8000 minix/lib/i86/em/em_exg.s at R3.1.2 · devinblood/minix · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
executable file
·
21 lines (20 loc) · 200 Bytes

em_exg.s

File metadata and controls

executable file
·
21 lines (20 loc) · 200 Bytes
.define .exg
! #bytes in cx
.text
.exg:
push di
mov sp,di
add di,#4
mov bx,di
add bx,cx
sar cx,#1
1:
mov ax,(bx)
xchg ax,(di)
mov (bx),ax
add di,#2
add bx,#2
loop 1b
2:
pop di
ret
0