# HG changeset patch # User Pascal Bellard # Date 1534113990 -7200 # Node ID c0625ff5d49b85a0be8ec61c16b898e98bf0bc42 # Parent 85dfc60c69aceb15df3e52e850f245da8a9e70cb linld: fix xmm_driver diff -r 85dfc60c69ac -r c0625ff5d49b linld/stuff/src/XMM.ASM --- a/linld/stuff/src/XMM.ASM Sun Aug 12 14:15:39 2018 +0200 +++ b/linld/stuff/src/XMM.ASM Mon Aug 13 00:46:30 2018 +0200 @@ -48,8 +48,8 @@ ifndef NO386 cmp [dword si],0 else - mov ax,[word si] - or ax,[word si+2] + mov cx,[word si] + or cx,[word si+2] endif jne @@gotit @@ -65,11 +65,10 @@ int 2fh @@err: xchg ax,cx ; restore cmd - push es - push bx - pop [dword si] + mov [si],bx + mov [si+2],es @@gotit: - call [dword si] + call [dword si] ; far ptr [si] dec ax ; Z=1=OK pop si ret diff -r 85dfc60c69ac -r c0625ff5d49b linld/stuff/src/_BEG.ASM --- a/linld/stuff/src/_BEG.ASM Sun Aug 12 14:15:39 2018 +0200 +++ b/linld/stuff/src/_BEG.ASM Mon Aug 13 00:46:30 2018 +0200 @@ -23,10 +23,10 @@ ;*************************************************************** ; clear bss ;*************************************************************** - mov bx,offset _bss_start + mov si,offset _bss_start clearbss: - mov [byte bx],0 ; clear bss + heap + sp - inc bx + mov [byte si],0 ; clear bss + heap + sp + inc si jne clearbss cld @@ -93,18 +93,17 @@ label check_vcpi near push ds ; Check whether it is safe to call 67h (we trust only known EMM managers) - xor bx,bx - push bx + push si pop ds mov ds,[word 67h*4+2] - cmp [dword bx+10+4],'0XXX' + cmp [dword si+10+4],'0XXX' jne skip ;mov eax,'XMME' - ;xor eax,[dword bx+10] + ;xor eax,[dword si+10] ; QMME also works (as told by ) ;shl eax,8 mov ax,'ME' - xor ax,[word bx+10] + xor ax,[word si+10] skip: pop ds jne no_vcpi