User manual

Table Of Contents
ASSEMBLER/DISASSEMBLER
M68CPU32BUG/D 4-6
4.2.1.5 Character Set
The character set recognized by the CPU32Bug assembler is a subset of ASCII and listed below:
The letters A through Z (uppercase and lowercase)
The integers 0 through 9
Arithmetic operators: +, -, *, /, <<, >>, !, &
Parentheses ( )
Characters used as special prefixes:
# (pound sign) specifies the immediate form of addressing.
$ (dollar sign) specifies a hexadecimal number.
& (ampersand) specifies a decimal number.
@ (commercial at sign) specifies an octal number.
% (percent sign) specifies a binary number.
’ (apostrophe) specifies an ASCII literal character string.
Five separating characters:
Space
. (period)
/ (slash)
- (dash)
The asterisk (*) character indicates current location.
4.2.2 Addressing Modes
Effective address modes, combined with operation codes, define the particular function
performed by a given instruction. Effective addressing and data organization are described in
detail in the CPU32 Reference Manual.
ASSEMBLER/DISASSEMBLER
M68CPU32BUG/D 4-3
4.2.1 Source Line Format
Each source statement is a combination of operation and, as required, operand fields. Line
numbers, labels and comments are not used.
4.2.1.1 Operation Field
Since there is no label field, the operation field may begin in the first available column. It may
also follow one or more spaces. Entries can consist of one of three categories:
Operation codes which correspond to the M68300 Family instruction set.
Define constant directive (DC.W) defines a constant in a word location.
System call directive (SYSCALL) calls CPU32Bug system utilities.
The size of the data field affected by an instruction is determined by the data size codes. Some
instructions and directives can operate on more than one data size. For these operations, the data
size code must be specified or a default size applicable to the instruction is used. The size code
need not be specified if only one data size is permitted by an operation. The operation field is
followed by a period (.) and the data size code. The data size codes are:
B = Byte (8-bit data)
W = Word (16-bit data; the usual default size)
L = Longword (32-bit data)
When the instruction or directive does not have a data size attribute, the data size code is not
permitted.
EXAMPLES Legal
LEA (A0),A1 Load the effective address of the first operand into A1. The longword
size is the default (.B, .W not allowed) for this instruction.
ADD.B (A0),D0 Add the byte pointed to in A0 to the lowest order byte in D0.
ADD D1,D2 Add the low order word of D1 to the low order word of D2. W is the
default size code for ADD.
ADD.L A3,D3 Add the entire 32-bit (longword) contents of A3 to D3.
EXAMPLE Illegal
SUBA.B #5,A1 Illegal size specification (.B not allowed in instruction SUBA). This
instruction would have subtracted the value 5 from the low order byte
of A1; byte operations on address registers are not allowed.
Fr
eescale S
emiconduct
or
, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...