Pristine Ack-5.5
[Ack-5.5.git] / lang / m2 / libm2 / EM.def
1 (*$Foreign *)
2 DEFINITION MODULE EM;
3 (*
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 $
7 *)
8
9         FROM SYSTEM IMPORT ADDRESS;
10
11         TYPE TrapHandler = PROCEDURE(INTEGER);
12
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.
16         *)
17
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".
21         *)
22
23         PROCEDURE TRP(trapno: INTEGER);
24         (* Generate EM trap number "trapno" *)
25
26         PROCEDURE SIG(t: TrapHandler): TrapHandler;
27         (* install traphandler t; return previous handler *)
28
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
32         *)
33
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
37         *)
38 END EM.