
 # @(#)def.s	1.2	1/6/89
 # @(#)Copyright (C) 1988 National Semiconductor Corp.

 #
 # def.s file includes all the global constants and variables
 #

 #
 #       .file "def.s"
 #
 # this file includes all the constants and sb variable offsets of the
 # monitor and the diagnostics
 #
 #---------------const from diag file

 #--- Define LX32 Address Map ---------------------------------#
 # DRAM - burst,cach.    00000000 -- 01FFFFFF (32Mb) 32 bits
 # EPROM shadow          00000000 -- 003FFFFF (4Mb) 8/32 bits
 # DRAM - cach.          02000000 -- 03FFFFFF (32Mb) 32 bits
 # DRAM - burst          04000000 -- 05FFFFFF (32Mb) 32 bits
 # DRAM                  06000000 -- 07FFFFFF (32Mb) 32 bits
 # EPROM - burst,cach.   10000000 -- 403FFFFF (32Mb) 8/32 bits
 # EPROM - cach.         12000000 -- 423FFFFF (32Mb) 8/32 bits
 # EPROM - burst         14000000 -- 443FFFFF (32Mb) 8/32 bits
 # EPROM                 16000000 -- 463FFFFF (32Mb) 8/32 bits
 # ATBUS                 A0000000 -- A0FFFFFF (16Mb) 16 bits
 # DMA controller reg.   B0000000 -- B0000007 (8b)   32 bits
 # Expansion bus         C0000000 -- E8000000  
 # Exp. bus - Eng. I/O   E8000000 -- EFFFFFFF (128Mb) 
 #
 # On-board I/O          FF000000 -- FFFFFFFF (1Mb) 8 bits
 # --
 # ICU reg.              FFFFFE00 -- FFFFFE1F (32b) 8 bits
 #--------------------------------------------------------------#

 #--- define macro used -------------------#

 #-------------------------------------------------------#
 #	Emulate "call" format.				 #
 #	i/p : ?1 = the calling subroutine		 #
 #	Note: can call subroutine within +- 29 bits	 #
 #	      location relative to current PC		 #
 #-------------------------------------------------------#
	call_num := 0
	
.macro	call	dest
		addr	ret_label{call_num} ,r7
		br	{dest}:d
	ret_label{call_num}:
	call_num := {{call_num} + 1}
.endm

 #--- return to calling module ------------#
.macro return
	jump	0(r7)
.endm
	
 #--- communication type check macros -----#


.macro	br_on_serial	test_val,  dest
		andd	$0xe0, {test_val}
		cmpqb	0, {test_val}
		beq	ether_cont
		cmpb	$0x80, {test_val}
		bne	{dest}
	ether_cont:
.endm


	#this macro test for thin ethernet.
	# upon entrence {test_val} contains value read from dip switch
	# upon exit {test_val} = 1 if thin ethernet used, 
	#           {test_val} = 0 if thick ethernet used. 
.macro	thin_ether	test_val
		andd	$0x80, {test_val}
		lshd	$(-7), {test_val}
.endm

 # This macro translate dip switch value to integer in the range 0-7 used as
 # entry to divisor table for baud rate selecting.
 
.macro	dip_to_baud	test_val
		andd	$0xe0, {test_val}
		lshd	$(-5), {test_val}
.endm

 #--- bit definition of r6 -----------------------------#
 # r6 is used to store the result of all test		#
 #    bit16 = 1 : CPU test pass				#
 #    bit17 = 1 : Serial I/O test pass			#
 #    bit18 = 1 : DRAM test pass			#
 #    bit19 = 1 : EPROM test pass                   	#
 #    bit20 = 1 : Centronics test pass			#
 #    bit21 = 1 : SCSI test pass			#
 #    bit22 = 1 : Keyboard Interface test pass		# 
 #    bit23 = 1 : TCP test pass           		#
 #    bit24 = 1 : ICU test pass             		#
 #    bit25 = 1 : Engine Interface test pass 		#
 #    bit26 = 1 : FPU test pass              		#
 #    bit27 = 1 : EPROM Mode test pass       		#
 #    bit28 = 1 : DRAM window access test pass		#
 #    bit29 = 1 : DRAM burst on/off test pass		#
 #    bit30 = 1 : DRAM page comparator test pass	#
 #------------------------------------------------------#
 #    bit28 = 1 : uart1 (console) test fail (temporary) #
 #    bit29 = 1 : uart0 (tty) test fail (temporary)	#
 #    bit30 : temporary use for serial_io test		# 
 #    bit31 : temporary use for serial_io test		# 
 #------------------------------------------------------#
 
 #--- Define Symbolic Constants ------------#

.set CPU_pass,		16
.set SERIAL_pass,	17
.set DRAM_pass,		18
.set EPROM_pass,	19
.set CENTRON_pass,	20
.set SCSI_pass,		21
.set KEYB_pass,		22
.set TCP_pass,		23
.set ICU_pass,		24
.set ENG_pass,	        25
.set FPU_pass,	        26
.set EPMODE_pass,	27
.set WINDOW_pass,	28
.set BURST_pass,	29
.set PAGE_pass,		30

.set temp1_flag,	28
.set temp2_flag,	29
.set u1_flag,		30
.set u2_flag,		31


.set TWO,	2	# adust factor to suit CG16 EVB( testing only )
.set YES,	1
.set No,	0
.set ZERO,	0
.set SEC,	100000		# 1 second delay count 

.set cr,	0x0d
.set lf,	0x0a
.set space,	0x20

.set bit0,	0x1
.set bit1,	0x2
.set bit2,	0x4
.set bit3,	0x8
.set bit4,	0x10
.set bit5,	0x20
.set bit6,	0x40
.set bit7,	0x80
.set bit8,	0x100
.set bit9,	0x200
.set bit10,	0x400
.set bit11,	0x800
.set bit12, 	0x1000	

.set C_flag,	bit0	# carry flag
.set T_flag,	bit1	# trace flag
.set L_flag,	bit2	# low flag
.set V_flag,	bit4	# overflow flag
.set F_flag,	bit5	# general flag
.set Z_flag,	bit6	# zero flag 
.set N_flag,	bit7	# negative flag
.set U_flag,	bit8	# user mode flag
.set S_flag,	bit9	# stack flag
.set P_flag,	bit10	# trap pending flag
.set I_flag,	bit11	# interrupt enable flag

 #--- UART run on 18.432 Mhz clock ---
.set LSP_128000, 9 	# 128000 baud -- 9
.set MSP_128000, 0x0
.set LSP_38400, 30 	# 38400 baud -- 30
.set MSP_38400, 0x0
.set LSP_9600,	120	# 9600 baud -- 120
.set MSP_9600,	0x0
.set LSP_50,	0x0	# 50 baud -- 23040
.set MSP_50,	0x5A

.set DELAY_9600, 5000*20	# 9600 delay count
.set DELAY_38400, 8000		# 38400 delay count
.set DELAY_128000, 4000		# 128000 delay count
.set DELAY_50,	 200*5000	# 50 delay count

.set led_0,	0x81-0x80	# 0
.set led_1,	0xCF-0x80	# 1
.set led_2,	0x92-0x80	# 2
.set led_3,	0x86-0x80	# 3
.set led_4,	0xCC-0x80	# 4
.set led_5,	0xA4-0x80	# 5
.set led_6,	0xA0-0x80	# 6
.set led_7,	0x8F-0x80	# 7
.set led_8,	0x80-0x80	# 8
.set led_9,	0x84-0x80	# 9
.set led_A,	0x88-0x80	# A
.set led_b,	0xE0-0x80	# b
.set led_C,	0xB1-0x80	# C
.set led_d,	0xC2-0x80	# d
.set led_E,	0xB0-0x80	# E
.set led_P,	0x98-0x80	# P
.set led_F,	0xB8-0x80	# F
.set led_space,	0xFF-0x80	# space


 #--- System RAM Allocation For The EB ---------#
.set s_dram,	0x0			# start of DRAM
.set s_prom,	0x10000000		# start of program area EPROM
.set s_at_bus,	0xA0000000		# start of AT BUS

.set PROG_END,  0x01ff02fe

.set s_io,	0xFF000000		# start of I/O
.set s_eng,	0xE8000000		# start of engine I/O
.set s_int_ctl,	0xFFFFFE00		# start of interrupt control

.set dma_ctrl,	0xB0000000		# DMA controller register (8b),32bits

 #--- Address Of The I/O Module ---------
.set scsi_d,		0xFF000000		# start of SCSI data reg. (1Mb)
.set scsi_eop,		0xFF100000		# start of SCSI end-of-transfer
.set scsi_c,            0xFF180000		# start of SCSI ctrl. reg. (8b)
.set rtc,               0xFF200000              # start of RTC registers (32b)
.set duart, 		0xFF300000              # start of DUART registers (16b)
.set mio_in,            0xFF800000              # misc. I/O in register
.set mio_out,           0xFF900000              # misc. I/O out register
.set dip_switch,	0xFFA00000		# configuration dip switch
.set cent_status,       0xFFB00000              # Centronics status
.set cent_data,         0xFFC00000              # Centronics data
.set bd_ctrl,		0xFFD00000		# Board Control Register
.set led_port,		0xFFE00000		# seven segment LED

.set uart0,		0xFF300008		# console (uart 1)
.set uart1,		0xFF300000		# tty     (uart 2)

.set at_bus_io,		0xFF700000 		# start of AT bus I/O space

 # --- DS16552 DUART internal register address map ---------
.set u_rx_data,		0	# rx. data
.set u_tx_data,		0	# tx. data
.set u_ier,		1	# interrupt enable register
.set u_iir,		2 	# interrupt identification register
.set u_fifocr,		2 	# FIFO control register (write)
.set u_lcr,		3 	# line control register
.set u_mcr,		4 	# MODEM control register
.set u_lsr,		5 	# line status registe
.set u_msr,		6 	# MODEM status register
.set u_scratch,		7 	# scratch register
.set u_ldlr,		0 	# (DLAB=1) LSB divisor latch register
.set u_mdlr,		1 	# (DLAB=1) MSB divisor latch register
.set u_afr,		2 	# (DLAB=1) alternate function register

 # --- common used bits in UART ---------
.set	out_rdy, 5		# transmitter holding register empty
.set	in_rdy, 0		# receiver data register ready
.set	u_ipnd, 0		# uart interrupt pending bit in iir
.set	ls_chng, 6		# line status change interrupt
.set	i_rdy, 4		# received data interrupt
.set	o_rdy, 2		# transmitter holding register int.
.set	ms_chng, 0		# modem status change interrupt


 #--- Engine Interface Register Address map ----#
.set    eng_addr,0xE8000000	  	# address of engine i.f.
.set	eng_idr,eng_addr+0x0		# input data reg.
.set	eng_isr,eng_addr+0x100000	# interface status reg.
.set	eng_lcr,eng_addr+0x104000	# LCD command reg.
.set	eng_ldr,eng_addr+0x104004	# LCD data reg.
.set	eng_lsr,eng_addr+0x108000	# LED status reg
.set	eng_ssr,eng_addr+0x10C000	# switch status reg.
.set	eng_psr,eng_addr+0x110000	# printer status reg.
.set	eng_msr,eng_addr+0x114000	# margin set reg.
.set	eng_sdr,eng_addr+0x118000	# serial data reg.
.set	eng_sir,eng_addr+0x11C000	# serial input reg.

 #--- TCP Setting Address Map ----#
.set	tcp_addr,0xff200000	# TCP address
.set	tcp_msr,tcp_addr+0x0	# main status reg.
.set	tcp_t0cr,tcp_addr+0x1	# timer 0 control reg.
.set	tcp_t1cr,0xff200002	# timer 1 control reg. as bug walk around
 #.set	tcp_t1cr,tcp_addr+0x2	# timer 1 control reg.
.set	tcp_pfr,tcp_addr+0x3	# periodic flag reg.
.set	tcp_irr,tcp_addr+0x4	# interrupt routing reg.
.set	tcp_rtmr,tcp_addr+0x1	# real time mode reg.
.set	tcp_omr,tcp_addr+0x2	# output mode reg.
.set	tcp_icr0,tcp_addr+0x3	# interrupt control reg. 0
.set	tcp_icr1,tcp_addr+0x4	# interrupt control reg. 1
.set	tcp_msc,tcp_addr+0x5	# 10mS counter
.set	tcp_scc,tcp_addr+0x6	# seconds clock counter
.set	tcp_micc,tcp_addr+0x7	# minutes clock counter
.set	tcp_hcc,tcp_addr+0x8	# hour clock counter
.set	tcp_dmcc,tcp_addr+0x9	# day of month clock counter
.set	tcp_mocc,tcp_addr+0xa	# month clock counter
.set	tcp_ycc,tcp_addr+0xb	# year clock counter
.set	tcp_ujcc,tcp_addr+0xc	# units julian clock ctr
.set	tcp_hjcc,tcp_addr+0xd	# hundreds julian clk ctr
.set	tcp_dwcc,tcp_addr+0xe	# day of week clk ctr
.set	tcp_t0l,tcp_addr+0xf	# timer 0 LSB
.set	tcp_t0m,tcp_addr+0x10	# timer 0 MSB
.set	tcp_t1l,tcp_addr+0x11	# timer 1 LSB
.set	tcp_t1m,tcp_addr+0x12	# timer 1 MSB
.set	tcp_tcr,tcp_addr+0x13	# timer compare ram
.set	tcp_tsr,tcp_addr+0x19	# timer save ram

 #--- SCSI Interface settings
.set mode_e, 0x040 	# enhanced mode
.set loop_back, 0x08	# loop back mode
.set init_ctl, 0x05e	# initiator controls
.set targ_ctl, 0x0f	# target controls
.set cur_stat, 0x07e	# current scsi bus status
.set bus_stat, 0x0e	# bus status
.set ass_data, 0x041 	# assert data bus
.set par_chki, 0x030	# parity check & interrupt
.set bsy_data, 0x049	# bsy & data bus on
.set dma_eop,  0x0a	# dma & eop interrupt
.set ass_req,  0x08	# assert req
.set star_dma, 0x0	# start dma send
.set des_req,  0x0	# deassert req
.set eop_int,  0x090	# eop interrupt
.set scsi_odr, 0x0ff180000	# output data register
.set scsi_csd, 0x0ff180000	# current scsi data
.set scsi_icr, 0x0ff180001	# initiator command register
.set scsi_mr2, 0x0ff180002	# mode register 2
.set scsi_tcr, 0x0ff180003	# target command register
.set scsi_ser, 0x0ff180004	# select enable register
.set scsi_csb, 0x0ff180004	# current scsi bus status
.set scbsr, 0x0ff180005	# bus and status
.set scsds, 0x0ff180005	# start dma send
.set scsi_sdt, 0x0ff180006	# start dma target receive
.set scsi_idr, 0x0ff180006	# input data register
.set scsi_sdi, 0x0ff180007	# start dma initiator receive
.set scsi_rpi, 0x0ff180007	# reset parity / interrupts
.set scsi_emr, 0x0ff180007	# enhanced mode register
.set scsi_imr, 0x0ff180007	# interrupt mask register
.set scsi_isr, 0x0ff180007	# interrupt status register

 #--- ICU setting address map ----------------------------------#
.set	icu_addr,0xfffffe00		# icu physical address
.set	hvct,0+icu_addr
.set	svct,1+icu_addr
.set	eltg_l,2+icu_addr
.set	eltg_h,3+icu_addr
.set	tpl_l,4+icu_addr
.set	tpl_h,5+icu_addr
.set	ipnd_l,6+icu_addr
.set	ipnd_h,7+icu_addr
.set	isrv_l,8+icu_addr
.set	isrv_h,9+icu_addr
.set	imsk_l,10+icu_addr
.set	imsk_h,11+icu_addr
.set	csrc_l,12+icu_addr
.set	csrc_h,13+icu_addr
.set	fprt_l,14+icu_addr
.set	fprt_h,15+icu_addr
.set	mctl,16+icu_addr
.set	ocasn,17+icu_addr
.set	ciptr,18+icu_addr
.set	pdat,19+icu_addr
.set	ips,20+icu_addr
.set	pdir,21+icu_addr
.set	cctl,22+icu_addr
.set	cictl,23+icu_addr
.set	lcsv_l,24+icu_addr
.set	lcsv_h,25+icu_addr
.set	hcsv_l,26+icu_addr
.set	hcsv_h,27+icu_addr
.set	lccv_l,28+icu_addr
.set	lccv_h,29+icu_addr
.set	hccv_l,30+icu_addr
.set	hccv_h,31+icu_addr
.set	sirq,0xa2000308			# addr of AT IRQ3
					# addr of AT IRQ4 = a2000309
					#	.	.	.
					# addr of AT IRQ9 = a200030d
.set	xint,0xe8000000			# addr of EXP XINT1 = ??????
					# addr of EXP XINT2 = ??????
.set	dmal,0xb0000000			# dma length
.set	dmaa,0xb0000004			# dma starting address
.set	io_bcr,0xffd00000		# board control reg.
 #.set	eng_isr,0xe8100000		# engine interface status reg
.set	bd_mii,0xff800000		# board I/O in reg.
.set	bd_mio,0xff900000		# board I/O out reg.
 #.set	tcp_addr,0xff200000		# TCP address
 #.set	tcp_msr,tcp_addr+0		# 
 #.set	tcp_t1cr,tcp_addr+1		#
 #.set	tcp_irr,tcp_addr+4		#
 #.set	tcp_omr,tcp_addr+2		#
 #.set	tcp_icr0,tcp_addr+3		#
 #.set	tcp_icr1,tcp_addr+4		#
 #.set	tcp_t1l,tcp_addr+0x11		#
 #.set	tcp_t1m,tcp_addr+0x12		#

 #--- monitor ram & stack location ------
#ifdef	ISE
.set stack_top,	0x3ffff0	# initialize top of stack to end of ram
#else
.set stack_top,	0x8000		# initialize top of stack to be 0x8000
#endif

 #--- system ram allocation for the EB ---------#
.set dram_start1, 0		# DRAM - burst on, cacheable W1
.set dram_start2, 0x2000000	# DRAM - burst off, cacheable W2
.set dram_start3, 0x4000000	# DRAM - burst on, non-cacheable W3
.set dram_start4, 0x6000000	# DRAM - burst off, non-cacheable W4
.set max_dram,   0x01FFFFFF	# max dram address w/ 4M chip
.set wrap_add,	0x800000	# wrap address in 4Mb & 8Mb configu
.set blksize,	0x400000	# ram blksize = 4Mb

 #--- System EPROM address map --------------------------#
.set	PROM0, 0x10000000	# burst on, casheable
.set	PROM1, 0x12000000	# burst off, casheable
.set	PROM2, 0x14000000	# burst on, non-cashe
.set	PROM3, 0x16000000	# burst off, non-cashe

 #---------------end const from diag file
 #
 #  global constants
 #





#if (defined (DEBUG) || defined (RAM))
	.set	modad, 0x0010
	.set	dataad, 0x0020
#else
        .set    modad, 0x8000		# monitor mod table
        .set    dataad, 0x8010		# monitor data address
#endif
	.set	prom_start, 0x10000000	# PROM location
	.set	is_size,    0x400	#interrupt stack size
	.set	mon_stack_size,0x200	#monitor stack size
	.set	ram_start, 0x0		# start of RAM
	.set	ram_end, 0x1ffffff	# RAM size

	.set	busof, 1		# address offset
        .set    timeout,1		# timeout error
	.set	demo_entry,0x10008000	# burned demo entry

#ifdef	ETHER
        .globl  _Einit, _Eread, _Ewrite, _Eload
#endif

 # Protocol errors stored in proerr(sb):

 #      0       no error
 #      1       timeout while in get char loop
 #      2       not used
 #      3       illegal char in the command length field
 #      4       command too short (no. of char received < command length)
 #      5       illegal char in the crc field
 #      6       crc error
 #
        .set    stalon, 0             	# stand alone indicator
        .set    transp, 1             	# transparent mode
        .set    true, 1               	# define logical true
        .set    false, 0              	# define logical false
        .set    trma, 0               	# terminal a
        .set    trmb, 1               	# terminal b
        .set    nswbpt, 14             	# number of software break-points
        .set    mncfg, 0              	# monitor cfg reg. value #### not used
        .set    cfg_de, 8             	# cfg direct exception bit
        .set    cfg_dc,9              	# cfg data cache enable bit
        .set    cfg_ic,11             	# cfg instruction  cache enable bit
        .set    psr_u, 8              	# u bit in psr
        .set    psr_t, 1              	# t bit in psr
        .set    psr_s, 9              	# s bit in psr
        .set    psr_p, 10             	# p bit in psr
        .set    psrs, 0x200           	# psr s number
        .set    psrt, 2               	# psr t number
        .set    pce_dcr,20            	# pce bit in dcr (pc match enable)
        .set    crd_dcr,6             	#crd bit in dcr (addr compare for read)
        .set    bptc, 0xf2            	# bpt instruction
        .set    rxpc,0x32             	# rxp instruction
        .set    puti,1                	# put indication for get_put procedure
        .set    cfgn,20               	# cfg number in get_put procedure
        .set    handb,0               	# hand_shaking bit of opmod word
        .set    handlf,1              	# on hand_shaking cr echo is lf
        .set    echob,2               	# echo bit
        .set    echolf,3              	# flag for echo to cr by cr lf
 #
 #  ascii characters
 #
        .set    cntra, 0x1            	# cntr/a
        .set    cntrt, 0x14           	# cntr/t
        #.set    cr, 0x0d              	# return
        #.set    lf, 0x0a              	# line feed
        .set    dot, 0x2e             	# dot
        .set    comma, 0x2c           	# comma character
        #.set    space, 0x20           	# space character
 #
 # ***************************************************************
 #        global variables   (sb relative)
 # *************************************************************** 
 #

    .dsect	globals,	0

opmod:		.blkb		# operation mode variable
ophnd:		.blkb		# operation mode hand_shaking
mon_usr:	.blkb		# monitor/user time flag
pndf:		.blkb		# pending interrpts flag
dtrm:		.blkd		# pointer to defult terminal buffer
ndtrm:		.blkb		# num of defult terminal
svcpf:		.blkb		# svc flag for read/write for movus
errtyp:		.blkb		# entry type
com_num:	.blkb		# save command number
scrch1:		.blkd		# scratch 1
scrch2:		.blkd		# scratch 2
svsize:		.blkd		# size of return value in getput.
strtadr:	.blkd		# save raddress
endadr:		.blkd		# save end interrupt routine address
serea:		.blkd		
svfp:		.blkd		# save fp
svus:		.blkd		# save us
svis:		.blkd		# save is
svpc:		.blkd		# save pc
svmod:		.blkd		# save mod
svpsr:		.blkd		# save psr
svsb:		.blkd		# save sb
svcfg:		.blkd		# save cfg
svr7:		.blkd	7	# save r
svr0:		.blkd		# save r0
tmppsr:		.blkd		
heapp:		.blkd		# heap pointer
heape:		.blkd		# heap end
heaps:		.blkd		# heap begin
mnpsr:		.blkw		# monitor psr
mnfp:		.blkd		# save monitor fp
mnmcr:		.blkd		# save monitor mcr
mnsp:		.blkd		# save monitor sp
mnsph:		.blkd		# monitor high sp
brkar:		.blkd	nswbpt	# soft-bpr array
stepflg:	.blkb		# step flag
ackflg:		.blkb		# acknowledge flag
cxpflg:		.blkb		# cxp command counter
ins:		.blkb	nswbpt	# array of brpr instruction save
monusr1:	.blkb		# temp save of mon_user flag
stpcnt:		.blkd		# step counter
actbrk:		.blkd		# # of current break
oldpc:		.blkd	2	# save old pc,us,is,mod in cxp command
endpc:		.blkd		# pc of inserted bpt on stack
endpc1:		.blkd		# pc of begin when cxp also
cntrlb:		.blkb		# cntrl/b starts every command     
cntrll:		.blkb		# cntrl/l start fast load message
cntrls:		.blkb		# cntrl/s hold screen
cntrlq:		.blkb		# cntrl/q resume screen
stptype:	.blkd		# step type (step while,step until etc)
stuadd:		.blkd		# stu command variable address
stpmsk:		.blkd		# step until/while mask
stpup:		.blkd		# upper bound in step while/until
stplow:		.blkd		# lower bound of step while/until
rstint:		.blkd		# save reset value of intbase
lstfrm:		.blkb		# $$$ frame number of last command
prot_chng:	.blkb		# $$$ protocol is going to be changed
protoc:		.blkb		# $$$ 1 if new protocol, 0 if old
proerr:		.blkb		# $$$ protocol error
curfrm:		.blkb		# $$$ current frame number
profld:		.blkb		# $$$ binary load in new protocol
fldfrm:		.blkb		# $$$ current frame is fast load frame
timcnt:		.blkw		# $$$ timer/counter (new protocol use)
t1pckh:		.blkd   	# $$$ header field for term1 packet
ram_size:	.blkd		
rbptf:		.blkd		# rem bpt flag
fpubuf:		.blkd	4	# working buffer for getput fpu lregs 
term1:		.blkd	137	# terminal 1 record
t2pckh:		.blkd		# $$$ header field for term2 packet
term2:		.blkd	137	# terminal 2 record
sresp:		.blkd		# $$$ response saved for retransmission
esbvar:		.blkd		# $$$ end of static base variables
#ifdef	ETHER
force_serial:	.blkb		# flag to force serial link
#endif
		.align		4
stacks:		.blkb		is_size  # allocate intterupt stack space
svrsp:		.blkd
		.blkb	mon_stack_size	# allocate monitor stack space
stackl:		.blkd

end_local_vars:
 
        .globl  _evars
        .set    _evars,         end_local_vars + dataad 
  
 #
 # **************************************************************
 #        end  of  global  variables
 # **************************************************************
 #
 
 #  other constatnts

        .set    mont, 0			# flag monitor time
        .set    usert, 1		# flag user time
        .set    pndmod, 2		# flag to delay interrupts
 
        .set    sio_intr, 1             # serial I/O interrupt
        .set    clear, 0x40          	# clear ipnd register
        .set    frz, 3             	# mctl freeze bit
	.set	cfrz, 7			# mctl counter freeze bit

 #
 #  terminal record
 #
        .set    inlen, 0x220   		# length of input buffer (544 bytes)
        .set    inbuf, 0       		# input bufer
        .set    inlm, inbuf+inlen	# offset into inbuf of last character 
					#  read
        .set    outb, inbuf    		# output buffer (same as input )
        .set    outlm, inlm    		# pointer to last byte in outb to be 
					#  printed
        .set    trmrlg, inlm+4 		# terminal record length
  
