
M5251C3 Evaluation Board Users Guide, Rev. 0
Freescale Semiconductor
2-23
asm (“ trap#15”);
/* make the call */
asm (“ move.ld1,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 is 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 */
}
Summary of Contents for freescale M5251C3
Page 1: ...Document Number M5251C3UG Rev 0 05 2006 M5251C3 Evaluation Board Users Guide ...
Page 6: ...M5251C3 Evaluation Board Users Guide Rev 0 vi Freescale Semiconductor ...
Page 18: ...M5251C3 Evaluation Board Users Guide Rev 0 1 12 Freescale Semiconductor ...
Page 42: ...M5251C3 Evaluation Board Users Guide Rev 0 2 24 Freescale Semiconductor ...
Page 68: ...M5251C3 Evaluation Board Users Guide Rev 0 B 6 Freescale Semiconductor ...