#include	<TT8.h>			// Tattletale Model 8 Definitions
#include	<tat332.h>		// 68332 Tattletale (7,8) Hardware Definitions
#include	<sim332.h>		// 68332 System Integration Module Definitions
#include	<qsm332.h>		// 68332 Queued Serial Module Definitions
#include	<tpu332.h>		// 68332 Time Processing Unit Definitions
#include	<dio332.h>		// 68332 Digital I/O Port Pin Definitions
#include	<tt8pic.h>		// Model 8 PIC Parallel Slave Port Definitions

#include	<tt8lib.h>		// definitions and prototypes for Model 8 library
#include	<userio.h>		// common convenient user I/O routines

#include	<assert.h> 
#include	<ctype.h> 
#include	<errno.h> 
#include	<fcntl.h> 
#include	<float.h> 
#include	<limits.h> 
#include	<locale.h> 
#include	<math.h> 
#include	<setjmp.h> 
#include	<sgtty.h> 
#include	<signal.h> 
#include	<stat.h> 
#include	<stdarg.h> 
#include	<stddef.h> 
#include	<stdio.h> 
#include	<stdlib.h> 
#include	<string.h> 
#include	<time.h> 



enum {CHAN_CTRL, LINK_CTRL, MAX_COUNT, TRANS_COUNT, FINAL_TRANS_TIME, LAST_TRANS_TIME};

/* Host Service Request */
#define		Initialize		1

/* Host Sequence */
#define         SingleNoLinks		0
#define		ContinuousNoLinks	1
#define         SingleLinks		2
#define		ContinuousLinks		3

/* PAC Pin Action Control (input) */
#define         NoDetect	   	0x00
#define         DetRising               0x04
#define         DetFalling              0x08
#define         DetEither               0x0c
#define         NoChangePAC             0x10

/* TBS Time Base/Directionality Control */
#define         InputChan               0x00
#define         CapTCR1			0x00
#define         CapTCR2			0x40













