ack/mach/i86/libem/sti.s

27 lines
404 B
ArmAsm
Raw 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
! #bytes in cx
! address in bx
! save di/si. they might be register variables
1985-02-07 15:33:13 +00:00
.sti:
mov dx,di ! save di
pop ax ! return address
mov di,bx
mov bx,ax
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
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