//
// Definitions for the Alto microprocessor
// last edited  October 6, 1977  10:23 AM
//
// Copyright Xerox Corporation 1979


structure MI:	// the Alto microinstruction
[	rsel bit 5; aluf bit 4; bs bit 3; f1x bit 4
	f2x bit 4; loadt bit 1; loadlx bit 1; next bit 10
]

manifest	// bits for masks
[	b0=#100000; b1=#40000; b2=#20000; b3=#10000
	b4=#4000; b5=#2000; b6=#1000; b7=#400
	b10=#200; b11=#100; b12=#40; b13=#20
	b14=#10; b15=4; b16=2; b17=1
]

manifest
[	ltalumask = b2+b5+b6+b12+b13+b14	// ALUF's which load T
	tdefalumask = not (b0+b5+b6+b13+b15)	// ALUF's which use T
]

manifest	// bus sources
[	bsREADR=0; bsLOADR=1; bsNONE=2; bsREAD2R=3
	bsLOAD2R=4; bsMD=5; bsMOUSEDATA=6; bsDISP=7
]

manifest	// F1's, hi bit inverted
[	f1NONE=#10; f1MARGETS=#11; f1TASK=#12; f1BLOCK=#13
	f1LLSH1=#14; f1LRSH1=#15; f1LLCY8=#16; f1CONST=#17
	f1SWMODE=0; f1WRTRAM=1; f1RDRAM=2
	f1STARTIO=7
]
manifest
[	badf1mask = b3+b4+b5+b6	// illegal F1's
	busf1mask = b1+b7	// F1's which read the bus
	waitf1mask = b0+b1+b2+b11+b12	// F1's with deferred effect
]

manifest	// F2's, hi bit inverted
[	f2NONE=#10; f2BUSEQ0=#11; f2SHLS0=#12; f2SHEQ0=#13
	f2BUS=#14; f2ALUCY=#15; f2STORE=#16; f2CONST=#17
	f2BUSODD=0; f2MAGIC=1; f2DNS=2; f2ACDEST=3
	f2IRGETS=4; f2IDISP=5; f2ACSOURCE=6
]
manifest
[	badf2mask = b7	// illegal F2's
	busf2mask = b0+b11+b14	// F2's which read the bus
	nmf2mask = not (b1+b2+b3+b7+b10+b16+b17)	// branch F2's
	ldef2mask = b2+b12+b13+b15	// F2's which use L
]