EM.e 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. #
  2. ;
  3. ; (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
  4. ; See the copyright notice in the ACK home directory, in the file "Copyright".
  5. ;
  6. ;
  7. ; Module: Interface to some EM instructions and data
  8. ; Author: Ceriel J.H. Jacobs
  9. ; Version: $Id$
  10. ;
  11. mes 2,EM_WSIZE,EM_PSIZE
  12. #define ARG1 0
  13. #define ARG2 EM_DSIZE
  14. #define IRES 2*EM_DSIZE
  15. ; FIF is called with three parameters:
  16. ; - address of integer part result (IRES)
  17. ; - float two (ARG2)
  18. ; - float one (ARG1)
  19. ; and returns an EM_DSIZE-byte floating point number
  20. ; Definition:
  21. ; PROCEDURE FIF(ARG1, ARG2: LONGREAL; VAR IRES: LONGREAL) : LONGREAL;
  22. exp $FIF
  23. pro $FIF,0
  24. lal 0
  25. loi 2*EM_DSIZE
  26. fif EM_DSIZE
  27. lal IRES
  28. loi EM_PSIZE
  29. sti EM_DSIZE
  30. ret EM_DSIZE
  31. end ?
  32. #define FARG 0
  33. #define ERES EM_DSIZE
  34. ; FEF is called with two parameters:
  35. ; - address of base 2 exponent result (ERES)
  36. ; - floating point number to be split (FARG)
  37. ; and returns an EM_DSIZE-byte floating point number (the mantissa)
  38. ; Definition:
  39. ; PROCEDURE FEF(FARG: LONGREAL; VAR ERES: integer): LONGREAL;
  40. exp $FEF
  41. pro $FEF,0
  42. lal FARG
  43. loi EM_DSIZE
  44. fef EM_DSIZE
  45. lal ERES
  46. loi EM_PSIZE
  47. sti EM_WSIZE
  48. ret EM_DSIZE
  49. end ?
  50. #define TRAP 0
  51. ; TRP is called with one parameter:
  52. ; - trap number (TRAP)
  53. ; Definition:
  54. ; PROCEDURE TRP(trapno: INTEGER);
  55. exp $TRP
  56. pro $TRP, 0
  57. lol TRAP
  58. trp
  59. ret 0
  60. end ?
  61. #define PROC 0
  62. ; SIG is called with one parameter:
  63. ; - procedure instance identifier (PROC)
  64. ; and returns the old traphandler.
  65. exa handler
  66. exp $SIG
  67. pro $SIG, 0
  68. lae handler
  69. loi EM_PSIZE
  70. lal PROC
  71. loi EM_PSIZE
  72. lae handler
  73. sti EM_PSIZE
  74. ret EM_PSIZE
  75. end ?
  76. exp $LINO
  77. pro $LINO,0
  78. loe 0
  79. ret EM_WSIZE
  80. end ?
  81. exp $FILN
  82. pro $FILN,0
  83. lae 4
  84. loi EM_PSIZE
  85. ret EM_PSIZE
  86. end ?