wok-6.x diff linld/stuff/src/_BEG.ASM @ rev 24019

syslinux: fix build
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Feb 28 16:32:57 2021 +0000 (2021-02-28)
parents bc4b94310a29
children 217c02cbbe8d
line diff
     1.1 --- a/linld/stuff/src/_BEG.ASM	Thu Feb 18 08:56:43 2021 +0000
     1.2 +++ b/linld/stuff/src/_BEG.ASM	Sun Feb 28 16:32:57 2021 +0000
     1.3 @@ -6,6 +6,9 @@
     1.4                  %crefref
     1.5                  %noincl
     1.6                  %nomacs
     1.7 +
     1.8 +	include	"common.inc"
     1.9 +
    1.10                  p8086
    1.11  
    1.12          group   DGROUP  _TEXT,_DATA,_BSS
    1.13 @@ -18,10 +21,12 @@
    1.14          ;global  _data_start:byte
    1.15          label   _data_start byte
    1.16  		ifndef	NO386
    1.17 -msg_badcpu      db      "I need 386+ CPU in real mode w/o paging"
    1.18 +msg_badcpu      db      "I need a 386+ in real mode w/o paging"
    1.19 +		ifdef	VCPI
    1.20  		db	" or "
    1.21  msg_badmapping	db	"under VCPI 4.0+ manager with low 640k 1:1 mapping"
    1.22          global  _vcpi:byte
    1.23 +		endif
    1.24  _vcpi		db	0
    1.25  		endif
    1.26  
    1.27 @@ -36,13 +41,15 @@
    1.28          ;global  _bss_start:byte
    1.29          label   _bss_start byte
    1.30          global  stktop:byte
    1.31 -		ifdef	NO386
    1.32          global  _cpu386:byte
    1.33  _cpu386		db	?
    1.34 +		ifdef	CPU64
    1.35  		org	$-1
    1.36  		endif
    1.37 +		ifdef	CPU64
    1.38          global  _cpu_features:dword
    1.39  _cpu_features	dd	?
    1.40 +		endif
    1.41          ends    _BSS
    1.42  
    1.43          segment _TEXT byte public use16 'CODE'
    1.44 @@ -118,6 +125,7 @@
    1.45  ;***************************************************************
    1.46  label   check_vcpi near
    1.47                  p386
    1.48 +		ifdef	VCPI
    1.49  ; Check whether it is safe to call 67h
    1.50  		xor	eax,eax
    1.51                  mov     es,ax
    1.52 @@ -142,8 +150,10 @@
    1.53  		extrn	_vcpi:byte
    1.54  		dec	[byte _vcpi]
    1.55  		endif
    1.56 +		endif
    1.57  no_vcpi:
    1.58  endcpu386:
    1.59 +		ifdef	CPU64
    1.60  		pushfd
    1.61  		pop	dx
    1.62  		pop	ax
    1.63 @@ -168,6 +178,9 @@
    1.64  		mov	[_cpu_features],edx
    1.65  @@no_cpuid:
    1.66  		endif
    1.67 +		else
    1.68 +		dec	[_cpu386]
    1.69 +		endif
    1.70  endcpu86:
    1.71                  p8086
    1.72  
    1.73 @@ -266,6 +279,9 @@
    1.74  		ret
    1.75  
    1.76          endp    _topseg
    1.77 +		else
    1.78 +@ret:
    1.79 +		ret
    1.80  		endif
    1.81  
    1.82  ;***************************************************************