wok diff linld/stuff/src/_BEG.ASM @ rev 24074
Add some current_version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jul 08 09:18:48 2021 +0000 (2021-07-08) |
parents | 06547d8cf241 |
children | ffa068512f60 |
line diff
1.1 --- a/linld/stuff/src/_BEG.ASM Mon Jul 05 15:05:16 2021 +0000 1.2 +++ b/linld/stuff/src/_BEG.ASM Thu Jul 08 09:18:48 2021 +0000 1.3 @@ -167,11 +167,11 @@ 1.4 p386 1.5 ifdef VCPI 1.6 mov edx,cs 1.7 - shl edx,4 ; edx for prepare_vcpi 1.8 + shl edx,4 ; edx for prepare_vcpi (edx[31-20]=0) 1.9 else 1.10 ifndef LARGE_ZIMAGE 1.11 mov edx,cs 1.12 - shl edx,4 ; edx for memcpy32 1.13 + shl edx,4 ; edx for memcpy32 (edx[31-20]=0) 1.14 endif 1.15 endif 1.16 ifndef LARGE_ZIMAGE 1.17 @@ -180,15 +180,15 @@ 1.18 endif 1.19 1.20 ; Check for vm 1.21 - smsw ax ;SMSW cannot be trapped! :-) 1.22 - and al,1 ;MSW_PE 1.23 + smsw bx ;SMSW cannot be trapped! :-) 1.24 + shr bx,1 ;MSW_PE 1.25 ; We're in vm 1.26 - jnz check_vcpi 1.27 + jnc check_vcpi 1.28 1.29 check_rm_paging: 1.30 ; It's a 386 in real mode, chk for paging (crazy but possible) 1.31 - mov eax,cr0 1.32 - inc eax ;CR0_PG to S 1.33 + mov ebx,cr0 1.34 + inc ebx ;CR0_PG to S 1.35 jns endcpu386 1.36 ifndef NO386 1.37 p8086 1.38 @@ -253,6 +253,11 @@ 1.39 pop dx 1.40 xor al,dl ; clear C 1.41 ifdef CPUTYPE 1.42 + ifndef VCPI 1.43 + ifdef LARGE_ZIMAGE 1.44 + cdq ; 386 and 486 are not 64 bits 1.45 + endif 1.46 + endif 1.47 cmp al,20h 1.48 mov ax,0400h 1.49 je is486