3-40
M5271EVB User’s Manual
TRAP #15 Functions
3.5
TRAP #15 Functions
An additional utility within the dBUG firmware is a function called the TRAP 15 handler.
This function can be called by the user program to utilize various routines within the dBUG,
to perform a special task, and to return control to the dBUG. This section describes the
TRAP 15 handler and how it is used.
There are four TRAP #15 functions. These are: OUT_CHAR, IN_CHAR,
CHAR_PRESENT, and EXIT_TO_dBUG.
3.5.1
OUT_CHAR
This function ( function code 0x0013) sends a character, which is in the lower 8 bits of D1,
to the terminal.
Assembly example:
/* assume d1 contains the character */
move.l
#$0013,d0
Selects the function
TRAP
#15
The character in d1 is sent to terminal
C example:
void board_out_char (int ch)
{
/* If your C compiler produces a LINK/UNLK pair for this routine,
* then use the following code which takes this into account
*/
#if l
/* LINK a6,#0 -- produced by C compiler */
asm (“ move.l8(a6),d1”);
/* put ‘ch’into d1 */
asm (“ move.l#0x0013,d0”); /* select the function */
asm (“ trap#15”);
/* make the call */
/* UNLK a6 -- produced by C compiler */
#else
/* If C compiler does not produce a LINK/UNLK pair, the use
* the following code.
*/
asm (“ move.l4(sp),d1”);
/* put ‘ch’into d1 */
asm (“ move.l#0x0013,d0”); /* select the function */
Содержание M5271EVB
Страница 1: ...M5271EVBUM Rev 1 0 6 2004 M5271EVB User s Manual Supports Devices MCF5271 MCF5270 ...
Страница 8: ...8 M5271EVB User s Manual MOTOROLA CONTENTS Paragraph Number Title Page Number ...
Страница 37: ...Chapter 2 Initialization and Setup 2 7 Installation and Setup Figure 2 5 Jumper Locations ...
Страница 84: ...A 4 M5271EVB User s Manual MOTOROLA Troubleshooting Network Problems ...
Страница 85: ...MOTOROLA Appendix B Schematics B 1 Appendix B Schematics B 1 M5271EVB Schematics ...
Страница 86: ...B 2 M5271EVB User s Manual MOTOROLA M5271EVB Schematics ...
Страница 100: ...B 16 M5271EVB User s Manual MOTOROLA M5271EVB Schematics ...