wok rev 20426

linld: fix xmm_driver
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Aug 13 00:46:30 2018 +0200 (2018-08-13)
parents 85dfc60c69ac
children f4bc280fe3c4
files linld/stuff/src/XMM.ASM linld/stuff/src/_BEG.ASM
line diff
     1.1 --- a/linld/stuff/src/XMM.ASM	Sun Aug 12 14:15:39 2018 +0200
     1.2 +++ b/linld/stuff/src/XMM.ASM	Mon Aug 13 00:46:30 2018 +0200
     1.3 @@ -48,8 +48,8 @@
     1.4  		ifndef	NO386
     1.5  		cmp	[dword si],0
     1.6  		else
     1.7 -		mov	ax,[word si]
     1.8 -		or	ax,[word si+2]
     1.9 +		mov	cx,[word si]
    1.10 +		or	cx,[word si+2]
    1.11  		endif
    1.12  		jne	@@gotit
    1.13  
    1.14 @@ -65,11 +65,10 @@
    1.15                  int     2fh
    1.16  @@err:
    1.17  		xchg	ax,cx			; restore cmd
    1.18 -		push	es
    1.19 -		push	bx
    1.20 -		pop	[dword si]
    1.21 +		mov	[si],bx
    1.22 +		mov	[si+2],es
    1.23  @@gotit:
    1.24 -		call	[dword si]
    1.25 +		call	[dword si]		; far ptr [si]
    1.26                  dec     ax			; Z=1=OK
    1.27  		pop	si
    1.28                  ret
     2.1 --- a/linld/stuff/src/_BEG.ASM	Sun Aug 12 14:15:39 2018 +0200
     2.2 +++ b/linld/stuff/src/_BEG.ASM	Mon Aug 13 00:46:30 2018 +0200
     2.3 @@ -23,10 +23,10 @@
     2.4  ;***************************************************************
     2.5  ; clear bss
     2.6  ;***************************************************************
     2.7 -		mov	bx,offset _bss_start
     2.8 +		mov	si,offset _bss_start
     2.9  clearbss:
    2.10 -		mov	[byte bx],0		; clear bss + heap + sp
    2.11 -		inc	bx
    2.12 +		mov	[byte si],0		; clear bss + heap + sp
    2.13 +		inc	si
    2.14  		jne	clearbss
    2.15                  cld
    2.16  
    2.17 @@ -93,18 +93,17 @@
    2.18  label   check_vcpi near
    2.19                  push    ds
    2.20  ; Check whether it is safe to call 67h (we trust only known EMM managers)
    2.21 -		xor	bx,bx
    2.22 -                push    bx
    2.23 +                push    si
    2.24                  pop     ds
    2.25                  mov     ds,[word 67h*4+2]
    2.26 -                cmp     [dword bx+10+4],'0XXX'
    2.27 +                cmp     [dword si+10+4],'0XXX'
    2.28                  jne     skip
    2.29  		;mov	eax,'XMME'
    2.30 -		;xor	eax,[dword bx+10]
    2.31 +		;xor	eax,[dword si+10]
    2.32          ; QMME also works (as told by <J.S.Peatfield@damtp.cambridge.ac.uk>)
    2.33  		;shl	eax,8
    2.34  		mov	ax,'ME'
    2.35 -		xor	ax,[word bx+10]
    2.36 +		xor	ax,[word si+10]
    2.37  skip:
    2.38                  pop     ds
    2.39                  jne     no_vcpi