
MOTOROLA
Chapter 3. DINK32 Commands
3-7
Assemble
3.5
Assemble
The “as” command assembles user-supplied source code and stores the opcodes at the
supplied addresses.
The assembler for the DINK32 system will disassemble the contents of memory at the
current location and wait for user instructions. A single line of source may be supplied and
assembled into a valid opcode, with the results stored at that memory location. A location
can be left unmodified by typing <return> to pass over it.
Branch labels are recognized by the assembler as a word followed by a colon (:) at the
address currently being displayed by the assembler. The assembler tracks the current
branch labels and automatically calculates the address to be entered into future instructions.
The
symtab/st
instruction is available for manipulating the branch table in DINK32. Branch
labels within PowerPC assembly instructions will not be recognized by the assembler if the
branch label has not yet been entered into the table. The user may display the branch table
list with the st instruction.
The DINK32 assembler ignores any comments preceded by a ‘#’ and any “.org” and “.dc”
commands. The assembler does recognize the .word and .long operations. The assembler
also accepts simplified mnemonics; in general, immediate values, including condition
register bit offsets, are assumed to be decimal unless preceded by 0b (binary), 0x
(hexadecimal) or 0d (decimal). Floating point and general purpose registers are recognized
just like previous versions of DINK32 where the register number may be preceded by an
“r” (general purpose), an “f” (floating point), or a “v” (vector - altivec) but is not necessary.
Simplified branch mnemonics involving the condition registers may have the condition
register number preceded by “cr” but isn’t necessary. The assembler always expects a “cr”
field for compare and branch instructions where, according to the architecture, cr0 is
implied if a “cr” field is not given. DINK32 does implement the implied cr0 functionality
of the simplified mnemonics.
Simple mnemonics that that use the form “4*cr<n>+<cc>” must enter this form with no
spaces. n = condition reg, cc = condition.
Comments can be specified with the “//” or the “/*” .... “*/ constructs. The rest of the line
is ignored following a comment specifier.
Arguments
:
Command
assemble
Abbreviation
as
Syntax
as addr [‘+’ | [‘-’ addr2]
Builds
All except MDINK
Boards
All
Processors
All
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.