debug_lib.library Reference¶
Comprehensive function reference for debug_lib.library, synthesised from the AmigaOS NDK 3.2 Release 4 (Autodocs/AG/debug_lib).
This page documents 7 functions of debug_lib.library. Each function entry follows the canonical autodoc format. struct Name, union Name, enum Name are clickable links to the type definition in the types reference.
Function index¶
KCmpStr()¶
KCmpStr - compare two null terminated strings
Synopsis
mismatch = KCmpStr(string1, string2)
D0 A0 A1
Function
string1 is compared to string2 using the ASCII collating sequence. 0 indicates the strings are identical.
KGetChar()¶
KGetChar - get a character from the console (defaults to the serial port at 9600 baud)
Synopsis
char = KGetChar()
D0
Function
busy wait until a character arrives from the console. KGetChar is the assembly interface, _KGetChar and _kgetc are the C interfaces.
KGetNum()¶
KGetNum - get a number from the console
Synopsis
number = KGetNum()
D0
Function
get a signed decimal integer from the console. This will busy wait until the number arrives.
KMayGetChar()¶
KMayGetChar - return a character if present, but don't wait (defaults to the serial port at 9600 baud)
Synopsis
flagChar = KMayGetChar()
D0
Function
return either a -1, saying that there is no character present, or whatever character was waiting. KMayGetChar is the assembly interface, _KMayGetChar is the C interface.
KPrintF()¶
KPrintF - print formatted data to the console (defaults to the serial port at 9600 baud)
Synopsis
KPrintF("format string",values)
A0 A1
Function
print a formatted C-type string to the console. See the exec RawDoFmt() call for the supported % formatting commands.
Inputs
"format string" - A C style string with % commands to indicate where paramters are to be inserted. values - A pointer to an array of paramters, to be inserted into specified places in the string.
KPutFmt and KPrintF are identical assembly interfaces that want the
two pointers in registers. _KPrintF and _kprintf are C interfaces
that expect the format string pointer on the stack, and the
paramters on the stack above that.
See also
KPutChar()¶
KPutChar - put a character to the console (defaults to the serial port at 9600 baud)
Synopsis
char = KPutChar(char)
D0 D0
Function
Put a character to the console. This function will not return until the character has been completely transmitted.
Inputs
KPutChar is the assembly interface, the character must be in D0. _KPutChar and _kputc are the C interfaces, the character must be a longword on the stack.
KPutStr()¶
KPutStr - put a string to the console (defaults to the serial port at 9600 baud)
Synopsis
KPutStr(string)
A0
Function
put a null terminated string to the console. This function will not return until the string has been completely transmitted.
Inputs
KPutStr is the assembly interface, a string pointer must be in A0. _KPutStr and _kputs are the C interfaces, the string pointer must be on the stack.