Hardware Reference
In-Depth Information
The second block of pseudoinstructions contains the data type indications for
the data segment. There are four types: .BYTE , .WORD , .LONG , and string. After an
optional label and the pseudoinstruction keyword, the first three types expect a
comma-separated list of constant expressions on the remainder of the line. For
strings there are two keywords, ASCII , and ASCIZ , with the only difference being
that the second keyword adds a zero byte to the end of the string. Both require a
string between double quotes. Several escapes are allowed in string definitions.
These include those of Fig. C-9. In addition to these, any specific character can be
inserted by a backslash and an octal representation, for example, \377 (at most
three digits, no 0 required here).
Escape symbol
Description
\n
New line (line feed)
\t
Tab
\\
Backslash
\b
Back space
\f
Form feed
\r
Carriage return
\"
Double quote
Figure C-9. Some of the escapes allowed by as88 .
The SPACE pseudoinstruction simply requires the location pointer to be incre-
mented by the number of bytes given in the arguments. This keyword is especially
useful following a label in the BSS segment to reserve memory for a variable.
ALIGN keyword is used to advance the location pointer to the first 2-, 4-, or 8-byte
boundary in memory to facilitate the assembly of words, longs, etc. at a suitable
memory location. Finally, the keyword EXTERN announces that the routine or
memory location mentioned will be made available to the linker for external refer-
ences. The definition need not be in the current file; it can also be somewhere else,
as long as the linker can handle the reference.
Although the assembler itself is fairly general, when it is used with the tracer
some small points are worth noting. The assembler accepts keywords in either
uppercase or lowercase but the tracer always displays them in uppercase. Simi-
larly, the assembler accepts both ''\r'' (carriage return) and ''\n'' (line feed) as the
new line indication, but the tracer always uses the latter. Moreover, although the
assembler can handle programs split over multiple files, for use with the tracer, the
entire program must be in a single file with extension ''.$''. Inside it, include files
can be requested by the command
#include filename
In this case, the required file is also written in the combined ''.$'' file at the posi-
tion of the request. The assembler checks whether the include file was already
 
Search WWH ::




Custom Search