typedef int (*PFI)();
#define PKeyBoardGet	(*(int (**)()) 0x35d6)
#define PScreenPut	(*(int (**)()) 0x3fa4)
#define NULLFUNC	((PFI) NULL)
#define	emask		(*((int *) 0X003724L))
#define ClearSPI	(SPInput.point = SPInput.end = (char *) 0, \
			 SPInput.startmark = (struct marker *) 0, \
			 SPInput.flag = 0, \
			 SPInput.display = 0)

#define trap(n)		asm("	trap	#15"); \
			asm("	.word	n");

extern PFI KeyBoardGet;
extern PFI ScreenPut;
extern PFI InputRoutine;
extern PFI OutputRoutine;
struct InputNode {
	char *point;		/* next character to go to subprogram */
	char *end;		/* one beyond last character */
	struct marker *startmark; /* eob at beginning of recursive edit */
	char flag;		/* 0: send EOF at end,
				   1: recursively ProcessKeys at end */
	char display;		/* 0: don't
				   1: once per line
				   2: once per character */
};
extern struct InputNode SPInput;
