ack/mach/i86/libem/loi.s

39 lines
489 B
ArmAsm
Raw Permalink Normal View History

1987-01-08 10:13:48 +00:00
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
1985-02-07 15:33:13 +00:00
.define .loi
1989-01-18 10:51:57 +00:00
.define .los
1985-02-07 15:33:13 +00:00
! #bytes in cx
! address in bx
! save si/di. they might be register variables
1989-01-18 10:51:57 +00:00
.los:
mov dx,si
mov si,bx
1989-01-18 10:51:57 +00:00
pop bx
mov ax,cx
1985-02-07 15:33:13 +00:00
sar cx,1
jnb 1f
xorb ah,ah
lodsb
mov si,dx
1985-02-07 15:33:13 +00:00
push ax
jmp bx
1:
sub sp,ax
1989-01-18 10:51:57 +00:00
jmp 1f
.loi:
! only called with size > 4
mov dx,si
mov si,bx
pop bx
sub sp,cx
sar cx,1
1:
mov ax,di
1985-02-07 15:33:13 +00:00
mov di,sp
rep movs
mov si,dx
mov di,ax
1985-02-07 15:33:13 +00:00
jmp bx