ack/mach/i86/libem/sti.s

33 lines
448 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 .sti
1989-01-18 10:51:57 +00:00
.define .sts
1985-02-07 15:33:13 +00:00
! #bytes in cx
! address in bx
! save di/si. they might be register variables
1989-01-18 10:51:57 +00:00
.sts:
mov dx,di ! save di
mov di,bx
1989-01-18 10:51:57 +00:00
pop bx
1985-02-07 15:33:13 +00:00
sar cx,1
jnb 1f
pop ax
stosb
mov di,dx
1985-02-07 15:33:13 +00:00
jmp bx
1989-01-18 10:51:57 +00:00
.sti:
! only called with count > 4
mov dx,di
mov di,bx
pop bx
sar cx,1
1985-02-07 15:33:13 +00:00
1:
1987-06-10 10:33:19 +00:00
mov ax,si
1985-02-07 15:33:13 +00:00
mov si,sp
rep movs
mov sp,si
mov di,dx
1987-06-10 10:33:19 +00:00
mov si,ax
1985-02-07 15:33:13 +00:00
jmp bx