	.title	bttab
;
;
	.ident	/01/
	.list	meb
;
;	data tables for "background terminal" driver
;
;
;	j. s. sventek, 09-jul-80
;
;
;	this module provides the loadable driver data tables
;	for the background terminal driver.
;
	.mcall	ucbdf$
	ucbdf$				; define bit settings and offsets
	.sbttl	defined symbols and macros
;
;
;	defined symbols and macros
;
;
ld$bt=0			; driver is loadable
;
;
;	macro to build UCB's
;
;
	.macro	blducb	unit
btst=.
	.if df	m$$cli
	.word	$mcrpt				; CLI pointer
	.endc
	.if df	m$$mup!m$$cli
	.word	0,0				; u.luic & u.own
	.endc
.bt'unit'::
	.word	.btdcb				; DCB pointer
	.word	.-2				; redirect pointer
	.byte	uc.que,0			; notify upon queueing
	.byte	unit',0				; unit number
	.word	dv.rec!dv.ccl!dv.tty		; device characteristics
	.word	u2.log,0			; log set => not logged in
	.word	255.				; pick a size
	.word	$bt0				; SCB pointer
	.word	0,0,0,0				; TCB, u.buf, u.buf+2 & u.cnt
	.blkw	5				; extry words for TTY device
	.word	0				; u.uic
	.blkw	2				; two extra words for TTY
btnd=.
	.endm	blducb
	.page
	.sbttl	DCB
	.iif df ld$bt,	$bttbl=0
$BTDAT::					; start of data base
.btdcb:						; background TTY DCB
	.word	0				; pointer to next DCB
	.word	.bt0				; pointer to first UCB
	.ascii	/BT/				; device name
	.byte	0,b$$t11-1			; first and last units
	.word	btnd-btst			; length of UCB
	.word	$bttbl				; pointer to dispatch table
	.word	160037,0,160031,0,7,0,1,6	; function codes
	.if df	l$$drv
	.word	0				; PCB address for driver
	.endc
	.page
	.sbttl	UCB's
unit=0
	.rept	b$$t11
	blducb	\unit
unit=unit+1
	.endr
	.page
	.sbttl	SCB
pr0=0
$bt0::						; background TTY SCB
	.word	0,.-2				; IRP DEQUEUE
	.byte	pr0,0				; device priority, & vector
	.byte	0,2				; current and init timeout
	.byte	0*2,0				; cont index and status
	.word	4				; CSR address
	.word	0				; IRP address
	.word	0,0,0,0				; fork block
	.if df l$$drv&m$$mge
	.word	0				; extra word in fork block
	.endc
	.if df	m$$mge&m$$ext
	.blkw	6
	.endc
$BTEND::					; end of data base
	.end
