// D1.d -- Definitions for D1-dependent parts of Midas
//	Last edited: 26 November 1979

structure Pointers:
[	garb0	bit 1
	MemBX	bit 2
	MemBase	bit 5
	StkOvf	bit 1
	StkUnd	bit 1
	garb1	bit 2
	RBase	bit 4
]

//Structure of HWStatus vector defined in D1i0 and used by D1Reset,
//D1I2, D1CONFIG, & elsewhere.
structure HWStatus:
[ //First word is saved value of DMuxTab!dCLKRUN
	ClkRate		byte
	RunControl	bit 4	//ECLup, EnRefreshPeriod', IOReset',
				//RefreshPeriod
	g0		bit 4
	MIRdebugging	word	//MIRdebug bit for LoadDMD(IMAddr2)
				//when MIRdebug feature on, else 0
	g5		word	//unused
	ConnectedMachine word	//-1 if connection unknown, else serial no.
//Basic configuration items saved across Run-Prog; during operation these
//are unpacked into statics of the same names.
	HaveControl	bit
	HaveProcL	bit
	HaveProcH	bit
	HaveMemC	bit
	HaveMemD	bit
	HaveMemX	bit
	HaveIFU		bit
	HaveDskEth	bit
	HaveDisplay	bit
	g1		bit 5
	NoCacheAParity	bit
	ConfigUnknown	bit

	MapICcode	bit 4
	MainICcode	bit 4
	ModuleMask	bit 4
	g2		bit 4

	g3		bit 4
	log2rows	bit 4
	log2pgsize	byte

	IMXmask		word
	g4		word	//For additions
]

structure [ lh byte; rh byte ]
structure [ nib0 bit 4; nib1 bit 4; nib2 bit 4; nib3 bit 4 ]

manifest
[	BadLoadRam = 2000
	BadConstants = 2001
//Removed 2002
	UndefRegXRead = 2003
	UndefRegXWrite = 2004
	NotGoMemX = 2005
	LookUpAAFail = 2006
	BadIMAVec = 2007
	XSMicTextArgs = 2008
	UnexpectedIMMemX = 2009
	UnexpectedFFtype = 2010
	BadBCarg = 2011
	MSTATbug = 2012
	PrintDMXwbug = 2013
	HWChkMenubug = 2014
]