Using the 8088 Assembler
Installing the Assembler
If you don't already have access to an assembler for the Intel
8088 you can download an archive file containing a free
assembler, valarrow.zip (about 107 kB).
You'll need to extract the files using the unzip or
pkunzip commands on a DOS PC. The only two files you
need to keep are ASM.EXE and VAL.EXE.
You can also use any assembler (e.g. MASM or
TASM) that uses standard Intel mnemonics and operand
syntax.
Using the Assembler
Use a text editor (for example, the DOS EDIT program) to
create the assembly language file. Use a file type extension of
.asm.
To assemble your program into an object (.obj) file use
the command (assuming the file name is asg2.asm):
asm asg2;
If it assembles without errors you can "link" it into an
executable MS-DOS "COM" (.com) file using the command:
val /co asg2;
Then you can run the program by typing
asg2
Assembler Directives
You'll need to include a few assembler directives at the start of
your assembly language program to make sure that: (1) the linker
knows the object file contains executable code, (2) the assembler
knows how the segment registers will be set up when the program
is loaded, and (3) the executable code is placed at the right
starting location within the code segment.
Add the following 3 lines before your code:
code segment public ; (1)
assume cs:code,ds:code ; (2)
start: org 100h ; (3)
and the following 2 lines at the end of your code:
code ends ; (1)
end start ; (3)
to perform these functions. When your program is executed, DOS
will load the code into memory, set the DS and CS segment
registers to the appropriate values, set SS to the top of the 64k
segment and start execution at location CS:100H.
Your code should terminate using the instruction
int 20h
to return control to DOS
ELEC 464 Home Page