2-39
move.l #$0010,d0
Select the function
trap
#15
Make the call, the input character is in d1.
C example:
int board_in_char (void)
{
asm (“ move.l
#0x0010,d0”);
/* select the function */
asm (“ trap
#15”);
/* make the call */
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 */
}
Содержание SBC5307
Страница 15: ...1 8 J1 J4 J7 J8 J9 JP1 J2 Figure 4 Jumper and connector placement ...
Страница 20: ...2 3 Figure 5 Flow Diagram of dBUG Operational Mode ...
Страница 26: ...2 9 0x00012002 nop 0x00012004 lsr l 1 d0 0x00012006 cmp 4 d0 0x00012008 beq start 0x0001200A ...
Страница 79: ...9 APPENDIX C Schematics ...