Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .MODEL SMALL
- .STACK 100
- .DATA
- M1 DB "ENTER STRING: $"
- M2 DB 10,13, "REVERSE STRING: $"
- ARR DB '?'
- .CODE
- JOY PROC
- MOV AX, @DATA
- MOV DS, AX
- LEA DX, M1
- MOV AH, 9
- INT 21H
- MOV SI, 0
- MOV AH, 1
- TOP:
- MOV ARR[SI], AL
- INT 21H
- CMP AL, 0DH
- JE PRINT
- INC SI
- JMP TOP
- PRINT:
- LEA DX, M2
- MOV AH, 9
- INT 21H
- TOOP:
- MOV DL, ARR[SI]
- MOV AH, 2
- INT 21H
- DEC SI
- CMP SI, 0
- JE EXIT
- JMP TOOP
- EXIT:
- MOV AH, 4CH
- INT 21H
- JOY ENDP
- END JOY
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement