Executing The Assembler/Disassembler; Entering A Source Line - Motorola M68CPU32BUG User Manual

Debug monitor
Table of Contents

Advertisement

4.3.1

Executing the Assembler/Disassembler

The assembler/disassembler is actuated using the ;DI option of the MM (Memory Modify) and
MD (Memory Display) commands:
MM <ADDR >;DI
where
<CR>
.<CR>
and
MD[S] <ADDR>[:<count>I<ADDR>];DI
Use the MM (;DI option) to enter and modify the program. When this command is used, the
memory contents at the specified location are disassembled and displayed. A new or modified
line can be entered if desired.
The disassembled line is either an M68300 Family instruction, a SYSCALL, or a DC.W
directive. If the disassembler recognizes a valid form of an instruction, the instruction is returned.
If the disassembler does not recognizes a valid form of an instruction, random data occurs, the
DC.W $XXXX (always hex) is returned. Because the disassembler gives precedence to
instructions, a word of data interpreted as a valid instruction is returned as the instruction.
4.3.2

Entering a Source Line

Enter a new source line immediately following the disassembled line. Use the format discussed
in paragraph 4.2.1.
CPU32Bug>MM 6000;DI <CR>
00006000
When a line is terminated with a carriage return, the old source line is erased from the terminal
screen, the new line is assembled and displayed, and the next instruction in memory is
disassembled and displayed:
CPU32Bug>MM 6000;DI<CR>
00006000
00006002
Another program line can now be entered. Program entry continues in like manner until all lines
have been entered. A period (.) is used to exit the MM command. If an error occurs during line
assembly, the assembler displays the line unassembled with an error message. The location being
accessed is redisplayed:
CPU32Bug>MM 6000;di <CR>
00006000
LEA.L 5(A0,D8),A4
BAD COMBINATION OF COMMAND, OPERANDS
00006000
M68CPU32BUG/D
sequences to next instruction
exits command
2600
MOVE.L
528B
ADDQ.L
4282
CLR.L D2 ?
528B
ADDQ.L
528B
ADDQ.L
4-11
ASSEMBLER/DISASSEMBLER
D0,D3 ? ADDQ.L #1,A3 <CR>
#1,A3
#$1,A3? LEA.L 5(A0,D8),A4<CR>
#$1,A3?

Advertisement

Table of Contents
loading

Table of Contents