HomeComputer programmingAssembly: Constant jmp Statement (MASM/TASM)

Assembly: Constant jmp Statement (MASM/TASM)

The following tech recipe covers how to use jmp.


jmp, used as a jump statement, jumps from one place to another.

Example:

.MODEL SMALL
.STACK 100H
.DATA
result_msg DB 'true inside if statement',0
test_msg DB 'no jmp',0

.486
.CODE
INCLUDE io.mac

main PROC
.STARTUP

start_go:
putStr test_msg
jmp done
mov Ax,0
putStr test_msg
cmp Ax,0
jne done

putStr test_msg
putStr test_msg

done:
putStr test_msg
.EXIT

main ENDP
END main

All of the code in this program is passed over by this jmp command. Try moving it to different places to prove that it is a static jump, and all code between the jump and the target (in this case, the tag done) is skipped.

Questions/Comments: [email protected]
-William. § (marvin_gohan)

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -

Most Popular

Recent Comments

Cleveland Furia on How to Clear Google Activity
Sid Wohlfarth on How to Clear Google Activity
Riley Magsayo on How to Clear Google Activity
สมัครรับเครดิตฟรี ทันที on How to improve Remote Desktop Protocol Performance
Neal Wangstad on How to Clear Google Activity
Slavcho Andov on How to install Ubuntu
Slavcho Andov on How to fix bad sectors
Sheraz Ali on How to Backup Android