home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / EFFO / pd3.lzh / SBPROLOG2.2 / SIM / BUILTIN / builtin.h < prev    next >
Text File  |  1991-08-10  |  3KB  |  124 lines

  1. /************************************************************************
  2. *                                    *
  3. *    The SB-Prolog System                        *
  4. *    Copyright SUNY at Stony Brook, 1986                *
  5. *                                    *
  6. ************************************************************************/
  7.  
  8. /*-----------------------------------------------------------------
  9. SB-Prolog is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY.  No author or distributor
  11. accepts responsibility to anyone for the consequences of using it
  12. or for whether it serves any particular purpose or works at all,
  13. unless he says so in writing.  Refer to the SB-Prolog General Public
  14. License for full details.
  15.  
  16. Everyone is granted permission to copy, modify and redistribute
  17. SB-Prolog, but only under the conditions described in the
  18. SB-Prolog General Public License.   A copy of this license is
  19. supposed to have been given to you along with SB-Prolog so you
  20. can know your rights and responsibilities.  It should be in a
  21. file named COPYING.  Among other things, the copyright notice
  22. and this notice must be preserved on all copies. 
  23. ------------------------------------------------------------------ */
  24.  
  25. /* builtin.h */
  26.  
  27. #define CALL 10
  28. #define LOAD 11
  29.  
  30. #define RESET 16
  31. #define REWRITE 17
  32. #define GET0 18
  33. #define GET  19
  34. #define SKIP 20
  35. #define READ 21
  36. #define CLOSE 23
  37. #define PUT 24
  38. #define TAB 25
  39. #define NL  26
  40. #define FILEERRORS 28
  41. #define NOFILEERRORS 29
  42. #define SEE    30
  43. #define SEEING    31
  44. #define SEEN    32
  45. #define TELL    33
  46. #define TELLING 34
  47. #define TOLD    35
  48. #define GETHOSTBYNAME 39
  49.  
  50. #define STATISTICS 41
  51. #define SYMTYPE 42
  52. #define HASHVAL 43
  53.  
  54. #define SUBSTRING 51
  55. #define SUBNUMBER 52
  56. #define SUBDELIM  53
  57. #define CONLENGTH 54
  58.  
  59. #define WRITE4    59
  60. #define ARITH    60
  61. #define FLOATC    61
  62.  
  63. #define REAL 62
  64. #define FLOOR0 63
  65. #define VAR 64
  66. #define NONVAR 65
  67. #define ATOM 66
  68. #define INTEGER 67
  69. #define ATOMIC 68
  70. #define ARITY 69
  71. #define CPUTIME 70
  72. #define STATS 71
  73. #define LENGTH 72
  74. #define COMPARE 73
  75. #define SAVE 74
  76. #define RESTORE 75
  77.  
  78. #define ALLOC_BUFF 76
  79. #define BUFF_CODE  77
  80. #define TRIMBUFF  79
  81.  
  82. #define ARG0 80
  83. #define FUNCTOR0 81
  84. #define SYSTEM0 82
  85. #define SYSCALL 83
  86. #define BLDSTR  84
  87. #define BLDATOM 98
  88. #define NAME0 99
  89. #define BROCALL 100
  90. #define ERRNO 101
  91.  
  92. #define TRACE 110
  93. #define PILTRACE 111
  94. #define UNTRACE 112
  95. #define FLAGS 113
  96.  
  97. #define TERMREP 127
  98. #define NUMBER 128
  99. #define STRUCTURE 129
  100. #define WRITEQNAME 130
  101. #define WRITENAME 133
  102.  
  103. #define CURSES 134    /* for curses interface */
  104.  
  105. /* extern unsigned short no_buf_err; */
  106.  
  107.  
  108. #include "../sim.h"
  109. #include "../aux.h"
  110.  
  111. extern int (*branch_table[])();
  112.  
  113.  
  114.  
  115. /* #define arity0(x)    get_arity((x).psc_ptr) */
  116.     /* assumes that x is the first word of a structure */
  117.  
  118. /* #define to_con_str_ptr(term) \
  119.     deref(term); \
  120.     if (islist(term) ||  var(term))  {Fail0;} \
  121.     untag(term) */
  122. /* deref term (regs  or temp var); if list or free variable, fail; o/w get
  123.    the pointer to the con_str node in the heap */
  124.