Motorola M68CPU32BUG Manuel d'utilisateur Page 57

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 98
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 56
SYSTEM CALLS
M68CPU32BUG/D REV 1 5-2
It is necessary to create an equate file with the routine names equated to their respective codes, or
download the archive file C32SCALL.ARC from the Motorola FREEWARE Bulletin Board
(BBS). For more information on the FREEWARE BBS, reference customer letter
M68xxxEVx/L2.
When using the CPU32Bug one-line assembler/disassembler, the SYSCALL macro and the
equates are pre-defined. Input: SYSCALL, space, function, carriage return.
EXAMPLE
CPU32Bug>M 3000;DI<CR>
0000 3000 00000000 ORI.B #$0,D0? SYSCALL .OUTLN <CR>
0000 3000 4E3F0022 SYSCALL .OUTLN
0000 3004 00000000 ORI.B #$0,D0? . <CR>
CPU32Bug>
5.1.2 Input/Output String Formats
Within the context of the TRAP #15 handler are three string formats:
Pointer/Pointer Format The string is defined by a pointer to the first character and a
pointer to the last character + 1.
Pointer/Count Format The string is defined by a pointer to a count byte which
contains the count of the characters in the string followed by
the string itself.
Line Format A line is defined as a string followed by a carriage return and a
line feed.
5.2 SYSTEM CALL ROUTINES
Table 5-1 summarizes the TRAP #15 functions. Refer to the appropriate paragraph for a
description of the available system calls.
ASSEMBLER/DISASSEMBLER
M68CPU32BUG/D 4-11
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> sequences to next instruction
.<CR> exits command
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 2600 MOVE.L D0,D3 ? ADDQ.L #1,A3 <CR>
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 528B ADDQ.L #1,A3
00006002 4282 CLR.L D2 ?
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 528B ADDQ.L #$1,A3? LEA.L 5(A0,D8),A4<CR>
LEA.L 5(A0,D8),A4
BAD COMBINATION OF COMMAND, OPERANDS
00006000 528B ADDQ.L #$1,A3?
Fr
eescale S
emiconduct
or
, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Vue de la page 56
1 2 ... 52 53 54 55 56 57 58 59 60 61 62 ... 97 98

Commentaires sur ces manuels

Pas de commentaire