News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Jwasm for DOS

Started by Gunther, June 10, 2015, 05:24:57 AM

Previous topic - Next topic

Gunther

I'm currently working on the compilation of Jwasm for DOS. There are 2 possible ways to go:

  • Using gcc for DOS (DJGPP).
  • Using the old Watcom tools.

Has anyone experiences with the Watcom tools (Open Watcom v. 1.8/1.9)? Any help and feedback is very welcome.

Gunther
You have to know the facts before you can distort them.

habran

If you have JWasm212s_140105 there is OWDOS16.mak
if not copy this one and name it "OWDOS16.mak"

# this makefile creates a DOS 16-bit real-mode version of JWasm (JWASMR.EXE).
# tools used:
# - Open Watcom v1.8/v1.9

name = JWasm

!ifndef WATCOM
WATCOM = \Watcom
!endif
!ifndef DEBUG
DEBUG=0
!endif

!if $(DEBUG)
OUTD=OWDOS16D
!else
OUTD=OWDOS16R
!endif

inc_dirs  = -IH -I$(WATCOM)\H

# 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

LINK = $(WATCOM)\binnt\wlink.exe

#cflags stuff
#########
extra_c_flags =
!if $(DEBUG)
!if $(TRMEM)
extra_c_flags += -od -d2 -DDEBUG_OUT -DTRMEM
!else
extra_c_flags += -od -d2 -DDEBUG_OUT
!endif
!else
extra_c_flags += -obmilrs -s -DNDEBUG
!endif

#########

!if $(DEBUG)
LOPTD = debug dwarf op symfile
!endif

lflagsd = $(LOPTD) sys dos op map=$^*, stack=0x8400

CC=$(WATCOM)\binnt\wcc -q -0 -w3 -zc -ml -bc -bt=dos $(inc_dirs) $(extra_c_flags) -fo$@ -DFASTMEM=0 -DFASTPASS=0 -DCOFF_SUPPORT=0 -DELF_SUPPORT=0 -DAMD64_SUPPORT=0 -DSSSE3SUPP=0 -DSSE4SUPP=0 -DOWFC_SUPPORT=0 -DDLLIMPORT=0 -DAVXSUPP=0 -DPE_SUPPORT=0 -DVMXSUPP=0 -DSVMSUPP=0 -DCVOSUPP=0 -DCOMDATSUPP=0 -DSTACKBASESUPP=0 -zt=12000

.c{$(OUTD)}.obj:
@$(CC) $<

proj_obj = &
!include owmod.inc

!if $(TRMEM)
proj_obj += $(OUTD)/trmem.obj
!endif

ALL: $(OUTD) $(OUTD)/$(name)r.exe

$(OUTD):
@if not exist $(OUTD) mkdir $(OUTD)

$(OUTD)/$(name)r.exe: $(OUTD)/$(name).lib $(OUTD)/main.obj
@set LIB=$(WATCOM)\Lib286;$(WATCOM)\Lib286\DOS
@$(LINK) $(lflagsd) file $(OUTD)/main.obj name $@ lib $(OUTD)/$(name).lib

$(OUTD)/$(name).lib: $(proj_obj)
@cd $(OUTD)
@wlib -q -n $(name).lib $(proj_obj:$(OUTD)/=+)
@cd ..

$(OUTD)/msgtext.obj: msgtext.c H/msgdef.h H/globals.h
@$(CC) msgtext.c

$(OUTD)/reswords.obj: reswords.c H/instruct.h H/special.h H/directve.h
@$(CC) reswords.c

######

clean: .SYMBOLIC
@if exist $(OUTD)\*.obj        erase $(OUTD)\*.obj
@if exist $(OUTD)\$(name)r.exe erase $(OUTD)\$(name)r.exe
@if exist $(OUTD)\$(name)r.map erase $(OUTD)\$(name)r.map
Cod-Father

FORTRANS

Hi Gunther,

   I have used Open Watcom FORTRAN for quite some time.  I
have used WASM and some of the tools at some point in time.
I found their FORTRAN to be a solid and versatile product.

Regards,

Steve N.

Gunther

Hi Habran,

Quote from: habran on June 10, 2015, 05:53:36 AM
If you have JWasm212s_140105 there is OWDOS16.mak
if not copy this one and name it "OWDOS16.mak"

I have it. The point is the Watcom tool chain (compiler, linker etc.)

Steve,

Quote from: FORTRANS on June 10, 2015, 05:55:24 AM
   I have used Open Watcom FORTRAN for quite some time.  I
have used WASM and some of the tools at some point in time.
I found their FORTRAN to be a solid and versatile product.

Is it free? Do you have a download link?

Gunther
You have to know the facts before you can distort them.

anta40

Hi Gunther,

Yes it's free.
Here's the link: http://openwatcom.org (oops website is down, due too maintenance  :redface:).

The development seems to be stagnant, though (last official release is 5 years ago).
Fortunately, some brave guys decided to mantained the project themselves.
http://sourceforge.net/projects/openwatcom/files/current-build/
https://github.com/open-watcom


Gunther

Hi anta40,

thank you for the links. I'll try to figure out the rest. Probably it will work with DJGPP. Watcom would be an additional option.

Gunther
You have to know the facts before you can distort them.

FORTRANS

Hi,

   Google shows a number of sites.  This one looked okay.

http://sourceforge.net/projects/openwatcom/

Similar to what anta40 showed.  It is free, though at one time you
could order a CD-ROM for a nominal price to support them.  Maybe
still can when their site comes back up.

Regards,

Steve N.

nidud

#7
deleted

Gunther

Hi nidud,

Quote from: nidud on June 10, 2015, 10:20:14 PM
Open Watcom is an excellent tool chain for building both DOS and Windows applications.

Good to know.

Quote from: nidud on June 10, 2015, 10:20:14 PM
However building from a DOS environment is a difficult task these days.

Yes, it is. But I think it's possible with Habran's new sources. I'll let you know what happens.

Gunther
You have to know the facts before you can distort them.

dedndave

i think JwAsm started out as an open watcom project   :P

Gunther

Dave,

Quote from: dedndave on June 11, 2015, 01:21:22 AM
i think JwAsm started out as an open watcom project   :P

yes, of course. That's what nidud did say in post #7:
Quote from: nidud on June 10, 2015, 10:20:14 PM
Open Watcom is an excellent tool chain for building both DOS and Windows applications. Most (if not all) tools build by Andreas is build using OW as default. JWASM, JWLINK, and JWLIB are also forks of OW's WASM, WLINK, and WLIB.

Gunther
You have to know the facts before you can distort them.