; DMTMain.asm
; Copyright Xerox Corporation 1979, 1983
; Last modified July 1, 1983  2:36 PM by Boggs

	.TXTM B

.DUSR	SWAT = 77400

; OUTGOING

.BEXTZ	RANDOM, LOADRAM, ERROR, OsFinish
.BEXT	INITINT, DESTROYINT, FINDFREECHAN
.BEXTZ	EOM, ALTO2, VINT, pACT, pWW, pSAD, pDISPLAY
.BEXTZ	PEAC0, PEAC1, PEAC2, PEAC3, PECY, PEPC, pIRET
.BEXTZ	pSBCTAB, pEBCTAB

; INCOMING

.BEXT	INITETHER, bootLoaderPacket, mayDayPacket
.BEXT	RAMTEST, PRINTRAMTEST, INITRAMTEST
.BEXT	A1PBC, A1INIT, A1TMF, A1TMS, A1PEINT
.BEXT	A2PBC, A2INIT, A2TMF, A2TMS, A2PEINT
.BEXT	RESTORE, UNRESTORE
.BEXTZ	PMSG, PMSG1, POCT, PDEC, CHANGEBANK
.BEXT	SwatTrap, SwatInterrupt, RamImage
.BEXTZ	SOM, XMFLAG, RAMFLAG

	.SREL

TIMERINT:	.TIMERINT
INITINT:	.INITINT
PEINT:		.PEINT
OsFinish:	.OsFinish
NOPARTRAP:	.NOPARTRAP

	.ZREL

VERSION:	0		; -> VERSION TEXT
ERROR:		.ERROR
RANDOM:		.RANDOM
LOADRAM:	.LOADRAM
ALTO2:		0		; NONZERO IF THIS IS AN ALTO2
DOSUMMARY:	0		; TRUE IF IT IS TIME TO REPORT IN
DOSLOWTESTS:	0		; TRUE IF IT IS TIME TO DO SLOW TESTS
VINT:		0		; INCREMENTED BY VERT. INTERVAL INTERRUPT
EOM:		176777		; END OF MEMORY

pBLANKDCB:	BLANKDCB	; -> DCB TO KEEP SCREEN BLACK
pSHOWDCB:	SHOWDCB		; -> DCB TO SHOW THE INNER WORKINGS

pACT:		453		; -> INTERRUPTS ACTIVE
pWW:		452		; -> INTERRUPTS WAITING
pSAD:		621		; -> SAD IN PARITY DUMP AREA
pDISPLAY:	420		; -> DISPLAY LIST HEAD

pSBCTAB:	SBCTAB		; -> START OF BAD CHIP TABLE
pEBCTAB:	EBCTAB		; -> END OF BAD CHIP TABLE

C17:		17

	.NREL

	0			; sacrificial word for BLDR to eat

;-----------------------------------------------------------------------------
DMT:				; INITIALIZATION
;-----------------------------------------------------------------------------
	JSR Bird
	.TXT "DMT Cursor by Phil Zimmerman, who likes exotic birds."
Bird:	STA 3 VERSION
	JSR CURSOR
	 0
	1700
	16060
	34010
	60610
	40222
	100016
	100061
	100141
	100301
	100201
	170742
	36642
	6446
	654
	70
	140

CURSOR:	MOV 3 0			; SRC-1
	LDA 1 pCURMAPEND	; END DEST
	LDA 3 M16D		; COUNT
	BLT

	LDA 0 @ppSwatTrap	; FILL TRAPVEC WITH CALLS TO DEBUGGER
	LDA 1 pTRAPVECEND
	LDA 3 M32D
	BLKS

	LDA 0 @ppNOPARTRAP
	STA 0 @P532

	LDA 0 TRAP		; SET TRAPS IN LOW CORE
	LDA 1 C17
	LDA 3 M16D
	BLKS

	MKZERO 0 0		; ZERO TEST AREA
	LDA 1 EOM
	MOV 1 3
	LDA 2 SOM
	SUB 2 3			; LENGTH OF TEST AREA-1
	COM 3 3			; -LENGTH OF TEST AREA
	BLKS

	LDA 1 pEBCTAB		; ZERO THE BAD CHIP TABLE
	LDA 3 MLBCTAB
	BLKS

;	JSR @LOADRAM

	VERS			; AC0[0-3] IS ENGINEERING NUMBER
	CYCLE 4
	LDA 1 C17
	AND 1 0
	JSR ENG
	0			; ALTO 1 MICROCODE VERSION 23 OR OLDER
	0			; ALTO 1 MICROCODE VERSION 24 OR NEWER
	-1			; ALTO 2 WITHOUT XM
	-1			; ALTO 2 WITH XM
	0			; D0 EMULATING AN ALTO 1
	-1			; DORADO EMULATING AN ALTO 2 XM
ENG:	ADD 0 3
	LDA 0 0,3
	STA 0 ALTO2

	MKZERO 0 0
	STA 0 @pACT		; MASK OFF ALL INTERRUPT CHANNELS
	EIR
	STA 0 @pWW		; IGNORE INTERRUPTS CAUSED UP TO NOW

	LDA 3 pBLANKDCB		; BLANKDCB KEEPS THE SCREEN BLACK
	SKEVEN 3 3		; FORCE DCB TO BE ON AN EVEN ADDRESS
	 INC 3 3
	STA 3 pBLANKDCB
	MKZERO 0 0
	STA 0 0 3		; LINK
	STA 0 2 3		; BIT MAP ADDR
	INC 0 0
	STA 0 3 3		; SCAN LINE COUNT
	LDA 0 C40000
	STA 0 1 3		; BLACK BACKGROUND, 0 WDS/SCAN LINE
	STA 3 @pDISPLAY

	LDA 3 pSHOWDCB		; SHOWDCB SHOWS THE INNER WORKINGS OF DMT
	SKEVEN 3 3		; FORCE DCB TO BE ON AN EVEN ADDRESS
	 INC 3 3
	STA 3 pSHOWDCB
	MKZERO 0 0
	STA 0 0 3		; LINK
	LDA 0 D38		; 38 WORD/SL,
	STA 0 1 3		; HIGH RESOLUTION, WHITE BACKGROUND
	LDA 0 SOM
	SKEVEN 0 0
	 INC 0 0
	STA 0 2 3		; BIT MAP ADDR
	LDA 0 D404
	STA 0 3 3		; SCAN LINE COUNT

	LDA 0 ALTO2		; INITIALIZE TEST MODULES
	SNZ 0 0
	 JSRII ppA1INIT
	JSRII ppA2INIT
	 NOP

	LDA 0 @ppPEINT		; SET UP PARITY ERROR INTERRUPT ROUTINE
	JSRII ppINITINT		; MUST BE FIRST CALL ON INITINT
	MOVR 0 0 SZR		; DID WE GET CHANNEL 15?
	 SWAT			; NO. PROGRAM BUG

	LDA 0 @ppTIMERINT	; SET UP TIMER INTERRUPT
	JSRII ppINITINT
	STA 0 @pDSTART1

	LDA 0 @ppSwatInterrupt	; SET UP SWAT INTERRUPT
	JSRII ppINITINT
	LDA 1 @pDSTART1
	ADD 1 0
	STA 0 @pDSTART1

	JSRII ppINITETHER	; START THE ETHERNET
	JSRII ppINITRAMTEST	; INITIALIZE THE RAM TEST

	JMP LOOP		; BEGIN MAIN LOOP

pTRAPVECEND:	567		; END OF TRAP VECTOR
pCURMAPEND:	450		; END OF CURSOR BITMAP
pDSTART1:	421		; DISPLAY INTERRUPT MASK LOC

ppPEINT:	PEINT
ppINITINT:	INITINT
ppTIMERINT:	TIMERINT
ppA2INIT:	A2INIT
ppA1INIT:	A1INIT
ppINITRAMTEST:	INITRAMTEST
ppINITETHER:	INITETHER
ppCHANGEBANK:	CHANGEBANK
ppSwatTrap:	SwatTrap
ppSwatInterrupt: SwatInterrupt
ppNOPARTRAP:	NOPARTRAP

P532:		532		; PARAMETERLESS OPCODES TRAP VIA HERE
TRAP:		SWAT
C24400:		24400
C40000:		40000
MLBCTAB:	-LBCTAB		; -LENGTH OF BAD CHIP TABLE
D38:		38.
D404:		404.
M32D:		-32.
M16D:		-16.

BLANKDCB:	.BLK 5
SHOWDCB:	.BLK 5

;-----------------------------------------------------------------------------
LOOP:				; TOP OF THE MAIN LOOP
;-----------------------------------------------------------------------------
	LDA 2 CURSORFLAG
	SNZ 2 2			; STEP IT OR FLING IT?
	 JMP FLING

	JSR @RANDOM
	MOVL 0 0 SNC		; SHALL WE STEP X?
	 JMP DOY		; NO
	LDA 1 @pCURSORX
	LDA 2 M16D
	MOVL 0 0 SNC		; WHICH DIRECTION?
	 NEG 2 2		; THE OTHER DIRECTION
	ADD 2 1
	SP 1 1			; IS IT TOO SMALL?
	 LDA 1 CURSORXMAX	; YES.  SET TO BIGGEST VALUE
	LDA 0 CURSORXMAX
	SLE 1 0			; IS IT TOO BIG?
	 MKZERO 1 1		; YES.  SET TO SMALLEST VALUE
	STA 1 @pCURSORX

DOY:	JSR @RANDOM
	MOVL 0 0 SNC		; SHALL WE STEP Y?
	 JMP KBD		; NO
	LDA 1 @pCURSORY
	LDA 2 M16D
	MOVL 0 0 SNC		; WHICH DIRECTION?
	 NEG 2 2		; THE OTHER DIRECTION
	ADD 2 1
	SP 1 1			; IS IT TOO SMALL?
	 LDA 1 CURSORYMAX	; YES.  SET TO BIGGEST VALUE
	LDA 0 CURSORYMAX
	SLE 1 0			; IS IT TOO BIG?
	 MKZERO 1 1		; YES.  SET TO SMALLEST VALUE
	STA 1 @pCURSORY
	JMP KBD

FLING:	JSR @RANDOM		; NEW X COORDINATE
	MOV 0 1
	MKZERO 0 0
	LDA 2 CURSORXMAX	; SCALE IT
	DIV
	 NOP
	STA 0 @pCURSORX

	JSR @RANDOM		; NEW Y COORDINATE
	MOV 0 1
	MKZERO 0 0
	LDA 2 CURSORYMAX	; SCALE IT
	DIV
	 NOP
	STA 0 @pCURSORY

KBD:	LDA 0 pBLANKDCB
	LDA 1 @pKBDAD1
	LDA 2 BLANKTOPKEY
	AND# 2 1 SNR		; SHOW THE INNER WORKINGS?
	 LDA 0 pSHOWDCB		; YES
	STA 0 @pDISPLAY

	LDA 0 @pKBDAD1		; CHECK KEYBOARD
	LDA 1 SKEY
	AND# 0 1 SNR		; "S" KEY?
	 JSR PRINTSUM		; PRINT ERROR SUMMARY
	LDA 0 @pKBDAD1
	LDA 1 BLANKMIDKEY
	AND# 0 1 SZR		; "BLANK MIDDLE" KEY?
	 JMP L1			; NO
	LDA 1 CURSORFLAG
	COM 1 1
	STA 1 CURSORFLAG

L1:	LDA 0 ALTO2		; TEST MEMORY FAST
	SNZ 0 0
	 JSRII ppA1TMF
	JSRII ppA2TMF
	 NOP
	ISZ BLOCKS
	 NOP

	LDA 0 DOSUMMARY
	SZ 0 0			; TIME TO REPORT TEST RESULTS?
	 JSR PRINTSUM		; YES
	MKZERO 0 0
	STA 0 DOSUMMARY

	LDA 0 DOSLOWTESTS
	SNZ 0 0
	 JMP LOOP
	MKZERO 0 0
	STA 0 DOSLOWTESTS
	LDA 0 ALTO2		; TEST MEMORY SLOW
	SNZ 0 0
	 JSRII ppA1TMS
	JSRII ppA2TMS
	 NOP
	JSRII ppRAMTEST		; RAM TEST IS SLOW
	JMP LOOP

C77:		77
BLOCKS:		0		; TOTAL TESTS MOD 2↑16

CURSORXMAX:	1100		; MAX CURSOR X VALUE
CURSORYMAX:	1400		; MAX CURSOR Y VALUE
pCURSORX:	426		; CURSOR X LOC
pCURSORY:	427		; CURSOR Y LOC
CURSORFLAG:	-1		; TRUE => WALK, FALSE => FLING

ppA1TMF:	A1TMF
ppA2TMF:	A2TMF
ppA1TMS:	A1TMS
ppA2TMS:	A2TMS

ppRAMTEST:	RAMTEST

;-----------------------------------------------------------------------------
PRINTSUM:
;-----------------------------------------------------------------------------
	STA 3 PSRET

	JSRII ppRESTORE		; SET UP DISPLAY
	LDA 0 VERSION
	STA 0 PS0
	JSR @PMSG
PS0:	 0
	JSR @PMSG1
	 .TXT "*NAlto "
	JSR @PMSG1
	 .TXT "I"
	LDA 0 ALTO2
	SNZ 0 0
	 JMP PS1
	JSR @PMSG1
	 .TXT "I"
PS1:	LDA 1 @pEHLOC
	JSR @POCT

	LDA 0 XMFLAG
	SZ 0 0
	 JMP PS2
	JSR @PMSG1
	 .TXT ", 64K"
	JMP PS6
PS2:	MKONE 1 1
	SE 0 1
	 JMP PS3
	JSR @PMSG1
	 .TXT ", XM 64K"
	JMP PS6
PS3:	INC 1 1
	SE 0 1
	 JMP PS4
	JSR @PMSG1
	 .TXT ", XM 128K"
	JMP PS6
PS4:	INC 1 1
	SE 0 1
	 JMP PS5
	JSR @PMSG1
	 .TXT ", XM 192K"
	JMP PS6
PS5:	JSR @PMSG1
	 .TXT ", XM 256K"

PS6:	LDA 0 RAMFLAG
	SZ 0 0
	 JMP PS7
	JSR @PMSG1
	 .TXT ", No Ram"
	JMP PS9

pKBDAD1:	177035		; KEYBOARD WORD POINTER
SKEY:		1B4		; THE BIT FOR THE KEY "S"
BLANKTOPKEY:	1		; THE BIT FOR THE KEY "BLANK TOP"
BLANKMIDKEY:	2		; THE BIT FOR THE KEY "BLANK MIDDLE"

PSRET:		0
pEHLOC:		610		; ETHER HOST LOC
BMASK:		14
pBANKREG0:	177740

ppRESTORE:	RESTORE
ppUNRESTORE:	UNRESTORE 
ppPRINTRAMTEST:	PRINTRAMTEST
ppA1PBC:	A1PBC
ppA2PBC:	A2PBC

PS7:	MKONE 1 1
	SE 0 1
	 JMP PS8
	JSR @PMSG1
	 .TXT ", 1K Ram"
	JMP PS9
PS8:	JSR @PMSG1
	 .TXT ", 3K Ram"

PS9:	JSR @PMSG1
	 .TXT "*NPass "
	LDA 1 BLOCKS
	JSR @PDEC
	JSR @PMSG1
	 .TXT ", testing "

	LDA 1 SOM
	JSR @POCT
	JSR @PMSG1
	 .TXT " to "

	LDA 1 EOM
	JSR @POCT
	LDA 0 XMFLAG
	SNZ 0 0
	 JMP PS10
	JSR @PMSG1
	 .TXT " in bank "
	LDA 1 @pBANKREG0
	LDA 0 BMASK
	ANDZR 0 1
	MOVZR 1 1
	JSR @PDEC
PS10:	JSR @PMSG1
	 .TXT "*N"

	LDA 1 SOFTPEC
	SNZ 1 1
	 JMP PS11
	JSR @PDEC
	JSR @PMSG1
	 .TXT " PEs apparently caused by software*N"

PS11:	LDA 0 ALTO2
	SNZ 0 0			; PRINT BAD CHIPS, IF ANY
	 JSRII ppA1PBC
	JSRII ppA2PBC
	 NOP
	JSRII ppPRINTRAMTEST

	LDA 1 SKEY	
	LDA 0 @pKBDAD1
	AND 1 0 SNR		; "S" KEY STILL DOWN?
	 JMP .-2		; YES. LOOP
	JSRII ppUNRESTORE 	; RELEASE DISPLAY SPACE
	JMP @PSRET

;-----------------------------------------------------------------------------
.INITINT:			; INITIALIZE INTERRUPT CHANNEL
;-----------------------------------------------------------------------------
; ACCEPTS IN AC0/ INTERRUPT HANDLER ADDRESS
; RETURNS IN AC0/ CHANNEL BIT

	STA 3 IIRET
	MOV 0 3

	MKONE 0 0
	LDA 2 pINTVEC
	LDA 1 @pACT
II1:	AND# 0 1 SNR		; CHANNEL AVAILABLE?
	 JMP II2		; YES
	MOVL 0 0 SZC		; CHANNEL BIT
	 SWAT			; NO CHANNELS AVAILABLE
	INC 2 2			; INTVEC
	JMP II1

II2:	STA 3 0 2		; INSTALL HANDLER IN INTVEC
	ADD 0 1
	STA 1 @pACT		; TURN ON CHANNEL

	JMP @IIRET

IIRET:		0
pINTVEC:	501

;----------------------------------------------------------------------------
.PEINT:				; PARITY ERROR INTERRUPT ROUTINE
;----------------------------------------------------------------------------
	STA 0 PEAC0		; SAVE MACHINE STATE
	STA 1 PEAC1
	STA 2 PEAC2
	STA 3 PEAC3
	MOVR 3 3
	STA 3 PECY
	LDA 1 @pPCLOC
	STA 1 PEPC

; DECIDE WHETHER IT WAS A REAL PE (I.E. HARDWARE GENERATED)
; OR WHETHER IT WAS CAUSED BY SOFTWARE (I.E. A BUG)
; IF IT WAS A REAL PARITY ERROR, LOCATIONS 614-621 WILL BE NONZERO

	LDA 2 pDCBR
	LDA 1 M6
PE2:	LDA 0 0 2		; PARITY R-REGISTER
	SZ 0 0			; BEING ZERO IS SUSPICIOUS
	 JMP PE1		; NON-ZERO MEANS THE PE WAS REAL
	INC 2 2
	INC 1 1 SZR		; HAVE WE LOOKED AT ALL OF THEM?
	 JMP PE2		; NO
	ISZ SOFTPEC		; SOFTWARE BUG
	 JMP IRET
	DSZ SOFTPEC		; CANT SKIP
	 JMP IRET

PE1:	LDA 0 @pACT		; DISABLE PARITY INTERRUPTS
	MOVR 0 0
	MOVZL 0 0
	STA 0 @pACT
	EIR			; BUT ALLOW OTHER INTERRUPTS

	LDA 0 ALTO2
	SNZ 0 0			; CALL ERROR ANALYZER
	 JSRII ppA1PEINT
	JSRII ppA2PEINT
	 NOP

; COME HERE TO DISMISS THE PARITY INTERRUPT

IRET:	DIR
	LDA 0 @pWW		; CLEAR PARITY WAKEUPS WAITING
	MOVR 0 0
	MOVZL 0 0
	STA 0 @pWW
	LDA 0 @pACT		; ENABLE PARITY INTERRUPTS
	MOVR 0 0
	MOVOL 0 0
	STA 0 @pACT

; ZERO THE PARITY ERROR DUMP AREA.  IF IT IS STILL ZERO ON THE
; NEXT PE INTERRUPT, THEN IT WAS CAUSED BY A SOFTWARE BUG.

	MKZERO 0 0
	LDA 1 pSAD
	LDA 3 M6
	BLKS

	LDA 0 PEPC		; RESTORE MACHINE STATE
	STA 0 @pPCLOC
	LDA 0 PECY
	MOVL 0 0
	LDA 3 PEAC3
	LDA 2 PEAC2
	LDA 1 PEAC1
	LDA 0 PEAC0
	BRI

pPCLOC:		500		;-> INTERRUPT PC
pDCBR:		614		;-> PARITY DUMP AREA
ppA1PEINT:	A1PEINT
ppA2PEINT:	A2PEINT
M6:		-6
SOFTPEC:	0

	.ZREL

; MACHINE STATE SAVED HERE ON PARITY INTERRUPT
PEAC0:		0		; AC0
PEAC1:		0		; AC1
PEAC2:		0		; AC2
PEAC3:		0		; AC3
PECY:		0		; CARRY
PEPC:		0		; PC

pIRET:		IRET		;-> CODE TO DISMISS PARITY INTERRUPT

	.NREL

;-----------------------------------------------------------------------------
.TIMERINT:			; VERTICAL FIELD INTERRUPT
;-----------------------------------------------------------------------------
	STA 0 TS0
	STA 1 TS1
	STA 2 TS2
	STA 3 TS3
	MOVL 0 0
	STA 0 TC

	ISZ VINT		; USED BY ALTO1 DTEST
	 NOP

; THIS CODE DECIDES WHEN TO BROADCAST A SUMMARY OF THE TEST RESULTS.
; IT GENERATES ITS FIRST SUMMARY AFTER 1 MINUTE, THEN EVERY 128 MINUTES.
; IF AN ERROR IS REPORTED, THEN IT IMMEDIATELY GENERATES A SUMMARY,
; THEN ANOTHER AFTER 1 MINUTE, THEN 2 MINUTES LATER,
; THEN 4 MINUTES AFTER THAT, ... UP TO A MAX OF 128 MINUTES.
; WHEN IT REACHES 128, IT HOLDS THERE GENERATING REPORTS EVERY 128
; MINUTES THEREAFTER.
 
	DSZ SECOND
	 JMP TI1
	LDA 0 D60		; SECOND COUNTER UNDERFLOWED
	STA 0 SECOND

; D0S AND DORADOS RUN DMT FOR 60 MINUTES THEN POWER THEMSELVES OFF
	DSZ POWERTIME
	 JMP TI3
	VERS			; AC0[0-3] IS ENGINEERING NUMBER
	CYCLE 4
	LDA 1 C17
	AND 1 0
	LDA 1 C5
	SNE 0 1			; SKIP UNLESS DORADO
	 61034			; POWER OFF CPU: MAY TRAP

TI3:	DSZ MINUTE
	 JMP TI1
	LDA 0 D60		; MINUTE COUNTER UNDERFLOWED
	STA 0 MINUTE

	DSZ SLOWTIMER
	 JMP TI2
	LDA 0 SLOWINTERVAL
	STA 0 SLOWTIMER
	STA 0 DOSLOWTESTS

TI2:	DSZ PEEKTIMER
	 JMP TI1
	LDA 0 PEEKINTERVAL	; TIME TO REPORT TEST RESULTS
	MOVZL 0 0		; AND GENERATE A NEW TIME
	LDA 1 PEEKLIMIT
	SGTU 1 0		; LIMIT > NEW INTERVAL?
	 MOV 1 0		; NO.  FORCE NEW INTERVAL = LIMIT
	STA 0 PEEKINTERVAL
	STA 0 PEEKTIMER
	STA 0 DOSUMMARY

TI1:	LDA 0 TC
	MOVR 0 0
	LDA 3 TS3
	LDA 2 TS2
	LDA 1 TS1
	LDA 0 TS0
	BRI

; CALLED BY ERROR LOGGING ROUTINES TO NOTIFY THE TIMER THAT AN ERROR
; HAS OCCURRED AND IT SHOULD START GENERATING FREQUENT REPORTS.
.ERROR:	LDA 0 FIRST
	SZ 0 0
	 JMP 0,3		; NOT FIRST ERROR WE'VE SEEN
	MKONE 0 0
	STA 0 PEEKINTERVAL	; GENERATE FREQUENT REPORTS FOR A WHILE
	STA 0 PEEKTIMER		; GENERATE THE FIRST ONE 16 MS FROM NOW
	STA 0 SECOND
	STA 0 MINUTE
	STA 0 FIRST		; REMEMBER THAT WE'VE SEEN AN ERROR
	JMP 0,3

FIRST:		0		; ZERO IF HAVEN'T SEEN ANY ERRORS
C5:		5

TS0:		0
TS1:		0
TS2:		0
TS3:		0
TC:		0

D60:		60.
SECOND:		60.
MINUTE:		60.

PEEKTIMER:	1		; time to next peek report
PEEKINTERVAL:	128.		; minutes between peek reports
PEEKLIMIT:	128.		; max interval in minutes

SLOWTIMER:	1		; time to next slow test
SLOWINTERVAL:	2		; minutes between slow tests

;-----------------------------------------------------------------------------
.NOPARTRAP:			; unimpl nopar opcodes trap here
;-----------------------------------------------------------------------------
	STA 3 TRAPAC3
	STA 0 TRAPAC0
	LDA 3 @.TRAPPC
	STA 3 NPT
	LDA 0 -1,3
	LDA 3 PWRINS
	SE 0 3
	 77400
	LDA 0 TRAPAC0
	LDA 3 TRAPAC3
	JMP @.+1
NPT:	0

TRAPAC3:	0
TRAPAC0:	0
.TRAPPC:	527
POWERTIME:	10800.		; 3 X 60 X 60 = 3 hours
C4:		4
PWRINS:		61034

;-----------------------------------------------------------------------------
.LOADRAM:
;-----------------------------------------------------------------------------
	STA 3 LRRET
	MKZERO 1 1		; RAM ADDRESS
	LDA 2 @pRAMIMAGE	; MICROINSTRUCTION TABLE ADDRESS
	LDA 0 C400
	ADD 0 2			; SKIP THE CONSTANTS

LR3:	LDA 0 0 2		; HIGH HALF
	INC 2 2			; INSTRUCTION TABLE ADDRESS
	LDA 3 0 2		; LOW HALF
	INC 2 2			; INSTRUCTION TABLE ADDRESS
	61012			; WRITE INTO RAM
	INC 1 1			; RAM ADDRESS
	DSZ LRCNT		; DONE?
	 JMP LR3		; NO

	LDA 1 USTART		; STARTING ADDRESS
	61010			; CONTINUE EMULATOR IN RAM
	JMP @LRRET

LRRET:		0
LRCNT:		1024.		; # OF 32 BIT MICROINSTRUCTIONS
C400:		400
USTART:		20		; EMULATOR STARTING ADDRESS
pRAMIMAGE:	RamImage

;-----------------------------------------------------------------------------
.RANDOM:			;AC0 ← RANDOM #.  PRESERVES AC2
;-----------------------------------------------------------------------------
	STA 3 RANRET
	LDA 0 IRAN
	INC 0 0
	LDA 3 C20D
	SLTU 0 3
	 SUB 0 0
	STA 0 IRAN
	LDA 1 C3
	ADD 0 1
	SLTU 1 3
	 SUB 3 1
	LDA 3 PRAN
	ADD 0 3
	LDA 0 0 3
	LDA 3 PRAN
	ADD 1 3
	LDA 1 0 3
	ADD 1 0
	STA 0 0 3
	JMP@ RANRET

C3:	3
C20D:	20.
IRAN:	16.
PRAN:	XPRAN
RANRET:	0

	.SREL

XPRAN:	30200.
	27432.
	62096.
	39855.
	17884.
	58726.
	55595.
	20904.
	28164.
	27447.
	34709.
	35231.
	33770.
	31508.
	40689.
	1411.
	20373.
	3422.
	62938.
	40035.

	.NREL

;-----------------------------------------------------------------------------
.OsFinish:			; <Left-Shift> <Swat>
;-----------------------------------------------------------------------------
	MKZERO 0 0		; BOOT FROM NET
	JSR @CHANGEBANK		; FLIP BACK INTO BANK 0
	DIR			; DISABLE INTERRUPTS
	LDA 0 C3
	SIO			; RESET ETHERNET
	LDA 3 @LVMAYDAYPACKET
	LDA 0 BFN
	STA 0 5,3		; BFN GOES IN LOW HALF OF PUP ID
	LDA 0 @LVBOOTLOADERPACKET
	INC 0 0
	LDA 1 C400
	LDA 3 LBLT
	BLT			; MOVE BOOT LOADER INTO PAGE 0
	JMP 6			; JUMP INTO BOOT LOADER!


LVBOOTLOADERPACKET:	bootLoaderPacket
LVMAYDAYPACKET:		mayDayPacket
BFN:			10
LBLT:			-401+3

;-----------------------------------------------------------------------------
; DMT1Test and DMT2Test share a common 'bad chip table'.
;-----------------------------------------------------------------------------
LBCTAB = 17.*8.*8.		; 17 bits * 8 rows/board * 8 boards
SBCTAB:	.BLK LBCTAB
EBCTAB = .-1

	.END

; by Debbie Bernsen
	JSR Palm
	.TXT "DMT of Palm Sunday."
Palm:	STA 3 VERSION
	JSR CURSOR
	 0			; padding -- not part of cursor
	33154
	75736
	46662
	6660
	63764
	177777
	103741
	101701
	1700
	1700
	1700
	1700
	1700
	1700
	1700
	1700

; by Boggs
	JSR Fool
	.TXT "DMT of April Fool's Day."
Fool:	STA 3 VERSION
	JSR CURSOR
	 0
	.blk 16.		; uninitialized => zeros

	JSR Heart
	.TXT "DMT of Valentine's Day."
Heart:	STA 3 VERSION
	JSR CURSOR
	 0			; padding -- not part of cursor
	0
	36074
	77176
	-1
	-1
	-1
	-1
	77776
	77776
	37774
	37774
	17770
	7760
	3740
	1700
	600

; by Karen Kolling
	JSR Sham
	.TXT "DMT of St. Patrick's Day.  Cursor by Kolling.pa."
Sham:	STA 3 VERSION
	JSR CURSOR
	 0			; padding -- not part of cursor
	1100
	3740
	7760
	7760
	7760
	3740
	33754
	77776
	177777
	77776
	77776
	177777
	76676
	30614
	600
	600

	JSR Ein
	.TXT "DMT of Einstein's 100th Birthday."
Ein:	STA 3 VERSION
	JSR CURSOR
	 0
	17000
	10000
	10170
	17000
	10170
	10000
	17000
	17
	1
	4
	76750
	52417
	52400
	52400
	52400
	42740

	JSR SB
	.TXT "DMT of the Softball season."
SB:	STA 3 VERSION
	JSR CURSOR
	 0
	001700
	007760
	017770
	027764
	073756
	073756
	175737
	175737
	175737
	175737
	073756
	073756
	027764
	017770
	007760
	001700

	JSR Egg
	.TXT "DMT of Easter."
Egg:	STA 3 VERSION
	JSR CURSOR
	 0
	0
	0
	7740
	32370
	62354
	44716
	144731
	144733
	144733
	144731
	44716
	62354
	32370
	7740
	0
	0

	JSR Bun1
	.TXT "DMT of Easter."
Bun1:	STA 3 VERSION
	JSR CURSOR
	 0
	0
	20002
	70007
	74017
	76037
	47071
	1540
	700
	1740
	3760
	7270
	7570
	3260
	1540
	700
	700

	JSR Bun2
	.TXT "DMT of Easter."
Bun2:	STA 3 VERSION
	JSR CURSOR
	 0
	0
	42
	167
	167
	167
	167
	66
	34
	3476
	7675
	17777
	57777
	177776
	177774
	177777
	57777

	JSR Cinco
	.TXT "DMT of Cinco de Mayo."
Cinco:	STA 3 VERSION
	JSR CURSOR
	 0
	0
	77776
	74052
	74466
	75252
	74466
	75252
	74066
	77776
	40000
	56034
	50020
	56334
	41002
	56034
	0

	JSR MayDay
	.TXT "DMT of May day."
MayDay:	STA 3 VERSION
	JSR CURSOR
	 0
	160
	7610
	10204
	30212
	50021
	104001
	40201
	40706
	61741
	110701
	100211
	100006
	104002
	70102
	4136
	7740

	JSR Domin
	.TXT "DMT of Dominion Day."
Domin:	STA 3 VERSION
	JSR CURSOR
	 0
	400
	1600
	1600
	103702
	143706
	163716
	167756
	177776
	177776
	177776
	177776
	77774
	37770
	7740
	400
	400

	JSR Domin
	.TXT "DMT of Dominion Day."
Domin:	STA 3 VERSION
	JSR CURSOR
	 0
	600
	1700
	3740
	7760
	7760
	177777
	177777
	177777
	177777
	77776
	37774
	77776
	37774
	17770
	6660
	600

; by Dan Bobrow
	JSR Mem
	.TXT "DMT of Memorial Day."
Mem:	STA 3 VERSION
	JSR CURSOR
	 0
	0
	37700
	30400
	30400
	30400
	30400
	37770
	77774
	177776
	177777
	77776
	36074
	36074
	14030
	0
	0

	JSR Mem
	.TXT "DMT of Memorial Day."
Mem:	STA 3 VERSION
	JSR CURSOR
	 0
	146314
	146314
	31463
	31463
	146314
	146314
	31463
	31463
	0
	37774
	37774
	4620
	73756
	167767
	174037
	167767

	JSR Flag
	.TXT "DMT of Flag Day."
Flag:	STA 3 VERSION
	JSR CURSOR
	 0
	53437
	125360
	52417
	125370
	52407
	125374
	53603
	176176
	7701
	174077
	3740
	176037
	1760
	177017
	770
	177400

	JSR Flag
	.TXT "DMT of Flag Day."
Flag:	STA 3 VERSION
	JSR CURSOR
	 0
	100000
	134002
	153636
	165362
	53016
	67363
	30415
	23173
	34506
	11714
	12370
	10000
	14000
	4000
	4000
	6000

	JSR Bell
	.TXT "DMT of Independence Day."
Bell:	STA 3 VERSION
	JSR CURSOR
	 0
	167767
	177777
	177777
	167767
	163747
	17770
	17770
	37774
	37774
	37774
	37774
	37734
	37754
	77756
	177767
	7000

	JSR Mom
	.TXT "DMT of Mother's Day."
Mom:	STA 3 VERSION
	JSR CURSOR
	 0
	105721
	155133
	125125
	125125
	125125
	125125
	105121
	105121
	105121
	105121
	105121
	105121
	105121
	105121
	105121
	105121

	JSR Mom
	.TXT "DMT of Mother's Day."
Mom:	STA 3 VERSION
	JSR CURSOR
	 0
	6720
	32554
	77766
	54016
	170013
	120006
	161543
	42022
	140001
	140201
	40002
	41042
	20704
	10010
	4020
	2040

	JSR Norges
	.TXT "DMT of Norges Nasjonaldag."
Norges:	STA 3 VERSION
	JSR CURSOR
	 0
	171777
	171777
	171777
	171777
	0
	0
	171777
	171777
	171777
	171777
	100000
	102725
	102525
	102727
	102521
	102721

	JSR NY
	.TXT "DMT of 'I love NY' week 1979."
NY:	STA 3 VERSION
	JSR CURSOR
	 0
	77543
	4167
	4177
	4076
	4034
	4010
	77400
	0
	60501
	60442
	50424
	44410
	42410
	41410
	41410
	0

	JSR POP
	.TXT "DMT of Father's Day."
POP:	STA 3 VERSION
	JSR CURSOR
	 0
	37
	3
	5
	7611
	30131
	40020
	154620
	114310
	101010
	101010
	103410
	110110
	44220
	43420
	30140
	7600

	JSR VES
	.TXT "DMT of the 1900th anniversary of Vesuvius' explosion."
VES:	STA 3 VERSION
	JSR CURSOR
	 0
	500
	5220
	12640
	24714
	2620
	5612
	1304
	25551
	103740
	3764
	27760
	7772
	117770
	37774
	77776
	177777

	JSR SAT1
	.TXT "DMT of the Pioneer 11 Saturn encounter."
SAT1:	STA 3 VERSION
	JSR CURSOR
	 0
	3
	17
	1322
	7666
	15674
	17570
	27364
	36764
	31754
	27734
	17670
	37550
	46360
	55700
	170000
	140000

	JSR SAT2
	.TXT "DMT of the Pioneer 11 Saturn encounter."
SAT2:	STA 3 VERSION
	JSR CURSOR
	 0
	3
	17
	1722
	7566
	17354
	16730
	37664
	37564
	37354
	36734
	15670
	33550
	46360
	55700
	170000
	140000

; by Rich Pasco, submitted 10 Sept 79
	JSR HALLOW
	.TXT "DMT of Halloween."
HALLOW:	STA 3 VERSION
	JSR CURSOR
	 0
	300
	600
	600
	16660
	17774
	77776
	71717
	175757
	177177
	177577
	177777
	71746
	74016
	37274
	7760
	0

; by Brodie, submitted 6 Sept 79
	JSR ESCHER
	.TXT "DMT of the S.F. M.C. Escher exhibition."
ESCHER:	STA 3 VERSION
	JSR CURSOR
	 0
	200
	500
	1100
	2220
	4450
	11110
	22222
	31445
	24511
	22222
	11044
	4510
	2220
	1240
	700
	200

	
; by (Bill) Stevenson.WBST, submitted 6 Sept 79
	JSR Trek
	.TXT "DMT of the 13th anniversary of Star Trek."
Trek:	STA 3 VERSION
	JSR CURSOR
	 0
	167116
	102252
	62354
	162252
	0
	167352
	45214
	46314
	45352
	0
	177470
	1174
	7774
	7774
	1174
	177470

; by Rich Brodie, submitted 18 Sept 79
	JSR SunSpot
	.TXT "DMT of the 280-year Sun spot maximum."
SunSpot:STA 3 VERSION
	JSR CURSOR
	 0
	1000
	404
	40430
	31740
	7363
	7574
	134774
	57734
	17374
	14772
	56771
	127660
	3750
	4610
	4204
	10400

; by Dan Swinehart, submitted 19 October 79
	JSR SU
	.TXT "Stanford University DMT."
SU:	STA 3 VERSION
	JSR CURSOR
	 0
	1700
	7760
	16070
	34634
	71616
	62706
	144643
	141623
	142703
	144643
	61606
	72716
	34674
	16670
	7760
	1700

; by Mike Schroeder, submitted 19 October 79
	JSR MIT
	.TXT "Massachusetts Institute of Technology DMT."
MIT:	STA 3 VERSION
	JSR CURSOR
	 0
	0
	160340
	60300
	50500
	50500
	45100
	45100
	42100
	162340
	0
	0
	0
	0
	0
	0
	0

; by Roy Levin, submitted 19 October 79
	JSR CMU
	.TXT "Carnegie-Mellon University DMT."
CMU:	STA 3 VERSION
	JSR CURSOR
	 0
	401
	176576
	102506
	103712
	100422
	100742
	161556
	22650
	177777
	25510
	166616
	107402
	110402
	123702
	142502
	176576

; by Wally Engle, submitted 19 November 79
	JSR Turkey
	.TXT "DMT of Thanksgiving."
Turkey:	STA 3 VERSION
	JSR CURSOR
	 0
	0
	41044
	22102
	41044
	22100
	40014
	21726
	46150
	10230
	26224
	51346
	50403
	177777
	60006
	37774
	0

; by Wally Engle, submitted 18 December 79
	JSR Tree
	.TXT "DMT of Christmas."
Tree:	STA 3 VERSION
	JSR CURSOR
	 0
	604
	616
	1337
	1716
	2644
	6560
	5720
	17250
	27730
	35374
	67666
	75356
	153665
	177377
	1700
	1700

; by Jerry Morrison, submitted 14 December 1979
	JSR Fire
	.TXT "DMT of New Year's Day."
Fire:	STA 3 VERSION
	JSR CURSOR
	 0
	1042
	10125
	40045
	1125
	24125
	1042
	50000
	2760
	10010
	4
	4
	174444
	171150
	162360
	144740
	111740

; by Rudi Sherry, submitted 20 December 1979
	JSR Hanukah
	.TXT "DMT of Hanukah."
Hanukah:STA 3 VERSION
	JSR CURSOR
	 0
	100402
	120412
	125652
	125652
	125652
	125652
	125652
	125652
	75274
	7740
	400
	1600
	1600
	3700
	7710
	0

; by Rich Hoffarth, submitted 28 December 1979
	JSR Champagne
	.TXT "DMT of New Year's Day."
Champagne: STA 3 VERSION
	JSR CURSOR
	 0
	140
	140
	14014
	14614
	600
	0
	37774
	17770
	7760
	3740
	1700
	600
	600
	600
	600
	7760

; by Eric Rawson, submitted 2 Jan 1980
	JSR Ski
	.TXT "DMT of the 1980 ski season."
Ski:	STA 3 VERSION
	JSR CURSOR
	 0
	704
	702
	205
	1770
	22700
	34700
	20702
	20705
	20512
	20524
	20250
	70120
	20240
	500
	3200
	1400

; by Pettit, submitted 22 Jan 1980
	JSR GW
	.TXT "DMT of George Washington's birthday."
GW:	STA 3 VERSION
	JSR CURSOR
	 0
	6760
	15010
	65764
	73772
	33772
	164143
	122453
	167673
	3432
	13772
	13430
	15760
	46742
	102001
	3160
	660

; by R. Lyon, submitted 1 Feb 80
	JSR GHog
	.TXT "DMT of Ground Hog's day."
GHog:	STA 3 VERSION
	JSR CURSOR
	 0
	740
	7030
	70004
	143002
	165462
	163011
	40011
	40021
	30401
	27002
	10002
	4002
	2001
	5001
	5001
	10401i

; by S. Weyer, submitted 1 Apr 80
	JSR CENSUS
	.TXT "DMT of the 1980 U.S. Census."
CENSUS:	STA 3 VERSION
	JSR CURSOR
	 0
	20406
	61211
	20201
	20207
	20201
	20411
	71707
	0
	20202
	20202
	70707
	125252
	20202
	50505
	50505
	0

; by D. Curry, submitted April 80
	JSR BUZZ
	.TXT "Buzzards return to Hinkley Ohio."
BUZZ:	STA 3 VERSION
	JSR CURSOR
	 0
	16000
	37000
	37034
	77426
	77637
	77671
	77760
	177340
	176000
	176000
	176000
	176000
	166000
	166000
	42000
	5000

; by K. Kolling, submitted May 6, 1980
	JSR Paw
	.TXT "DMT of 'Be Kind to Animals Week'."
Paw:	STA 3 VERSION
	JSR CURSOR
	 0
	600
	1700
	1700
	60606
	170017
	170017
	61706
	7760
	7760
	17770
	17770
	17770
	17770
	7760
	7760
	1700

; by Capps.wbst, submitted 9 May 80
	JSR Astoria
	.TXT "First Xerographic print 22 Oct 38."
Astoria:STA 3 VERSION
	JSR CURSOR
	 0
	47356
	127112
	161112
	127116
	0
	7220
	5250
	6270
	5250
	0
	0
	67356
	25052
	27156
	21052
	21356

; by CParker.wbst, submitted 9 June 80
	jsr OuterSpace
	.TXT "DMT of Outer Space Week."
OuterSpace:STA 3 VERSION
	JSR CURSOR
	 0
	7400
	14600
	30340
	60074
	40006
	40002
	140002
	100002
	100002
	100006
	140014
	43410
	66670
	34340
	0
	0

; by Norm Cox (dlos), submitted 29 May 80
	jsr OPD
	.TXT "'OPIE' - 1st anniversary of OPD, by Norm Cox."
OPD:	STA 3 VERSION
	JSR CURSOR
	 0
	60000
	70340
	70160
	74060
	34036
	36034
	16020
	6060
	3740
	3700
	1600
	3000
	1000
	400
	200
	1740

; by Capps.wbst, submitted 12 June 80
	JSR Fri13
	.TXT "DMT of Friday the 13th."
Fri13:	STA 3 VERSION
	JSR CURSOR
	 0
	36074
	37174
	35134
	17170
	0
	0
	0
	1100
	0
	170017
	6060
	177177
	2040
	174037
	0
	0

; by L. Clark, submitted 13 June 80
	JSR Helen
	.TXT "DMT - Mt. St. Helens, by LClark.PA."
Helen:	STA 3 VERSION
	JSR CURSOR
	 0
	43542
	116270
	71536
	156563
	167376
	65254
	11260
	100702
	4710
	20502
	3060
	47771
	7730
	15514
	22554
	63176

; by Geoff Thompson, submitted 11 July 80
	JSR xxx
	.TXT "DMT *NAlto"
xxx:	STA 3 VERSION
	JSR CURSOR
	 0
	36
	365
	3665
	6651
	6113
	1130
	1300
	3027
	25
	27
	0
	167356
	125252
	167310
	105252
	105252

; by Ted Kaehler, submitted 10 July 80
	JSR Light
	.TXT "Dealing lightning: Parc's tenth anniversary."
Light:	STA 3 VERSION
	JSR CURSOR
	 0
	1
	41
	173
	316
	1606
	1000
	7400
	4200
	10100
	10600
	21040
	41000
	101040
	102400
	104020
	110010

; by Bob Weissman, submitted 29 July 80
	JSR Skull
	.TXT "Cursor design by Bob Weissman."
Skull:	STA 3 VERSION
	JSR CURSOR
	 0
	1600
	2100
	4040
	7340
	4440
	2500
	2100
	1200
	4440
	6140
	1200
	400
	1200
	6140
	4040
	0

; by T. Pettit, submitted 30 July 80
	JSR Legs
	.TXT "DMT of the Parc Picnic - cursor by T. Pettit."
Legs:	STA 3 VERSION
	JSR CURSOR
	 0
	7160
	7160
	107160
	42040
	37770
	2656
	2642
	2642
	2642
	6660
	15720
	31720
	21730
	21714
	21706
	61702

; by Mike Trigoboff, submitted 9 Sept 80
	JSR Leaf
	.TXT "DMT of Autumn 1980 - cursor by Mike Trigoboff."
Leaf:	STA 3 VERSION
	JSR CURSOR
	 0
	1
	17
	63
	305
	411
	1021
	2042
	4102
	4204
	10410
	11020
	12140
	24600
	33000
	174000
	140000

; by George Komorowski, submitted 11 Sept 80
	JSR Grape
	.TXT "The grapes of September - cursor by George Komorowski."
Grape:	STA 3 VERSION
	JSR CURSOR
	 0
	6003
	76407
	173706
	152340
	16070
	33073
	72353
	35416
	73164
	67126
	12076
	36154
	34176
	72
	20
	0

; by David Cheng, submitted 15 Sept 80
	JSR China
	.TXT "China exhibit in S.F. thru 9/28 - cursor by D. Cheng."
China:	STA 3 VERSION
	JSR CURSOR
	 0
	10377
	10201
	10201
	177275
	111221
	111221
	111221
	111221
	111275
	177221
	10225
	10225
	10221
	10275
	10201
	10377

; by Aden.ES, submitted 17 Sept 80
	JSR X5700
	.TXT "DMT of the Xerox 5700 announcement."
X5700:	STA 3 VERSION
	JSR CURSOR
	 0
	177177
	100101
	100002
	177004
	1010
	1020
	177040
	0
	0
	177177
	101101
	101101
	101101
	101101
	101101
	177177

; by Allen Wells, submitted 9 Oct 80
	JSR COL
	.TXT "Columbus stops short of India -- 1492."
COL:	STA 3 VERSION
	JSR CURSOR
	 0
	3760
	2024
	17237
	31221
	61721
	41221
	141221
	101221
	177037
	13764
	150205
	177777
	72527
	37776
	17774
	7770

; by Allen Wells, submitted 18 Oct 80
	JSR TAE
	.TXT "Thomas Edison died -- 18 Oct 1931."
TAE:	STA 3 VERSION
	JSR CURSOR
	 0
	173131
	117575
	103743
	141103
	41102
	61706
	30614
	17770
	4160
	7620
	4360
	7420
	4760
	7060
	2640
	3740

; by Allen Wells, submitted 18 Oct 80
	JSR Hallo1
	.TXT "Werewolves howl and goblins prowl - by A. Wells."
Hallo1:	STA 3 VERSION
	JSR CURSOR
	 0
	660
	370
	370
	1760
	770
	710
	3600
	157600
	71600
	16600
	3600
	7700
	7774
	17477
	17037
	3017

; by Capps.wbst, submitted 22 Oct 80
	JSR Hallo2
	.TXT "Werewolves howl and goblins prowl - by Capps.wbst."
Hallo2:	STA 3 VERSION
	JSR CURSOR
	 0
	3540
	17170
	37174
	76076
	77176
	177177
	176016
	176171
	176147
	176037
	177037
	76636
	71636
	7614
	17770
	3740

; by Trigoboff, submitted 21 Oct 80
	JSR Hallo3
	.TXT "Werewolves howl and goblins prowl - by M. Trigoboff."
Hallo3:	STA 3 VERSION
	JSR CURSOR
	 0
	0
	140
	300
	1700
	760
	700
	200
	167700
	34340
	7360
	1770
	3740
	1477
	617
	1406
	2

; by Capps.wbst, submitted 16 Sept 80
	JSR Babbage
	.TXT "Charles Babbage born 26 Dec 1792."
Babbage:STA 3 VERSION
	JSR CURSOR
	 0
	400
	14620
	7760
	17172
	77176
	36074
	36074
	74637
	175636
	35714
	30014
	77776
	57770
	7760
	7760
	4630
	200

; by Capps.wbst, submitted 16 Sept 80
	JSR Turing
	.TXT "A. M. Turing born 23 June 1912."
Turing:	STA 3 VERSION
	JSR CURSOR
	 0
	7740
	4040
	177777
	4040
	125656
	125252
	125252
	125252
	125656
	4040
	177777
	4040
	7740
	0
	0
	0

; by Capps.wbst, submitted 16 Sept 80
	JSR Hollerith
	.TXT "Hollerith born 29 Feb 1860."
Hollerith:STA 3 VERSION
	JSR CURSOR
	 0
	17777
	37777
	77777
	172727
	172727
	177575
	177575
	177767
	177767
	173577
	173577
	177775
	177775
	176737
	176737
	177777

; by Komoroski.wbst, submitted 16 Sept 80
	JSR AmCup
	.TXT "America's Cup race."
AmCup:	STA 3 VERSION
	JSR CURSOR
	 0
	177737
	177637
	177637
	177427
	177427
	177023
	176023
	174023
	172721
	162121
	142721
	102420
	2720
	177757
	100000
	170007

; by Allen Wells, submitted 30 Oct 80
	JSR Vote
	.TXT "You'll have to live with the winner for 4 years."
Vote:	STA 3 VERSION
	JSR CURSOR
	 0
	141436
	141477
	63163
	63343
	36307
	36316
	14374
	14170
	0
	177576
	177576
	14140
	14176
	14140
	14176
	14176

; by Allen Wells, submitted 30 Oct 80
	JSR Frog
	.TXT "Frog hunting season starts Nov 5."
Frog:	STA 3 VERSION
	JSR CURSOR
	 0
	70
	707
	17673
	37707
	77776
	77770
	177777
	177774
	77760
	77660
	17037
	17406
	177001
	174000
	77600
	17760

; by S. Quarterman, sumbitted 7 Nov 80
	JSR Tank
	.TXT "DMT of November 15 - Erwin Rommel's 89th birthday."
Tank:	STA 3 VERSION
	JSR CURSOR
	 0
	0
	0
	0
	0
	3700
	77740
	7740
	37770
	40004
	52524
	40004
	37770
	0
	0
	0
	0

; by Allen Wells, submitted 19 Nov 80
	JSR CT
	.TXT "Americans get ready for Thanksgiving with X-mas sales."
CT:	STA 3 VERSION
	JSR CURSOR
	 0
	600
	1700
	1100
	3340
	2440
	6160
	5020
	16230
	10050
	35114
	20404
	36074
	13750
	2640
	600
	1700

; by Allen Wells, submitted 19 Nov 80
	JSR TK
	.TXT "Indians help pilgrims celebrate first Thanksgiving."
TK:	STA 3 VERSION
	JSR CURSOR
	 0
	400
	1200
	7340
	35270
	25250
	165256
	125652
	126552
	130032
	127752
	123312
	170436
	54464
	51624
	54064
	63714

; by Teri Pettit, submitted 1 Dec 80
	JSR Hannuk
	.TXT "DMT of the first day of Hannukah."
Hannuk:	STA 3 VERSION
	JSR CURSOR
	 0
	1
	1
	1
	1
	0
	52725
	52225
	53765
	50205
	57775
	40201
	77777
	200
	200
	700
	3760

2nd night (Dec 3): same as above but 5 instead of 1 in lines 0-3
3rd night (Dec 4): ditto but 25
4th night (Dec 5): ditto but 125
5th night (Dec 6): ditto but 525
6th night (Dec 7): ditto but 2525
7th night (Dec 8): ditto but 12525
8th night (Dec 9): ditto but 52525

; by Allen Wells, submitted 10 Dec 80
	JSR Winter
	.TXT "Winter begins - cursor by A. Wells."
Winter:	STA 3 VERSION
	JSR CURSOR
	 0
	0
	7160
	10010
	12650
	0
	5120
	51112
	100601
	127165
	100601
	51112
	5120
	0
	12650
	10010
	7160

; by Allen Wells, submitted 16 Dec 80
	JSR NewYear
	.TXT "Time runs out as the new year approaches."
NewYear:STA 3 VERSION
	JSR CURSOR
	 0
	3740
	16070
	30614
	66646
	46002
	152613
	103601
	131615
	131615
	100601
	150013
	40002
	62646
	30614
	16070
	3740

; by Allen Wells, submitted 17 Dec 80
	JSR Xmas
	.TXT "Angels bear glad tidings to Bethleham."
Xmas:	STA 3 VERSION
	JSR CURSOR
	 0
	70616
	45122
	145123
	102641
	105121
	110011
	111711
	113751
	110611
	107761
	104021
	104021
	170017
	150013
	16070
	3740

; by Allen Wells, submitted 23 Dec 80
	JSR Dpl
	.TXT "Diplomacy Day -- watch your back."
Dpl:	STA 3 VERSION
	JSR CURSOR
	 0
	14
	14
	34
	470
	760
	360
	360
	730
	1700
	3600
	17400
	77000
	34400
	2000
	12400
	10000

; by Brett Fleisch.wbst, submitted 1 Jan 81
	JSR Recov
	.TXT "DMT of People Recover from New Years - by Brett Fleisch."
Recov:	STA 3 VERSION
	JSR CURSOR
	 0
	4
	10
	20
	40
	37776
	17774
	7770
	3760
	1740
	700
	200
	200
	200
	200
	7770
	7770

; by Allen Wells, submitted 8 Jan 81
	JSR Knee
	.TXT "90 years since last Indian war at Wounded Knee."
Knee:	STA 3 VERSION
	JSR CURSOR
	 0
	400
	1200
	7340
	35270
	25250
	165256
	125652
	126552
	130032
	127752
	123312
	170436
	54464
	51624
	54064
	63714

; by Allen Wells, submitted 11 Jan 81
	JSR Vult
	.TXT "This is a vulture for Phil Petit.  Cursor and caption by Allen Wells."
Vult:	STA 3 VERSION
	JSR CURSOR
	 0
	30170
	34374
	174166
	176362
	176377
	177717
	167705
	167705
	107702
	117700
	17600
	37400
	37000
	25400
	6200
	5340

; by Fred Tou, submitted 13 Jan 81
	JSR Bowl
	.TXT "DMT of SuperBowl XV.  Cursor by Fred Tou."
Bowl:	STA 3 VERSION
	JSR CURSOR
	 0
	370
	3770
	7770
	17770
	37760
	77760
	77740
	177700
	177600
	177400
	174125
	125
	45
	45
	122
	122

; by Allen Wells, submitted 19 Jan 81
	JSR BZM
	.TXT "BZM BDAY 81.  Aoooooooo! Cut loose!"
BZM:	STA 3 VERSION
	JSR CURSOR
	 0
	2040
	100000
	761
	41770
	3774
	3774
	3774
	103774
	3774
	1770
	20760
	1
	20
	0
	2000
	100040

; by Allen Wells, submitted 20 Jan 81
	JSR Honda
	.TXT "A lonely Honda drives into the land of the rising sun."
Honda:	STA 3 VERSION
	JSR CURSOR
	 0
	163000
	160000
	144000
	2000
	20000
	111770
	102514
	3504
	37776
	77776
	177777
	77776
	34034
	10010
	177777
	0

; by Weissman.pa, submitted 28 Jan 81
	JSR Moped
	.TXT "A lonely moped chugs into the rain."
Moped:	STA 3 VERSION
	JSR CURSOR
	 0
	124000
	124000
	0
	52000
	52000
	600
	1000
	1600
	2000
	3400
	36470
	43704
	53724
	43704
	34470
	177777

; by Gobbel & Morrison, submitted 20 March 81
	JSR Spring
	.TXT "DMT of Spring '81. Cursor by Gobbel & Morrison."
Spring:	STA 3 VERSION
	JSR CURSOR
	 0
	20
	3620
	4140
	3640
	40
	7440
	10300
	7500
	100
	17100
	20600
	17200
	200
	36200
	41400
	36400

; by Eisenberg.es, submitted 18 Feb 81
	JSR ACM
	.TXT "ACM '81 -- L.A. Nov. 9-11"
ACM:	STA 3 VERSION
	JSR CURSOR
	 0
	61621
	112133
	112125
	112025
	172125
	112121
	111621
	0
	0
	61604
	22114
	22104
	1604
	2104
	2104
	1616

; by Diebert, submitted 25 March 81
	JSR Maxc
	.TXT "DMT of the axing of Maxc1.  Cursor by Tim Diebert."
Maxc:	STA 3 VERSION
	JSR CURSOR
	 0
	3700
	17777
	17777
	17777
	7740
	17760
	37770
	77774
	37770
	17760
	3700
	0
	174453
	125222
	125652
	125253

; by Diebert, submitted 1 April 81
	JSR Tax
	.TXT "DMT of Tax Time: the Long and the Short of it.  By C. Lietner"
Tax:	STA 3 VERSION
	JSR CURSOR
	 0
	114446
	122451
	122451
	122751
	122051
	122051
	114046
	0
	0
	0
	0
	0
	132562
	152525
	153527
	130565


; by LaPrade.eos, submitted 14 April 81
	JSR STS1
	.TXT "DMT of the landing of Columbia.  Cursor by K. LaPrade."
STS1:	STA 3 VERSION
	JSR CURSOR
	 0
	0
	120000
	150000
	74000
	76000
	37000
	17400
	7600
	2752
	1377
	576
	274
	130
	54
	10
	0

; by Ramshaw & Halloran, submitted 19 April 81
	JSR Bun
	.TXT "Ether Bunny, by L. Ramshaw & L. Halloran"
Bun:	STA 3 VERSION
	JSR CURSOR
	 0
	200
	1300
	1570
	754
	174
	370
	760
	1774
	1776
	3766
	3740
	3700
	17700
	17600
	15740
	760

; by K. LaPrade.eos, submitted 28 April 81
	JSR Star
	.TXT "DMT of the Star announcement"
Star:	STA 3 VERSION
	JSR CURSOR
	 0
	200
	300
	300
	740
	740
	177777
	77776
	37774
	17770
	7760
	7760
	7760
	17770
	17170
	34034
	30014

; by Brian Reid, submitted 1 May 81
	JSR IPress
	.TXT "DMT of the InterPress release.  Cursor by Brian Reid."
IPress:	STA 3 VERSION
	JSR CURSOR
	 0
	36000
	36000
	173400
	170746
	36077
	36017
	170007
	170000
	36000
	36000
	170000
	170000
	30000
	177777
	0
	177777

; by Sperry.wbst, submitted 1 June 81
	JSR CP6
	.TXT "Honeywell CP-6 is now available at RTCC."
CP6:	STA 3 VERSION
	JSR CURSOR
	 0
	17776
	20002
	27772
	24010
	25750
	25050
	25010
	25070
	25000
	25770
	25010
	25010
	25010
	25772
	20002
	17776

; by Kerry LaPrade.eos, submitted 16 July 81
	JSR Eclipse
	.TXT "Eclipse of the Moon 16 July 81.  Cursor by LaPrade.eos"
Eclipse:STA 3 VERSION
	JSR CURSOR
	 0
	600
	140
	60
	60
	30
	14
	30
	14
	14
	30
	14
	30
	60
	60
	140
	600

; by Donovan.es, submitted June 81
	JSR Alto12
	.TXT "Alto II build 12 -- the last ever!  Cursor by Donovan."
Alto12:	STA 3 VERSION
	JSR CURSOR
	 0
	21167
	21045
	51045
	51045
	175045
	105045
	105647
	0
	0
	23000
	64400
	120565
	21045
	22047
	24045
	27445

; by G. Young (.wbst), submitted 28 July 81
	JSR HRH
	.TXT "DMT of the wedding of Prince Charles to Lady Diana Spencer on 29 July 81,*Nat St. Pauls Cathedral in London.  Cursor by Welwyn Hall Engineering."
HRH:	STA 3 VERSION
	JSR CURSOR
	 0
	600
	1700
	600
	600
	21704
	73156
	26664
	24624
	75736
	51712
	154633
	104621
	124025
	174037
	127765
	124625

; by Lou Kohnen, submitted 5 Aug 81
	JSR Patco
	.TXT "DMT of the air traffic controllers strike.  By Lou Kohnen."
Patco:	STA 3 VERSION
	JSR CURSOR
	 0
	77777
	40001
	44461
	46511
	45511
	44461
	40001
	44715
	52221
	56221
	52215
	40001
	77777
	200
	200
	200

; by Allen Wells, submitted 20 Aug 81
	JSR Lucy
	.TXT "Lucy doesn't live here anymore.  Cursor by A. Wells."
Lucy:	STA 3 VERSION
	JSR CURSOR
	 0
	0
	0
	2020
	7070
	7570
	13564
	10704
	16734
	17574
	7570
	7770
	5750
	5050
	3760
	1740
	0

; by Eric Rawson, submitted 21 Aug 81
	JSR MedFly
	.TXT "MedFly Apocalypse Now!  Cursor by E. Rawson"
MedFly:	STA 3 VERSION
	JSR CURSOR
	 0
	177774
	1000
	3006
	4411
	10771
	10746
	7400
	21050
	17500
	50
	1
	20
	2
	0
	4
	1

; by CParker, submitted 26 Aug 81
	JSR VII
	.TXT "Voyager II encounters Saturn.  Cursor by C Parker."
VII:	STA 3 VERSION
	JSR CURSOR
	 0
	6700
	6700
	15700
	35602
	173600
	147400
	37020
	176020
	174260
	160160
	370
	1770
	60
	120
	220
	420

; by Bridget Spera, submitted 22 Sept 81
	JSR Fall
	.TXT "DMT of the first day of Autumn.  Cursor by Bridget Spera."
Fall:	STA 3 VERSION
	JSR CURSOR
	 0
	3
	3047
	7176
	17174
	37754
	35736
	35674
	15560
	35360
	76776
	175036
	73774
	17770
	27560
	47000
	102000

; by Toni Shetler, submitted 16 Oct 81
	JSR ACM
	.TXT "ACM'81 -- Nov. 9-11*N*NACM'81 Info Box 24059 LA CA 90024*NShetler.ES/213 536-9735*N"
ACM:	STA 3 VERSION
	JSR CURSOR
	 0
	61621
	112133
	112125
	112025
	172125
	112121
	111621
	0
	0
	61604
	22114
	22104
	1604
	2104
	2104
	1616

; by CParker, submitted 15 Oct 81
	JSR HW
	.TXT "DMT of Halloween.  Cursor by C. Parker."
HW:	STA 3 VERSION
	JSR CURSOR
	 0
	3700
	17760
	37770
	37770
	71634
	62454
	62454
	60414
	60414
	71634
	77774
	77774
	77774
	77774
	55554
	11110

; by CParker, submitted 12 Nov 81
	JSR CII
	.TXT "DMT of the second flight of Columbia.  Cursor by C. Parker."
CII:	STA 3 VERSION
	JSR CURSOR
	 0
	4000
	16000
	37000
	37200
	37300
	37340
	37740
	37340
	37340
	37340
	37340
	37360
	37360
	37770
	37374
	16000

; by Denber.WBST, submitted 12 Nov 81
	JSR CHESS
	.TXT "DMT of the World Chess Championship.  Cursor by M. Denber."
CHESS:	STA 3 VERSION
	JSR CURSOR
	 0
	14000
	36000
	36000
	14111
	77111
	14177
	14177
	36042
	77042
	177442
	42
	42
	42
	177
	177
	177

; by LaPrade.eos, submitted 11 Jan 82
	JSR BRO
	.TXT "DMT of Brother Dominic's birthday.  Cursor by LaPrade.eos."
BRO:	STA 3 VERSION
	JSR CURSOR
	 0
	0
	0
	0
	0
	17770
	77776
	60006
	140003
	140003
	60006
	77776
	17770
	0
	0
	0
	0

; by Vest.pa, submitted 28 Jan 82
	JSR SF49
	.TXT"The 49ers win it all!  Cursor by Vest.pa."
SF49:	STA 3 VERSION
	JSR CURSOR
	 0
	3740
	14030
	60006
	124345
	125245
	127345
	61046
	14030
	3740
	0
	74170
	40100
	74160
	4100
	75104
	0

; by LaPrade.eos, submitted 1 March 82
	JSR Texas
	.TXT "DMT of Texas Independence Day.  Cursor by LaPrade.eos."
Texas:	STA 3 VERSION
	JSR CURSOR
	 0
	3400
	3400
	3400
	3600
	3776
	3776
	177776
	77777
	37776
	17777
	4776
	370
	360
	160
	160
	60

; by Boggs, submitted 2 April 82
	JSR PacMan
	.TXT "DMT of national Pac-Man day.  Cursor by Boggs.pa."
PacMan:	STA 3 VERSION
	JSR CURSOR
	 0
	1700
	7760
	17670
	17434
	37676
	37770
	77740
	37606
	77017
	37017
	37606
	17740
	17770
	7776
	3774
	770

; by Michel Denber.wbst, submitted 19 April 82
	JSR Dog
	.TXT "DMT of Be Kind to Animals Week, May 2-8.  Cursor by Denber.wbst."
Dog:	STA 3 VERSION
	JSR CURSOR
	 0
	160
	320
	230
	237
	261
	707
	454
	41420
	103020
	106060
	117160
	131360
	161330
	161550
	41654
	77666

; by Stone.wbst, submitted 18 May 82
	JSR Lilac
	.TXT "DMT of Rochester's annual Lilac Festival.  Cursor by Stone.wbst."
Lilac:	STA 3 VERSION
	JSR CURSOR
	 0
	25
	172
	12667
	26534
	55566
	125330
	125550
	154761
	125246
	174615
	51072
	31125
	31056
	13152
	15374
	5620

; by Thompson.pa, submitted 14 Jul 82
	JSR Bast
	.TXT "DMT of Bastille Day.  Cursor by Thompson.pa."
Bast:	STA 3 VERSION
	JSR CURSOR
	 0
	3760
	2020
	2020
	3760
	3720
	3420
	3020
	2020
	2020
	2020
	3760
	3560
	2020
	3560
	17774
	37776

; by LaPrade.eos, submitted 22 July 82
	JSR LA
	.TXT "DMT of Los Angeles: Dirtiest air in the U.S.  'Curser' by LaPrade.eos"
LA:	STA 3 VERSION
	JSR CURSOR
	 0
	0
	0
	0
	0
	21100
	125116
	70121
	125127
	21125
	2125
	4427
	4520
	3117
	0
	0
	0

; by LaPrade.eos, submitted 11 Aug 82
	JSR F13
	.TXT "DMT of Friday the Thirteenth.  Cursor by LaPrade.eos"
F13:	STA 3 VERSION
	JSR CURSOR
	 0
	0
	37777
	31707
	1601
	31561
	63362
	147744
	147714
	147434
	147714
	147744
	146744
	146704
	102014
	1434
	177774

; by LaPrade.eos, submitted 18 Aug 82
	JSR AAAI
	.TXT "DMT of the AAAI conference.  Cursor by LaPrade.eos."
AAAI:	STA 3 VERSION
	JSR CURSOR
	 0
	0
	300
	440
	40
	340
	40
	6457
	6306
	17006
	17006
	31406
	31406
	60606
	77606
	140306
	140317

; by Malcolm.eos, submitted 5 Oct 82
	JSR Goddard
	.TXT "DMT of Goddard's 100th birthday.  Cursor by Malcolm.eos."
Goddard:STA 3 VERSION
	JSR CURSOR
	 0
	373
	407
	1016
	2035
	4071
	10021
	20001
	40001
	40002
	56004
	37010
	77020
	177040
	176100
	75600
	30000

; by Hewitt.henr, submitted 12 Oct 82
	JSR Lotus
	.TXT "DMT of the IMO of the 1075.  Cursor by Hewitt.henr."
Lotus:	STA 3 VERSION
	JSR CURSOR
	 0
	0
	0
	0
	117717
	111110
	111110
	111110
	111104
	111102
	111111
	111111
	111111
	111111
	111111
	177177
	0

; by Evelyn VanOrden.eos, submitted 15 Nov 82
	JSR SmallT
	.TXT "Xerox 1100 Smalltalk-80 customer release.  Cursor by VanOrden.eos."
SmallT:	STA 3 VERSION
	JSR CURSOR
	 0
	3700
	17760
	37770
	37770
	77774
	77774
	77774
	37770
	37770
	17760
	7740
	3700
	1600
	0
	1600
	1600

; by Eric Rawson, submitted 11 Dec 82
	JSR Marty
	.TXT "Comedian Marty Feldman dies 12/3/82. Cursor by E Rawson."
Marty:	STA 3 VERSION
	JSR CURSOR
	 0
	0
	7000
	10414
	23423
	45445
	46513
	101213
	101215
	101201
	102402
	104402
	70404
	410
	360
	0
	0

; by Mehdi Araghi.wbst, submitted 31 Jan 83
	JSR Eubie
	.TXT "Eubie Blake's centenary, 7 Feb 83. Cursor by Araghi.wbst."
Eubie:	STA 3 VERSION
	JSR CURSOR
	 0
	40300
	50060
	51017
	51200
	11240
	1244
	245
	70045
	50005
	151601
	171340
	33240
	3647
	745
	155
	17

; by Tim Diebert, submitted 3 Feb 83
	JSR Heart
	.TXT "DMT of Valentines Day.  Cursor by Tim Diebert.pa."
Heart:	STA 3 VERSION
	JSR CURSOR
	 0
	7160
	35734
	30614
	70616
	60006
	60006
	60006
	70016
	30016
	36036
	7160
	3740
	1700
	600
	0
	0

; by Tim Diebert, submitted 7 Mar 83
	JSR Rain
	.TXT "DMT of another rainy day (in Calif.).  Cursor by T. Diebert."
Rain:	STA 3 VERSION
	JSR CURSOR
	 0
	3340
	33770
	37774
	177777
	177777
	177777
	177777
	77774
	7760
	20742
	2002
	42040
	410
	20110
	22102
	402

; by Tim Diebert, submitted 14 March 83
	JSR Sun
	.TXT "DMT of a sunny day in Calif. (finally!).  Cursor by T. Diebert."
Sun:	STA 3 VERSION
	JSR CURSOR
	 0
	44422
	20004
	1700
	147760
	17773
	17770
	37774
	137775
	17774
	17772
	17771
	143760
	1704
	20002
	42241
	4220

; by Tim Diebert, submitted 7 Apr 83
	JSR Tax
	.TXT "DMT of tax day: the long and the short of it.  Cursor by Diebert.pa."
Tax:	STA 3 VERSION
	JSR CURSOR
	 0
	117257
	111251
	111251
	111251
	111351
	111251
	111251
	0
	0
	0
	0
	135272
	125252
	125655
	124257
	136275

; by Eric Rawson, submitted 10 June 83
	JSR P10
	.TXT "Pioneer 10: 1st manmade object to leave the solar system.  Cursor by E. Rawson."
P10:	STA 3 VERSION
	JSR CURSOR
	 0
	3
	157
	26
	10
	24
	42
	160002
	14000
	2000
	1000
	400
	140200
	20200
	10100
	4100
	104100

; by Phil Zimmerman, submitted 27 June 83
	JSR Bird
	.TXT "DMT Cursor by Phil Zimmerman, who likes exotic birds"
Bird:	STA 3 VERSION
	JSR CURSOR
	 0
	1700
	16060
	34010
	60610
	40222
	100016
	100061
	100141
	100301
	100201
	170742
	36642
	6446
	654
	70
	140