User manual

Table Of Contents
ASSEMBLER/DISASSEMBLER
M68CPU32BUG/D 4-10
EXAMPLES DESCRIPTION
00010022 04D2 DC.W 1234 Decimal number
00010024 AAFE DC.W &AAFE Hexadecimal number
00010026 4142 DC.W ’AB’ ASCII String
00010028 5443 DC.W ’TB’+1 Expression
0001002A 0043 DC.W ’C’ ASCII character is right justified
4.2.4 System Call Directive (SYSCALL)
This directive aids the user in making the TRAP #15 calls to the system functions. The format for
this directive is:
SYSCALL <function name>
For example, the following two pieces of code produce identical results.
TRAP #$F
DC.W 0
or
SYSCALL .INCHR
The CPU32Bug input default is hexadecimal, while other assemblers default to decimal. When
programming a CPU32Bug assembler TRAP function it is best to use the SYSCALL directive
and let CPU32Bug make the conversion. Refer to Chapter 5 (SYSTEM CALLS), for a complete
listing of all the functions provided.
4.3 ENTERING AND MODIFYING SOURCE PROGRAM
User programs are entered into memory using the one-line assembler/disassembler. The program
is entered in assembly language statements on a line-by-line basis. The source code is not saved
as it is converted immediately upon entry into machine code. This imposes several restrictions on
the type of source line that can be entered.
Symbols and labels, other than the defined instruction mnemonics, are not allowed. The
assembler has no means of storing the associated values of the symbols and labels in look-up
tables. This forces the programmer to use memory addresses and to enter data directly rather than
use labels.
Also, editing is accomplished by retyping an entirely new source line. Add or delete lines by
moving a block of memory data to free up or delete the appropriate number of locations (refer to
the BM command).
ASSEMBLER/DISASSEMBLER
M68CPU32BUG/D 4-7
Table 4-1 summarizes the CPU32Bug one-line assembler addressing modes.
Table 4-1. CPU32Bug Assembler Addressing Modes
Format Description
Dn Data register direct
An Address register direct
(An) Address register indirect
(An)+ Address register indirect with post-increment
-(An) Address register indirect with pre-decrement
d(An) Address register indirect with displacement
d(An,Xi) Address register indirect with index, 8-bit displacement
(bd,An,Xi) Address register indirect with index, base displacement
ADDR(PC) Program counter indirect with displacement
ADDR(PC,Xi) Program counter indirect with index, 8-bit displacement
(ADDR,PC,Xi) Program counter indirect with index, base displacement
(xxxx).W Absolute word address
(xxxx).L Absolute long address
#xxxx Immediate data
The user may use an expression in any numeric field of these addressing modes. The assembler
has a built in expression evaluator that supports the following operand types and operators:
Binary numbers (%10 )
Octal numbers (@76543210)
Decimal numbers (&9876543210)
Hexadecimal numbers ($FEDCBA9876543210)
String literals (’CHAR’ )
Offset registers (R0-R7)
Program counter (*)
Fr
eescale S
emiconduct
or
, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...