Trailing-Edge
-
PDP-10 Archives
-
klad_sources
-
klad.sources/dakahm.mac
There are no other files named dakahm.mac in the archive.
SUBTTL DIAGNOSTIC SECTION
LALL
PGMNAM: ASCIZ /
PDP-10 KA10 BASIC INSTRUCTION DIAGNOSTIC # 8 [DAKAH]
/
START: SETZM USER# ;CLEAR USER CONTROL WORD
JSP 0,.+1 ;GET FLAGS
TLNE USERF ;IN USER MODE?
SETOM USER ;YES, SET USER CONTROL WORD
SKIPN USER
JRST STARTA
TTCALL 3,PGMNAM ;MENTION OUR NAME
OUTSTR [ASCIZ /
?EXEC MODE DIAGNOSTIC ONLY
/] ;TELL USER
HALT . ;AND DIE...
STARTA:
ST: SETZM MATPOF# ;CLR MA TRAP OFFSET FLAG.
MOD: SKIPE 1,SAV40 ;RESTORE THESE LOC IF PROG
MOVEM 1,10040 ;IF PROG MODIFIED
SKIPE 1,SAV41
MOVEM 1,10041
SKIPE 1,SAV42
MOVEM 1,10042
SKIPE 1,SAV43
MOVEM 1,10043
CONI CPSAV#
CONI PI,PISAV#
DATAI ;DO WE HAVE FP
SKIPGE MONCTL ;MONITR CONTROL ?
MOVE 0,MONCTL ;YES
ORCM [1B35]
SETCAM FPTRAP#
SETOM PI7SYS#
DATAI ;IS THIS MACH WITH USER
SKIPGE MONCTL ;MONITR CONTROL ?
MOVE 0,MONCTL ;YES
ORCM [1B34]
SETCAM USMOD#
SKIPE MATPOF# ;START AT 3776?
JRST MOD200 ;YES. GO CK MA 29 SET.
;MACH/OPTION DEPENDENT
;TEST UU0
RETURN MOD1 ;TEST UUO FOR NOT GOING TO 60
MOVE 1,[JRST .+4] ;IF THIS ROUT STOPS THE
MOVE 2,[JSP MOD1+1] ;TRAP WAS TO 60. IF UU0 HANG
MOVEM 2,61 ;THE MACH, CHECK XCTF0 AND
0 ;UU0F0 FLAGS FOR NOT SETING
MOD1: SKIPA ;CHECK MA 31 SET
STOP ;IR 1XX GATE FAIL
MOD2: RETURN MOD3 ;TEST 40 TO MA LOGIC (UU0)
MOVE 1,[JRST .+3] ;IF 40 WAS NOT (J) TO MA
0 ;THIS UU0 WILL STORE IN LOC 0
MOD3: SKIPA ;CHECK MA-30 SET
STOP ;ON THE MA1 PRINT
MOD4: RETURN MOD5 ;IF THE MA FROM AR
MOVE 2,[JSP MOD5+1] ;INHIBIT (AT6) FAILED THE
MOVEM 61 ;UU0 WOULD STORE IN E ORED
20 ;WITH 40 RATHER THAN C(40)
MOD5: SKIPA ;MA FM AR(J) CAME UP CHECK
STOP ;AND OF AT6-IR UU0 ON MA1 PRINT
MOD6: RETURN MOD7 ;TEST UU0 ABILITY TO STORE
0 ;IF C(40) UNCHANGED SCE FAIL
MOD7: CAMN 2,40 ;CK IR UU0 INPUT TO SCE
STOP ;ON S2 PRINT
MOD8: RETURN MOD9 ;TEST SACINH FOR UU0
SETO ;IF FAIL WILL MODIFY AC
0 ;SACINH THE IR UU0 INPUT
MOD9: CAME [-1] ;ON S2 PRINT FAILED
STOP
MOD10: RETURN MOD11 ;TEST UU0 FACINH, IF THE
MOVEI -1 ;UU0 FETCHES A AC THE
0 ;AC WILL BE STORED
MOD11: CAMN 40 ;FAC INH THE IR UU0 INPUT
STOP ;ON F2 PRINT FAIL
MOD12: RETURN MOD13 ;TEST UU0 IR TO ARLT
XWD 077740,0 ;THE AND OF (ET0,IR UU0)
MOD13: SKIPN 40 ;ON ARC-2 PRINT FAILED
STOP
MOD14: RETURN MOD15 ;UU0 FAIL
XWD 000740,0 ;CHECK ARLT FM FLAGS (J) B
MOD15: SKIPN 40 ;THE PA ON ARC-2 PRINT
STOP
MOD16: RETURN MOD17 ;UU0 FAIL
XWD 077000,0 ;CHECK ARLT FM FLAGS (J) A
MOD17: SKIPN 40 ;THE PA ON ARC-2 PRINT
STOP
ZZ=40
MOD18: REPEAT ^D10,
< RETURN .+4 ;TEST IRLT TO AR
XWD ZZ,0
SKIPN 40
STOP
ZZ=ZZ+ZZ
>
MOD19: RETURN MOD19A ;TEST PROPER STORAGE
0 ;OF UU0
MOD19A: SKIPE 40
STOP
MOD20: RETURN MOD20A ;CK FOR STORING OF E
XWD 0,-1 ;ON A UU0
MOD20A: MOVE 40
CAIE -1
STOP
MOD21: RETURN MOD21A ;CK FOR STORING OF E
XWD 077740,0 ;ON A UU0
MOD21A: MOVE 40
CAME [XWD 077740,0]
STOP
MOD22: RETURN MOD22A ;CK FOR STORING OF
XWD 077740,-1 ;E AND IR ON UU0
MOD22A: MOVE 40
CAME [XWD 077740,-1]
STOP
MOD23: RETURN MOD23A ;UU0 TEST THE PC+1
0 ;INHIBIT FEATURE LOC 41
MOD23A: ANDI 2,-1 ;CONTAINS TSP 2,X
CAIN 2,. ;PC+1 INH THE IR UU0 INPUT
STOP ;FAILED. SEE PC1 PRINT
MOD24: RETURN MOD24A ;PC STORED IN CORRECTLY
XWD 0,-1 ;FROM THE JSP AT 41
MOD24A: ANDI 2,-1 ;ON A UUO INST
CAIE 2,.-1
STOP
MOD25: ;SET PRIVILEGE TO FLAG
;SET UU0 TRAP
;TEST IOT INST FOR
;NOT TRAPING. SEE IR-2
;PRINT IR UU0 CAME UP
MOD26: ;CK AND OF IR IOTA, NOT ALLOW, ETC
MOD27: SFLAG 0 ;MAKE SURE EX IOT USER=0
RETURN MOD28 ;CK FOR NOT TRAP ON IOT
CONI ;IF IOTS TRAP NOW THE
CAI ;AND GATE EX USER (0), EX IOT USER
SKIPA ;DID NOT RESPOND TO EX USER (0)
MOD28: STOP ;SEE EX ALLOW IOTS ON EX PRINT
MOD29: SETO 1, ;THE IOTS FAIL TO STORE C(E)
DATAI 1 ;CHECK IR IOT ON IR2 PRINT
CONI 1 ;LOOKS LIKE IR DECODE FAILED
CAMN 1,[-1]
STOP
MOD30: MOVE 1,[123456654321] ;CHECK SCE FOR DATAI
DATAI 1 ;THE CONTENTS OF LOC1
CAMN 1,[123456654321] ;WERE NOT MODIFIED. SEE
STOP ;S1 PRINT SCE AND DECODE ON IOT
MOD31: MOVE 1,[123456654321] ;CHECK SCE FOR CONI. THE
CONI 1 ;CONTENTS OF LOC1 WERE NOT
CAMN 1,[123456654321] ;MODIFIED. SEE S2 PRINT SCE
STOP ;AND DECODE ON IOT PRINT
MOD32: SETO ;SACINH FAIL FOR INST
CONI 1 ;CONI FAILED. CHECK
CAME [-1] ;IR IOT INPUT TO SACINH
STOP ;ON THE S2 PRINT
MOD33: CONO ME,0 ;CLEAR LAST DEVICE
CONI ME,2 ;AR CLEAR AT(ET0)FAILED
CAIN 2,2 ;ON INST CONT CK AR
STOP ;CLEAR ETO, CONI ON ARC-2 PRINT
MOD34: DATAO ME,[0] ;AR CLR ON A DATAI
DATAI ME,3 ;INST FAILED CHECK
CAIN 3,3 ;IOT DATAI INPUT ON THE
STOP ;OR GATE TO AR CLR. SEE ARC-2 PRINT
SETZ ;CONSZ FAIL TO SKIP. CK
CONSZ ;PC+1 AT AND OF AD=0, IOT CONSZ,
STOP ;IOT T5 ON PC1 PRINT
CONO ME,0 ;CONSZ FAIL TO SKIP CK
CONSZ ME,700000 ;FOR NO AR CLR AT (ETO). SEE ARC-2
STOP ;PRINT THE IOT CONSX INPUT
CONO ME,0 ;CONSO SKIPED. CHECK PC+1
CONSO ME,0 ;(IOT T5,AD=0,IOT CONSO,IOT CONSZ
SKIPA ;AND GATES) ON PC1 PRINT
STOP
MOD35: SETZ 1, ;CHECK POINTER INC ON IOT BLK
BLKO ME,1 ;IF C(1)=0 THEN AR FM AD(J) (ET0)
CAI ;ON ARC-3 PRINT, OR AD+1 BOTH (FT9)
CAI ;ON AD2 PRINT FAILED
CAME 1,[XWD 1,1] ;IF IR 12 FAIL TO SET, PROG
STOP ;BLOWS UP
MOD36: SETZ 1, ;PC+1 INH FOR BLK FAILED
BLKO ME,1 ;CHECK IOT BLK INPUT TO
CAI ;PC+1 INH ON THE PC1 PRINT
SKIPA
STOP
MOD37: SETZ 1, ;BLKO PC+1 AT ET0 TIME
BLKO ME,1 ;FAILED. CHECK THE AND GATE
STOP ;BLK, CYC(0) CRY(0) ON PC1 PRINT
MOD38: SETO 1, ;BLKO PERFORMED A SKIP WHEN
BLKO ME,1 ;END CRY0 SHOULD=1
SKIPA ;CK PC+1,SEE ABOVE ROUTINE
STOP
MOD39: CONO PI,10000 ;JUST IN CASE
CONO 435447 ;SET SOME CPA FLAGS
CONI 0 ;(1) DID FLAGS SET? NO CONO FAIL
SKIPN 0 ;YES: CONI FAIL CK IOB TO AR
STOP ;AND MANY OTHERS. IE SINGLE STEP
MOD40: CONO ;PIA 35 FAIL TO SET (CPU)
CONO 1 ;OR READ SINGLE STEP
CONI ;SEE CPA PRINT
TRNN 1
STOP
MOD41: CONO ;PIA 3+(CFU) FAIL TO SET
CONO 2 ;OR READ. SEE CPA PRINT
CONI ;SINGLE STEP
TRNN 2
STOP
MOD42: CONO ;PIA 33 (CPU) FAIL TO SET
CONO 4 ;OR READ. SEE CPA PRINT
CONI ;SINGLE STEP
TRNN 4
STOP
MOD43: CONO 1 ;PIA 35 (CPU) FAIL TO CLEAR
CONO ;OR READ INCORRECT
CONI ;SEE CPA PRINT
TRNE 1 ;SINGLE STEP
STOP
MOD44: CONO 2 ;PIA 34 (CPU) FAIL TO CLEAR
CONO ;OR READ INCORRECTLY
CONI ;SEE CPA PRINT
TRNE 2 ;SINGLE STEP
STOP
MOD45: CONO 4 ;PIA 33 (CPU) FAIL TO CLEAR
CONO ;OR READ INCORRECTLY
CONI ;SEE CPA PRINT
TRNE 4 ;SINGLE STEP
STOP
MOD46: CONO 7 ;SET SOME CP FLAGS
CONSO ;CONSO FAILED CK
SKIPA
STOP
MOD47: CONO 7 ;CONSO FAILED
CONSO 7
STOP
MOD48: CONO 7 ;CONSZ FAIL
CONSZ 7 ;CHECK PC+1 AT AND
SKIPA ;OF AD=0, CONSZ, IOT T5
STOP ;ON PC1 PRINT
MOD50: CONO 40 ;CPU AROV ENABLE
CONO 20 ;TRY TO SET
CONSO 20
STOP ;IOB OR FLOP
CONO 20 ;SET AROV EN
CONO ;CK FOR NOT CLEARING
CONSO 20
STOP
CONO 20 ;SET AROV EN
CONO 40 ;TRY TO CLEAR
CONSZ 20
STOP
CONO 40 ;CLEAR AROV EN
CONO ;CK FOR NOT SETTING
CONSZ 20
STOP
MOD51: CONO 400 ;FOV EN CLEAR
CONO 200 ;TRY TO SET
CONSO 200
STOP
CONO 200 ;SET FOV EN
CONO ;CK FOR NOT CLEARING
CONSO 200
STOP
CONO 200 ;SET FOV EN
CONO 400 ;TRY TO CLEAR
CONSZ 200
STOP
CONO 400 ;CLEAR FOV EN
CONO ;CK FOR NOT SETTING
CONSZ 200
STOP
MOD52: CONO 4000 ;CLEAR CLK EN
CONO 2000 ;TRY TO SET
CONSO 2000
STOP
CONO 2000 ;SET CLK EN
CONO ;CK FOR NOT CLEARING
CONSO 2000
STOP
CONO 2000 ;SET CLK EN
CONO 4000 ;TRY TO CLEAR
CONSZ 2000
STOP
CONO 4000 ;CLEAR CLK EN
CONO ;TEST FOR NOT SETTING
CONSZ 2000
STOP
MOD53: CAM -1 ;SET NON-EX VIA F(CE)
CONO 10000 ;TRY TO CLEAR
CONSZ 10000
STOP ;FAIL TO CLEAR
CONO 10000 ;CLEAR NON-EX
CAM -1 ;TRY TO SET VIA F(CE)
CONSO 10000 ;FAIL TO SET
STOP ;CK MEM CNTL, CPA
CONO 10000 ;CLEAR NON-EX
MOVEM -1 ;TRY TO SET VIA S(CE)
CONSO 10000 ;FAIL TO SET
STOP
CONO 10000 ;CLEAR NON-EX
ADDM -1 ;TRY TO SET VIA PSE
CONSO 10000 ;FAIL TO SET
STOP
CAM -1 ;SET NON EX
CONO ;TEST FOR NOT CLEARING
CONSO 10000 ;ON CONO 0
STOP
CONO 10000
MOD54: CONO 400000 ;CLEAR PDL OV
SETO ;TRY TO SET
PUSH ;VIA PUSH
CONSO 200000 ;TEST FOR SET
STOP ;CPA PRINT
SETO
PUSH ;SET PDL OV
CONO 400000 ;TRY TO CLEAR .CK
CONSZ 200000 ;CPA PDL OV SET (ET0) POP GATE
STOP ;FLOP/IOB CPA PRINT
SETO
PUSH ;SET PDL OV
CONO ;CK FOR NOT CLEARING
CONSO 200000
STOP
CONO 400000 ;TEST FOR NOT
SETO ;SETTING PDL-OV
AOS ;CPA PDL OV SET FAIL
CONSZ 200000 ;IR PUSH CRY(0) (1) AT ET0
STOP ;AND GATE. THE PUSH INPUT
MOD55: CONO 400000 ;CK PDL FLAG
SETZ ;CPA PDL OV SET
PUSH ;CK AND GATE OK
CONSZ 200000 ;ET0 IR PUSH,ADCRY0 (1)
STOP ;THE CRY FLAG SHOULD PREVENT
CONO 400000 ;TRY TO SET PDL-OV
SETO ;VIA PUSHJ
PUSHJ .+1 ;THE AND GATE OF
CONSO 200000 ;PUSH,PUSHJ TO FROM
STOP ;CPA PDL OV SET FAILED. SEE CPA PRINT
CONO 400000 ;TRY TO SET VIA POPS
MOVEI 1 ;CHECK AND GATE OF
POP ;IR POPS, ET0, AD CRY 0(0)
CONSO 200000 ;TO CPA PDL OV SET
STOP
CONO 400000 ;CHECK POPS FOR NOT
MOVE [XWD 1,1] ;SETTING PDL-OV
POP ;AD CRY0(0) SHOULD PREVENT
CONSZ 200000 ;SEE ABOVE
STOP
MOD56: MOVSI 400000 ;SET AROV FLAG
ADD [XWD 400000,0] ;CK IOB INPUT IOB1
CONSO 10 ;PRINT FOR MISSING
STOP ;IOB BIT 32
JFCL 17,.+1 ;CHECK AROV STATUS
CONSZ 10 ;BIT 32 ON IOB
STOP ;SEE IOB1 PRINT
CONSZ 404440 ;STATUS BITS NOT USED
STOP ;SHOULD BE 0 IOB1 PRINT
CONO 200000 ;CLEAR THE WORLD
SETZ ;ON IOT THE
BLKI ;AND GATE OF IOT BLKI
CAI ;BLKO WHICH MAKES IOT BLK
CAME [XWD 1,1] ;FAILED LOOK AT THE
STOP ;BLKI INPUT
MOD57: MOVSI 400000 ;SET AROV FLAG
ADD [XWD 400000,0] ;A CONO WITH OUT
CONO ;BIT 32 CLEARED IT
JFCL 10,.+2 ;SEE ARF PRINT CPA CONO
STOP ;AND BIT 32
MOVSI 400000 ;SET AROV FLAG
ADD [XWD 400000,0] ;TRY TO CLEAR WITH
CONO 10 ;A CONO
JFCL 10,.+2 ;IT FAILED TO CLEAR
SKIPA ;CHECK ARF PRINT
STOP ;CPA CONO AND BIT 32
MOVSI 1,40000
JFCL 17,.+1 ;SET FOV FLAG
JRST 2,.+1(1) ;VIA RESET FLAGS
CONO ;CONO WITHOUT BIT29
JFCL 1,.+2 ;CLEARED IT. SEE ARF PRINT
STOP ;CPA CONO SET AND IOB 29
MOD58: MOVSI 1,40000
JFCL 17,.+1 ;SET FOV FLAG
JRST 2,.+1(1) ;VIA RESET FLAGS
CONO 100 ;CONO FAIL TO CLEAR FOV
JFCL 1,.+2 ;SEE ARF PRINT
SKIPA ;CONO CPU AND IOB
STOP ;BIT 29
JFCL 1,.+1 ;AR FOV FLAG TO IOB
CONSZ 100 ;FAIL SEE IOB1 PRINT
STOP ;AND CPA STATUS, AR FOV (1)
MOVSI 1,40000
JFCL 17,.+1 ;SET FOV VIA
JRST 2,.+1(1) ;RESTOR FLAGS
CONSO 100 ;FOV TO IOB FAIL
STOP ;SEE IOB1 PRINT
CONO 40000 ;CPA ADDR BREAK
CONSZ 40000 ;STATUS FAIL
STOP ;SEE CPA OR IOB1 PRINT
MOD59: CONO 7 ;A CONO TO P1 MODIFIED
CONO PI,0 ;CPU AS A DEVICE. BIO
CONSO 7 ;CPA SEL IS CONFUSED
STOP
CONO 10000 ;JUST CHECKING FOR
CAM . ;NOT NONEX AGAIN
CONSZ 10000
STOP
CONO PI,200000 ;SEE IF PAR ERR
CONSZ PI,200000 ;IS A ZERO
STOP
CONO PI,400000 ;SEE IF POWER FAIL
CONSZ PI,400000 ;IS A ZERO
STOP
MOVEI -1 ;WAIT FOR CLOCK
CONSZ 1000 ;FLAG TO SET
JRST .+3
SOJG .-2
STOP ;NO CLOCK FLAG
MOD60: CONO PI,100000 ;CLEAR CPA PARITY ENB
CONO PI,40000 ;TRY TO SET IT
CONSO PI,100000 ;ALSO PI AS DEVICE
STOP
CONO PI,40000 ;SET CPA PAR ENB
CONO PI, ;CK FOR NOT CLEAR
CONSO PI,100000
STOP
CONO PI,40000 ;SET CPA PAR ENB
CONO PI,100000 ;TRY TO CLEAR
CONSZ PI,100000
STOP
CONO PI,100000 ;CLEAR CPA PAR ENB
CONO PI, ;CK FOR NOT SET
CONSZ PI,100000 ;ON CONO
STOP
MOD70: CLEAN ;SEE IOB1
CONI PI,0 ;READ PI STATUS
TRNE 77400 ;A PI HOLD FLOP FAIL TO
STOP ;CLEAR OR IOB PI INPUT
MOVE 1,[MOVEI 40] ;STORE A MOVIT IN
MOVEM 1,(1) ;LOCATIONS 40 TO 60
CAME 1,[MOVEI 57]
AOJA 1,.-2
DEFINE BLURB<
;CORE LOCATIONS 40 TO 60 CONTAIN A "MOVEI, ADDRESS"
;THEREFORE IF A INTERRUPT OCCURES THE MOVEI WILL
;STORE IN LOCATION ZERO THE ADDRESS OF THE EXECUTED
;INSTRUCTION
>
DEFINE PIO (A)
< CLEAN
CONO PI,PIOSET+A ;PIO FAIL TO SET IF LIGHT OUT
CONSO PI,A ;OTHERWISE FAIL TO READ
STOP ;STATUS SE P12-IOB1 PRINT
CLEAN ;CHECK PIO CLEAR
CONO PI,PIOSET+A ;SET PIO
CONO PI,PIOCLR+A ;TRY TO CLEAR
CONSZ PI,A ;LIGHT=FAIL TO CLEAR PI2 PRINT
STOP ;NO LIGHT=STATUS FAIL IOB1 PRINT
CLEAN ;CHECK FOR PI RESET
CONO PI,PIOSET+A ;ABILITY TO CLEAR PIO FLAG
CONO PI,10000 ;SEE PI2 PRINT, PI RESET
CONSZ PI,A ;TO PIO FLAGS
STOP
CLEAN ;TEST PIO SET
CONO PI,PIOSET ;SEE PI2 PRINT
CONSZ PI,A ;IT SET FLOP WITHOUT
STOP ;A IOB BIT
CLEAN ;TEST PIO CLR
CONO PI,PIOSET+A ;PERHAPS PI RESET OCCURED (NO IOB-23)
CONO PI,PIOCLR ;THE FLOP CLEARED
CONSO PI,A ;WITH OUT A IOB BIT
STOP ;SEE PI2 PRINT
>
MOD71: CLEAN ;CHECK PIO SET
CONO PI,PIOSET+177 ;THE PI CHANNEL FLOPS
CONSO PI,177 ;FAILED TO SET
STOP ;CHECK PI1 PRINT
MOD72: PIO 100
PIO 40
MOD73: CHANEL MOD75
PIO 20
PIO 10
MOD74: PIO 4
PIO 2
PIO 1
MOD75: CLEAN
MOD76: CLEAN
CONO PI,PIOSET+100 ;PI RESET OCCURED
CONO PI,0 ;WITH OUT IOB-23
CONSO PI,100 ;SEE PI1 PRINT
STOP
CLEAN ;PI RESET OCCURED
CONO PI,PIOSET+100 ;WITH OUT PI SEL
CONO ME,1000 ;SEE PI1 PRINT
CONSO PI,100
STOP
CLEAN
CONO PI,PIOSET+100 ;CHECK SELECTION
CONO ME,PIOCLR+100 ;ON CONO SETL. SEE
CONSO PI,100 ;PI1 PRINT CONO ME
STOP ;SHOULD NOT EFFECT PI
MOD77: CLEAN
CONO PI,ACT ;SET ACTIVE THEN
CONO PI,10000 ;TRY TO CLEAR VIA PI RESET
CONSZ PI,200 ;FAIL TO CLEAR SEE P11 PRINT
STOP ;THE PI ACT FLAG
CLEAN
CONO PI,ACT ;SET ACTIVE THEN
CONO PI,400 ;TRY TO CLEAR VIA CONO
CONSZ PI,200 ;AND BIT27 SEE PI1
STOP ;PRINT ACTIVE FLAG
CLEAN
CONO PI,ACT ;SEE ACT VIA CONO BIT 28
CONSO PI,200 ;LIGHT=0 FAIL TO SET
STOP ;LIGHT=(1) FAIL TO READ PI1-IOB1
CLEAN
CONO PI,ACT ;SEE ABOVE
CONO PI,ACT
CONSO PI,200
STOP ;PI ACT FAIL
DEFINE NOTPIR (A)<
CLEAN ;ENABLE PRIORITY, EXPECT NO INTERRUPTS
CONO PI,ACT ;CK PI REQ LEVEL (PI2 PRINT). THE
CONSZ PI,A ;PIR (1) INPUT TO AND GATE OF PIH (0)
STOP ;BOTTEM OF PAGE. ALSO PIR-FLOP
>
MOD78: BLURB
;CHECK CHANNEL 1, PIR1 FLOP OR RI REQ1 LEVEL
NOTPIR 40000
;CHECK CHANNEL 2, PIR2 FLOP OR PI REQ2 LEVEL
NOTPIR 20000
;CHECK CHANNEL 3, PIR3 FLOP OR PI REQ3 LEVEL
NOTPIR 10000
;CHECK CHANNEL 4, PIR4 FLOP OR PI REQ4 LEVEL
NOTPIR 4000
;CHECK CHANNEL 5, PIR5 FLOP OR PI REQ5 LEVEL
NOTPIR 2000
;CHECK CHANNEL 6, PIR6 FLOP OR PI REQ6 LEVEL
NOTPIR 1000
;CHECK CHANNEL 7, PIR 7 FLOP OR PI REQ7 LEVEL
NOTPIR 400
DEFINE NOTREQ (A,B)<
CLEAN ;A TEST OF PI OK TO PREVENT INTERRUPT
CONO PI,PIREQ+A ;ACTIVE CLEARED, REQUEST FLAG SET
CONSZ PI,B ;INTR OCCURED PIOK INPUT, PIOK TO PI
STOP ;REQ FAIL. SEE BOTTEM PI2 PRINT
>
MOD79: BLURB
;TEST PI ACT ABILITY TO PREVENT PI REQ1, INTERRUPT VIA ACTIVE
NOTREQ 100,40000
;TEST PIOK2 ABILITY TO PREVENT PI REQ2, INTERRUPT
NOTREQ 40,20000
;TEST PIOK3 ABILITY TO PREVENT PI REQ3, INTERRUPT
NOTREQ 20,10000
;TEST PIOK4 ABILITY TO PREVENT PI REQ4, INTERRUPT
NOTREQ 10,4000
;TEST PIOK5 ABILITY TO PREVENT PI REQ5, INTERRUPT
NOTREQ 4,2000
;TEST PIOK6 ABILITY TO PREVENT PI REQ6, INTERRUPT
NOTREQ 2,1000
;TEST PIOK7 ABILITY TO PREVENT PI REQ7, INTERRUPT
NOTREQ 1,400
DEFINE PIRCLR (A)<
CLEAN
CONO PI,PIREQ+A ;SET REQUEST FLOP BUT
SETZ ;NOT ACTIVE THEN CLEAR
CONO PI,10000+ACT ;REQUEST AND SET ACTIVE
SKIPE ;PI RESET FAILED TO CLEAR
STOP ;THE PIR FLAG.`SEE PI2 PRINT
>
ZZ=100 ;CHECK CLEAR TO PIR FLAGS
REPEAT 7,<
PIRCLR ZZ
ZZ=ZZ/2>
DEFINE FILAC<
MOVE 17,[MOVEI 17] ;FILL ACS WITH
MOVEM 17,(17) ;MOVEI TO AC 0
CAME 17,[MOVEI 0] ;THE CURRENT LOC
SOJA 17,.-2
MOVE 17,[MOVEI 17]
>
FILAC
CLEAN ;CHECK PC+1 INHIBIT ON INTERRUPT
MOVE [MOVEI]
CONO PI,ACT+PIREQ+100 ;CAUSE INTERRUPT
SKIPA ;PC+1 INH ON PC1 PRINT FAIL
STOP ;SEE P1 CYC(1) INPUT
BLURB
MOD80: CLEAN
MOVE [MOVEI] ;IF LOC 0 EXECUTED C(0)=0
CONO PI,ACT+PIREQ+100 ;CAUSE AN INTERRUPT
SKIPN 0 ;MA FM PICH (1) PULSE FAIL
STOP ;SEE MA1 PRINT
CLEAN
MOVE [MOVEI]
CONO PI,ACT+PIREQ+100 ;CAUSE INTERRUPT IF MA
CAIN 40 ;34 SET FAIL C(0)=40
STOP ;SEE MA1 PRINT
CLEAN
CONO PI,ACT+PIREQ+100 ;CAUSE INTERRUPT
CAIN 2 ;MA 30 SET FAILED
STOP ;SEE MA1 PRINT
CLEAN
CONO PI,ACT+PIREQ+100 ;CAUSE INTERRUPT
CAIN 46 ;MA 33 SET OUCCRED ON CH1
STOP ;SEE MA1 PRINT
MOD81: CLEAN
CONO PI,ACT+PIREQ+100 ;CAUSE INTERRUPT
CAIN 52 ;MA 32 SET OCCURED ON CH1
STOP ;SEE MA1 PRINT
CLEAN
CONO PI,ACT+PIREQ+100 ;CAUSE INTERRUPT
CAIN 43 ;MA 35 SET OUCCURED ON CH1
STOP ;SEE MA1 PRINT
CLEAN
CONO PI,ACT+PIREQ+40 ;CAUSE INTERRUPT
CAIN 40 ;MA 33 SET FAILED ON CH2
STOP ;SEE MA1 PRINT
CLEAN
CONO PI,ACT+PIREQ+20 ;CAUSE INTERRUPT
CAIN 40 ;MA 32 SET FAILED ON CH4
STOP ;SEE MA1 PRINT
CLEAN
CONO PI,ACT+PIREQ+40 ;CAUSE INTERRUPT
CAIN 46 ;MA 34 SET OCCURED ON CH2
STOP ;SEE MA1 PRINT
BLURB
MOD82: CLEAN ;CHECK IF AN INTERRUPT OCCURES
SETZ 0 ;C(0) FILLED BY XCT OF MOVEI
CONO PI,ACT+PIREQ+177 ;ACTIVATE ALL INTERRUPTS
SKIPN 0 ;CK PIR FM IOB [1] PI1 PRINT
STOP ;AND PIRQ LEVEL PI1 PRINT
CLEAN
SETZ 0 ;ON INTERRUPT NO PI HOLDS
CONO PI,ACT+PIREQ+177 ;WERE SET CHECK PIH
CONSO PI,77400 ;FM PICHRQ PULSE ON
STOP ;PI1 PRINT
DEFINE PIHCLR (A,B)<
CLEAN
CONO PI,PIREQ+ACT+A ;CAUSE INTERRUPT TO SET HOLD
CONO PI,10000 ;TRY TO CLEAR WITH PI RESET
CONSZ PI,B ;FAIL TO CLEAR SEE PI2
STOP
>
ZZ=100
YY=40000 ;CHECK RESET TO PIH FLOPS
MOD83: REPEAT 7,<
PIHCLR ZZ,YY
ZZ=ZZ/2
YY=YY/2
>
BLURB
DEFINE OFFPIR (A,B)<
CLEAN
CONO PI,PIREQ+ACT+A ;SETS PIH. THEN CLR
JRST 10,.+1 ;PIR TURNED BACK ON
CONSZ PI,B ;PIR TURNED BACK ON.PIH(1) CLR PIR
STOP
>
ZZ=100
YY=40000 ;TEST THE RESET TO PIR
MOD85: REPEAT 7,<
OFFPIR ZZ,YY
ZZ=ZZ/2
YY=YY/2
>
DEFINE TSTREQ (A)<
CLEAN ;TEST ABILITY OF HOLD TO PREVENT INTERRUPT
CONO PI,ACT+PIREQ+A ;INTERRUPT SETS PIH IF SECOND
SETZ ;INTERRUPT OCCURED PIH (0)
CONO PI,ACT+PIREQ+A ;FAILED TO INHIBIT PIREQ
SKIPE ;SEE BOTTOM OF PI2 PRINT
STOP
>
BLURB
ZZ=100
MOD86: REPEAT 7,<
TSTREQ ZZ
ZZ=ZZ/2
>
DEFINE PIHOK (A,B)<
CLEAN
CONO PI,ACT+PIREQ+A ;INTERRUPT SHOULD SET HOLD(PIH)
SETZ ;IF SECOND INTERRUPT OCCURS PIH
CONO PI,ACT+PIREQ+B ;FAILED TO PREVENT PIOK THUS
SKIPE ;ALLOWING INTERRUPT. SEE BOTTOM
STOP ;OF PI2 PRINT
>
BLURB
ZZ=100
YY=40 ;TEST PRIORITY CHAIN
MOD87: REPEAT 6,<
PIHOK ZZ,YY
ZZ=ZZ/2
YY=YY/2
>
DEFINE SETPIH (A,B)<
CLEAN ;CHECK REQ AND PIH FLOPS
CONO PI,ACT+PIREQ+A ;CAUSE INTERRUPT, SHOULD SET
CONSO PI,B ;HOLD (PIH) SEE PI2 PRINT
STOP ;BOTH PIR+PIH SHOULD BE SET
>
MOD88: SETPIH 100,40000 ;CH 1
SETPIH 40,20000 ;CH 2
CHANEL MOD90
MOD89: SETPIH 20,10000 ;CH 3
SETPIH 10,4000 ;CH 4
SETPIH 4,2000 ;CH 5
SETPIH 2,1000 ;CH 6
SETPIH 1,400 ;CH 7
MOD90: CLEAN
DEFINE PIADDR (A,B)<
CLEAN ;CHECK ABILITY TO INTERRUPT TO
SETZ ;LOC 40-60 SHOULD SEE MOVEI
CONO PI,ACT+PIREQ+A ;ACTIVATE AN INTERRUPT. IF C(0)=0
CAIE B ;NO INTERRUPT OCCURED, C(0)=ADDR
STOP ;OF INTERRUPT EXECUTED
>
BLURB
MOD91: PIADDR 100,42 ;CH 1 TO LOC 42
PIADDR 40,44 ;CH 2 TO LOC 44
CHANEL MOD93
MOD92: PIADDR 20,46 ;CH 3 TO LOC 46
PIADDR 10,50 ;CH 4 TO LOC 50
PIADDR 4,52 ;CH 5 TO LOC 52
PIADDR 2,54 ;CH 6 TO LOC 54
PIADDR 1,56 ;CH 7 TO LOC 56
MOD93: CLEAN
DEFINE TWOPIR (A,B)<
CLEAN ;CK PIR(0) ABILITY TO PREVENT INTERRUPT
SETZ ;LOWER CHANNEL SHOULD BE INHIBIT
CONO PI,ACT+PIREQ+A ;TURN ON 2 PIR FLOPS. CHECK INT LOC
CAIN B ;PIR (0) INPUT TO PIOK
STOP
>
BLURB
MOD94: TWOPIR 100,46 ;CH 1+2
TWOPIR 40,46 ;CH 2+3
CHANEL MOD96
MOD95: TWOPIR 20,56 ;CH 3+4
TWOPIR 10,52 ;CH 4+5
TWOPIR 4,56 ;CH 5+6
TWOPIR 2,56 ;CH 6+7
MOD96: CLEAN
DEFINE MULPIR (A,B)<
CLEAN
SETZ ;TEST MULTI REQUEST BREAK ON
CONO PI,ACT+PIREQ+A ;CORRECT CHANNEL TO CORRECT
CAIE B ;LOC C(0)=INTERRUPTED ADDR
STOP
>
BLURB
MOD97: MULPIR 100,42
MULPIR 40,44
CHANEL MOD99
MOD98: MULPIR 20,46
MULPIR 10,50
MULPIR 4,52
MULPIR 2,54
MULPIR 1,56
MOD99: CLEAN
DEFINE JENOK (A,B)<
CLEAN
CONO PI,ACT+PIREQ+A ;SET THE PIH FLOP THEN REMOVE
CONO PI,DACT ;THE PIOK LEVELS VIA NO ACTIVE
JRST 10,.+1 ;RELEASE INTERRUPT SHOULD NOT
CONSO PI,B ;EFFECT PIH FLOP UNLESS AND
STOP
>
MOD100: JENOK 100,40000 ;PIH 1
JENOK 40,20000 ;PIH 2
CHANEL MOD102
MOD101: JENOK 20,10000 ;PIH 3
JENOK 10,4000 ;PIH 4
JENOK 4,2000 ;PIH 5
JENOK 2,1000 ;PIH 6
JENOK 1,400 ;PIH 7
MOD102: CLEAN
DEFINE ONEPIH (A,B)<
CLEAN
CONO PI,ACT+PIREQ+A ;CHECK FOR REDUNDANT
CONSZ PI,B ;PIH FLAGS.SEE TOP PI2 PRINT
STOP
>
WW=20000
ZZ=100
YY=37400
MOD103: REPEAT 7,<
ONEPIH ZZ,YY
YY=YY+WW
WW=WW/2
ZZ=ZZ/2
>
DEFINE FASTPIH (A,B,C)<
CLEAN
CONO PI,ACT+PIREQ+B ;SET PIH AND PIH ON
CONO PI,ACT+PIREQ+A ;NEXT HIGHER CHANNEL
JRST 10,.+1 ;SHOULD RELEASE ONLY HIGH CH
CONSO PI,C ;CHECK FOR FAST TURN OFF (PIH)
STOP
>
MOD104: FASTPIH 100,40,20000
CHANEL MOD106
MOD105: FASTPIH 40,20,10000
FASTPIH 20,10,4000
FASTPIH 10,4,2000
FASTPIH 4,2,1000
FASTPIH 2,1,400
MOD106: CLEAN
ZZ=100
YY=40000
MOD107: REPEAT 7,<
CLEAN
CONO PI,PIOSET+ACT+ZZ ;SET CHANNEL IOB SHOULD
CONSZ PI,YY ;NOT HAVE DATA. CHECK AND
STOP ;OF PIR STB, IOB PIRQ, PIO
ZZ=ZZ/2 ;THE PIRQ INPUT. INTERRUPT NOT
YY=YY/2 ;HAVE OCCURED. SEE PI2 PRINT>
DEFINE CPINTR (A)< ;PROVIDE AN INTERRUPT TO PI
MOVSI 400000 ;BUS FROM PROCESSOR VIA ARROV
ADD ;AND OTHER SOURCES
CONO 42220+A>
DEFINE IOBRQ (A,B,C)<
CLEAN ;CLEAR THE WORLD EXCEPT CP
CPINTR A
CONO PI,PIOSET+ACT+B ;TURN ON CK FLOP TO ALLOW
CONSO PI,C ;INTERRUPT. CK INPUT TO PIR FLOP
STOP
>
ZZ=1
YY=40000
MOD108: REPEAT 7,< ;TEST FOR NO INTERRUPT FROM BUSS
CLEAN ;CLEAR WORLD
CPINTR ZZ ;INTERRUPT TO BUSS INPUT TO PIR
CONSZ PI,YY ;PIO=0 EXPECT NO INTERRUPT. SEE
STOP
ZZ=ZZ+1 ;IOB PIRQ,PIO(1), ON PI2 PRINT
YY=YY/2
>
MOD109: IOBRQ 1,100,77400
IOBRQ 2,40,77400
CHANEL MOD111
MOD110: IOBRQ 3,20,77400
IOBRQ 4,10,77400
IOBRQ 5,4,77400
IOBRQ 6,2,77400
IOBRQ 7,1,77400
MOD111: CLEAN
MOD115: CLEAN ;TEST CP FOR NO INTERRUPT
CONO 1 ;ASSIGN A CHANNEL TO
CONO PI,PIG0 ;PROCESSOR, ENABLE PI. IF
CONSZ PI,77400 ;INTERRUPT PROCESS PUT BIT ON PI BUSS
STOP ;CHECK TOB IPRQ ON CPA PRINT
BLURB
MOD116: CLEAN
CPINTR 1 ;ENABLE PROCESSOR INTERRUPT
SETZ
CONO PI,PIG0 ;PROCESSOR DECODE TO PI BUSS
CAIE 42 ;FAIL, SEE TOP RIGHT OF CPU
STOP ;PRINT C(0)=ADDR OF XCT INST
MOD117: CLEAN
CPINTR 2 ;ENABLE PROCESSOR INTERRUPT
SETZ ;WILL BE FILLED BY ADDR OF XCT INST
CONO PI,PIG0 ;ACTIVATE PI SYS
CAIE 44 ;EXPECT CHANNEL 2
STOP ;IF C(0)=0 NO INTERRUPT. SEE CPA PRINT
CHANEL MOD120
MOD118: CLEAN
CPINTR 4 ;ENABLE PROCESSOR INTERRUPT
SETZ ;WILL BE FILL BY ADDR OF XCT INST
CONO PI,PIG0 ;ACT PI SYS
CAIE 50 ;EXPECT CHANNEL 4
STOP ;IF C(0)=0 NO INTERRUPT. SEE CPA PRINT
BLURB
MOD119: CLEAN ;ENABLE AN INTERRUPT ON CHANNEL 1-7
CPINTR 7 ;CHECK PROCESSOR INTERRUPT
CONO PI,PIG0
CAIE 56
STOP ;CH 7 FAIL TO INTERRUPT
CONO 6
CAIE 54
STOP ;CH 6 FAIL TO INTERRUPT
CONO 5
CAIE 52
STOP ;CH 5 FAIL TO INTERRUPT
CONO 4
CAIE 50
STOP ;CH 4 FAIL TO INTERRUPT
CONO 3
CAIE 46
STOP ;CH 3 FAIL TO INTERRUPT
CONO 2
CAIE 44
STOP ;CH 2 FAIL TO INTERRUPT
CONO 1
CAIE 42
STOP ;CH 1 FAIL TO INTERRUPT
MOD120: CLEAN
BLURB
MOD121: CLEAN
SETZ ;C(0) MODIFIED IF INTERRUPT
CONO PI,PIG0 ;ENABLE PI
JFCL 10,.+1 ;CLEAR AROV
CONO 20+1 ;ENABLE AROV CH1
SKIPE ;INTERRUPT OCCURED SEE CPA PRINT
STOP ;CPA AROV EN(1) AND GATE TO PIRQ
MOD122: CLEAN
SETZ
CONO PI,PIG0
MOVSI 400000
ADD ;SET AROV
CONO 1 ;AROV CNT NO ENABLE
SKIPE ;INT OCCURED SEE CPU PRINT
STOP
MOD123: CLEAN
SETZ
CONO PI,PIG0 ;ENABLE PI
MOVSI 400000 ;SET AROV
ADD ;FLOP
CONO 21 ;FLOP AND AROV (EN)
CAIE 42 ;NO INTERRUPT CHECK AND GATE
STOP ;TO PIRQ ON CPU PRINT
MOD124: CLEAN
SETZ
CONO PI,PIG0 ;ENABLE PI
CONSO 1000
JRST .-1 ;WAIT IF CLK=0
CONO 2001 ;SET CLOCK ENABLE
CAIE 42 ;SHOULD INTERRUPT TO LOC 42
STOP ;SEE CPU PRINT AND CLK ENABLE
BLURB
MOD125: CLEAN
CONO PI,PIG0 ;ENABLE PISYS
CONO 1 ;TRY TO SET NONEX MEM
SETZ ;NO INTERRUPT SET
CAM -1 ;NONEX INPUT TO
CAIE 42 ;PIRQ ON CPA
STOP ;PRINT
MOD127: CLEAN
CONO PI,PIG0 ;ENABLE PI
CONO 1 ;CPU TO CHANNEL 1
SETO ;SET THE
PUSHJ .+1 ;PDL FLAG
CAIE 42 ;IT FAILED TO INTERRUPT
STOP ;SEE ITS INPUT TO PIRQ ON CPA PRINT
MOD128: CLEAN
CONO PI,PIG0 ;ENABLE PI
CONO 1
SETZ
CONO PI,40000 ;ENABLE PAR
SKIPE ;INTERRUPT OCCURED
STOP ;CHECK CPU PIRQ INPUT
MOD129: CLEAN
JFCL 1,.+1 ;CLEAR FOV
CONO PI,PIG0 ;ENABLE PI
SETZ
CONO PI,201 ;FOV ENABLE. INTERRUPT
SKIPE ;OCCURED CK PIRQ INPUTS
STOP ;ON CPU PRINT
MOD130: CLEAN
SFLAG 40000 ;SET FOV FLAG
SETZ
CONO PI,PIG0 ;ENABLE PI
CONO 1 ;CH1 TO PROCESSOR
SKIPE ;FOV ENABLE FAIL TO PREVENT
STOP ;INTERRUPT SEE CPU PRINT
BLURB
MOD131: CLEAN
SFLAG 40000 ;SET FOV FLAG
CONO PI,PIG0 ;ENABLE PI
SETZ
CONO 201 ;ENABLE FOV+CH1
CAIE 42 ;FAIL TO INTERRUPT SEE
STOP ;PIRQ INPUTS ON CPA PRINT
MOD132: CLEAN
CONO PI,ACT+PIREQ+100 ;INTERRUPT
REPEAT ^D10,
< JRST .+1>
CONSO PI,40000 ;PIH WAS RESET BY JRST (NO BIT 9)
STOP ;SEE PI RESTORE LOGIC ON PI1 PRINT
MOD133: CLEAN
CONO PI,ACT+PIREQ+100 ;INTERRUPT
REPEAT ^D10,
< CAI 10,0>
CONSO PI,40000 ;PIH WAS RESET BY BIT9(NO JRST)
STOP ;SEE PI RESTORE LOGIC ON PI1 PRINT
MOD134: CLEAN ;TEST PI CYC(1) INPUT TO PI OV
SETO ;PROVIDE ALL CONDITIONS TO SET
BLKI ;PI OV EXCEPT PI CYC(1)
CONO PI,ACT+PIREQ+100 ;IF C(0)=43 REPLACE THE B137
CAIE 42 ;AND GATE TO PI OV SEE
STOP ;PI1 PRINT
MOD135: CLEAN
MOVE [BLKO ME,0] ;PUT A BLKI IN
MOVEM 42 ;LOC 42
SETZ ;PROVIDE FOR NO OVERFLOW
CONO PI,ACT+PIREQ+100 ;INTERRUPT. IF C(0)=43
CAIN 43 ;AND GATE TO PIOU THE AD
STOP ;CRY0(1) INPUT FAILED. SEE PI1 PRINT
JRST MOD136
;HOLE LEFT FOR RELOCATION TEST
MOD136: CLEAN
MOVE [AOS] ;PUT AN AOS IN LOC 42
MOVEM 42 ;PROVIDE ALL INPUTS TO
SETO ;PIOU EXCEPT IOT BLK
CONO PI,ACT+PIREQ+100 ;CANT TEST GATE
SKIPE ;THINK UNNECESSARY
STOP ;BUT DO IT ANYWAY
MOD137: CLEAN
MOVE [BLKO ME,0] ;SETUP A BLKO TO SET
MOVEM 42 ;THE PI OV FLOP
SETO
CONO PI,ACT+PIREQ+100 ;CAUSE FIRST INTERRUPT
SETZ ;PI SHOULD SET AT THIS
CLEAN ;TIME, IF PI OV IS NOT
CONO PI,ACT+PIREQ+100 ;CLEARED AT ST1 NEXT INTERRUPT
CAIN 43 ;WILL OCCUR AT LOC 43
STOP ;SET PI 1 PRINT.
MOD140: CLEAN
MOVE [BLKO ME,0] ;PUT A BLKO IN LOC 42
MOVEM 42 ;WHEN EXECUTED THIS SHOULD
SETO ;SET PIOV. IF PI OV IS NOT
CONO PI,ACT+PIREQ+100 ;CONNECTED TO MA REGISTER
ANDI -1 ;42 WILL BE EXECUTED TWICE
CAIN 1 ;SEE MA 35 SET AT IT0
STOP ;AND PI OV(1) ON MA1 PRINT
MOD141: CLEAN ;CHECK BLKO NOT RESET PIH
MOVE [MOVEI 42] ;RESTORE LOC 42
MOVEM 42 ;TO MOVEI
CONO PI,PIREQ+ACT+100 ;SET PIH VIA INTERRUPT
SETZ ;IF PIH1(0) THEN PI CYC(1)
BLKO ME,0 ;INPUT TO PI RESTORE FAILED
CAI
CONSO PI,40000 ;SET PI1 PRINT
STOP
MOD142: CLEAN ;CHECK PI RESTORE LOGIC
MOVE [DATAO ME,0] ;DATAO AND PIOV SHOULD PRODUCE
MOVEM 42 ;PI RESTORE. CHECK THIS INPUT
CONO PI,PIREQ+ACT+100 ;TO PI RESTORE ON PI1 PRINT
CONSZ PI,40000 ;ALSO CHECK PI CYC(1) INPUT
STOP ;ON SAME PAGE
MOD143: CLEAN
MOVE [DATAI ME,0] ;IF MACHINE HANGS OR
MOVEM 42 ;PIH(1) CHECK DATAO/DATAI
CONO PI,PIREQ+ACT+100 ;INPUT TO PRIORITY SYSTEM
CONSZ PI,40000 ;SEE PI1 PRINT (LOWER LEFT)
STOP
MOD144: CLEAN
MOVE [BLKO ME,0] ;INTERRUPT TO A BLKO WHOS
MOVEM 42 ;POINTER SHOULD SET PIOV. THE
SETO ;INST AT LOC 43 A (MOVEI 43)
CONO PI,PIREQ+ACT+100 ;SHOULD BE EXECUTED. CHECK
CONSO PI,40000 ;PI OV AND ASSOCIATED LOGIC
STOP ;ON PI1 PRINT
MOD145: CLEAN
MOVE [BLKO ME,0] ;INTERRUPT TO A BLKO WHOS
MOVEM 42 ;POINTER SHOULD SET PIOV. THE
SETO ;INST AT LOC 43 A (MOVEI 43)
CONO PI,PIREQ+ACT+100 ;SHOULD BE EXECUTED. CHECK
CAIE 43 ;CHECK PI OV INPUT TO MA35
STOP ;SET ON MA1 PRINT
MOD147: CLEAN ;TEST PI CYC(0) GET TO PIR STB
MOVE [BLKO ME,0] ;PUT A BLKO WITH POINTER TO
MOVEM 44 ;SET PI OV IN CHANNEL 2 BLKO
MOVE [MOVEI 1,42] ;WILL SET NONEX MEM CAUSING
MOVEM 42 ;INTERRUPT ON CH1 THE INSTRUCTION
HRROI -2 ;AT LOC 45 MUST BE EXECUTED
CONO PI,PIOSET+100
CONO 1 ;OR PI CYC(0) GATE TO PIR STB FAILED
CONO PI,PIREQ+ACT+40
CAIE 45 ;AND OF MC RQ PULSE PICYC(0)
STOP
CAIE 1,42
STOP ;NONEX FAIL TO INTERRUPT CH1
MOD148: CLEAN ;PUT A SKIPA IN THE
MOVE [SKIPA] ;INTERRUPT SPOT
MOVEM 42
CONO PI,PIREQ+ACT+100
STOP
MOD149: CLEAN
MOVE [JSR .+4]
MOVEM 42
CONO PI,PIREQ+ACT+100
STOP
0
MOD150: CLEAN ;INTERRUPT TO A PUSHJ
MOVE [PUSHJ .+4]
MOVEM 42
MOVSI -1
CONO PI,ACT+PIREQ+100
ANDI 1,-1
CAIE 1,.-1
STOP ;PC STORED INCORRECTLY
CAIE 1 ;THE PUSHJ
STOP ;POINTER WORD IN ERROR
CLEAN
MOD151: CLEAN
MOVE [MOVEI 43] ;TEST CLEAR MA ON INTERRUPT
MOVEM 43
MOVE [BLKO ME,4]
MOVEM 42
SETOB 4
HRRI 4,4
CONO PI,PIREQ+ACT+100
CAIE 43
STOP
MOD152: SETZM 60 ;TEST TRAP TO 60
MOVE [JSP MOD153] ;GO HERE IF TRAP TO 40
MOVEM 41 ;ERROR
MOVE [JSP MOD153+1]
MOVEM 61 ;OK TRAP
XWD 100000,0 ;OP CODE 100-127
STOP
MOD153: STOP
SKIPN 60 ;NOTHING STORED IN C(60)
STOP
MOD154: SKIPN USMOD# ;TEST RELOC IF SPECIFIED
JRST MOD195
DEFINE UMON<
CONO 634440 ;PREPARE TO TURN ON USER
CONO PI,10000 ;MODE. CL PI, IOB, RELOC
DATAO [XWD -1,0]>
DEFINE UMOFF<
MOVE [JSP .+3] ;TURN OFF USER MODE VIA
MOVEM 41 ;UUO. PROG RETURNS TO END
XWD 040000,0 ;OF MACRO. PC+FLAGS STORED .+1
>
DEFINE HOLD<
JUMPA . ;MACH ERROR. HALT MAY TRAP
JUMP .+1 ;SO WAITING FOR OPERATOR
>
MOD160: JRST 2,@[XWD 0,.+1] ;CLEAR EX IOT USER, IF LIGHT
JSP .+1 ;OUT FLAG TRANSFER TO AR FAIL
TLNE UMIOT ;BIT 6. OR FLOP FAIL TO CLEAR
STOP
JRST 2,@[XWD UMIOT,.+1] ;SET THEN CLEAR EX IOT USER
JRST 2,@[XWD 0,.+1] ;CK AND GATE ARF FLAGS FM BR (J),
JSP .+1 ;BR6(0) FAIL TO CLEAR
TLNE UMIOT ;EX IOT USER ON EX PRINT
STOP
JRST 2,@[XWD 0,.+1] ;CLEAR THEN SET EX IOT USER
JRST 2,@[XWD UMIOT,.+1] ;IF LIGHT=1 FLAGS TO AR FAIL
JSP .+1 ;IF LIGHT=0 FLOP FAIL TO SET. CK
TLNN UMIOT ;BR6(1), EX USER(0), ARF FLAGS(J), EX PRINT
STOP
JRST 2,@[XWD 0,.+1] ;CLEAR USER. IOB1 PRINT
CONSZ 1B20 ;READ PROCESSOR STATUS
STOP
JRST 2,@[XWD UMIOT,.+1] ;SET USER IOB1 PRINT
CONSO 1B20 ;CPA STATUS FAIL
STOP
MOD161: UMOFF
TLNE USERF ;FLAGS TO AR BIT5 (USER MODE) FAIL
HOLD
;TRY TO TURN ON USER MODE VIA RESTORE FLAGS THEN
;TURN OFF VIA UU0. SEE EX PRINT
MOD162: MOVE [JSP MD162A]
MOVEM 41
UMON
JRST 2,@[XWD USERF+UMIOT,MD162B] ;ALSO PRIVI IO
MD162A: HOLD ;TRAP HERE, NO MEMORY ACCESS, USER MODE
MD162B: UMOFF
TLNN USERF ;JSP STORED FLAGS IN C(0)
HOLD
;TEST UUO TURN OFF OF USER MODE. PRIVI I/O ALLOWS
;IOT TO OCCUR IN CASE USER STILL ON. SEE EX PRINT
MOD163: UMON
JRST 2,@[XWD USERF+UMIOT,.+1]
UMOFF
UMOFF
TLNE USERF ;FLAGS STORED VIA JSP AT 41
HOLD
MOD164: UMON
JRST 2,@[XWD USERF+UMIOT,.+1] ;SET USER+PRIV I/O
MOVE [JUMPA .+3] ;SET RETURN FOR THE
MOVEM 41 ;UUO. EX ILL OP SHOULD
XWD 40000,0 ;NOT TURN OFF USER FLAG
JSP .+1 ;BECAUSE AR FM PC(J)(ET0)
TLNN USERF ;PULSE IF NOT PRESENT. SEE EX
HOLD
UMOFF
;PERFORM A UUO. THE PURPOSE OF THIS IS TO SET THE
;EX ILL OP FLOP. THE FLOP SHOULD BE CLEARED BY THE
;JSP AT 41. IF HOWEVER THIS DID NOT OCCUR, ANY
;STORE PC INSTRUCTION IN USER MODE WOULD CLEAR
;USER MODE. THIS TEST THEREFORE TEST THE CLEAR
;TO EX ILL OP VIA AR FM PC(J) (ET0) ON EX PRINT
MOD165: UMOFF
UMON
JRST 2,@[XWD USERF+UMIOT,.+1]
JSP .+1 ;DONT FORGET FAIL TO CLEAR
JSP .+1 ;MAY BE PHONEY SET EX ILL OP
TLNN USERF ;OR PHONEY CLEAR EX-USER
HOLD
UMOFF
MOD166: UMOFF
UMON
JRST 1,.+1 ;SET USER MODE VIA ET0
JSP .+1 ;IR JRST, IR12(1). IT FAILED
TLNN USERF ;REPLACE B135 ON EX PRINT
HOLD
UMOFF
;THIS TEST WILL TRY TO SET THE PRIV I/O BIT WHEN IN
;USER MODE. IF THE EX IOT USER FLOP SETS EX USER (0) INPUT
;TO THE FLAG FAILED SEE EX PRINT
MOD167: UMON
JRST 2,@[XWD USERF,.+1] ;SET USER
JRST 2,@[XWD USERF+UMIOT,.+1] ;TRY TO SET PRIV I/O
JSP .+1
TLNE UMIOT
HOLD
UMOFF
MOD170: UMON
JRST 2,@[XWD USERF,.+1] ;SET USER MODE
MOVE [JSP .+4] ;SET TRAP RETURN
MOVEM 41 ;1 PAST THE IOT INST
SETZM 40 ;FAIL TO TRAP. EX ALLOW IOT
XWD 700000,0 ;ALLOWED THE IOT IN USER
SKIPN 40 ;MODE. SEE EX PRINT
HOLD
UMOFF
MOD171: UMON
JRST 2,@[XWD USERF+UMIOT,.+1] ;SET PRIVI+USER
MOVE [JSP .+4] ;SET TRAP RETURN 1 PAST
MOVEM 41 ;THE TRAP INST
SETZB 40 ;THE EX IOT USER FLOP
XWD 700000,0 ;SHOULD ALLOW THE IOT
CAI
SKIPE 40 ;CHECK EX ALLOW IOT. EX PRINT
HOLD
UMOFF
MOD172: UMON
JRST 2,@[XWD USERF+UMIOT,.+1] ;USER AND PRIV I/O
MOVE [JSP .+3] ;THEN CAUSE A PI REQUEST
MOVEM 42 ;PI CYC(1) SHOULD SET EX PI SYNC
CONO PI,ACT+PIREQ+100 ;WHICH SHOULD CLEAR EX USER
JSP .+1 ;AT ET1 OF JSP AT 42. IT
TLNE USERF ;FAILED. SEE EX PRINT
HOLD
;THIS TEST WILL INSURE THAT EX ILL OP IS CLEARED
;BY IOT BLK. THIS LOGIC IS NECESSARY FOR RETURNING TO
;THE PROPER RELOCATION WHEN A UUO IS INTERRUPTED AND
;MUST BE RE EXECUTED.
MOD173: MOVE [JUMPA .+3]
MOVEM 41
XWD 040000,0 ;PERHAPS TURN OFF USER MODE
SETZ ;PREVIOUS UUO SET EX ILL OP
BLKI ;THIS IOT SHOULD CLEAR IT
CAI
JRST 2,@[XWD USERF,.+1] ;NOW ENTER USER MODE IF
JSP .+1 ;EX ILL OP SET JSP WILL CLEAR
JSP .+1 ;EX USER FLAG. SEE EX PRINT
TLNN USERF
HOLD
UMOFF
MOD174: UMON
JRST 2,@[XWD USERF,.+1]
MOVE [JSP .+4] ;SET RETURN
MOVEM 41 ;SEE IR2 PRINT
SETZM 40 ;IR JRST A IR10(1)
HALT . ;THIS HALT SHOULD TRAP
SKIPN 40 ;BUT DID NOT
HOLD
UMOFF
MOD175: UMON
JRST 2,@[XWD USERF,.+1]
MOVE [JSP .+4] ;SET RETURN
MOVEM 41 ;SEE IR2 PRINT
SETZM 40 ;THE ENABLE PI SHOULD
JEN .+1 ;TRAP TO 40
SKIPN 40 ;BUT DID NOT
HOLD
UMOFF
MOD176: UMON
JRST 2,@[XWD USERF+UMIOT,.+1]
MOVE [JSP .+4] ;SET PRIVI IO BIT
MOVEM 41 ;THIS SHOULD PREVENT JRST IO,
SETZM 40 ;FROM TRAPPING. SEE IR UUO
JRST 10,.+1 ;ON IR2 PRINT
SKIPE 40
HOLD
UMOFF
MOD177: UMON
JRST 1,.+1 ;SEE IF JUST A PLAIN
MOVE [JSP .+4] ;JRST WILL TRAP
MOVEM 41 ;SEE IR2 PRINT FOR
SETZM 40 ;DECODE IR-UUO
JRST .+1
SKIPE 40
HOLD
UMOFF
MOD178: UMON
JRST 1,.+1 ;SEE IF IR 9+10 WITH OUT
MOVE [JSP .+4] ;A JRST WILL TRAP
MOVEM 41 ;SEE IR UUO ON IR-2 PRINT
SETZM 40
JFCL 14,.+1
SKIPE 40
HOLD
UMOFF
;CHECK THAT AN IOT AT INTERRUPT LEVEL WILL NOT LOOK
;LIKE A UUO SEE IR-2 PRINT
MOD179: UMON
CONO 1
MOVE [BLKI]
MOVEM 42
MOVE [JSP M179+1]
MOVEM 41
SETZB 40
MOVE [JSP M179]
MOVEM 43
SETO
CONO PI,ACT+PIOSET+100
JRST 1,.+1
CAM -1
M179: SKIPE 40
HOLD
UMOFF
MODXX1: UMON ;TEST TRAP (60) TURN OFF OF
MOVE [JSP .+5] ;USER MODE
MOVEM 61
JRST 1,.+1
XWD 100000,0 ;OP CODE 100
HOLD ;IT FAILED TO TRAP
JSP .+1 ;IT SHOULD ALSO
TLNE USERF ;TURN OFF USER MODE
HOLD
MODXX2: UMON
MOVE [JSP .+4] ;TEST IR TO C(40)
MOVEM 41 ;FOR BITS 1,2,3
JRST 2,@[XWD USERF,.+1]
XWD 700000,0 ;AN IOT
MOVE 40
CAME [XWD 700000,0]
HOLD
MOD180: UMON
DATAO [0] ;GET RID OF PROTECT REG
CONO 1
CONO PI,ACT+PIOSET+100
MOVE [JSP M180]
MOVEM 42
MOVE [JSP .+4]
MOVEM 41
JRST 2,@[XWD USERF+UMIOT,.+1] ;ENABLE USER
JUMPA . ;THIS INST SHOULD SET PROT
M180: CONSO PROT ;HERE IF FLAG FAIL
HOLD
CONSZ NONEX ;NEVER NON EX WITH PROT
HOLD
CONO 1B22 ;FAIL TO CLEAR PROT
CONSZ PROT ;FLAG SEE CPA PRINT
HOLD
DEFINE EXCT (A) <
MOVE [JSP .+3] ;EXECUTE A UUO
MOVEM 41 ;AND STORE FLAGS
XWD A,0 ;IN AC0.
>
;CHECK UUO 0 TRAPING TO EXEC MODE AND UUO 1-37
;NOT TRAPING TO EXEC MODE...1P19 ON EX CONTROL PRINT.
MOD18A: UMON
JRST 2,@[XWD USERF+UMIOT,.+1]
EXCT 0
EXCT 0
TLNE USERF ;USER MODE ON?..CK 1P19 EX CONT PNT.
HOLD
UMON
JRST 2,@[XWD USERF+UMIOT,.+1]
EXCT 1000
TLNN USERF ;CK BIT 8 INPUT TO 1P19 EX CONTROL PRINT.
HOLD
UMON
JRST 2,@[XWD USERF+UMIOT,.+1]
EXCT 2000
TLNN USERF ;CK BIT 7 INPUT TO 1P19 EX CONTROL PNT.
HOLD
UMON
JRST 2,@[XWD USERF+UMIOT,.+1]
EXCT 4000
TLNN USERF ;CK BIT 6 INPUT TO 1P19 EX CONTROL PNT.
HOLD
UMON
JRST 2,@[XWD USERF+UMIOT,.+1]
EXCT 10000
TLNN USERF ;CK BIT 5 INPUT TO 1P19 EX CONTROL PNT.
HOLD
UMON
JRST 2,@[XWD USERF+UMIOT,.+1]
EXCT 20000
TLNN USERF ;CK BIT 4 INPUT TO 1P19 EX CONTROL PNT.
HOLD
UMON
JRST 2,@[XWD USERF,.+1]
MOVE 0,[JSP .+3]
MOVEM 0,41
XWD 700000,0 ;XCT AN IOT.
JSP .+1 ;GET FLAGS.
TLNE 0,USERF ;USER MODE STILL ON?
HOLD ;YES. CK EX NON REL UUO
;EX PRINT.
MOD181: MOVE 10040 ;SAVE THESE LOC
SKIPN SAV40
MOVEM SAV40
MOVE 10041
SKIPN SAV41
MOVEM SAV41
MOVE 10042
SKIPN SAV42
MOVEM SAV42
MOVE 10043
SKIPN SAV43
MOVEM SAV43
JRST .+5
SAV40: 0
SAV41: 0
SAV42: 0
SAV43: 0
;TEST THE SETTING OF PROTECT FLAG BY MOVING A
;TWO INST PROG TO AC 1+2 PROG IS CAM X AND UU0
;WITH TRAP SET TO REAL WORLD THE CAM SHOULD TEST
;THE PROT FLAG
X=2000
DEFINE LAC (A)<
UMON
DATAO [0]
MOVE 1,[CAM A]
MOVSI 2,40000
CONO PI,ACT+PIOSET+100
CONO 1
MOVE [JSP .+5]
MOVEM 42
MOVE [JSP .+3]
MOVEM 41 ;SET TRAP RETURN
JRST 1,1 ;TURN ON USER MODE
CONSO PROT ;THE PROT FLAG SHOULD BE SET
HOLD
CONSZ NONEX
HOLD
>
MOD182: REPEAT 10,<
LAC X
X=X+X>
MOD185: SETZM 40 ;TEST FOR TRAP TO REAL LOC 40
MOVE [JSP MOD186-1] ;NOT RELOCATED 40
MOVEM 41 ;SETUP TRAP FOR OK
DATAO [XWD -1,10000]
MOVE [JSP MOD186] ;SETUP TRAP FOR ERR
MOVEM 10041
JRST 1,.+1-10000 ;IF THE UUO TRAPS TO
XWD 40000,0 ;RELOCATED 40 PROG WILL HOLD
SKIPN 40 ;AT THIS POINT
MOD186: HOLD
JSP .+1 ;IF USER MODE STILL ON
TLNE USERF ;THEN WAIT HERE
HOLD
;TEST FOR INTERRUPT TO REAL PI (NOT RELOCATED)
MOD190: UMON
MOVE [JSP MOD191] ;SET ERROR PI RET
MOVEM 10042
MOVE [JSP MOD191+1] ;SET OK PI
MOVEM 42
DATAO [XWD -1,10000]
JRST 2,@[XWD USERF+UMIOT,.+1-10000]
CONO PI,ACT+PIREQ+100 ;SHOULD INTERRUPT
HOLD
MOD191: HOLD
UMOFF
;TEST FOR NOT RELOCATION OF AC'S
MOD192: SETZM 5
UMON
MOVE [JSP M192]
MOVEM 41
DATAO [XWD -1,10000]
JRST 1,.+1-10000
MOVEI 5,12345
XWD 040000,0 ;UUO TO TERM USER MODE
M192: CAIE 5,12345
HOLD
MOD195: SKIPE FPTRAP ;SEE IF SWITCH SAYS FP
JRST MOD196
MOVE [JSP .+3] ;TEST THE ABILITY TO
MOVEM 61 ;TRAP A FP INST
FADRI -1 ;THIS INST SHOULD TRAP
MOVE 2,.-1 ;FAIL TO TRAP PROPERLY
CAME 2,60
STOP
JRST MOD197 ;WHAT ABOUT SWITCHS
MOD196: MOVE [JSP .+4] ;TEST FOR FP NOT TRAP
SETZM 60
MOVEM 61 ;SET RETURN
FADRI -1
SKIPE 60 ;DOES MACH HAVE FP
STOP
;CHECK BYT7A SETING BYF6.
MOD19X: CONO 635550 ;CLR THE WORLD.
MOVE [JSP MOD19B]
MOVEM 42 ;SETUP FOR INT ON CH # 1.
CONO PI,12300 ;SETUP PI.
MOVE 1,POINTR ;PUT POINTER INTO AC1.
CONO 1000 ;CLR CLOCK FLAG.
CONSO 1000 ;WAIT FOR
JRST .-1 ;CLOCK FLAG.
CONO 3001 ;SET INT ENABLE AND PI 35 AND CLR CLK FLG.
ILDB 0,1 ;SHOULD STAY IN INDIRECT LOOP.
MOD19B: CONSO 1000 ;CLK FLG INT?
HOLD
TLNN 0,20000 ;BYF6 FLAG SET? NO..CK BYT7A ON BYTE PRINT.
HOLD
JSP .+1 ;CAUSE ARLT FM FLAGS(J)A.
TLNE 0,20000 ;CK BYTE PRINT.
HOLD
JRST MOD197
POINTR: XWD 440720,1
;CK TO SEE THAT UUO 0 TRAPS TO 141.
MOD200: UMON
JRST 2,@[XWD USERF+UMIOT,.+1]
MOVE [JSP .+5]
MOVEM 41
AOJ
MOVEM 141
0
HOLD ;UUO 0 TRAPED TO 40. CK 2L44 ON MA CONTROL PRINT.
TLNN USERF ;USER MODE GET CLR?..CK 1P19 ON EX CONT PNT.
HOLD
;CK TO SEE THAT UUO 37 TRAPS TO 41.
UMON
JRST 2,@[XWD USERF + UMIOT, .+1]
MOVE [JSP .+5]
MOVEM 141
AOJ
MOVEM 41
037000000000
HOLD ;UUO 37 TRAPPED TO 141, CK 2L44 ON MA CONTROL PRINT.
;CK TO SEE THAT AN INTERRUPT ON CH # 1 TRAPS TO 142.
MOVE [MOVEI 142]
MOVEM 142
CONO 634440 ;CLR THE WORLD.
SETZ 0,
CONO PI,10000 ;CLR PI.
CONO PI,ACT+PIREQ+100;CAUSE INT.
CAIE 0,142 ;CK 2K44 ON MA CONTROL PRINT.
HALT
SETOM MATPOF ;SET FLG SO KNOW IN THIS ROUTINE.
MOD197: JRST BEGEND ;REPEAT DIAGNOSTIC
;DIAGNOSTIC STORAGE
LIT
VAR
LAST: JRST 4,BEGIN