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
|
1989-10-10 11:38:18 +00:00
|
|
|
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:
|
1989-10-10 11:38:18 +00:00
|
|
|
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
|