2-35
asm (“ move.l
d1,d0”);
/* put the character in d0 */
}
2.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
Select the function
trap
#15
Make the call, d0 contains the response (yes/no).
C example:
int board_char_present (void)
{
asm (“ move.l
#0x0014,d0”);
/* select the function */
asm (“ trap
#15”);
/* make the call */
}
2.5.4 EXIT_TO_dBUG
This function (function code 0x0000) transfers the control back to the dBUG, by terminating the user
code. The register context are preserved.
Assembly example:
move.l #$0000,d0
Select the function
trap
#15
Make the call, exit to dBUG.
C example:
void board_exit_to_dbug (void)
{
asm (“ move.l
#0x0000,d0”); /* select the function */
asm (“ trap
#15”);
/* exit and transfer to dBUG */
}