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:
|
1987-06-09 10:22:50 +00:00
|
|
|
! bx, descriptor address
|
1985-02-07 15:33:13 +00:00
|
|
|
! ax, index
|
1987-06-09 10:22:50 +00:00
|
|
|
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
|
1987-06-09 10:22:50 +00:00
|
|
|
pop si
|
|
|
|
pop bx
|
1985-02-07 15:33:13 +00:00
|
|
|
push ax
|
|
|
|
jmp bx
|
|
|
|
1:
|
1987-06-09 10:22:50 +00:00
|
|
|
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
|
1987-06-09 10:22:50 +00:00
|
|
|
mov di,ax
|
|
|
|
mov si,dx
|
1985-02-07 15:33:13 +00:00
|
|
|
jmp bx
|