As per a suggestion from Arkady: use CPU to enforce 8086 etc instructions.

git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@879 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2004-04-13 20:41:15 +00:00
parent 74970d953b
commit 6f6ceadebc
6 changed files with 17 additions and 10 deletions

View File

@ -128,7 +128,7 @@ irp_hi equ 26
; ;
%IFNDEF I386 %IF XCPU < 386
; no need to save/restore anything ; no need to save/restore anything
; error 1 2 3 ; error 1 2 3

View File

@ -344,7 +344,7 @@ int21_exit_nodec:
pop bp ; get back user stack pop bp ; get back user stack
pop si pop si
%IFDEF I386 %if XCPU >= 386
%ifdef WATCOM %ifdef WATCOM
sub bp, 4 ; for fs and gs only sub bp, 4 ; for fs and gs only
%else %else

View File

@ -132,7 +132,7 @@ IntDosCal:
cld cld
%IFDEF I386 %if XCPU >= 386
%ifdef WATCOM %ifdef WATCOM
mov si,fs mov si,fs
mov di,gs mov di,gs
@ -145,7 +145,7 @@ IntDosCal:
extern _int2F_12_handler extern _int2F_12_handler
call _int2F_12_handler call _int2F_12_handler
%IFDEF I386 %if XCPU >= 386
%ifdef WATCOM %ifdef WATCOM
mov fs,si mov fs,si
mov gs,di mov gs,di

View File

@ -324,7 +324,7 @@ _LoL_nbuffers dw 1 ; 003F number of buffers
global _BootDrive global _BootDrive
_BootDrive db 1 ; 0043 drive we booted from _BootDrive db 1 ; 0043 drive we booted from
%IFNDEF I386 %IF XCPU < 386
db 0 ; 0044 cpu type (1 if >=386) db 0 ; 0044 cpu type (1 if >=386)
%ELSE %ELSE
db 1 ; 0044 cpu type (1 if >=386) db 1 ; 0044 cpu type (1 if >=386)

View File

@ -27,6 +27,17 @@
; $Header$ ; $Header$
; ;
; CPU specification -- putting it here because all .asm files include this
; file __NASM_VER__ was introduced in NASM after CPU -- ver 0.98 doesn't
; understand it
%ifdef __NASM_VER__
%if XCPU == 86
CPU 8086
%else
CPU XCPU
%endif
%endif
group PGROUP PSP group PGROUP PSP
group LGROUP _LOWTEXT _IO_TEXT _IO_FIXED_DATA _TEXT group LGROUP _LOWTEXT _IO_TEXT _IO_FIXED_DATA _TEXT
group DGROUP _FIXED_DATA _BSS _DATA _DATAEND CONST CONST2 DCONST DYN_DATA group DGROUP _FIXED_DATA _BSS _DATA _DATAEND CONST CONST2 DCONST DYN_DATA

View File

@ -20,11 +20,7 @@ NASMFLAGS=$(NASMFLAGS) -DWITHFAT32
!endif !endif
NASM=$(XNASM) NASM=$(XNASM)
!if $(XCPU) == 386 NASMFLAGS = $(NASMFLAGS) -i../hdr/ -DXCPU=$(XCPU)
NASMFLAGS = $(NASMFLAGS) -i../hdr/ -DI386
!else
NASMFLAGS = $(NASMFLAGS) -i../hdr/
!endif
LINK=$(XLINK) LINK=$(XLINK)