wok diff linld/stuff/src/MEMTOP.ASM @ 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 | 76087975885f |
children | b06deec67841 |
line diff
1.1 --- a/linld/stuff/src/MEMTOP.ASM Fri Jan 20 09:55:25 2017 +0100 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