![Axiom CML-5485 Hardware User Manual Download Page 42](http://html.mh-extra.com/html/axiom/cml-5485/cml-5485_hardware-user-manual_3036878042.webp)
C M L - 5 4 8 5 U S E R M A N U A L V 1 . 0
0 6 / 2 2 / 0 5
41
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.l 4(sp),d1”);
/* put ‘ch’into d1 */
asm (“ move.l #0x0013,d0”);
/* select the function */
asm (“ trap #15”);
/* make the call */
#endif
}
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
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 */
}
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: