User manual

Table Of Contents
ASSEMBLER/DISASSEMBLER
M68CPU32BUG/D 4-4
4.2.1.2 Operand Field
If present, the operand field follows the operation field and is separated from the operation field
by at least one space. When two or more operand subfields appear within a statement, separate
them with a comma. In an instruction like ’ADD D1,D2’, the first subfield (D1) is called the
source effective address (<EA>) field, and the second subfield (D2) is called the destination
<EA> field. Thus, the contents on D1 are added to the contents of D2 and the result saved in
register D2. In the instruction ’MOVE D1,D2’, the first subfield (D1) is the source field and the
second subfield (D2) is the destination field. In other words, for most two-operand instructions,
the format ’<opcode> <source>,<destination>’ applies.
4.2.1.3 Disassembled Source Line
The disassembled source line may not look identical to the source line entered. The disassembler
decides how to interpret the numbers used. If the number is an offset of an address register, it is
treated as a signed hexadecimal offset. Otherwise, it is treated as a straight unsigned
hexadecimal.
EXAMPLE
MOVE.L #1234,5678
MOVE.L FFFFFFFC(A0),5678
disassembles to
00003000 21FC0000 12345678 MOVE.L #$1234,($5678).W
00003008 21E8FFFC 5678 MOVE.L -$4(A0),($5678).W
Also, for some instructions, there are two valid mnemonics for the same opcode, or there is more
than one assembly language equivalent. When the opcode is disassembled some instructions may
appear different from the originally entered code. As examples:
BT is dissembled as BRA
DBRA is dissembled as DBF
NOTE
The assembler recognizes two forms of mnemonics for two branch
instructions. The BT form (branch conditionally true) has the same
opcode as the BRA instruction. Also, DBRA (decrement and
branch always) and DBF (never true, decrement, and branch)
mnemonics are different forms for the same instruction. In each
case, the assembler accepts both forms.
ASSEMBLER/DISASSEMBLER
M68CPU32BUG/D 4-5
4.2.1.4 Mnemonics and Delimiters
The assembler recognizes all M68300 Family instruction mnemonics. Numbers are recognized as
binary, octal, decimal, and hexadecimal, with hexadecimal as the default case.
Decimal values are preceded by an ampersand (&). Examples are:
&12334
-&987654321
Hexadecimal values are preceded by a dollar sign ($). An example is:
$AFE5
One or more ASCII characters enclosed by single quote marks ( ’ ) constitute an ASCII string.
ASCII strings are right-justified and zero filled (if necessary), whether stored or used as
immediate operands.
00003000 21FC0000 12345678 MOVE.L #$1234,($5678).W
005000 0053 DC.W ’S’
005002 223C41424344 MOVE.L #’ABCD’,D1
005008 3536 DC.W ’56’
The following register mnemonics are recognized/referenced by the assembler/disassembler:
Pseudo Registers
R0-R7 User Offset Registers.
Main Processor Registers
PC Program Counter - Used only in forcing program counter-relative addressing.
SR Status Register
CCR Condition Codes Register (Lower eight bits of SR)
USP User Stack Pointer
SSP System Stack Pointer
VBR Vector Base Register
SFC Source Function Code Register
DFC Destination Function Code Register
D0-D7 Data Registers
A0-A7 Address Registers - Address register A7 represents the active system stack
pointer, that is, either USP or SSP, as specified by the S bit of the status
register
Fr
eescale S
emiconduct
or
, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...