x;
	char eot,enq,nak,etb,etx;
	char slp,time,try;
	int  cc,resp,uoff;
	struct dqsbuf *x,*q,*u;
	struct dqsbuf bf[NBF];
};

struct dqsdat dqsx[];
#endif
	du_nxmit;
	char	du_state;
	char	du_dummy;
	int	du_proc;
	char	*du_bufb;
	char	*du_bufe;
	int	du_nleft;
};
extern struct du du_du[];

#ifdef DQS11
#define NDQ 4
#define NBF 2

struct dqsbuf	{
	int bufl,bufc;
	char *bufb;
	struct dqsbuf *bufn;
	struct buf *bufa;
};

struct dqsdat	{
	int  state;
	char qcase,open;
	char *addr;
	int  dly;
	int  ttd,ack0,wack,ack/*
 * One structure allocated per active process. It contains all data needed
 * about the process while the process may be swapped out.
 * Other per process data (user.h) is swapped with the process.
 */
struct	proc {
	char	p_stat;
	char	p_flag;
	char	p_pri;		/* priority, negative is high */
	char	p_time;		/* resident time for scheduling */
	char	p_cpu;		/* cpu usage for scheduling */
	char	p_nice;		/* nice for cpu usage */
	int	p_sig;		/* signals pending to this process */
	int	p_uid;		/* user id, used to direct tty signals */
	int	p_pgrp;		/* name of process group leader */
	int	p_pid;		/* unique process id */
	int	p_ppid;		/* process id of parent */
	int	p_addr;		/* address of swappable image */
	int	p_size;		/* size of swappable image (*64 bytes) */
	int	p_wchan;	/* event process is awaiting */
	int	*p_textp;	/* pointer to text structure */
	int	*p_link;	/* linked list of running processes */
	int	p_clktim;	/* time to alarm clock signal */
};
extern struct proc proc[];

/* stat codes */
#define	SSLEEP	1		/* awaiting an event */
#define	SWAIT	2		/* (abandoned state) */
#define	SRUN	3		/* running */
#define	SIDL	4		/* intermediate state in process creation */
#define	SZOMB	5		/* intermediate state in process termination */
#define	SSTOP	6		/* process being traced */

/* flag codes */
#define	SLOAD	01		/* in core */
#define	SSYS	02		/* scheduling process */
#define	SLOCK	04		/* process cannot be swapped */
#define	SSWAP	010		/* process is being swapped out */
#define	STRC	020		/* process is being traced */
#define	SWTED	040		/* another tracing flag */

/*
 * Structure used to access saved times and status
 * of a dead processs, by the parent.
 * Overlays the proc structure.
 */
struct	xproc {
	char	p_stat;
	char	p_flag;
	char	p_pri;		/* priority, negative is high */
	char	p_time;		/* resident time for scheduling */
	char	p_cpu;		/* cpu usage for scheduling */
	char	p_nice;		/* nice for cpu usage */
	int	p_sig;		/* signals pending to this process */
	int	p_uid;		/* user id, used to direct tty signals */
	int	p_pgrp;		/* name of process group leader */
	int	p_pid;		/* unique process id */
	int	p_ppid;		/* process id of parent */
	int	xp_xstat;	/* Exit status for wait */
	long	xp_utime;	/* user time, this proc */
	long	xp_stime;	/* system time, this proc */
	int	p_clktim;	/* time to alarm clock signal */
};
cheduling */
	char	p_cpu;		/* cpu usage for scheduling */
	char	p_nice;		/* nice for cpu usage */
	int	p_sig;		/* signals pending to this process */
	int	p_uid;		/* user id, used to direct tty signals */
	int	p_p/*
 * Location of the users' stored registers relative to R0.
 * Usage is u.u_ar0[XX].
 */
#define	R0	(0)
#define	R1	(-2)
#define	R2	(-9)
#define	R3	(-8)
#define	R4	(-7)
#define	R5	(-6)
#define	R6	(-3)
#define	R7	(1)
#define	RPS	(2)

#define	TBIT	020		/* PS trace bit */
 to alarm clock signal */
};
cheduling */
	char	p_cpu;		/* cpu usage for scheduling */
	char	p_nice;		/* nice for cpu usage */
	int	p_sig;		/* signals pending to this process */
	int	p_uid;		/* user id, used to direct tty signals */
	int	p_p/*
 * KT-11 addresses and bits.
 */

#define	UISD	0177600		/* first user I-space descriptor register */
#define	UISA	0177640		/* first user I-space address register */
#define	UDSA	0177660		/* first user D-space address register */
#define	RO	02		/* access abilities */
#define	RW	06
#define	ED	010		/* extend direction */
#define	TX	020		/* Software: text segment */

/*
 * structure used to address a sequence of integers.
 */
struct
{
	int	r[];
};
int	*ka6;		/* 11/40 KISA6; 11/45 KDSA6 */

/*
 * address to access 11/70 UNIBUS map
 */
#define	UBMAP	0170200
	0177600		/* first user I-space descriptor register */
#define	UISA	0177640		/* first user I-space address register */
#define	UDSA	0177660		/* first user D-space address register */
#define	RO	02		/* access abilities */
#define	RW	06
#define	ED	010		/* extend direction */
#define	TX	020		/* Software: text segment */

/*
 * structure used to address a sequence of integers.
 */
struct
{
	int	r[];
};
int	*ka6;		/* 11/40 KISA6; 11/45 KDSA6 */

/*
 * address to a#include "../hd/buf.h"
struct	buf	buf[NBUF];	/* buffer headers */
struct	buf	bfreelist;	/* head of the free list of buffers */
char	buffers[NBUF][514];	/* buffer pool */

#include "../hd/file.h"
struct	file	file[NFILE];	/* file table */

#include "../hd/inode.h"
struct	inode	inode[NINODE];	/* inode table */

#i