ack/mach/i86/libem/lar2.s

36 lines
498 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 .lar2
.lar2:
! bx, descriptor address
1985-02-07 15:33:13 +00:00
! ax, index
pop cx
pop dx ! base address
push cx
push si
mov si,dx
sub ax,(bx)
mov cx,4(bx)
1985-02-07 15:33:13 +00:00
imul cx
add si,ax
sar cx,1
jnb 1f
xorb ah,ah
lodsb
pop si
pop bx
1985-02-07 15:33:13 +00:00
push ax
jmp bx
1:
pop dx ! saved si
mov ax,4(bx)
pop bx ! return address
sub sp,ax
mov ax,di ! save di
1985-02-07 15:33:13 +00:00
mov di,sp
rep movs
mov di,ax
mov si,dx
1985-02-07 15:33:13 +00:00
jmp bx