bug fixes

This commit is contained in:
ceriel 1989-05-16 16:02:46 +00:00
parent f45eda8c23
commit 03d44703a2
2 changed files with 4 additions and 3 deletions

View file

@ -5,7 +5,7 @@
.sect .text .sect .text
.exg: .exg:
push di push di
mov sp,di mov di,sp
add di,4 add di,4
mov bx,di mov bx,di
add bx,cx add bx,cx
@ -14,6 +14,8 @@
mov ax,(bx) mov ax,(bx)
xchg ax,(di) xchg ax,(di)
mov (bx),ax mov (bx),ax
add di,2
add bx,2
loop 1b loop 1b
2: 2:
pop di pop di

View file

@ -10,10 +10,9 @@
jne .unknown jne .unknown
pop bx ! descriptor address pop bx ! descriptor address
pop ax ! index pop ax ! index
pop dx ! array base
sub ax,(bx) sub ax,(bx)
mul 4(bx) mul 4(bx)
mov bx,dx pop bx ! base address
add bx,ax add bx,ax
push cx push cx
ret ret