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

/* removed define of KSIM to run on real Kernel */
/* #define KSIM  */  /*defined if to run on the Kernel simulator not real Kernel */

#ifdef KSIM
#define fuiword(param) EMT38(param)
#endif



/* defines that should be moved to global file  */
#define  high_byte(x)  ((int)((x.hibyte)&0377)  )
#define  low_byte(x)  (int)(x & 0377)  )

struct{
	char lowbyte;
	char hibyte;
};


#define  usr_R0  (*(usr_reg_pointer)  )
#define  usr_R1  (*(usr_reg_pointer + 1) )




/* miscellaneous defines used in ESC   */
#define  INDIR_NUMBER    0       /* indirect system call number  */
#define  ILLEGAL_CALL   -1      /* bad system call              */



/*
 *      CONSTANTS
 */

#ifdef KSIM
#define TRAP_INSTRUCTION 0104000    /* EMT  */
#else
#define TRAP_INSTRUCTION 0104400    /* TRAP */
#endif

#define  NSYS_CALLS 64      /* number of system calls in emulator       */
#define  NMAX_ARGS   5      /* Max number of arguments to system calls  */

/*
 *      TYPES
 */

/*
 *      t_in_arg_cnt      = 0 .. NMAX_ARGS -1
 */

typedef char    t_in_arg_cnt;

/*
 *      t_out_arg_cnt      = (0..2)
 */

typedef char    t_out_arg_cnt;

/*
 *      t_in_R0            = (0,1)
 */

typedef char    t_in_R0;

typedef struct {                                /* elements must all be    */
		t_in_R0         in_R0;          /* integers do to the need */
		t_in_arg_cnt    in_arg_cnt;     /* to be initialized, and  */
		t_out_arg_cnt   out_arg_cnt;    /* not being to initialize */
		int             (*call_function)();      /* structures     */
	}  t_sys_call_tab;
