; CopydiskMc.mu -- main microcode source for CopyDisk
; Copyright Xerox Corporation 1979
; Last modified November 25, 1979  10:23 PM by Boggs

; Standard R-registers usable by the emulator task

$AC3		$R0;	Accumulators
$AC2		$R1;
$AC1		$R2;
$AC0		$R3;
$NWW		$R4;	New wakeups waiting (communication between tasks)
$SAD		$R5;	Temporary private to emulator
$PC		$R6;	Program Counter for emulated Nova
$XREG		$R7;	Temporary private to emulator.
;			Contains instruction LCY 8 upon dispatch to TRAP1.
$XH		$R10;	Temporary private to emulator
$MTEMP		$R25;	Temporary usable by any task
$DWAX		$R35;	Temporary private to emulator
$MASK		$R36;	Temporary private to emulator

$LREG		$R40;	Another name for the M-register

%0, 1777, 37, TRAP1;	must be at location 37 in the ram

#TriConMc.mu;		Gets AltoConsts23.mu

; Trap handler and dispatcher for instructions that trap into
; the RAM.  In the following predefinition, the tags correspond
; to opcodes 60000, 60400, 61000, 61400, ... 77400.
; Note that opcodes 60000, 60400, 61000, 64400, 65000, 67000, and 77400
; cannot be used since control never gets to the RAM for these).

;		      61400    62000  62400       63000   63400
!37,40,TrapDispatch,,,GetFrame,Return,BcplUtility,BlockEq,PupChecksum;

; Control comes here with the instruction LCY 8 in XREG
TRAP1:	T←37;
	L←XREG AND T;
TrapDispatch:
	SINK←LREG, BUS, TASK;
	:TrapDispatch;

#GetFrame.mu;		kept in <AltoSource>BcplRuntimeSource.dm
#BcplUtil.mu;		kept in <AltoSource>BcplRuntimeSource.dm
#BlockEq.mu;		kept in <AltoSource>CopyDisk.dm
#PupChecksum.mu;	kept in <Ifs>IfsMc.dm