In_Char; Char_Present - Motorola M5271EVB User Manual

Table of Contents

Advertisement

asm (" trap#15");
#endif
}
3.5.2

IN_CHAR

This function (function code 0x0010) returns an input character (from terminal) to the
caller. The returned character is in D1.
Assembly example:
move.l
#$0010,d0
trap
#15
C example:
int board_in_char (void)
{
asm (" move.l#0x0010,d0");
asm (" trap#15");
asm (" move.ld1,d0");
}
3.5.3

CHAR_PRESENT

This function (function code 0x0014) checks if an input character is present to receive. A
value of zero is returned in D0 when no character is present. A non-zero value in D0 means
a character is present.
Assembly example:
move.l
#$0014,d0
trap
#15
C example:
int board_char_present (void)
{
asm (" move.l#0x0014,d0");
asm (" trap#15");
}
Select the function
Make the call, the input character is in d1.
Select the function
Make the call,
Chapter 3. Using the Monitor/Debug Firmware
/* make the call */
/* select the function */
/* make the call */
/* put the character in d0 */
d0 contains the response (yes/no).
/* select the function */
/* make the call */
TRAP #15 Functions
3-41

Advertisement

Table of Contents
loading

Table of Contents