ack/mach/i386/libem/lar4.s

38 lines
571 B
ArmAsm
Raw Normal View History

1989-01-19 16:43:32 +00:00
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
.define .lar4
.lar4:
! ebx, descriptor address
! eax, index
sub eax,(ebx)
mov ecx,8(ebx)
imul ecx
pop ebx
pop edx ! base address
1989-01-19 16:43:32 +00:00
add edx,eax
sar ecx,1
jnb 1f
xor eax,eax
movb al,(edx)
push eax
jmp ebx
1:
sar ecx,1
jnb 1f
xor eax,eax
o16 mov ax,(edx)
push eax
jmp ebx
1:
xchg edx,esi ! saved esi
mov eax,ecx
sal eax,2
1989-01-19 16:43:32 +00:00
sub esp,eax
mov eax,edi ! save edi
mov edi,esp
rep movs
mov edi,eax
mov esi,edx
jmp ebx