Motorola 68HC12 User Manual page 5

Table of Contents

Advertisement

DB12->printf("This is the value of num: %d", num);
d, i
o
x
X
u
c
s
p
putchar
This will display a single ASCII character on the screen.
Function Prototype: int putchar(int);
Return Value: The character that was displayed.
GetCmdLine
This function is used to read in a line of data from the user and store it in an
array.
Each character that is entered is echoed back to the screen using a call to
the putchar function.
with the exception of carriage return and backspace.
Function Prototype: int GetCmdLine(char *CmdLineStr, int CmdLineLen);
Return Value: An error code of NoErr.
The location where data that is read in is stored and the number of characters that
are to be read, are determined by CmdLineStr and CmdLineLen respectively.
CmdLineStr is a char array that is created by the programmer.
input line from the user is stored.
CmdLineLen is the length of the string to be read in.
characters may be entered by the user before the GetCmdLine function exits. The
user may also use a carriage return to exit before the value of CmdLineLen has been
reached.
Backspace may be used to delete unwanted characters from the line that the user
entered.
The character will be erased from the screen and the memory array.
isxdigit
This routine determines if c is a member of the
Function prototype: int isxdigit(int c);
Return Value: If c is part of the set the function returns
int, signed decimal number
int, unsigned octal number
int, unsigned hexadecimal number using a-f for 10-15
int, unsigned hexadecimal number using A-F for 10-15
int, unsigned decimal
int, single character
char *, display from a string until '\0'
void *, pointer
Only printable ASCII characters are accepted by the function
true (1), if c is not a part of the set the function
returns a false (0).
A total of CmdLineLen -1
set 0..9, a..z and A...Z
5
This is where the

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents