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

D0 mismatch = KCmpStr(A0 string1, A1 string2)

LONG KCmpStr( CONST_STRPTR a, CONST_STRPTR b );

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

D0 char = KGetChar()

LONG KGetChar( VOID );

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

D0 number = KGetNum()

LONG KGetNum( VOID );

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

D0 flagChar = KMayGetChar()

LONG KMayGetChar( VOID );

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(A0 "format string", A1 values)

VOID KPrintF( CONST_STRPTR formatString, ... );

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

RawDoFmt()


KPutChar()

KPutChar - put a character to the console (defaults to the serial port at 9600 baud)

Synopsis

D0 char = KPutChar(D0 char)

VOID KPutChar( LONG ch );

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(A0 string)

VOID KPutStr( CONST_STRPTR string );

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.