D-Bug 12 Monitor Program - Motorola 68HC12 User Manual

Table of Contents

Advertisement

3. D-Bug12:
D-Bug12 is the monitor program for the 6812 EVB.
monitor used on the 6811.
series of C functions that are stored in an EPROM on the EVB.
be called by the user to handle both I/O and several of the common C language ANSI
functions.
All calls to the D-Bug12 routines follow the same format.
DB12->"routine name";
The "DB12->" is used as a cast pointer that allows the compiler to reference the
EPROM for the different routines.
and any parameters that are being passed to the function.
a value to the program the return value can be assigned to a variable.
done as follows:
temp=DB12->"routine name";
This assigns the return value of the routine to a variable named temp.
As always the variable must be declared in the program.
It is important to note that if you do not include the "DB12->" with the function
call the compiler will return an error message.
is that the function does not exist.
will solve this problem.
D-Bug12 Functions
Readers interested in a more in-depth explanation of the D-Bug12 routines are
referred to Motorola Document an1280a, "Using the Callable Routines in D-Bug 12"
(available on the web at http://www.ecse.rpi.edu/Courses/CStudio/appnotes/).
getchar
This function will get a single character of input from the user.
Function Prototype: int getchar(void);
Return Value: This returns the character from the keyboard in
printf
This will display a string of characters to the screen.
Function Prototype: int printf(char *s);
Return value: The number of characters that were transmitted.
NOTE: The Introl 4.0 compiler has an error in this function. The first parameter in
the list is not printed properly. There are workarounds for some cases that are
given in examples in class handouts. In any case, simple strings without variables
will work without problems.
To display a variable, the variable is represented using %y in the printf
statement, where y is chosen from the table below to match the variable type. To
display a signed decimal integer stored in a variable num, the function call would
look like:
Unlike the BUFFALO monitor, the D-Bug12 monitor is a
The routine name is just the name of the routine
hexadecimal ASCII.
This is similar to the BUFFALO
The error message that is returned
Putting the "DB12->" before the function name
4
These functions can
The format is:
If the function returns
This is

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents