# HG changeset patch # User Pascal Bellard # Date 1490944621 -7200 # Node ID c9c88c0a2ae575d6d1d49130b3ccabbbdf38af2f # Parent f01ec3e34a08e2a551560f26ed7a5edcab7bcd3c linld/tazboot: fix 286 case diff -r f01ec3e34a08 -r c9c88c0a2ae5 linld/stuff/src/CRTL.ASM --- a/linld/stuff/src/CRTL.ASM Thu Mar 30 18:01:42 2017 +0200 +++ b/linld/stuff/src/CRTL.ASM Fri Mar 31 09:17:01 2017 +0200 @@ -1340,13 +1340,14 @@ proc _progname near push si di es + xor di,di mov ah,30h int 21h cmp al,3 - mov ax,0 + xchg ax,di jb @@skip - xor di,di - mov es,[cs:2Ch] + ;mov es,[cs:2Ch] + mov es,[2Ch] mov cx,-1 mov ax,di @@loop: diff -r f01ec3e34a08 -r c9c88c0a2ae5 linld/stuff/src/_BEG.ASM --- a/linld/stuff/src/_BEG.ASM Thu Mar 30 18:01:42 2017 +0200 +++ b/linld/stuff/src/_BEG.ASM Fri Mar 31 09:17:01 2017 +0200 @@ -35,14 +35,31 @@ ;*************************************************************** ; Check for oldies + ifndef EXTRA push sp pop ax + sub ax,sp + ifndef NO386 mov bx,offset msg_badcpu - sub ax,sp - ifndef NO386 jnz no_vcpi ;it is a 86/186 not a 286+ + else + jnz endcpu ;it is a 86/186 not a 286+ + endif else - jnz endcpu + pushf + mov bh, 0F0h + push bx ; < 286 : flags[12..15] are forced 1 + popf ; = 286 : flags[12..15] are forced 0 + pushf ; > 286 : only flags[15] is forced 0 + pop dx + popf + add dh,bh ; NS=386+, NC=286 + ifndef NO386 + mov bx,offset msg_badcpu + js no_vcpi ;it is a 386+ + else + js endcpu ;it is a 386+ + endif endif p386 ifdef EXTRA @@ -233,7 +250,9 @@ segment _DATA byte public use16 'DATA' global _data_start:byte label _data_start byte + ifndef NO386 msg_badcpu db "I need 386+ CPU in real mode or under VCPI manager" + endif global _vcpi:byte _vcpi db 0 msg_badmapping db "VCPI: low 640k: need 1:1 mapping",0