Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; example 11.1
- ;reverse copy string
- .stack 100h
- .model small
- .data
- str1 db 'HELLO'
- str2 db 5 dup(?)
- .code
- main proc
- mov ax, @data
- mov ds,ax
- mov es,ax
- lea si, str1+4
- lea di, str2
- std
- mov cx, 5
- move:
- movsb
- add di,2
- loop move
- mov cx, 5
- xor si, si
- lop2:
- mov dl,str2[si]
- mov ah,2
- int 21h
- inc si
- loop lop2
- main endp
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement