Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org 100h
- use16
- Start:
- push array
- push length
- call Procee
- ; res in address 'array'
- ret
- Procee:
- push BP
- mov BP, SP
- mov DI, word[BP + 6]
- mov AX, word[BP + 4]
- mov SI, DI
- add SI, AX
- dec SI
- mov BH, 2
- div BH
- xor CX, CX
- mov CL, AL
- zaLoop:
- mov AL, byte[DI]
- mov AH, byte[SI]
- mov byte[DI], AH
- mov byte[SI], AL
- inc DI
- dec SI
- loop zaLoop
- pop BP
- ret 4
- array db 4, 9, 0, 5, 2, 6, 3
- length = $ - array
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement