ack/lang/m2/libm2/EM.def
1987-06-26 15:59:52 +00:00

28 lines
733 B
Modula-2

(*$Foreign *)
DEFINITION MODULE EM;
(* An interface to EM instructions and data *)
FROM SYSTEM IMPORT ADDRESS;
TYPE TrapHandler = PROCEDURE(INTEGER);
PROCEDURE FIF(arg1, arg2: LONGREAL; VAR intres: LONGREAL) : LONGREAL;
(* multiplies arg1 and arg2, and returns the integer part of the
result in "intres" and the fraction part as the function result.
*)
PROCEDURE FEF(arg: LONGREAL; VAR exp: INTEGER) : LONGREAL;
(* splits "arg" in mantissa and a base-2 exponent.
The mantissa is returned, and the exponent is left in "exp".
*)
PROCEDURE TRP(trapno: INTEGER);
(* Generate EM trap number "trapno" *)
PROCEDURE SIG(t: TrapHandler): TrapHandler;
PROCEDURE FILN(): ADDRESS;
PROCEDURE LINO(): INTEGER;
END EM.