DEFINITION MODULE MiscPMOS; (************************************************) (* *) (* Miscellaneous PMOS procedures *) (* *) (* Programmer: P. Moylan *) (* Last edited: 8 May 1997 *) (* Status: OK *) (* *) (************************************************) IMPORT SYSTEM; TYPE RegisterPacket = (* We don't bother covering everything here, just *) (* the registers we have a need for. *) RECORD CASE :BOOLEAN OF | FALSE: AL, AH, BL, BH, CL, CH, DL, DH: SYSTEM.BYTE; | TRUE: AX, BX, CX, DX, BP, SI, DI, DS, ES: CARDINAL; END (*CASE*); END (*RECORD*); CMOSaddress = CARDINAL[0..63]; (************************************************************************) (* STRING COPY *) (************************************************************************) PROCEDURE CopyString (source: ARRAY OF CHAR; VAR (*OUT*) dest: ARRAY OF CHAR); (* Copies a string, with truncation or null termination as needed. *) (* This function is provided in order to help software portability, *) (* i.e. to avoid having to rewrite code for no reason other than *) (* a change of compilers. *) (************************************************************************) (* STRING COMPARISON *) (************************************************************************) PROCEDURE Compare (first, second: ARRAY OF SYSTEM.LOC): INTEGER; (* Returns >0 if first>second, 0 if first=second, <0 if *) (* first