Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org 100h
- push ourArr
- call OurProc
- EchoWait:
- mov ax, 0c08h ;like "readln;" in delphi
- int 21h
- test al,al
- jnz Skip
- mov ah, 08h
- int 21h
- Skip:
- ret
- ;===================================
- ourArr db 6, 1,2,3,4,5,6
- OurProc:
- push bp
- mov bp, sp
- push di
- push si
- xor cx, cx
- xor ax, ax
- mov di, [bp+4]
- mov cl, byte[di]
- inc di
- mov si, [bp+4]
- add si, cx
- .Cycle:
- mov ah, byte[di]
- xchg ah, byte[si]
- mov byte[di], ah
- inc di
- dec si
- cmp si, di
- jns .Cycle
- pop si
- pop di
- pop bp
- ret 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement