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 / simdef.h < prev    next >
Text File  |  1991-08-10  |  3KB  |  93 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. /* simdef.h */
  26.  
  27. #include "sim.h"
  28.  
  29. word        *memory;   /* heap, local stack */
  30. word        *pspace; /* psc records, instructions, p-names */
  31. word        *tstack;  /* trail stack */
  32. word        reg[maxregs];     /* registers */
  33. word        psw;    /* processor status word: currently (2/87) only
  34.                the lowest bit is used: a value of 0 indicates
  35.                that the last arithmetic operation resulted in
  36.                an integer value, while a value of 1 indicates
  37.                a floating-point result.    */
  38.  
  39. byte    *(trap_vector[maxtraps]);
  40. word    *hash_table[bucket_chain][2];
  41.  
  42. word *local_bottom;
  43. word *heap_bottom;
  44. word *trail_bottom;
  45.  
  46. byte *curr_fence; /* ptr to next free byte in perm space */
  47. byte *max_fence; /* ptr to last+1 free byte in perm space */
  48. byte *inst_begin; /* ptr to the beginning of inst. array */ 
  49.  
  50. short int st_base;         /* base of symbol table         */
  51.  
  52. word *ereg;                /* last activation record       */
  53. word *breg;                /* last choice point            */
  54. word *hreg;                /* top of heap                  */
  55. word *trreg;               /* top of trail stack           */
  56. word *hbreg;               /* heap back track point        */
  57. word *sreg;                /* current build or unify field */
  58. byte *cpreg;      /* return point register        */
  59. byte *pcreg;    /* program counter              */
  60.  
  61. word oprnd1, oprnd2, oprnd3;
  62.  
  63. byte flag;   /* read/write mode flag            */
  64.  
  65. word flags[10];  /* pars from command line: -uI Value (Index 0-9) */
  66. byte trace;     /* (0) 1 = trace on, 0 = trace off     */
  67. byte hitrace;   /* (1) 1 = hitrace on, 0 = hitrace off */
  68. byte overflow_f = 0; /* (2) 1 = ignore stack overflow */
  69.  
  70. byte disassem;
  71. byte trace_sta; /* 1 = keep max stack size stats */
  72. byte call_intercept; /* hitrace or trace_sta for efficiency */
  73. int num_line; /* print instruction addresses on trace and disassem */
  74.  
  75. word term ;  /* defined in "unsafe.c" ?? */
  76.  
  77. int pcstop;  /* used in "dis.c" ?? */
  78.  
  79. word nil_sym, list_str;
  80.  
  81. struct psc_rec *list_psc;
  82. struct psc_rec *interrupt_psc;
  83. struct psc_rec *comma_psc;
  84.  
  85. int pspace_used; /* heap_used, stack_used, trail_used; */
  86. pw mheaptop, mlocaltop, mtrailtop;
  87.  
  88. byte *sav_pcreg, *sav_ereg; /* to save old values of pcreg and ereg to handle
  89.                   saving of Prolog states correctly */
  90.  
  91. int interrupt_code;
  92.  
  93.