wok rev 19873
linld/tazboot: fix 286 case
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Mar 31 09:17:01 2017 +0200 (2017-03-31) |
parents | f01ec3e34a08 |
children | 766a40e6c5e0 |
files | linld/stuff/src/CRTL.ASM linld/stuff/src/_BEG.ASM |
line diff
1.1 --- a/linld/stuff/src/CRTL.ASM Thu Mar 30 18:01:42 2017 +0200 1.2 +++ b/linld/stuff/src/CRTL.ASM Fri Mar 31 09:17:01 2017 +0200 1.3 @@ -1340,13 +1340,14 @@ 1.4 proc _progname near 1.5 1.6 push si di es 1.7 + xor di,di 1.8 mov ah,30h 1.9 int 21h 1.10 cmp al,3 1.11 - mov ax,0 1.12 + xchg ax,di 1.13 jb @@skip 1.14 - xor di,di 1.15 - mov es,[cs:2Ch] 1.16 + ;mov es,[cs:2Ch] 1.17 + mov es,[2Ch] 1.18 mov cx,-1 1.19 mov ax,di 1.20 @@loop:
2.1 --- a/linld/stuff/src/_BEG.ASM Thu Mar 30 18:01:42 2017 +0200 2.2 +++ b/linld/stuff/src/_BEG.ASM Fri Mar 31 09:17:01 2017 +0200 2.3 @@ -35,14 +35,31 @@ 2.4 ;*************************************************************** 2.5 2.6 ; Check for oldies 2.7 + ifndef EXTRA 2.8 push sp 2.9 pop ax 2.10 + sub ax,sp 2.11 + ifndef NO386 2.12 mov bx,offset msg_badcpu 2.13 - sub ax,sp 2.14 - ifndef NO386 2.15 jnz no_vcpi ;it is a 86/186 not a 286+ 2.16 + else 2.17 + jnz endcpu ;it is a 86/186 not a 286+ 2.18 + endif 2.19 else 2.20 - jnz endcpu 2.21 + pushf 2.22 + mov bh, 0F0h 2.23 + push bx ; < 286 : flags[12..15] are forced 1 2.24 + popf ; = 286 : flags[12..15] are forced 0 2.25 + pushf ; > 286 : only flags[15] is forced 0 2.26 + pop dx 2.27 + popf 2.28 + add dh,bh ; NS=386+, NC=286 2.29 + ifndef NO386 2.30 + mov bx,offset msg_badcpu 2.31 + js no_vcpi ;it is a 386+ 2.32 + else 2.33 + js endcpu ;it is a 386+ 2.34 + endif 2.35 endif 2.36 p386 2.37 ifdef EXTRA 2.38 @@ -233,7 +250,9 @@ 2.39 segment _DATA byte public use16 'DATA' 2.40 global _data_start:byte 2.41 label _data_start byte 2.42 + ifndef NO386 2.43 msg_badcpu db "I need 386+ CPU in real mode or under VCPI manager" 2.44 + endif 2.45 global _vcpi:byte 2.46 _vcpi db 0 2.47 msg_badmapping db "VCPI: low 640k: need 1:1 mapping",0