wok rev 19876
linld: fix hook_int15_88
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Mar 31 16:58:50 2017 +0200 (2017-03-31) |
parents | 8fab00f1f6be |
children | 6c622282f662 |
files | linld/stuff/src/MEMTOP.ASM linld/stuff/src/XMM.ASM |
line diff
1.1 --- a/linld/stuff/src/MEMTOP.ASM Fri Mar 31 12:51:11 2017 +0200 1.2 +++ b/linld/stuff/src/MEMTOP.ASM Fri Mar 31 16:58:50 2017 +0200 1.3 @@ -173,38 +173,44 @@ 1.4 1.5 ifndef xmm_hook 1.6 mov ax,4300h 1.7 - ifdef NO386 1.8 cwd 1.9 - endif 1.10 + mov es,dx 1.11 int 2fh 1.12 cmp al,80h ; 80h = XMS driver installed 1.13 je @@skip 1.14 endif 1.15 ifndef NO386 1.16 + ifdef xmm_hook 1.17 push 0 1.18 pop es 1.19 - mov bx,15*4 1.20 - mov eax,[bx] 1.21 + endif 1.22 + push cs 1.23 + push offset int15_88 1.24 + pop eax 1.25 + xchg eax,[es:15*4] 1.26 mov [saved15],eax 1.27 else 1.28 - mov es,dx 1.29 - mov bx,15*4 1.30 - mov ax,[bx] 1.31 + ifdef xmm_hook 1.32 + xor ax,ax 1.33 + mov es,ax 1.34 + endif 1.35 + mov ax,offset int15_88 1.36 + xchg ax,[es:15*4] 1.37 mov [word saved15],ax 1.38 - mov ax,[bx+2] 1.39 + mov ax,cs 1.40 + xchg ax,[es:15*4+2] 1.41 mov [word saved15+2],ax 1.42 endif 1.43 - mov [word bx],offset int15_88 1.44 - mov [bx+2],cs 1.45 @@skip: 1.46 ret 1.47 int15_88: 1.48 cmp ah,88h 1.49 je @@do88 1.50 +@@jmp_saved15: 1.51 jmp [saved15] 1.52 @@do88: 1.53 pushf 1.54 - call [saved15] 1.55 + call @@jmp_saved15 1.56 test ax,ax 1.57 jnz @@iret 1.58
2.1 --- a/linld/stuff/src/XMM.ASM Fri Mar 31 12:51:11 2017 +0200 2.2 +++ b/linld/stuff/src/XMM.ASM Fri Mar 31 16:58:50 2017 +0200 2.3 @@ -43,11 +43,13 @@ 2.4 global xmm_driver:near 2.5 proc xmm_driver near 2.6 2.7 + push si 2.8 + mov si,offset xmm_handler 2.9 ifndef NO386 2.10 - cmp [xmm_handler],0 2.11 + cmp [si],0 2.12 else 2.13 - mov ax,[word xmm_handler] 2.14 - or ax,[word xmm_handler+2] 2.15 + mov ax,[word si] 2.16 + or ax,[word si+2] 2.17 endif 2.18 jne @@gotit 2.19 2.20 @@ -65,9 +67,10 @@ 2.21 xchg ax,cx ; restore cmd 2.22 push es 2.23 push bx 2.24 - pop [xmm_handler] 2.25 + pop [dword si] 2.26 @@gotit: 2.27 - call [xmm_handler] 2.28 + call [dword si] 2.29 + pop si 2.30 ret 2.31 xmm_fail: 2.32 xor ax,ax