EM.def 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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$
  7. *)
  8. FROM SYSTEM IMPORT ADDRESS;
  9. TYPE TrapHandler = PROCEDURE(INTEGER);
  10. PROCEDURE FIF(arg1, arg2: LONGREAL; VAR intres: LONGREAL) : LONGREAL;
  11. (* multiplies arg1 and arg2, and returns the integer part of the
  12. result in "intres" and the fraction part as the function result.
  13. *)
  14. PROCEDURE FEF(arg: LONGREAL; VAR exp: INTEGER) : LONGREAL;
  15. (* splits "arg" in mantissa and a base-2 exponent.
  16. The mantissa is returned, and the exponent is left in "exp".
  17. *)
  18. PROCEDURE TRP(trapno: INTEGER);
  19. (* Generate EM trap number "trapno" *)
  20. PROCEDURE SIG(t: TrapHandler): TrapHandler;
  21. (* install traphandler t; return previous handler *)
  22. PROCEDURE FILN(): ADDRESS;
  23. (* return current program file-name. This only works if file-name
  24. and line-number generation is not disabled during compilation
  25. *)
  26. PROCEDURE LINO(): INTEGER;
  27. (* return current program line-number. This only works if file-name
  28. and line-number generation is not disabled during compilation
  29. *)
  30. END EM.