-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed invoke dir: if cpu was 8086 and constants were to be pushed, th…
…e values might have been wrong
- Loading branch information
1 parent
eb83cf3
commit a14cc13
Showing
11 changed files
with
224 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
|
||
# this makefile in OW WMake style creates JWasmd.EXE (DOS32). | ||
# unlike the DOS version created with OWWin32.mak, which uses | ||
# a statically linked Win32 emulation layer, this creates | ||
# a DOS version that uses the native OW DOS32 support. Besides | ||
# a noticeable size reduction there isn't much gained, though. | ||
# Tools used: | ||
# - Open Watcom v2.0 | ||
# - jwlink ( OW's wlink might also be used ) | ||
# - HXDev ( for modules cstrtdhr.obj and loadpe.bin ) | ||
# | ||
# "WMake debug=1" - creates a debug version. | ||
# | ||
# Note that OW 1.9 has severe bugs concerning its LFN support! | ||
|
||
name = JWasm | ||
|
||
# Open Watcom root directory | ||
!ifndef WATCOM | ||
WATCOM = \ow20 | ||
!endif | ||
# HXDIR must contain the HX root directory | ||
!ifndef HXDIR | ||
HXDIR = \HX | ||
!endif | ||
|
||
NOGBL = 1 | ||
|
||
!ifndef DEBUG | ||
DEBUG=0 | ||
!endif | ||
!ifndef DJGPP | ||
DJGPP=1 | ||
!endif | ||
|
||
# to track memory leaks, the Open Watcom TRMEM module can be included. | ||
# it's useful only if FASTMEM=0 is set, though, otherwise most allocs | ||
# won't use the C heap. | ||
!ifndef TRMEM | ||
TRMEM=0 | ||
!endif | ||
|
||
!ifndef OUTD | ||
!if $(DEBUG) | ||
OUTD=Build\OWDOS32D | ||
!else | ||
OUTD=Build\OWDOS32R | ||
!endif | ||
!endif | ||
|
||
inc_dirs = -Isrc\H -I$(WATCOM)\H | ||
c_flags = -q -bc -bt=dos -3r -fpi87 -wcd=115 -D__WATCOM_LFN__ | ||
|
||
LINK = jwlink.exe | ||
|
||
#cflags stuff | ||
######### | ||
extra_c_flags = | ||
!if $(DEBUG) | ||
extra_c_flags += -od -d2 -w3 -hc -DDEBUG_OUT | ||
!else | ||
#extra_c_flags += -obmilrt -s -DNDEBUG | ||
extra_c_flags += -oxa -s -DNDEBUG | ||
!endif | ||
|
||
!if $(TRMEM) | ||
extra_c_flags += -of -DTRMEM -DFASTMEM=0 | ||
!endif | ||
!if !$(DJGPP) | ||
extra_c_flags += -DDJGPP_SUPPORT=0 | ||
!endif | ||
######### | ||
|
||
!if $(DEBUG) | ||
LOPTD = debug c op cvp, symfile | ||
!else | ||
LOPTD = | ||
!endif | ||
|
||
CC=$(WATCOM)\binnt\wcc386 $(c_flags) $(inc_dirs) $(extra_c_flags) -fo$@ | ||
LIB=$(WATCOM)\binnt\wlib | ||
|
||
{src}.c{$(OUTD)}.obj: | ||
$(CC) $< | ||
|
||
proj_obj = & | ||
!include owmod.inc | ||
|
||
!if $(TRMEM) | ||
proj_obj += $(OUTD)/trmem.obj | ||
!endif | ||
|
||
TARGET1=$(OUTD)/$(name)d.exe | ||
|
||
ALL: $(OUTD) $(TARGET1) | ||
|
||
$(OUTD): | ||
@if not exist $(OUTD) mkdir $(OUTD) | ||
|
||
$(OUTD)/$(name)d.exe: $(OUTD)/main.obj $(proj_obj) | ||
$(LINK) @<< | ||
$(LOPTD) | ||
format windows pe hx runtime console | ||
file { $(OUTD)/main.obj $(proj_obj) } | ||
name $@ | ||
Libpath $(WATCOM)\lib386\dos;$(WATCOM)\lib386 | ||
Libfile cstrtdhr.obj, inirmlfn.obj | ||
op quiet, stack=0x10000, heapsize=0x1000, map=$^*, stub=loadpero.bin | ||
disable 171 | ||
!ifndef NOGBL | ||
sort global | ||
!endif | ||
op statics | ||
!ifndef WLINK | ||
segment CONST readonly | ||
segment CONST2 readonly | ||
!endif | ||
<< | ||
|
||
$(OUTD)/msgtext.obj: src/msgtext.c src/H/msgdef.h src/H/globals.h | ||
$(CC) src\msgtext.c | ||
|
||
$(OUTD)/reswords.obj: src/reswords.c src/H/instruct.h src/H/special.h src/H/directve.h src/H/opndcls.h src/H/instravx.h | ||
$(CC) src\reswords.c | ||
|
||
###### | ||
|
||
clean: .SYMBOLIC | ||
@if exist $(OUTD)\$(name).exe erase $(OUTD)\$(name).exe | ||
@if exist $(OUTD)\$(name).map erase $(OUTD)\$(name).map | ||
@if exist $(OUTD)\*.obj erase $(OUTD)\*.obj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a14cc13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think something is off there: proc.c(1087)
seg_ofssize
is not defined by PROC sonewofssize
should probably be set toModuleInfo.Ofssize
.a14cc13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right - although using ModuleInfo.Ofssize almost certainly would also be wrong. My change is:
a14cc13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ended up doing the following:
CreateProc():