ack/mach/i86/libem/exg.s

21 lines
231 B
ArmAsm
Raw Normal View History

1987-01-08 10:13:48 +00:00
.sect .text; .sect .rom; .sect .data; .sect .bss
1985-02-07 15:33:13 +00:00
.define .exg
! #bytes in cx
1987-01-08 10:13:48 +00:00
.sect .text
1985-02-07 15:33:13 +00:00
.exg:
push di
mov sp,di
add di,4
mov bx,di
add bx,cx
1985-02-07 15:33:13 +00:00
sar cx,1
1:
mov ax,(bx)
xchg ax,(di)
mov (bx),ax
loop 1b
2:
pop di
ret