The MASM Forum

Projects => Rarely Used Projects => Archival JWASM postings => Topic started by: Gunther on June 10, 2015, 05:24:57 AM

Title: Jwasm for DOS
Post by: Gunther on June 10, 2015, 05:24:57 AM
I'm currently working on the compilation of Jwasm for DOS. There are 2 possible ways to go:

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

Gunther
Title: Re: Jwasm for DOS
Post by: 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"
Code: [Select]
# 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
Title: Re: Jwasm for DOS
Post by: FORTRANS on June 10, 2015, 05:55:24 AM
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.
Title: Re: Jwasm for DOS
Post by: Gunther on June 10, 2015, 04:25:02 PM
Hi Habran,

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,

   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
Title: Re: Jwasm for DOS
Post by: anta40 on June 10, 2015, 05:02:42 PM
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

Title: Re: Jwasm for DOS
Post by: Gunther on June 10, 2015, 05:13:53 PM
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
Title: Re: Jwasm for DOS
Post by: FORTRANS on June 10, 2015, 10:11:03 PM
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.
Title: Re: Jwasm for DOS
Post by: nidud on June 10, 2015, 10:20:14 PM
Hi Gunther,

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.

However building from a DOS environment is a difficult task these days. Not sure if it’s still possible to build the DOS version of JWASM from existing source so you may look for an older version. In any case I think you need OW to build it.

There are some good 32-bit tools to build DOS applications. Building from XP allows you to use both 16-bit and 32-bit tools, so that seems the most practical way.
Title: Re: Jwasm for DOS
Post by: Gunther on June 11, 2015, 12:38:32 AM
Hi nidud,

Open Watcom is an excellent tool chain for building both DOS and Windows applications.

Good to know.

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
Title: Re: Jwasm for DOS
Post by: dedndave on June 11, 2015, 01:21:22 AM
i think JwAsm started out as an open watcom project   :P
Title: Re: Jwasm for DOS
Post by: Gunther on June 11, 2015, 03:29:56 AM
Dave,

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

yes, of course. That's what nidud did say in post #7:
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