The almost modern way to assemble 16bit DOS EXE files


It is still possible to easily compile 16bit DOS programs in this modern world on 64bit Windows.

What you will need:
1. Open Watcom
2. DOSBox

Save hello.asm in C:\W\WATCOM\

.model small
.stack
.data
message   db "Hello Open Watcom", "$"

.code

main   proc
   mov   ax,seg message
   mov   ds,ax

   mov   ah,09
   lea   dx,message
   int   21h

   mov   ax,4c00h
   int   21h
main   endp
end main

Insall open Watcom in the folder C:\W\WATCOM\ because its not good to give DOSBox full access to C: drive.

In DOSBox

mount c c:\W\
C:
SET PATH=C:\WATCOM\BINW;%PATH%
SET INCLUDE=C:\WATCOM\H
SET WATCOM=C:\WATCOM
SET EDPATH=C:\WATCOM\EDDAT
SET WIPFC=C:\WATCOM\WIPFC

wasm hello.asm -i="C:\WATCOM/h" -ml -d1 -w4 -e25 -zq
wlink name hello d all sys dos op m op maxe=25 op q op symf FIL hello.obj
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s