Assembling
Your Program
Before
you attempt to debug your programs, you must first assemble them. Here’s
the
command for invoking the assembler when preparing a program for debugging:
dsk5a
[ filename(s)][–options]
dsk5a
is the
command that invokes the assembler.
filenames
are one or more assembly language source files. Filenames are
not
case sensitive.
–options
affect the way the assembler processes input files.
Options
and filenames can be specified in any order on the command line.
Summary
of Assembler Options
Option
Description
–k
Generates an output file regardless of errors or warnings
–l
Generates a temporary file containing a list of any unresolved
opcodes
or symbols
asm
Allows you to define assembler statements from the command line
Generating
an output file (–k option)
By
default, the DSK deletes a file corrupted with errors. For debugging
purposes,
the –k option tells the DSK assembler to generate an output file
despite
any errors or warnings found.
Creating
a temporary object file (–l option)
The
DSK assembler generates an intermediate listing file containing all un-resolved
opcodes
when you use the –l (lowercase L) option. For example, if
you
want to assemble a file named test.asm and create a listing file, enter:
dsk5a
test –l
The
above example creates the file test.lst from the file test.asm . Any
unresolved
symbols are resolved after the DSK assembler has read the entire
assembly
file.
Using
the DSK Assembler Directives
Table
5–1 summarizes the assembler directives. Note that all source
statements
that contain a directive may have a label and a comment . To
improve
readability, they are not shown as part of the directive syntax.
Table
5–1. Assembler Directives Summary
(a)
Directives that define sections