(* debug.lib for Cyclone
   16-Sep-96/Stefan Tiemann

   NEVER use any of these functions for release versions, they
   are inefficient, hardware banging and for debuging *only*

   further information can be found in:
   - autodocs: debug_lib.doc
   - more docs: Babel/The Guru Book
   - exec private functions: Ruprecht/Kommentiertes ROM-Listing
*)

DEFINITION MODULE DebugLib;

IMPORT R:Reg;
FROM SYSTEM IMPORT ADDRESS;


TYPE
   StrPtr= POINTER TO ARRAY [0..MAX(INTEGER)] OF CHAR;


PROCEDURE KPutChar(char{R.D0}: LONGCARD);

PROCEDURE KPutStr(s: StrPtr);

PROCEDURE KPrintF(str{R.A0}: StrPtr; values{R.A1}: ADDRESS);

PROCEDURE KMayGetChar(): LONGINT;

PROCEDURE KGetChar(): LONGINT;

(* Only for complete interface. Use UtilityL.Stricmp or String.Compare if possible *)
PROCEDURE KCmpStr(s1{R.A0}, s2{R.A1}: StrPtr): LONGINT;

(* No backspace handling. *)
PROCEDURE KGetNum(): LONGINT;

(* From "Guru Book" p. 193, set speed of internal serial *)
PROCEDURE SetSerial(Baud: LONGCARD);

END DebugLib.
