MODULE Runtime;
IMPORT SYSTEM;
VAR
kernelModule-: ARRAY 32 OF SYSTEM.ADDRESS;
modules-: LONGINT;
PROCEDURE InsertModule*(a: SYSTEM.ADDRESS): BOOLEAN;
BEGIN
kernelModule[modules] := a;
INC(modules);
RETURN TRUE
END InsertModule;
PROCEDURE CompareString*(CONST left,right: ARRAY OF CHAR): SHORTINT;
VAR i: LONGINT; res: SHORTINT; l,r: CHAR;
BEGIN
i := 0; res := 0;
LOOP
l := left[i];
r := right[i];
IF (res = 0) THEN
IF (l > r) THEN
res := 1; EXIT
ELSIF (l<r) THEN
res := -1; EXIT
ELSIF l=0X THEN
EXIT
END;
END;
INC(i);
END;
RETURN res
END CompareString;
PROCEDURE CopyString*(VAR dest: ARRAY OF CHAR; CONST src: ARRAY OF CHAR);
VAR i: LONGINT; ch :CHAR; l1,l2: LONGINT;
BEGIN
l1 := LEN(dest);
l2 := LEN(src);
IF l2 < l1 THEN l1 := l2 END;
SYSTEM.MOVE(SYSTEM.ADR(src[0]),SYSTEM.ADR(dest[0]),l1);
dest[l1-1] := 0X;
END CopyString;
BEGIN
END Runtime.