Download M68ICS08GP

Transcript
CASM08W Assembler Interface
Pseudo Operations
5.8.2 Labels
As the program code is written, the user will not necessarily know the addresses
where commands will be located. The assembler solves this problem using a
system of labels, providing a convenient way to identify specific points in the
program without knowing the exact addresses. The assembler later converts
these mnemonic labels into specific memory addresses and even calculates the
offsets for branch commands for the CPU to use.
Labels within macros must not exceed 10 characters in length.
Examples:
Label:
ThisIsALabel:
Loop_1
This_label_is_much_too_long:
The assembler would truncate the last example to 16 characters.
5.9 Pseudo Operations
The CASM08W assembler also allows pseudo operations (in place of opcode
mnemonics), which are summarized in Table 5-5.
Table 5-5. Pseudo Operations Allowed by the CASM08W
Pseudo
Op Code
Action
equ
Associates a binary value with a label
fcb m
or
db m
Defines byte storage, where m = label, number, or string. Strings
generate ASCII code for multiple bytes; number and label
parameters receive single bytes.
Separate multiple parameters with commas.
fdb n
or
dw n
Defines word storage, where n = label, number, or string. Two
bytes are generated for each number or label.
Separate multiple parameters with commas.
org n
Sets the origin to the value of the number or label n. No forward
references of n are allowed.
rmb n
or
ds n
Defines storage, reserving n bytes, where n = number or label.
No forward references of n are allowed.
M68ICS08GP In-Circuit Simulator — Rev. 1.0
MOTOROLA
CASM08W Assembler Interface
Operator’s Manual
107