Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; SIMPLE LOOP
- .STACK 100H
- .DATA
- MSG1 DB "A$"
- ;MSG2 DB "PASS$"
- ;MSG3 DB "FAIL!"
- i DB ?
- .CODE
- PROC MAIN
- MOV DX, @DATA
- MOV DS, DX
- ;loop limit/initialization
- MOV i,0
- ;condition
- CONDITON_CHECK:
- CMP i,10
- JGE EXIT
- JMP PRINTA
- PRINTA:
- MOV AH,9
- LEA DX,MSG1
- INT 21H
- ;INCREMENT
- inc i ; adding i, 1
- JMP CONDITON_CHECK
- EXIT:
- MOV AH,4CH
- INT 21H
- ENDP MAIN
- END MAIN
- RET
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement