4 Module: Interface to some EM instructions and data
5 Author: Ceriel J.H. Jacobs
6 Version: $Id: EM.def,v 1.4 1994/06/24 12:48:36 ceriel Exp $
9 FROM SYSTEM IMPORT ADDRESS;
11 TYPE TrapHandler = PROCEDURE(INTEGER);
13 PROCEDURE FIF(arg1, arg2: LONGREAL; VAR intres: LONGREAL) : LONGREAL;
14 (* multiplies arg1 and arg2, and returns the integer part of the
15 result in "intres" and the fraction part as the function result.
18 PROCEDURE FEF(arg: LONGREAL; VAR exp: INTEGER) : LONGREAL;
19 (* splits "arg" in mantissa and a base-2 exponent.
20 The mantissa is returned, and the exponent is left in "exp".
23 PROCEDURE TRP(trapno: INTEGER);
24 (* Generate EM trap number "trapno" *)
26 PROCEDURE SIG(t: TrapHandler): TrapHandler;
27 (* install traphandler t; return previous handler *)
29 PROCEDURE FILN(): ADDRESS;
30 (* return current program file-name. This only works if file-name
31 and line-number generation is not disabled during compilation
34 PROCEDURE LINO(): INTEGER;
35 (* return current program line-number. This only works if file-name
36 and line-number generation is not disabled during compilation