.Making DOS Programs
Writing any code consists of
1) Writing the source code.
2) Compliing the source code into an intermediate Object file (this step is usually ture).
3) Linking Object files into an Executable. (EXE)
We can use either TASM/TLINK, which is great if you already have (or can find) a version of it.
Because it costs about $150.
Alternatively, there is NASM/ALINK. Find the lastest versions online. They're free AND Open Source.
I'll archive it here in case of nuclear holycost.
MASM (m|cr0 slop's) is the assembler which TASM strives to be compatable with.
If you can downoad it or find it with any of their C compiliers, then use it.
Here's a list of places to seek assembliers:
TASM - http://asmsource.8k.com/utilities.htm#dos
NASM - http://sourceforge.net/projects/nasm
SO WHAT'S THE DIFFERENCE between TASM and NASM?
Good question. My answer relates to coding for DOS (16-bit code)
The main differrence is when using Directives, which allow the programer a way to control how the code will be compiled and then formed into an executable.
An executable is NOT the machine code itself, but the way the machine code has been packaged.
This packaging consists of organizing sections (segments) of code and data into a file, and having information headers that coordinate those sections included in that file;
these files contain the loadable program and are are known as executables.
Files with an EXE extension are executables.
When the Operating System loads the program, it reads those headers, and uses that info to build the program's image in memory.
Once that is done, the cpu is directed to the first instruction of the program's code.
Syntax Differences:
Minor differences: acessing variables.
Exp. Moving variable into AX register:
TASM: mov ax, wordvar
NASM: mov ax, [wordvar]
Minor differences: acessing variable's offset address.
Exp. Getting variable's offset address into AX register:
TASM: mov ax, offset wordvar
NASM: mov ax, wordvar
So choose you compilier and let's talk about how to use it.
TASM
NASM