Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //reverse
- data segment
- string db "hello world$"
- reverse db ?
- data ends
- code segment
- assume ds:data,cs:code
- start: mov ax,ds
- mov ds,ax
- mov cl,00h
- lea si,string
- up: mov bl,[si]
- cmp bl,'$'
- jz down
- inc cl
- inc si
- jmp up
- down: dec si
- lea di,reverse
- up1: mov al,[si]
- mov [di],al
- dec si
- inc di
- dec cl
- jnz up1
- int 03h
- code ends
- end start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement