1987-06-23 17:12:42 +00:00
|
|
|
(*$Foreign *)
|
|
|
|
DEFINITION MODULE EM;
|
1988-02-19 15:54:01 +00:00
|
|
|
(*
|
|
|
|
Module: Interface to some EM instructions and data
|
|
|
|
Author: Ceriel J.H. Jacobs
|
|
|
|
Version: $Header$
|
|
|
|
*)
|
1987-06-26 15:59:52 +00:00
|
|
|
|
|
|
|
FROM SYSTEM IMPORT ADDRESS;
|
|
|
|
|
|
|
|
TYPE TrapHandler = PROCEDURE(INTEGER);
|
1987-06-23 17:12:42 +00:00
|
|
|
|
|
|
|
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" *)
|
1987-06-26 15:59:52 +00:00
|
|
|
|
|
|
|
PROCEDURE SIG(t: TrapHandler): TrapHandler;
|
1988-02-19 15:54:01 +00:00
|
|
|
(* install traphandler t; return previous handler *)
|
1987-06-26 15:59:52 +00:00
|
|
|
|
|
|
|
PROCEDURE FILN(): ADDRESS;
|
1988-02-19 15:54:01 +00:00
|
|
|
(* return current program file-name. This only works if file-name
|
|
|
|
and line-number generation is not disabled during compilation
|
|
|
|
*)
|
1987-06-26 15:59:52 +00:00
|
|
|
|
|
|
|
PROCEDURE LINO(): INTEGER;
|
1988-02-19 15:54:01 +00:00
|
|
|
(* return current program line-number. This only works if file-name
|
|
|
|
and line-number generation is not disabled during compilation
|
|
|
|
*)
|
1987-06-23 17:12:42 +00:00
|
|
|
END EM.
|