; MData.asm	assembly of resident data items.
;	Last edited: 7 December 1979

.get "MAsmCommon.d"

; Defined here

; Items needed before Junta
.bext MidasCFA,LastTimer,TimeStart,BBWait

.bext GoVec		; Vector used for "Go" "Step" state information
.bext TimeTimeOut

.bext BadAText

; MDATA and MADDR memories used by MTEST and elsewhere that Midas creates
; items that must be displayed.

.bext MDATAtab		; 10 words long x TValSize*16 bits/word
.bextz BitsChecked,ShouldBe,DataWas
.bext BitsPicked,BitsDropped

.bext MADDRtab		; 14 words long x 40 bits/word
.bextz LowAddress,HighAddress,LoopCount,CurrentAddress,AddrIncrement
.bext AddrIntersect,AddrUnion,TestFailures,MCTimeOut

.zrel

BitsChecked:	.BitsChecked
ShouldBe:	.ShouldBe
DataWas:	.DataWas
LowAddress:	.LowAddress
HighAddress:	.HighAddress
LoopCount:	.LoopCount
CurrentAddress:	.CurrentAddress
AddrIncrement:	.AddrIncrement

.srel

MDATAtab:	.MDATAtab
MADDRtab:	.MADDRtab
AddrIntersect:	.AddrIntersect
AddrUnion:	.AddrUnion
BitsPicked:	.BitsPicked
BitsDropped:	.BitsDropped
TestFailures:	.TestFailures
MCTimeOut:	.MCTimeOut

GoVec:		.GoVec
TimeTimeOut:	.TimeTimeOut
LastTimer:	.LastTimer
TimeStart:	.TimeStart
BBWait:		.BBWait
MidasCFA:	.MidasCFA

BadAText:	.BadAText

.nrel

.TimeTimeOut:	0
		0

.LastTimer:	0
		0

.TimeStart:	0
		0

.BBWait:	0
		0

.MidasCFA:	.blk 13

; Vector used by Step, Go, Rep-Go, Rep-SS, etc. filled by SetupIMA
; in machine-dependent way.
.GoVec:		0
		0
		0
		0
		0
		0
		0
		0

.BadAText:	.txt "Bad address"

; Fake MDATA and MADDR memories used by MDEBUG and MTEST
; To display these, a microprogram defining MDATA and MADDR and naming
; addresses for each of these quantities must be loaded (Presumably this is
; carried out by the Midas.Midas command file invoked on Midas/I.).
.MDATAtab:
.BitsChecked:	.blk TValSize
.ShouldBe:	.blk TValSize
.DataWas:	.blk TValSize
.BitsDropped:	.blk TValSize
.BitsPicked:	.blk TValSize
		.blk 3*TValSize	; For future additions
.MADDRtab:
.LowAddress:	.blk 2
.HighAddress:	.blk 2
.LoopCount:	.blk 2
		.blk 2	; Unused
.CurrentAddress:	.blk 2
.AddrIncrement:	.blk 2
.AddrIntersect:	.blk 2
.AddrUnion:	.blk 2
.TestFailures:	.blk 2
; These ten machine-dependent error counters are stored 2 per MADDR word
.MCTimeOut:	.blk 16	; word 0: D0 hung detected by recvbyte
			; word 1: D0 hung at onset of sendbyte
			; word 2: D0 failed to ack sendbyte
			; word 3: D0 never removed ack
			; word 4: readtpc & readt consistency errs
			; word 5: CheckStopped glitches
			; word 6: word no. of last kernal transmission failure
			; word 7: 4-bit occurrence counts of transmission
			;	  failures during 10 repetitions of booting
			; word 10-15 unused

.end