# ifndef NO_WHAT
/*
 *      SCCS file type - Emulator Include File
 *
 *      What identification string:
 */
static char *_S_basicdefs = "@(#)EM_basicdefs.h	3.3";
# endif

/* un-define m4 built in macros */
undefine(`index')

translate( AND, && )
translate( OR, || )
translate( NOT, ! )


translate(KOOD,int)

translate( NIL, -1 )
translate( NULL, 0 )
translate( MAXINTEGER, 32767 )

/* commented out when C functions are not commented out and vice versa
 * (to comment out put '#' at beginning of "define" lines & move next line down
 */
define( decZ, ((--(*$1)) ? FALSE : TRUE) )
define( inc, ((*$1)++) )

#define NPROCS    5   /* used for coroutines , in CPP conditional compiles */

/*
 * Macros for accessing the PS, and for pulling out the saved PS and PC from
 * pseudo-interrupt vectors.  Put here for lack of a better idea where they
 * belong.
 */

translate( PREV_MODE,        0030000)
translate( CUR_MODE,         0140000)
translate( KERNEL_PREV_MODE, 0000000)
translate( SUPER_PREV_MODE,  0010000)
translate( USER_PREV_MODE,   0030000)
translate( KERNEL_CUR_MODE,  0000000)
translate( SUPER_CUR_MODE,   0040000)
translate( USER_CUR_MODE,    0140000)
translate( CBIT,                 001)
translate( TBIT,                 020)

translate( usr_pc,      (((pseudo_int_vector *)PI_ADDRESS)[base_lev].interrupted_pc))
translate( usr_ps,      (((pseudo_int_vector *)PI_ADDRESS)[base_lev].interrupted_ps))
translate( usr_hard_pc, (((pseudo_int_vector *)PI_ADDRESS)[hard_lev].interrupted_pc))
translate( usr_hard_ps, (((pseudo_int_vector *)PI_ADDRESS)[hard_lev].interrupted_ps))


/* macros and c definitions used to control debug printout */
/* set debug mask to the desired entries to be printed     */

int dbgmsk;             /* debug mask */

translate(dbg0,         01)             /* region/end region printouts */
translate(dbg1,         02)             /* Kernel emulator output KERfns*/
translate(dbg2,         04)             /* EFI */
translate(dbg3,        010)             /* ETTY */
translate(dbg4,        020)             /* ESG */
translate(dbg5,        040)             /* EIN */
translate(dbg6,       0100)             /* ECC */
translate(dbg7,       0200)             /* EEV */
translate(dbg8,       0400)             /* ESY */
translate(dbg9,      01000)             /* EPP */
translate(dbg10,     02000)             /* ETH */
translate(dbg11,     04000)             /* EBC */
translate(dbg12,    010000)             /* ECC (pseudo int trace) & ESC */
translate(dbg13,    020000)             /* EPS */
translate(dbg14,    040000)             /* EDI */
translate(dbg15,   0100000)             /* Kernel calls: set_pil */
# define debug0(a)      /* null */
# define debug1(a)      /* null */
translate( debug2, if(dbgmsk & dbg2)  printf)
translate( debug3, if(dbgmsk & dbg3)  printf)
translate( debug4, if(dbgmsk & dbg4)  printf)
translate( debug5, if(dbgmsk & dbg5)  printf)
translate( debug6, if(dbgmsk & dbg6)  printf)
translate( debug7, if(dbgmsk & dbg7)  printf)
translate( debug8, if(dbgmsk & dbg8)  printf)
translate( debug9, if(dbgmsk & dbg9)  printf)
translate( debug10, if(dbgmsk & dbg10)  printf)
translate( debug11, if(dbgmsk & dbg11)  printf)
translate( debug12, if(dbgmsk & dbg12)  printf)
translate( debug13, if(dbgmsk & dbg13)  printf)
translate( debug14, if(dbgmsk & dbg14)  printf)
translate( debug15, if(dbgmsk & dbg15)  printf)
