//D1Mic.d -- layout defs for microcomputer status block
//	Last editted: 18 July 1979

//Microcomputer storage can be viewed as 1-byte items ($ABSOLUTE) or
//2-byte items ($ABS); in addition, UPTIME, and TGLITCH are Midas
//registers; VOLTS through MAXTEMP2 are the Midas MSTAT memory

//Environment template:
//VOLTS	VDD	byte	 .0619*VDD = 12v supply voltage
//	VCC	byte	 .0262*VCC = 5v supply voltage
//	VTT	byte	-.0101*VTT = -2v supply voltage
//	VEE	byte	-.0259*VEE = -5v supply voltage
//AMPS	IDD	byte	 .971*IDD = 12v supply amperage
//	ICC	byte	 .971*ICC = 5v supply amperage
//	ITT	byte	 .971*ITT = -2v supply amperage
//	IEE	byte	4.29*IEE = -5v supply amperage
//All temperature bytes converted to degrees K when multiplied by 1.96
//TEMP0	Base	byte
//	ContB
//	ContA
//	ProcL
//TEMP1	ProcH
//	IFU
//	MemC
//	MemX
//TEMP2	MemD
//	DskEth
//	Display

structure Mic:
[	mZVERSION	byte
	mOUTOFSPEC	byte	//VDD, VCC, VTT, VEE, IDD, ICC, ITT, IEE

	mVOLTS		word 2	//$ABSOLUTE 2
	mAMPS		word 2
	mTEMP0		word 2
	mTEMP1		word 2
	mTEMP2		word 2

	mFVOLTS		word 2	//#26
	mFAMPS		word 2
	mFTEMP0		word 2
	mFTEMP1		word 2
	mFTEMP2		word 2

	mMINVOLTS	word 2	//#52
	mMINAMPS	word 2
	mMINTEMP0	word 2
	mMINTEMP1	word 2
	mMINTEMP2	word 2

	mMAXVOLTS	word 2	//#76
	mMAXAMPS	word 2
	mMAXTEMP0	word 2
	mMAXTEMP1	word 2
	mMAXTEMP2	word 2

	mUPTIME		word 3	//bytes reversed * 102.4 ms = uptime
	mTGLITCH	word 3	//uptime at worst power glitch

	mZPTR		word 1	//#136

	mZPC		word 1	//#140
	mZS		byte
	mZP		byte
	mZA		byte
	mZX		byte
	mZY		byte	//#146
	mBADSUPPLYSPEC	byte	//Like OUTOFSPEC saved at time when supply
				//was last bad
	mPROBLEMS	byte	//bit 0 (1 flash) = normal wait
				//bit 1 (2 flashes) = couldn't boot
				//bit 2 (3 flashes) = transient power problem
				//bit 3 (4 flashes) = current power problem
				//bit 4 (5 flashes) = normal shut down
				//bit 5 (6 flashes) = over temp shut down
				//bit 6 (7 flashes) = Midas hogging CPbus
				//bit 7 --
	g0		byte

	mZSUBPC		word	//#152
	mZSUBS		byte	//#154
	mZSUBP		byte
	mZSUBA		byte
	mZSUBX		byte
	mZSUBY		byte
	g1		byte

	mZSIMBLK	word 4
]

manifest [
MicStatLength = size Mic/16

//Address offsets in MSTAT memory
mVOLTS = 0
mAMPS = 1
mTEMP0 = 2
mTEMP1 = 3
mTEMP2 = 4

mFVOLTS = 5
mFAMPS = 6
mFTEMP0 = 7
mFTEMP1 = #10
mFTEMP2 = #11

mMINVOLTS = #12
mMINAMPS = #13
mMINTEMP0 = #14
mMINTEMP1 = #15
mMINTEMP2 = #16

mMAXVOLTS = #17
mMAXAMPS = #20
mMAXTEMP0 = #21
mMAXTEMP1 = #22
mMAXTEMP2 = #23
]