; Constant definitions for Alto II CAT microcode

;Version U5-R4-C

#AltoConsts23.mu;

$RMR
$L20013, 00000, 124000;Set Reset Mode Register. DF1 = 13

; ACB indices
$idxLink
$0;
$idxLength
$1;
$idxCmd
$2;
$idxData
$3;
$idxF1
$4;
$idxFAcc1
$5;
$idxF2
$6;
$idxFAcc2
$7;
$idxSamples
$10;

$cmdAdc
$1;
$cmdDac
$2;
$cmdTone
$3;
$cmdAdcPacked
$4;
$cmdDacPacked
$5;
$cmdAdcU255
$6;
$cmdDacU255
$7;

$Version
$5;"major" version only

; Constants for CAT
$OREMask
$4000;
$DataMask
$170000;
$Strobe
$1;command word strobe

; R-S registers
$AC3
$R0;
$AC2
$R1;
$AC1
$R2;
$AC0
$R3;

; NWW
$R4;comments represent unavailable registers
; TEMP
$R5;
; PC
$R6;
; ??
$R7-10;
; I/O
$R11-13;CLOCKTEMP (R11) is available
$RData
$R11;input assembly register

$Temp
$R14;temp, can receive output of shifter
$utVal
$R14;Temp

; Mesa
$R15
$stkp
$R16;
; Mesa
$R17;
; Display
$R20-24
$Sil2
$R21;once used by display (CURDATA)

$MTEMP
$R25;available between TASK switches, can receive output of shifter

; Display
$R26-27
$Sil1
$R26;once used by display (HTAB)

; Disk
$R30-34
; BitBlt
$R35-36

$Mrt
$R37;
$LASTL
$R40;same as M
$LastL
$R40;

; Mesa
$R41;
; BitBlt
$R42-43;
; Mesa
$R44-47;
; BitBlt
$R50;
; Mesa
$R51-57;

$stk0
$R60;
$stk1
$R61;
$stk2
$R62;
$stk3
$R63;
$stk4
$R64;
$stk5
$R65;
$stk6
$R66;
$stk7
$R67;
; Mesa
$R70;

$ACB1
$R71;Current ACB for list 1
$ACB2
$R72;Current ACB for list 2
$Index
$R73;0 for list 1, 1 for list 2
$Data
$R74;working registers for performing audio task functions
$Samples
$R75;
$ACB
$R76;current ACB, in DoAudio Routine
$utExp
$R76;ACB
$NCValue
$R77;intermediate value in NCO two-tone computation
$WData
$R77;output word register
$utSign
$R77;NCValue

$LeftMask
$177400;

;; DCS, July 21, 1978 11:55 AM, extract from corresponding Auburn...Mc-... files
;; May 21, 1979 9:07 AM, for version R4-C
;; May 24, 1979 5:23 PM, use XMesa’s version of emulator entry point
;; October 15, 1979 1:45 PM added silence registers
;; L. Stewart, March 16, 1980 5:39 PM added Formatting
;; L. Stewart, March 17, 1980 1:38 PM CAT copy