MAINDEC 11 DZRKJ D_D_RK11_Basic_Logic__I_Dec76 D RK11 Basic Logic I Dec76

MAINDEC-11-DZRKJ-D_D_RK11_Basic_Logic__I_Dec76 MAINDEC-11-DZRKJ-D_D_RK11_Basic_Logic__I_Dec76

User Manual: MAINDEC-11-DZRKJ-D_D_RK11_Basic_Logic__I_Dec76

Open the PDF directly: View PDF PDF.
Page Count: 36

DownloadMAINDEC-11-DZRKJ-D_D_RK11_Basic_Logic__I_Dec76 MAINDEC-11-DZRKJ-D D RK11 Basic Logic  I Dec76
Open PDF In BrowserView PDF
IDENTIFICATION
..............
PRODUCT CODEI
P~ODUCT

NAMEI

MAINDEC-l1·0ZR~J·O-D

RK11 BASIC LOGIC TEST I

DATE CREATED I

DECEMBER, 1976

MAINTAINER I

DIAGNOSTIC GROUP

AUTHOR.

JIM KAPADIA

REVISED BY I

PERVEZ ZAKI
TOM SAWYER
CHUC1< HESS

THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO
CHANGE WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED AS
A COMMITMENT BY DIGITAL EQUIPMENT
CORPORATION.
DIGITAL
EQUIPMENT
CORPORATION
ASSUMES
NO
RESpbNSIBILITY FOR ANY ERRORS THAT MAY APPEA~ IN
THIS MANUAL.

THE SOFTWARE DESCRIBED IN THIS DOCUMENT IS FURNISHED
TO THE PURCHASER UNDER A LICENSE FOR USE ON A SINGLE
COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION OF
DIGITAL'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH
SYSTEM, EXCEPT AS MAY OTHERWISE BE PROVIDED IN
WRITING BY DIGITAL.
DIGITAL
EQUIPMENT
CORPORATION
ASSUMES
NO
RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
SOFTWARE ON EQUIPMENT THAT IS NOT SUPPLIED BY
DIGITAL.
COPYRIGHT eCl 1975,1976 BY DIGITAL EQUIPMENT CORPORATION

QUICK LOOK-UP OPERATING INSTRUCTIONS
FOR A QUICK REFERENCE, LOOK UP THE FOLLOWING SECTIONS:
1.0
ABSTRACT
2.0
REQUIREMENTS
4.1
LOAOING AND OPERATOR ACfION
5.0
SWITCH OPTIONS
FOR A MORE COMPLETE EXPLANATION REFER TO THE TABLE OF
CONTENTS BELOW AND THE FOLLOWING DOCUMENT.
TABLE OF CONTENTS
ABSTRACT

2,2
2,3

REQUIREMENTS
EQUIPMENT
PRELIMINARY PROGRAMS
EXECUTION TIME

3,0

STARTING ADDRESS

4,0
4,1
4,2
4,3
4.4

PROGRAM CONTROL MODES & OPERATOR ACTION
PAPER TAPE
RKDP DUMP MODE
RKDP CHAIN 'MODE
ACT11

5.0

SWITCH OPTIONS

6,0

SCOPE LOOPS

1,0

PROGRAM STRUCTURE

2,0

2,1

ERROR REPORTING
9.0

ERROR INTERPRETATION

10,0

HANDLERS AND COMMON ROUTINES
TRAP HANDLER
SCOPE HANDLER
ERROR HANDLER
CONTROL RESET ROUTINE
CONTR6L READY ROUTINE
TIME DELAY ROUTINE
OTHER ROUTINES
TTY HANDLER ClIO), ERROR TYPEOUT ROUTINE
POWER DOWNIPOWER UP ROUTINE

10,1
10,2
10.3

10,4
10,5
10,6

10,7

11.0

12.0

UNEXPECTED TIMEOUT8 & RKll INTERRUPTS
QUICK VERYFYING MODE

1.0

ABSTRACT
THE RKll LOGIC TESTS CONSIST OF A SERIES
AIMED AT CHECKING THE BASIC LOGIC OF
CONTROLLER.

or

TESTS
THE RKII

THE ~OGIC TESTS CONSISTS OF TWO PARTS. THIS PROGRAM
IS PART-X AND IT CHECKS ONLY THE DRIVE-INDEPENDENT
LOGIC or THE RK11 CONTROLLER (SEE SEC.
9-0),
IT
SHOULD BE NOTED THAT LOGIC TEST-I AND LOGIC TEST-II
TOGETHER CONSTITUTE A COMPLETE PROGRAM AND HENCE
BOTH OF THEM SHOULD BE RUN.
USED CORRECTLY THIS PROGRAM CAN
ANALYTIC AND DIAGNOSTIC TOOL,

2.0

REQUIREMENTS

2.1

EQUIPMENT
A.
S,
C,

2.2

SE

AN

EFFECTIVE

PDPl1 WITH CONSOLE TELETYPE.
8K OF MEMORY
RKll OR RKV11 CONTROLLER

PRELIMIHARY PROGRAMS
NONE

2.3

EXECUTION TIME
ERROR FREE FIRST PASS ON PDP11/20 WITH CORE MEMORY
TAKES APPROXIMATELY ONE MINUTE. CONSIDERABLY LESS
FOR FASTER MACHINES OR MEMORIES,

3,0

STARTING ADDRESS
200 fOR ANY MODE or OPERATION.
ALL SWITCHES DOWN.

4.0

NORMAL STAPT UP wITH

PROGRAM CONTROL MODES' OPERATOR ACTION
PAPER TAPE LOADING
RKDP DUMP MODE
RKDP CHAtN MODE
ACTll

4.1

PAPER TAPE LOADING
LOAD PROGRAM INTO MEMORY
FOR .ABS TAPES.

USING

STANDARD

PUT THE DRIVES ON 'WRT PROT' AND
PRECAUTION AGAINST MALFUNCTIONING.
LOAD ADDRESS 200

PROCEDURE

'LOAD'

AS

A

SET SWITCHES IF DESIRED (SEE SEC 5.0) IF TESTING
SIMULATOR PUT SW 10 UP.

ON

PRESS START.

4.1.5

THE PROGRAM IDENTIfIES ITSELF (NAME,MAINDEC NO).
RK11 LOGIC TEST I
MAINDEC-I1-0ZRKJ-D
THEN THE PROGRAM PROCEEDS WITH TESTING.
OF A PASS THE 'OLLOWING TYPE-OUT OCCURS
END PASS i

AT THE

END

X

WHERE X. PASS NUMBER (1,2,3---), CONTROL IS PASSED
TO THE BEGINNING 0' THE PROGRAM AND RE-EXECUTION
BEGINS.
ERROR FREE PASSES OF THE
BELOW.

PROGRAM

APPEAR

AS

SHOWN

THE

RKDP

RK11 LOGIC TEST I
MAINDEC-I1-DZRKJ-O
END PASS • 1
END PASS • 2

.•••..

4.2

RKOP OUMP MODE
THE PROGRAM IS LOADED INTO THE MEMORY
MONITOR

BY

START AS NORMALLY USING SA 200
THE PROGRAM IDENTIFIES ITSELF (NAME,MAIHDEC NO.) AND
PROCEEDS WITH TESTING.
RKDP CHAIN ,MODE
THE PROGRAM IS CHAIN-LOADED FROM THE RKDP PACK. A'TER
THE PROGRAM IDENTIFIES ITSELF, IT PROtEEOS WITH TESTING.
4.4

ACT11 MODE
THE PROGRAM IS LOADED 8Y THE ACTtt MONITOR.
STARTING,
IDENTIFIES ITSELF, PROCEEDS WITH
EXECUTION OF THE TESTS AS BEFORE.

5.0

ON
THE

SWITCH OPTIONS
I' THE PROGRAM IS BEING RUN ON A SWITCHLESS PROCESSOR (I.E. AN 11/34)
THE PROGRAM WILL DETERMINE THAT THE HARDWARE SWIT:H REGISTER IS
NOT PRESENT AND WILL USE A ·SOFTWAPE· SWITCH REGISTER. THE

'SOFTWARE' SWITCH REGISTER IS LOCATED AT LOCATION 176 C8), THE
SETTINGS or THE 'SOFTWARE' SWITCHES APE CONTROLLED THROUGH A KEYBOARD
ROUTINE WHICH IS CALLED BY TYPING A 'CONTPOL G', THE PROGRAM WILL
RECOGNIZE THE 'CONTROL G' when.ver the proqram enters

the seope routine or beo1n. a new test, the

'SOFTWARE' SWITCH VALUF~ ~RE ENTERED AS AN OCTAL NUMBER IN RESPONSE
TO THE PROMPT FROM TH~ SWITCH ENTRY ROUTINE:
'SWR - NNNNNN

NEW.'

EACH TIME SWITCH SETTING ARE ENTERED, THE ENTIRE SWITCH REGISTER
IMAGE MUST BE ENTERED. LEADING ZEROS ARE NOT REQUIRED., 'RUSOUT' AND
'CO~TROL U' FUNCTIONS ~AY BE USED TO CORRECT TYPING ERROPS
DURING SWITCH ENTRY.
ON PROCESSORS WITH HARDWARE SWITCH REGISTERS, THE 'SOFTWARE' SWITCH
REGISTER MAY 8E USED, IF THE PROGRAM rINDS ALL 16 SWITCHES IN THE
'UP' POSITION, ALL SWITCH REGISTER REFERENCES WILL 8E TO THE
'SOFTWARE' REGISTER AND THE PROCEDURES DESCRIBED ABOVE MUST
BE FOLLOWED.
SW<15>-1
SW<14>=1
SW-1
SW<12>=1
SW-1
SW<10>=t
SW<09>-t
SW<08>al
S.1

HALT ON ERROR
LOOP ON TEST
INHIBIT ERROR PRINTOUTS
CYCLE ON ERROR TO THE
PREVIOUS
'SCOPE' STATEMENT
INHIBIT ITERATIONS
TESTING ON SIMULATOR
LOOP ON SPECIFIC ERROR
LOOP ON TEST AS PER SWC07:00>

SW<15>
THE PROGRAM HALTS ON ENCOUNTERING AN ERROR, AFTER
TYPING
OUT
THE
ERROR
MESSAGE AND PERTINENT
INFORMATION. PRESSING "CONTINUE" RESTORES NOR~AL
OPERATION OF THE PROGRAM.

5,2

SW<14>
THE PROGRAM LOOPS ON THE SU8TEST THAT IS BEING
EXECUTED WHEN THE SWITCH IS PUT ON, THIS SWITCH IS
USED NORMALLY ALONG WITH sw 15. SEE SEC 8.0.

5.3

SW <13>
THIS SWITCH INHIBITS ALL ERROR MESSAGES,
NORMALLY
USED WHEN LOOPING ON TEST (5W 14) OR LOOPING ON
ERROR (SW 9).

5,4

SW <12>
THIS SWITCH ALLOWS THE PORGRAM TO CYCLE FROM THE
POINT or ERROR TO THE PREVIOUS SCOPE STATEMENT.
NOTE THAT IN DOING SO ANY INITIALIZATION BEING DONE
AT THE BEGI~JNG OF THE SUBTEST WILL BE DONE AGAIN
AND AGAIN. SEE SEC 8.0 FOR DIFFERENT SCOPE LOOPS
AVAILABLE.

5,5

sw

<11>

EACH SUBTEST WILL BE EXECUTED ONLY

ONCE.

NORMALLY

AFTER THE FIRST PASS, EACH SUBTEST IS ITERATED A
NUMBER OF TIMES (USUALLY 50, 5 IN SOME CASES).
SETTING THIS SWITCH INHIBITS ITERATIONS, SO THAT
QUICK PASSES CAN BE MADE,
5,6

SW <10>
THIS SWITCH WHEN SET INDICATES THAT TESTING IS BEING
DONE ON A SIMULATOR, THE SWITCH SHOULD 8E PUT UP
BEFORE STA~T· ING THE PROGRAM, NOTE THAT RKI1C IS
NOT COMPATIBLE WITH THE SIMULATOR.

5,7

SW <09>
THIS SWITCH PROVIDES THE TIGHTEST POSSIBLE SCOPE
LOOP,
NOTE THAT UNLIKE SW12 THE INITIALIZATION or
PARAMETERS AT THE BEGINNING OF THE SUBTEST MAY NOT
BE DONE IN THIS CASF, THIS SWITCH IS HELPFUL wHEN A
PARTICULAR PART OF A SUB TEST IS BEING REPEATED USING
DIFFERENT PARAMETERS AND YOU WANT TO SCOPE ON THE
PARAMETER IN ERROR, (EXAMPLE. RKDA IS BEING WRITTEN
AND READ BACK WITH COUNT PATTERNS FROM 1 TO 177177.
PATTERN 561 IS GIVING ERROR, YOU MIGHT NOT WANT TO
GO THROUGH THE 560 PATTERNS BEFORE HITTING ERROR ON
THE 561TH PATTERN, IN THIS CASE SW 9 WILL GIVE YOU
A SCOPE LOOP ON THE 561TH PATTERN ONLY.)

5,8

SW

<08~

THIS SWITCH IS USED TO SELECT A PARTICULAR TEST CAS
PER SW<00-07» fOR EXECUTION AND SUBSEQUENT LOOPING.
THUS IF TEST 15 IS TO BE SELECTED THE SWITCH SETTING
WOULD BE 000415,
IT SHOULD BE NOTED THAT BEFORE
SELECTING TEST 15, ALL THE PREVIOUS TESTS (1-14)
WILL BE EXECUTED.

6,0

SCOPE LOOPS
THERE ARE THREE KINDS OF SCOPE LOOPS AVAILABLE
1.

SW14: LOOPING IS DONE FOR THE ENTIRE sue-TEST

2,

SW12z

LOOPING IS DONE FROM THE POINT OF ERROR
BACK TO THE PREVIOUS ~5COPE' STATEMENT.

3.

SW09a

PROVIDE THE TIGHTEST POSSIBLE SCOPE
SEE SEC, 5.7

EX~MPLEI

TST11

SCOPE
INITIALIZATION

LOOP

ERROR
I

ERROR 2
I

ERROR 3
I

ERROR
I
I

TST2.

"

SCOPE

THE SEQUENCE or LOOPING FOR DIFFERENT CASES IS
EXPLAINED BELOW.
NOTE THAT 'TST1' AND 'TST2' ARE
TAGS WHICH DEFINE THE BOUNDARY OF A TEST, (IN THIS
CASE TEST 1), TEST 1 STARTS AT 'TST1' AND ENOS JUST
BEFORE 'TST2'.
IN THE ILLUSTRATION BELOW --> INDICATES THE POINT
FROM WHERE RETURN IS MADE AND LOOPING IS DONE.
1.

ERROR 2 OCCURS, SW 14 SET.

TSTI •• ERROR 2 •• TST2-->TST1 •• ERROR 2.,TST2-->TST1 •••
2,

ERROR '2 OCCURS, SW 12 SET.

TSTt ••• ERROR 2-->TST1 ••• ERROR2--)TSTt •••
3.

ERROR 2,3, SW 14 SET.

TST1,.ERROR 2.,ERROR 3"TST2-->TST1 •• ERROR
3 •• T8T2-->TST1 •••
4.

2 •• ERROR

ERROR 2,3, SW 12 8ET.

TSTt."ERROR 2-->TST1, •• ERROR 2-->T8Tl ••••
NOTE THAT LOOPING IS DONE FROM THE VERY FIRST ERROR
ENCOUNTERED.
THE MORE BASIC AND ERROR THE EARLIER
IT OCCURS AND IS DETECTED AND SHOULD 8E FIXED.
IN THE ABOVE EXAMPLE NO PART OF THE SUB-TEST IS
BEING REPEATED USING DIFFERENT PARAMETERS, HENCE IT
SO HAP- PENS THAT SW 9 AND 12 GIVE THE SAME KIND OF
LOOPS,
THE EXAMPLE BELOW WILL DEMONSTRATE THE
DIFFERENCE BETWEEN sw 9 AND 12.
TST1,

SCOPE
I

INITIALIZATION
I

ERROR
I

MOV

:'SLPERR'
CONTAINS
:THE ADDRESS TO LOOP
:BACK ON EPROR- SW 9

tSl
I

EPROR 2

TST2z

N REPETITIONS

I
I

SCOPE

1.
SW 12
REPETITIONS

SET,

ERROR

2

OCCURS

DUPING

TST1 •• 1,2.,.K.ERROR 2-->TST1 •• 1,2 ••• K.ERROR 2-->TST1,.
2.

SW 9 SET, ERROR 2 OCCURS DURING K.TH REPETITION

IS •• K•• ERROR 2-->I ••• K•• ERROP 2-->1$ •••
1.0

PROGRAM DESCRIPTION
IN THIS PART OF THE PROGRAM THAT PART OF THE RKll
CONTROLLER IS CHECKED wHICH DOES NOT DEPEND ON
SIGNALS FROM THE DRIVE, THUS A DRIVE IS NOT NEEDED
FOR THIS TEST, BUT IT SHOULD BE NOTED THAT THE
PART-II OF THE 'BASIC LOGIC TESTS' MUST BE RUN, IN
ORDER TO GET A COMPLETE COVERAGE.
THE TESTS ARE GRADUALLY 8UILT UP, CHECKING THE MOST
BASIC AND SIMPLE LOGIC FIRST AND THEN PROGRESSIVELY
MORE COMPLEX LOGIC.
THE FIRST TEST CHECKS THAT ALL RKll REGISTERS CAN BE
REFERENCED
WITHOUT
TlMING
OUT,
THEN
THE
INITIALIZATION LOGIC or RKll IS CHECKED, THEN IT IS
CHECKED THAT ALL REGISTERS CAN BE WRITTEN AND READ
CORRECTLY, BY FLOATING A 'I' AND THEN USING A COUNT
PATTERN. THEN IT IS CHECKED THAT THE RKl1 REGISTERS
CAN BE CLEARED USING CONTROL RESET AND RESET CBUS
INIT).
FINALLY, THE WORD AND BYTE ADDRESSING LOGIC
or RK11 IS CHECKED TO SEE THAT EACH REGISTER IS
UNIQUELY ADDRESSED.

8.0

ERROR REPORTING
THE ERROR TABLE STARTING
INFORMATION PERTAINING TO
OCCUR. EACH ITEM IN
ENTRIES.

THE

AT
$ERRTB
EVERY ERROR
TABLE

CONSISTS

CONTAINS
THAT CAN
OF

FOUR

A.

EM - THIS 15 A POINTER TO THE ERROR MESSAGE
BE TYPED OUT WHEN THE ERROR OCCURS.

TO

B.

DH - THIS IS A POINTER TO THE DATA HEADER TO
TYPED OUT.

BE

C.

DT • THIS 15 A POINTER' TO THE DATA wHICH IS
BE TYPED TYPED OUT UNDER THE HEADERS.

TO

D. 0 - THIS IS A TERMINATOR SIGNIFYING THE
THE ITEM.
THE ERROR CALL IS AN EMT INSTRUCTION WITH ITS

END

OF

LOWER

BYTE ENCODED TO INDICATE THE ERROR NUMBER.
"ERROR 1" WOULD BE (EMT.1) IE 104001.

THUS

EVERY ERROR CORRESPONDS TO AN ITEM IN THE ERROR
TABLE. THUS "ERROR 14" WOULD CORRESPOND TO ITEM 14.
AS FAR AS POSSIBLE, THE EPROR MESSAGES HAVE BEEN
KEPT SHORT, BUT CLARITY IS NOT SACRIFICED FOR
BREVITY. INSPITE OF THIS, IF THE USER FINDS A NEED,
HE CAN LOOK UP THE ENTIRE ERROR MESSAGE IN THE ERROR
ITEMS TABLE FOUND IN THE BEGINNING or THE LISTINGS.
THUS FOR "ERROR 14", "ITEM 14" IN THE ITEM TABLE CAN
BE LOOKED UP.
WHEN THE ERROR INSTRUCTION
IS
EXECUTED A TRAP OCCURS TO THE ERROR HANDLER LOCATED
AT SERROR WHICH PROCESSES THE ERROR CALL.
SEE SEC
12.3
9.0

ERROR INTERPRETATION
WHENEVER AN ERROR MESSAGE IS PRINTED OUT, ALL
REGISTERS AND OTHER DATA PERTAINING TO THE ERROR ARE
ALSO GIVEN. RKDS, RKER ••• RKBA INDICATE THE CONTENTS
or THE CORRESPONDING REGISTERS AT THE TIME OF ERROR.
EVERY ERROR MESSAGE CONTAINS A PC.
THIS
PC
INDICATES THE POSITION IN PROGRAM WHERE THE ERROR
CALL IS LOCATED.
THE ERROR MESSAGE, BECAUSE OF
PRACTICAL
CONSIDERATIONS
IS
MADE
SHORT
AND
MEANINGFUL, THE USER IS ADVISED TO LOOK UP THE PC
IN THE PROGRAM LISTING, WHERE HE WILL FINO MORE
INFORMATION ABOUT THE ERROR, IN MANY INSTANCES, A
SINGLE FAULT WILL GIVE RISE TO MORE THAN ONE ERROR
REPORT.
A LITTLE
DELIBERATION
AND
CAREFUL
EXAMINATION OF THE DATA GIVEN WILL BE CERTAINLY VERY
HELPFUL IN PINPOINTING
THE
FAULT.
A BRIEF
EXPLANATION OF WHAT ts BEING CHECKED IN THE SU8TEST
IS GIVEN AT THE BEGINNING OF EVERY SUBTEST. ALL THE
NUMBERS GIVEN WITH ERROR MESSAGES ARE IN OCTAL.

10.0

HANDLERS AND COMMON ROUTINES
THE COMMONLY USED ROUTINES USED IN THE
CALLED IN TWO WAYS,

10.1

A.

AS A SUBROUTINE THROUGH 'JSR' CALL

8,

THROUGH A 'TRAP' HANDLER

PROGRAM

ARE

TRAP HANDLER
MANY COMMONLY USED ROUTINES IN THE PROGRAM ARE
CALLED USING THE TRAP INSTRUCTION AND THE 'TRAP'
HANDLER. THE LOWER BYTE OF THE TRAP INSTRUCTION IS
ENCODED DIFFERENTLY FOR DIFFERENCT ROUTINES. THE
TRAP HANDLER IS LOCATED AT 'STRAP', WHEN A CALL FOR
A ROUTINE IS EXECUTED, A TRAP OCCURS TO THE HANDLER
AT "TRAP', THE HANDLER PICKS UP THE LOWER BYTE OF
THE "CALL INSTRUCTION" AND USES IT TO FORM THE

STARTING
SERVICE.
10.2

ADDRESS

OF

THE

ROUTINE

TO

GO

TO

FOP

SCOPE HANDLER
THE 'lOT' TRAP IS USED BY THE 'SCOPE' STATEMENT,
WHEN 'SCOPE' IS EXECUTED, AN rOT TRAP OCCURS TO
MEMORY LOCATION "SCOPE', THE SCOPE HANDLER STARTS
AT 'SCOPE,
DEPENDING ON THE SWITCH SETTINGS THE
HANDLER DECIDES TO LOOP ON TEXT, INHIBIT ITERATIONS
ETC. THERE ARE CERTAIN POINTERS AND FLAGS WHICH ARE
ADJUSTED~
THUS~ IT IS NOT ADVISABLE
TO STAPf THF
PROGRAM AT ANY GIVEN LOCATION SINCE THE VARIOUS
POINTERS AND FLAGS MAY NOT BE CORRECTLY ADJUSTED.

10,3

ERROR HANDLER
AN EMT TRAP INSTRUCTION IS USED BY THE ERROR CALL.
THE LOWER BYTE IS ENCODED TO GIVE DIFFERENT ERROR
CALLS.
CEXI ERROR 1 • 10400~+lr ERROR 16
=
t04a00+16). WHEN THE ERROR STATEMENT IS EXECUTED, A
TRAP OCCURS TO MEMORY LOCATION 'SERROR', THE ERROR
HANDLER IS LOCATED AT 'SERROR'. THE HANDLER FOPMS
THE POINTER TO ERROR TABLE, WHICH IS USED IF AN
ERROR MESSAGE IS TO BE TYPED OUT. DEPENDI~G ON THE
SWITCH SETTINGS, A DECISION ABOUT HALTING ON ERROR,
INHIBITING TYPEOUT, LOOPING ON ERROR ETC. IS MADE.
IF AN ERROR MESSAGE IS TO BE TYPED DUT AN EXIT IS
MADE TO THE ERROR MESSAGE TYPEOUT ROUTINE LOCATED AT
'SERRTYP'.

10.4

CONTROL PESET ROUTINE
THE CALL FOR THIS ROUTINE IS "CNT.RESET" AND IS AN
ENCODED 'TRAP' INSTRUCTION,
WHEN "CNT,RESET" IS
EXECUTED THE CONTROL RESET ROUTINE STARTING AT
"CN,RST" IS ENTERED. A CONTPOL RESET IS ISSUED AND
THE PROGRAM WAITS TILL THE CONTROL READY SETS, ON
WHICH THE ROUTINE IS EXITED. IF CONTROL READY DOES
NOT SET WITHIN A CERTAIN TIME AN ERROR IS REPORTED.
THE
PC
TYPED OUT IS THE LOCATION WHERE THE
"CNT,RESET" CALL IS LOCATED, THE WAITING TIME IS
2,8 MS FOR 11/20 AND 560 US FOR 11/45 WITH BIPOLAR
MEMORY.

10,5

CONTROL READY ROUTINE
THIS ROUTINE IS CALLED BY "CNT,RDY" CAN ENCODED
'TRAP' INSTRUCTION) AND IS LOCATED AT "CN,RDY". THE
ROUTINE WAITS FOR THE CONTROL READY TO SET AND WHEN
IT DOES, EXITS OUT. IF CONTROL READY DOES NOT SET
WITHIN A SPECIFIED TIME AN ERROR MESSAGE IS GIVEN
CNTRL ROY DIDN'T SET
PC = XXXXXX
RKCS

= YYYYYY

THE PC IS THE LOCATIO~ AT WHICH THE "CNT.RDY"
15 LOCATED.
THE WAITING TIME IS 949 ~S FOR
AND 189 MS FOR 11/45 WITH BIPOLAR MEMORY,
10,6

CALL
11/20

TIME DELAY ROUTINE
THIS ROUTINE PROVIDES A VARIABLE TIME DELAY,
THE
CALL IS DELAY ,N WHERE N-l TO 177717 (OCTAL) TIME
DELAY PROVIDED_ 7.5 TIMES( X ) N MICRO SECS FOR
11/20, 1.5N US FOR 11/45 (N CONVERTED TO DECIMAL
BEFORE COMPUTING DELAY) IF THE USER WANTS TO CHANGE
THE DELAY AT ANY POINT IT CAN BE DONE BY'SIMPLY
CHANGING VARIABLE 'N',

10,7

OTHER ROUTINES
THERE ARE OTHER COMMONLY
BELOW.

USED

ROUTINES

AS

LISTED

STYPEI
TYPE ROUTINE FOR TYPING OUT ASCII
LOCATED AT "STYPE"
CALLED BY "TYPE"

STRI~GS.

,TYPOCI
ROUTINE FOR TYPING OUT OCTAL NUMBERS,
LOCATED AT "STYPOC"
CALLED 8Y "TYPOC"
STYPDS.
ROUTINE FOR TYPING OUT DECIMAL NUMBERS.
LOCATED AT "STYPOS"
CALLED BY "TYPOS"
8ERRTYPa
ROUTINE FOR TYPING OUT ERROR
LOCATED AT SERRTYP
CALLED BY "JSR SERRTYP"

~ESSAGES.

$PWRDN,SPWRUPI
ROUTINE FOR HANDLING POWER FAILUREIPOWER UP,
LOCATED AT SPWRDN,$PWRUP
$PWRrL,CALLED WHEN THERE IS A POWER FAILURE.
tPWRUP,CALLED WHEN THERE IS A POWER UP.
11,0

UNEXPECTED TIMEOUTS AND RKll INTERRUPTS
WHEN AN UNEXPECTED TIMEOUT OCCURS, THE PC AT WHICH
TIME OUT OCCURED IS TYPED OUT AND THE PROGRAM HALTS.
IF IT IS INTACT, IT CAN BE ~ESTARTED BY P~ESSING
CONTINUE.
IF AN UNEXPECTED RKll INTERRUPT10CBURS THE PROGRAM
TYPES OUT THE PC AT WHICH THE INTERRUPT CAME IN ~NO
THEN HALTS, PRESSING CONTINUE WOULD RESTART THE

PROGRAM FROM BEGINING. SW 9- LOOPING
PROVIDED AS A TROUBLE SHOOTING AID.

12.0

CAPABILIT~

IS

QUICK VERIFYING MODE
THE FIRST PASS OF THE PROGRAM IS A QUICK VERIFYING
MODE.
ALL THE TESTS ARE DONE ONLY ONCE, ON
SUBSEQUENT PASSES THE TESTS ARE ITERATED (NORMALLY
50 TIMES, 5 IN SOME CASES). THUS THE FIRST PASS
TAKES A SHORTER TIME TO COMPLETE, WHEREAS SUBSEQUENT
PASSES TAKE MORE TIME.

MAINDEC-11-0ZRKJ-D
MACYl1 27(1006) 04-0CT-76 13108
DZRKJD.Pll
30-AUG-76 14148
TABLE OF CONTENTS
22
49
159
168
170
18t
271
478
515

520
612
651

677
700
122
180
804

826
865

906
929

963
988
1023
1047
1082
1107
1161
1234
1310

1406
1452
1468
1480
1502

1519
1563
1631
1667
1115

1855
1926
1994
2072
2~95

2122

2110
2301

2124

OPERATIONAL SWITCH SETTINGS
BASIC DEfINITIONS
TRAP CATCHEP
STARTING ADDRESS(ES)
ACTtl HOOKS
COMMON TAGS
ERROR POINTER TABLE
INITIALIZE THE COMMON TAGS
TYPE PROGRAM NAME
GET VALUE FOR SOFTWARE SWITCH REGISTER
Tl
TEST THAT ALL RKll REGISTERS CAN BE REFERENCED
T2
CHECK RKll INITIALIZATION
T3
TEST RKCS FUNCTION BITS • 1,2,3
T4
TEST RKCS EXTENDED MEMORY BITS - 4,5
T5
CHECK RKCS IDE BIT • b
T6
CHECK RKCS SSE,EXB,rMT,IBA BITS - 8,9,10,11
T7
CHECK READ ONLY BITS Of RKCS
T10
CHECK THAT -GO- BIT (0) CIN BE SET
Til'
CHECK RKCS WITH A COUNT PATTERN
T12
CHECK THAT RKWC BIT 0-15 CAN BE SET
T13
CHECK RKWC WITH A COUNT PATTERN
T14
CHECK THAT RKBA CAN BE S~T
T15
CHECK RKBA WITH A COUNT PATTERN
T16
CHECK THAT RKDA CAN BE SET
T17
CHECK RKDA WITH A COUNT PATTERN
T20
CHECK THAT RK~C~RKBA,RKDA CAN BE CLEARED BY RESET
T21
CH!CKTHAT RKCS, RKWC. RKBA, RKDA CAN BE CLEARED BY CONTROL RESET
122
CHECK THAT EACH RKll REGISTER IS UNIQUELY ADRESSED
T23
CHECK THAT HI , LO BYTES OF RKCS CAN BE ADORESSED
T24
CHECK THAT HI , LO BYTES OF RKWC,BA,DA CAN BE ADDRESSED
END OF PASS ROUTINE
GT3RG: ROUTINE FOR GETTING RKCS, RKF.R, RKDS
GT4RG: ROUTINE rOR GETTING RKCS, RKER, RKOS, RKDA
DELAYe TIME DELAY ROUTINE
CON.RESET:
CONTROL REST ROUTINE
CHT.RDY:
WAIT FOR CONTROL READY ROUTINE
SCOPE HANDLER ROUTINE
ERROR HANDLER ROUTINE
ERROR MESSAGE TYPEOUT ROUTINE
TTY INPUT ROUTINE
TYPE ROUTINE
CONVERT BINARY TO DECIMAL AND TYPE ROUTINE
BINARY TO OCTAL (ASCII) AND TYPE
TRAP DECODER
TRAP TABLE
POWER DOWN AND UP ROUTINES
ERROP MESSAGES
ERROR DATA POINTERS
ERROR HEADERS

MAI ~DEC-l1-DZRKJ-D
MACYll 27C 1006)
DZRKJD.Pll
10-AUG-76 14148

04-0CT-76

13108

PAGE 1
S£;Q 0014

1

2
1
4
5
6

7
8
9

11
12
!l

.TITLE MAINDEC-ll-DZRKJ-D
,.COPYRIGHT (el 1974,1976
,.DIGITAL EQUIPMENT CORP.
,.MAYNAM, MASS. 017S4

14
15
16

,.

tI'l

,.

,.PROGRAM BY JIM KAPADIA

,.THIS PROGRAM WAS ASSEMBLED USING THE PDP-l1 MUNDEC SySMAC
,.PACKAGE (MAINDEC-ll-DZQAC-C2l, SEPT 14, 1976.

t7
18

,.
,.
,.

19
20
21

,.JANUARY 1975
.SBTTL OPERATIONAL SWI'l'CH SETTHIGS

22
21
24
25
26
27
28
29
10

II
32
)3
)4

,.

SIUTCH

;.
:.

15
14

:.

13

,.

12

,.

11

,.
,.
,.

11:1
9
8

USE
HALT ON ERROR
LOOP ON TEST
INHIBIT ERROR TYPEOUTS
CYCLE ON ERROR TO PREfIOUS "SCOPE" STATEMENT
INHIBIT ITERATIONS
TESTING ON SIMULATOR
LOOP ON ERROR
LOOP ON TEST IN SIIR<7'0>

,.
,

lS
36

..............................................................

,.PROGRAM REVISED 8Y TOM SAWYER, MARCH 1976
:.REVISED BY CHUCK HESS, AUGUST 1976

37
38
19
40
41

,YOU ARE ADVISED TO READ THE DOCUMENT BEFORE USING THIS PROGRAM.

42

n

JON GETTING AN ERROR REFER TO THE LISTINGS AT THE PC POINTED
lOUT IN THE ERROR MESSAGE. ADJACENT ERROR MESSAGES IF FOLLOWED
:CAREFULLY COULD LEAO TO AN EAS't PINPOINTING OF' THE rAULT

44
45
46

.................................................................

47

:

49
49
50
SI
52
53
54
5S
56

• SBTTL

001100

0001:111

BASIC DEF UlrIONS

:.INITIAL ADDRESS OF THE STACK POINTER . . . 1100 . . .
STACKa
1100
.EQUIV EMT,ERROR
"BASIC DEFINITION OF ERROR CALL
.EQUIV
lOT, SCOPE
"eASIC DEFINITION OF SCOPE CALL
:.MISCELLANEOUS DEFINITIONS
HT=
11
,: CODE FOR HORIZONTAL TAB

MAINDEC-l1-DZRKJ-D
"'ACYl1 27 (1006)
04-0CT~76
13: 08
DZRKJD.Pll
la-AUG-76 14148
BASIC DEFINITIONS
57
58
59
60
61
62
61
64
65
66
67
69
69
70
71
72

73
74
75
76
77
79
79
80

III
92
93

84
85
86
87
.98
R9
90
91
92
93
94
9S
96
97
98
99
100
10t

102
103
104
105
106
107

108
109
110

111

1:101:1012
000015
000200
177776

12
15
200
177776
PS,PSW
177774
177772
177570
177570

P"GE
SEQ 0015
IICODE FOR LI NE FEED
,'CODE FOR CARRIAGE RETURN
, :CODE FOR CARRIAGE RETURN.LINE FEED
I,PROCESSOR STATUS WOIIO

177774
177772
177570
177570

LFCR:
CRLFo:
PS=
• EQUIV
8TKL"'TPIRQa
DSWRa
DDISPo:

000000
O00001
000002
000033
PI"0004
000005
01'10306
O00007
000006
000007

: .GENERAL PURPOSE REGISTER DEFINITIONS
,0
R0a
, ,GENERAL REGISTER
Rla
I : GENERAL REGISTER
U
1'20:
, , GENERAL REGISTER
, ,GENERAL REGISTER
1'3R4"GENERAL REGISTER
'4
R5o:
, ,GENERAL REGISTER
'5
, I GENERAL REGISTER
R6'6
R7a
,:GENERAL REGISTER
t7
,6
SPJ J STACK POINTER
PCa
"PROGRAM COUNTER

000000
001:1040
000100
00"140
1:100200
000240
090300
000]40

:.PRIORITY LEVEL DEFINITIONS
PR0a
0
II PRIORITY
PRlo:
40
" PRIORITY
, , PRIORITY
PR2.
100
140
PR3"PRIORITY
200
, : PRIORITY
PR4PRS240
"PRIORITY
, , PRIORITY
PR6300
PR7.
, ,PRIORITY
340

100000
04001'10
020000
010030
004000
002000
01:1t000
000400
000200
000100
000040
000020
000010
11100004
000002
"00001

, I STACK LIMIT REGISTER
"PROGRAM INTERRUPT REQUEST REGISTER
" IlARDWARE SWITCH REGISTER
"HARDWARE DISPLAY REGISTER

'2
'3

"

LEVEL
LEVEL
LEVEL
LEVEL
LEVEL
LEVEL
LEVEL
LEVEL

:."SWITCH REGISTER" SWITCH DEFINITIONS
SW1S100001:1
SW14,.
40000
20001:1
SW13=
SW12a
10000
SWlla
4000
SWt'0=
2000
SW09a
1000
SIIi0S.
400
SW07.
200
SW0&.
100
SW05.
40
SW0420
SW01a
10
SW024
SW0ta
2
SW001
.EQUlY SW09,SW9
.EQUIV S1I08,SW8
.EOUIV SW07,SW7
.EQUIV Sil06,SW6
.EQUIV SW0S,SW5
• I!:OU IV SW04,SW4

0
1
2
3
4
5
6
7

MAINDEC-II-0ZIlKJ-O
IUCYlI
DZIIKJD,Pll
30-AUG-n 14,49

27 (1006'

04-0CT-76
13,08
BASIC DEfINITIONS
,EOlllV
,EOUIV
.FOUIV

1I 3
114

1I 5

PAGt 3
SEQ 0016

SN02,S1rI2
SN01,swl
5W00,SW0

116

117
118
lt9

,.OuA BIT DEFINITIONS (BIT01'1 TO BITI5)
100000
40001'1
20000
11'1000
4001'1
2000
1000
400
200

100000

BJTJ5-

04000~

BITU.
BITt JBIT12BIT11BIT10BIT09.
BITIil8BIT07BIT06BITIil5BIT04BIT03SIT0?BIT01BITil0,EOUIV
• EOUIY
.EOUIV
.EOUIV
.EQUIV
,EOUlV
.EOUIV
,F.QUIV
.EOUIV
.EOUIV

020000
010000
004000
002000
001000
000400
000200
000100
000040
000020
000011il
000004
000002
0001il01

120

121
122
123
124

125
126

127
128

129
130
131
n2
113
134
135
136

137
138

139
140

141
142

143
144
145
146
148
149

150
10;1

152
153

154
155

156
157

4
2
1
BIT09,BIT9
BIT0S,BIT8
BIT07,BlT7
BIT06,BIT6
BIT05,SIT5
SIT04,BJT4
BIT03,BIU
BITI!2,BIT2
BlT01,BlTl
BlT00,eIT0

,.SASIC ·CPU· TRAP VECTOII AOOIIESSES
ERRVEC- 4
"TIME OUT AND OTHER ERRORS
RESVEC" to
"RESERVED AND ILLEGAL INSTRUCTIONS
TBITVEC-14
; ,"T" BIT
TRTVEC= 14
,: TRACE TRAP
BPTVEC- 14
I,BREAKPOINT TRAP (BPT)
IOTVEC- 20
" INPUT/OUTPUT TRAP (lOT) HSCOPE**
PWRVEC= 24
, ,POWER FAIL
EIATVEC- 30
"EMULATOR TRAP (EMTl HERROR**
TRAPVEC-34
,,"TRAP" TIIAP
, ,TTY KEYBOARD VECTOR
TKVEC" 60
, I TTY PRINTER VECTOR
TPVEC=
64
PIRQVEC-240
"PROGRAM INTERRUPT REQUEST VECTOR
.SBTTL TRAP CATCHER

001'1004
1'100010
000014
1'101'1014
01'10014
001'1021'1
000024
1'101'1030
000034
000060
000064
000240

147

100
40
20
10

158

159
001'1000

160
161

... 0
,.ALL UNUSED LOCATIONS rROM 4 - 776 CONTAIN A • .+2,HALT"
;.SF.QUENCE TO CATCH ILLEGAL TRAPS AND INTERRUPTS
I.LOCATION '" CONTAINS \l TO CATCH IMPROPERLY LOADED VECTORS

162
163
164
165
166

000114
000176

000174
000000
1'1 00M' 1'1

000200

01'10137

.-174

167
168

001542

OISPREGI • WORD
I' sorrWARE DISPLAY REGISTER
SWREGI
.WORD 0
I,SOFTWARE SWITCH REGISTER
.SBTTL STARTING ADORESS(ES)
JMP
"START " JUMP TO STARTING ADDRESS or PROGRAM

MAINDEC-1I-0ZRKJ-O
"'ACYll 27(101'16)
04-0CT-76 13",8
DZRKJO. Pl1
3I'J-AUG-76 14148
ACT11 HOOKS
• SBTTL

169

PAGE
SEQ ",017

ACTll HOOKS

170
I , •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

171
172

173
174
175
176
177

171l
179

0001'146
000052

000204
001'1046
1'11'15370
01'10052
000000
01'10204

IHOOKS RE-QUIRED BY ACT11
• SVPC-.
._46
'I!:NDAD
.-52
.WORD
• -asvpc

; SAVE PC
1,1) SET LOC. 46 TO ADDRESS or IENDAD IN • SEOP
1,2)SET LOC.52 TO ZERO
; I RESTORE PC

131es
04-0CT-76
MACnl 27(11'186)
MAItfDEC-l1-DZRICJ-D
CONMON TAGS
38-AU<;-16 14148
DZRICJD.P11

, , •••• ***.****************************************************.**
,*THIS TABLE: CONTUNS VARIOUS COMMON STORAGE LOCATIONS
;*USEO IN THE PROGRAM.

183
184
195
186
197
188
199
19!il
191
192
193
194
195
196
197
198
199
201'1
21'11
202
203
204
235
286
207
299
209
210
211
212

211
214
21'5
216
217
218
219
220
221
222
223

224
225
226
227
228
229
230
231
232
233
234
23'5

.-1101'1

eellee
1'18111'11'1
81'1111'18
!ileU02
1'181183
e!il1184
813111'16
001118
1'11'11112
1'101114
81'11115
e!il1116
891121'1
1'11'11122
1'181124
1'11'11126
1'181138
00H32
1'11'11134
001135
881136
891141'1
81'11142
01'11144
01'11146
1'101150
1'101152
801154
081155
081156
801 157
801160

.CNTAGz
.PASSI
.TSTNMS
.ERFLGI
IlCtfTz
SLPAORs
SLPERRI
SERTTLI
UTEN81
IERMAXI
.ERRPCa
.GDADRI
SBDADRa
SGDDATI
SBODATI

88881'10
!ilge
881'1
80881313
00801'10
1'18881'11'1
81'11'11'11'11'1
8elil
eel
8801'109
08891'18
0881'11'10
081'101'18
1'11'10001'1
081'101'11'1
006660
1'11'10
1'11'18
e801il1il1il
177571'1
177578
177561'1
177562
177564
177566
000
082
012
081'1
081'11'100

.WORD
.8YTE
.8YTE
.WORD
.WORD
.WORD
.WORD
.BYTE
.SYTE
.WORD
.WORD
.WORD
.WORD
.WORO
.WORD
.!IlO!!O
SAUTOBa .SYTE
SINTAGI .BYTE
• WORD
SWRI
.WORD
DISPLr.T1 .WORD
STICSI
177569
177562
STKBI
177564
STPSI
177566
STPSI
SNULLI
.BYTE
.FILLSI .8YTE
.FILLCI .SYTE
STPFLGI .BYTE
$ REGAO I • WORD

001'101'10
008800
000000
1'18901'10

1'11/11162
881164
001166
1'101171'1
881172
001174
001176
1'101208
08121'12
1'11'11204
01'11206
001211'1
001212
001213
001214

1'10001'10
008800
000881'1
1'100008
8001'11'11'1
1'101'101'11'1
900000
1'177
015
000012

001216

005015

001224
01'11232
1'11'11241'1

239

: 'AUTOMATIC '"'ODE INDICATOR
;,INTERRUPT MODE INDICATOR

I ' ADDRESS OF SWITCH REGISTER
I I ADDRESS OF DISPLAY REGISTER
l ' TTY KSD STATUS
, I TTY KBO SUFrER
1,TTY PRINTER STATUS REG. ADDRESS
" TTY PRINTER BUFFER REG. ADDRESS
0
"CONTAINS NULL CHARACTER FOR FILLS
:,CONTAINS • OF FILLER CHARACTERS REQUIRED
2
12
11INSERT FILL CHARS. AFTER A "LINE FEED"
0
" "TERMINlI" AVAILABLE" rLAG (8IT<07>8e-YES)
1'1
I,CONTAINS THE ADDRESS FROM
, ,WHICH
(SREGe) WAS OBTAINED
8
.1i0RO
nCONTAINS «'REGAO)+0)
'REGel
SREG11
.WORO
"CONTAINS «SREGAD)+2)
8
.WORD
IICONTAINS «'REGAD)+4)
.REG21
1'1
"CONTAINS (C$REGAO)+6)
.REG31
.WORD
0
SREG4s
.WORD
"CONTAINS «.REGAD)+10)
.WORO
0
.REG51
"CONTAINS «UEGAO)+12)
: ,CONTAINS C(SREGAD)+14)
,WORD
'REG6,
1'1
,WORD
"CONTAINS (SREGAO)+16)
.REG7.
$REG191 .WORD
8
"CONTAINS (CSREGAD)+20)
0
IICONTAINS «SREGAD)+22)
SREG111 .WORD
STIMESI 0
"MAX. NUMBER OF ITERATIONS
SESCAPEe0
l ' ESCAPE ON ERROR ADDRESS
I f QUESTION MARK
SQUES.
/11
.ASCII
SCRLFs
<15>
l ' CARRIAGE RETURN
.ASCII
,fLINE FEED
OLFs
.ASCn <12>
1 ,******************************.***.****.*.** •• ********** •• *****
MSG3.
.Ascn <15><12>/CNT ROY DIDN't SEtl

"

0~01ile0

842122
047104
052105
001244

"START OF COMMON TAGS
: :COIiTUMS PASS COUNT
, ,CONTAINS THE TEST NUM8ER
: ,CONTAINS ERROR FLAG
: ,CONTAINS SUBTEST ITERATION COUNT
: ,CONTAINS SCOPE LOOP ADDRESS
, ,CONTAINS SCOPE RETURN FOR ERRORS
I,CONTAINS TOTAL ERRORS DETECTED
I ,CONTAINS ITEM CONTROL 8YTE
; ,CONTAINS MAX. ERRORS PER TEST
: 'CONTAINS PC OF LAST ERROR INSTRUCTION
I,CONTAINS ADDRESS OF "GOOD" DATA
nCONTAINS ADDRESS OF "SAD" DATA
"CONTAINS "GOOD" DATA
"CONTAINS "SAD" DATA
, ,RESERVED--NOT TO BE USED

II
e
8
1'1
1'1
1'1
1'1
e
1
9
8
8
1'1
0
1'1
0
8
0
e
DSWR
ODISP

"

947103

020124

MAINDEC-l1-DZRKJ-D
l'lACYl1 27C 11'11'16)
04-0CT-76
1311'18
DZRKJD.Pl1
J8-AUG-76 14148
COMMON TAGS
236
237
238

SEQ 1'11'118

COMMON TAGS

,S8TTL

191'1
181
182

PAGE

020131
052047
000

PAGE
SEQ 01'119

844504
~51440

.EVEN

240

241
242
243
244
245
246
247
248
249
250
25t
252
253
2'54
255
256
2'57
258
259
260
261
262
263
264
265
266
267
268
269

:RIC11 REGISTERS
I IF FOR Arty REASON THE REGISTER ADDRESSES ARE DIP'rERENT FROM tHESe:
: (GIVEN BELOW), THE CONTENTS OF THE APPROPRIATE POINTERS SHOULD BE
; MODIFIED SO THAT THE CORRECT ADDRESS IS USED.

1'101244
1301246
81'11251'1
01'11252
001254
081256
1'11'11260

177400
177402
17741'14
17741'16
177410
177412
177416

RKDSI
RKERI
RKCSI
RKWCI
RKSAI
RKDAI
RKOBI

,

~TAGS

.EVEN
17741'10
17741'12
17741'14
177406
177418
177412
177416

AND GENERAL DATA AREA

001262
001264
1'11'11266

900000
99801'10
908201'1

FTITLEI 8
0
TIMER I
RKPRII
201'1

1'11'11271'1

01'19220

RKVECI

220

,FLAG FOR PRINTING PROGRAM TITLE
,TIMER REGISTER
,CONTAINS THE CPU LEVEL AT ilHICH
,RKll NORMALLY INTERRUPTS. THIS WORD
,SHOULD SE CHANGED IF RK11 IS OESINGATED
,A BR LEVEL OTHER THAN 5. E.G. IF IT IS CHANGED
,TO 6, tHIS WORD SHOULD SE CHANGED TO 241'1.
,CONTAINS THE NORMAL VECTOR ADDRESS TO wHICH
,RU1 INTERRUPTS. Ir THIS IS NOT SO, CHANGE
,THIS WORD TO CONTAIN MODIFIED VECTOR ADDRESS.

MAINOEC-U-DZRICJ-D
MACYll 27(1006)
04-0CT-76 1311'. PAGE"
OZRICJO, Pll
30-AUG-76 14.48
ERROR POINTER TULE
,seUL

270

271

SEQ 0020

ERROR POINTER UBLE

,*THIS TABLE CONTAINS THP.: INfORMATION fOR EACH ERROR THAT CAN OCCUR,
,*THE INrORMATION IS OBTAINED 8Y USING THE INDEX NUMSER FOUND IN
:*LOCATION UTEMB, THIS NUMBER INDICATES IIHICH ITEM IN THE TABLE IS PERTINENT,
,*NOTEll
IF UTEMB IS 0 THE ONLY PERTINENT DATA IS (SERRPC),
r*NOTE21
EACH !TEll! IN THE TABLE CONTUM! 4 POINTERS EXPLAINED ~s fOLLOWS I

272

273
274
275
276
277
278
279
280

r*
1*
r*
r*

281

, I POINTS
, ,POINTS
"POINTS
, ,POINTS

EM
OH
OT
Dr

TO
TO
TO
TO

THE
THE
THE
THE

ERROR MESSAGE
DATA HEADER
DATA
DATA fORMAT

282

283
284
285
286
287
288
289
290
291

.ERRTaI

801272

:THP.: ERROR ITEMS TABLE CONSISTS Of ALL THE POSSIBLE ERROR MESSAGES
,USED IN THIS PROGRAM, AN ERROR C.. LL IN THE PROGR"M CORRESPONDS TO
rTHE ITEM NUMBER IN THE ERROR TABLE, THUS 'ERROR
I ' IN THE
,PROGRAM CORRESPONDS TO ' ITEM
I ' IN THE ERROR TABLE,
, 'EM ... ' IS THE POINTER TO THE ERROR MESSAGE IIHICH WILL BE TYPED
,OUT IN CASE THAT ERROR WERE TO OCCUR, THUS fOR 'ERROR
I' THE ERROR
,MESSAGE TYPE OUT WILL BE 'TIME OUT ON RlCll REG',
: 'OHU.' IS THE POINTER TO THE HEADER BLOCK IIHICH IIILL BE TYPED OUT
1 IMMEDIATELY ArTER THE ERROR MESSAGt,
: 'DTH.' SERVES AS A POINTER TO THE MtMORY LOCATIONS WHERE
,THE INfORMATION RtLEVANT TO THE ERROR TYPE OUTS (LIKE PC, CONTENTS
, OF RICCS ETC,) WILL BE PICKED UP fROM,
:THE LAST ROW CONTAINING '0' SERVES AS A TERMINATOR,
;EXAMPLEI
: IF ON RUNNING THIS PROGRAM A TIMEOUT WERE TO OCCUR ON ADDRESSING RKDS
: (177400), BECAUSE or SOME FAULT, THE rOLOWING TYPEOUT WOULD
:OCCUR ON THE TELETYPE.

292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
)08
309
H0
311
312
313

TIME OUT ON RKII REG
PC
REG
......
17741'10

:

,NOTE THAT ...... WOULD BE THE ACTUAL PC WHEI/E 'ERROR

1" IS LOCATED,

,THE ERROR HANDLEI/ IS LOCATED AT "ERROR', THE ERROR CALL IS AN "EMT'
'INSTRUCTION IIITH ITS LOIIER BYTE ENCODED TO PROVIDE INDEXING TO THE
JITEMS IN THE ERROR TABLE.
, THUS ' ERROR
1•
IS 104001
I
'ERROR
126' IS 104126
ETC.

314
315
316
317
319
319
320
321
322
323
324
325

, ERROR ITE148 TABLE

04-0CT-76 13108 PAGE
MAINDEC-1l-DZRKJ-D
MACY11 27(1006)
ERROR POINTER TABLE
l0-AUG-76 lUU
DZRKJD,Pll

329
329
H0

331
3)2
H3
334
3)5
H6
337
H8
339
340
341
342

341
344
345
346
347
349
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
313
374
375
376
377
379
379

l8tll

381

SEQ 0021

lITEM

326
327
001272
O01274
881276
O01300

010316
011526
011456
000001'1

801302
001304
OO1306
00131O

010350
IH 1546
011464
000080

001312
801314
801316
001320

010375
811623
011464
000000

001322
001324
001326
001H0

010410
011575
011464
000000

001332
001334
001336
801340

010455
011650
011416
000000

001342
001344
801346

010511
011650
011416
80.00.

EMt
oHl
oTI
0

ITIME OUT ON RKll REG
REG
,PC
,.ERRPC 'REG8

EM2
DH2
DT2
0

,REGISTER NOT CLEARED
RtGADD RECVo
JPC
, IERRPC .REG0
'REGI

EM3
DH3
DT2
0

,RKCS ERROR
WROTE
,PC
, $ERRPC 'REGe

EM4
oH4
DT2
0

, RKCS ERROR-ON IIRITING READ ONLY BITS
RECVD
EXPCT
,PC
,.ERRPC .REG0
.REGI

EM5
DH5
DTI
0

,BUS INIT DID NOT CLEAR RKCS
,PC
RECVD
, IERRP!! 'REG0

EM6
DH5
oTl
0

, 'CN'lRL RESET' DIDN'T CLtAR RKCS, ON SnING GO
RECVD
,Pc
,IERRPC: .REGe

EM7
DH3"
DT26
0

,'CNTRL RDY' DIDN'T lET AftER CONTROL RESET
RKER
RKDS
RKCS
,PC
, IIRRPC ,REG0
IAIGl
'R£G2

HTEM

: ITEM
RtAD
.REGI

,ITEM

,ITEM

,ITEM

8013511

,ITEM
00U52
801354
001356
""1360

010567
01221U

IH1514
•••• 80
,ITEM

8.1362
.81364
•• 1366
.0131.

.10636
011546

.114U
00111000

10
EMU
DH2
DT2
0

, REGISTER NOT CLEARED
REGlDD RECVD
!PC
'R£Gl
I IERRPC 'REG'

04"OCT-76 13108 PAGE
MACYl1 27(1006)
MAINoEC-I1-DZRKJ-D
ERROR POINTER TA8LE
30-AUG-76 14148
DZRKJD.Pll
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
491
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429

:ITEM
001372
001374
001376
001400

010663
011666
011464
000000

001402
001404
001406
0914U1

011423
011713
011519
000000

091412
001414
001416
001420

010676
911666
011464
000000

i10i422
991424
001426
001430

2110711
011546
011464
900000

001432
091434
001436
001440

010753
911666
1111464
00001219

001442
12101444
091446
001459

011301
912967
011514
00009121

01211452
091454
991456
001460

910766
011546
911464
00000121

001462
001464
001466
901470

011922
011720
IHU74
9099121121

lITEM

DH2
DT2
0

j CNTr=;L RESET DID NOT Cr..EAR
,PC
REGADD RECVO
I SERRPC, IREG0
$REGl

REGISTE~

IRKDA ERROR
WROTE
IPC
,SERRPC SRE~0

READ
fREGl

,RKCS ALTERERED ON Ct.EARING "REG-BYTE"
,pC
REG-BYTE (RKCS)EXP (RKCS)RECVD
,SERRPC aREG0
aREG2
'REGI

17
EM17
DH2
DT2
9

:ITEM

READ
.REGI

16
EM26
DH26
DT26
0

: ITEM

IRKBA ERROR
WROT
,PC
I SERRPC IREG0

15
EM15
DHl1
Df2
0

:ITEM

I UNEXPECTED RK 11 INTERRUPT
rPC
lSERRPC

14
Er;14

:ITEM

READ
SREGI

11
EMl1
OHll
DT2
0

: ITEM

IRKWC ERROR
WROTE
IPC
I SERRPC: SREG0

12
EM43
DH21
DT21
0

430
4H
412
433
434
435
4)6
437

11
EM11
DHll
oT2
0

lITEM

SEQ 0022

,BUS INIT DIDN"T CLEAR REGISTER
,pC
MGADD RECVD
SREGI
,URRPC 'REG9

29
EM20
DH20
OT29
9

I AODRESSING ERROR"TRIED TO ADDRESS REGl, GOT REG2
(REGl)
(REG2)
,pC
REGl
REG2
SREG3
SREGI
'SERRPC .REG9
'REG2

94"OCT-76 13109 PAGE 10
InCrtl 27 (191216)
MAINOEC-l1"OZRKJ-O
ERROR POINTER TASLE
10-AUG-76 14148
DZFlKJD.Pll
, ITEM

438

439
440
441
442
443
444
445
446
447
448
449
45121
451
452
453
454
455
456

457
458
459
460
461
462
463
464
465
466
467
468
469
470

471

001472
901474
001476
091500

011345
012131
911474
121001211210

1219151212
001504
00151216
001510

0t! 193
011575
911464
001219"0

901512
00t514
001516
001520

011136
011575
911464
9121000"

ITRIED TO CLEAR "FIEG-SYTE", CHANGED "REG-SYT2"
eYT2-EXPCt
REG-erT2
IPC
REG"SYTI
SREGI
SREG2
'SERRPC SREG0

22
EM22
OH4
OT2
0

:IEM

'DID NOT CLEAR RKCS 1.0 BYTE
,PC
EXPCT
RECVD
SREGI
,SERRPe .REG0

23
EM23
OH4
OT2

,010 NOT CLEAR RKCS HI 8YTE
RECVD
,PC
EXPCT
SREGI
ISERRPC tREGe

III

: ITE'"
001522
01H524
001526
00153121

21
!!:M27
DH27
DT20
0

: ITEM

011172
011767
011474
00012100

24
E"'24
DH24
OT20

I TRIED TO CLEAR RKCS "eYTE", CHANGED "REGIS"
(REG)EXP
,pC
(REG)RECVD
REGIS
SYTE
SREG3
,SERRPC aREGe
SREGI
SREG2

0

lITEM

25
EM25
DH25
DT2
0

091532
"01534
001536
01211540

011246
12112041
12111464
000000

001542

9121001215

001544
1211211550
1211211552
12101556
12191560

01271216 901100
095026
1212271216 001149
12101374 _
IH2706 001190

001564
001572
00160121
00161216
01211614
091622
001630
001636
001644

012737
012737
012737
O12737
012737
912737
012737
012737
01215037

I FAILED TO CLEAR 'FlEG-eYTE'
,pC
REG-eYTE RECVD
,IERRPC IREG0
IREGI

472
473

474
475
476
477
478
479
480
491
482
483
484
485
486
487
489
489
490
491
492
493

005632
000340
906104
0011140
010046
009340
0101]4
00034121
001206

000029
01210922
900030
01210032
121"0034
00012136
000024
00912126

SEQ 0023

STARtl
RESET
,CLEAR THE BUS
.SSTTI. INITIAt.UE THE COMMON TAGS
, 'Ct.EAR THE COMMON TAGS (lCMTAG) AR!!:A
MOV
UCMTAG,R6
"FIRST t.OCATION TO BE CLEARED
(R6)+
CLR
"CLEAR MEMORY LOCATION
CMP
UWR,R6 I ,DONE!
8NE
.-6
n LOOP BlCIt IF NO
MOV
tsTACf(,SP
"SETUP THE STACK POINTER
FEW VECTORS
I ' INITIALIZE
MOV
USCOPE,,, IOTVEC "lOT VECTOR FOR SCOPE ROUTINE
MOV
U40,.IIOTVEC+2 IILEVEL 7
MOV
'SERROR,t'EMTVE~ "EMT VECTOR FOR ERROR ROUTINE
MOV
U40,.nMTVEC+2 "LEVEL 7
MOV
UTRAP,.nRAPVEC "TRAP VECTOR FOR TRAP CALLS
MOV
U4",tnRAPVEC+Z,LEVEL 7
MOV
UPWRON, "PWRVEC' "POWER FAILURE VECTOR
MOV
U40, ,.,WRVEC+2 n LEVEL 7
ITINES
,'INITIALIZE NUMBER OF ITERATIONS
CLR

BYT2-RECVD
SREG3

"UNDEe-ll-DZ~KJ-D
30-AUG-76
DZ~KJD.Pll

494
495
496
497
498
499
500
501
592
51'JJ
5e4
5115
506
507
508
509
510
511
512
5tl
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
5)]
534
535
536
5)7
5]8
539
540
541
542
543
544
545
546
547
548
549

MAeul 27 (18flJ6)

14148

001650
.01654
001662
001670

0.5037
112737
012737
012737

01112HI
.e.001
001662
001670

001676
"01702
001710
001716
001724
001732

81]746
812737
012737
012737
022777
001012

0000.4
081736
177570
177570
177777

001734
001736
001742
00t744
001752
001760

000493
012716
000002
012737
0127]7
012637

001764
001770
001772

005227
001043
104401

001776
002002
002084
002012
002014
002016
002020
002026
002026

8057]7
00111106
023727
001005
104406
000403
112737

001115
001106
001110

000004
001140

001142
177206

114-0CT-76 131"
PAOE 11
INITIALIZE THE COMMON TAGS
CLR
MOVB
MOV
MOV
'lsnE ro~ A
"EQUAL TO A
MOV
MOV
MOV
MOV
CMP
BNE

B'R
641l

001744
0019176
000174
000004

001140
001142

65 ..
661l

MOV
RTI
MOV
MOV
MOV

nQ 0024

, ,CLEU THE ESCAPE ON ERROR ADDRESS
USCAP!
, , ALLOW ONE ERROR PE~ TEIT
U,IERMAX
•• ,8LPADR
, , INITIALIZE THE LDOP ADDRESS FOR SCOPE
, ,SETUP THE ERROR LOOP ADDRESS
' ••• LPERR
HA~DWARE SWITCH REOISTER. IF NOT FOUND OR IT IS
0_1", SETUP ro~ A sorTWARE SWITCH ~EGI8TER.
"ERRVEC,-(SP)
"SAVE E~ROR VECTO~
, , SET UP ERROR VECTOR
1648, UERRVEC
I,SETUP FOR A HARDWARE SIliCH REGISTER
• DSloIR,SWR
IIDDISP,DISPLAY "AND A HARDWARE DISPLAY ~EGISTER
, ,TRY TO REFERENCE HARDWA~E 8WR
'-I ,tsW~
"BRANCH IF NO TIMEOUT TRAP OCCURRED
661
, 'AND THE HARDWARE allR IS NOT II -I
658
" BRANCH IF NO TIMEOUT
1658, (SP)
, ,SET UP rOR TRAP RETURN
UIIREG,SWR
"POINT TO SOFTIIARE SIIR
.DISPREG, DISPLAY
(SP)+,UERRVEC , ,RElSTORE ERROR VECTOR

.S8TTL TYPE PROGRAM NAME
,'TYPE THE NAME or THE PROGRAM Ir FIRST PASS
l,rIRST TIME?
INC
6,.
, 'BRANCH IF NO
BNE
,688
I,TYPE AScn &TilING
TYPE
.SBTTL GET VALUE rOR SOFTWARE SWITCH REGISTER
, , ARE liE RUNNING UNDER XXDP/lCT?
TST
"42
I , BRANCH IF YES
BNE
SWR, tsllREG
, ,SOFTWARE SIIITCH REG SELECTED?
CMP
7fU
BNE
I 'BRANCH IF NO
GTSIIR
" GET 80FT-SIIR SETTINGS
BR
70'
, ,SET AUTO-MODE INDICATOR
69t1
U,UUTOB
MOVB
70"
6,.
, ,GET OVER THE ASC IZ
BR
; ,6811
.Ascn /RKll LOGIC TEST 1I<15><12>/MUNDEC-l1-DZRKJ-D/
6711

'-I

177777
002030
080042
001140

000176

000001

001114

080424

002100

69'

002100

012737

002116

000004

sTART11 MOV

002106

012777

002202

177154

MOV

I8ADINT, tlRKVEC

002114

000516

BR

TSTI

002116
002120
002122
002124
002130

011600
005740
022626
104401
000417

I8AOTMO,,,4

: SET TIME OUT VECTOR FOR UNEXPECTED
,TIME OUTS
,SET UP RICll INTERRUPT VECTOR rOR
,UNtXPECTED INTERRUPTS rROM RKll
:GO TO TEST 1

,THIS ROUTINE HANDLES UNEXPECTED TIME OUTS
BADTMOI MOV
TST
CMP
TYPE
BR
,,65$1
.Ascn
64$1

002132

802170

(SP),R0 ,SAVE PC WHERE TIME OUT OCCURED
-(RIll)

CSP)+, (SP)+
: RESTORE STACK POINTER
,658
;,TYPE ASCI! STRING
641
"GET OVER THE Ascn
<15>< 12>/UNEXPECTEO TIME OUT AT PC-/

MAINDEC-Il-DZRKJ-O
MACYlI 27( 1006) 04-0CT-76 IlI08 PAGE 12
GET VALUE FOR SOFTWARE SlitTCH REGISTER
30-AUG-76 14148
OZRKJD. Pl1
550
551
552
553
55.
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
591
594
595
596
597
598
599
6118
601
682

6113
604
685

002170
01/J2172
002174
002176

010046
104482
000000
000137

MOV
TYPOC
HALT
JMP

"01542

R0,-(SP)

, SET UP rOR TYPING OUT PC
IGO nPE OUT OCTAL PC

"START

JTHIS ROUTINE HANDLoES UNEXPECTED INTERRUPTS rROM RKll
,SII 9 AND 10 rOil LOOPING ON ERROII
, AND LOOPING ON TEST IN WHICH TIMEOUT
,OCCURRED, ARE PIIOVIDED.
002282
002284
002206
002214
002216
C!l02220
0C!12222
082224
"02226
002232

011600
005740
032777
0"1015
104401
0161213
104401
"l1n3
104401
000404

020000

176724

BADINTI MOV
TST
SIT
BNE
TYPE
SCRLF
TYPE
EM43

"02234
,,651:
6411

102244
002244
002246

010046
104402

tJ0225e
002256
002260
002262

el2777
001403
022626
000177

001000

002266
002274
002276
"02300

032777
001401
000002
000000

04000"

0023e2

0"0137

001542

(SP),R0
-(R0)
.20"0",(lSIiR
11

TYPE
BR
.ASCI!

,658
648
IAT PC-I

NOV
TYPOC

R0,-(SP)

176662

181

SIT
BEQ
CMP
JMP

U000,UIiR
2.
(SP)+, (SP)+
ULPADR

176644

211

BIT
BEQ
RTI
HALT

'40000, tSWR

JMP

'UURT

176620

HI

]I

,SAVE PC WHERE INTERRUPT OCCURED
J INHI8tT EAROR TYPEOUT?

rYES, DON'T TYPE OUT

,TYPE 'UNEXPEXTEO RKl1 INTERAUPT'
,TYPE ' AT PC.'
"TYPE AScn STRING
U GET OVER THE ASCI!
1 SET UP FOR TYPING OUT PC
:GO TYPE OCTAL PC WHERE BAD
,INTERUPT OCCURED
,LOOP ON ERROR?
INO, BRANCH
HES, IIEPOSITION STACK
IGO TO THE STARTING ADDRESS or
,THE TEST THAT GAVE UNEXPECTED INTERRUPT
: LOOP ON TEST?
,NO, BRANCH
,YES, LOOP. GO BACK liHER U INTERRUPTED rROM.
, UNEXPECTED INTERRUPT OCCURtD AS
: INDICATED IN THE TYPE OUT. U CAN LOOP
,ON ERROR, TEST,OR INHIBIT TYPEOUT BY
,SETTING APPROPRIATE SWITCHES.
: GO BACK TO THE START OF THE
,PROGRAM. THUS PRESSING CONTINUE
: ArtER THE ABOVE HALT WILL
,RESTART THE PROGRAM

,RESTAAT ArtER POliER rUL
JTHE PROGRAM WOULD RESTART HERE IF POWER CAME BACK ArTER A P'ALIUIIE.
PFSTRTI

002306
082386
002312

104481
00e411

882]]6
802]]6
te2340
002342

005080
01i15001
1105201

002314
n65'1
6411
111

TYPE
BR
.lSCI!

,651
"TYPE ASCI! STRING
641
, 'GET OVER THE ASCIZ
<15><12>/PWR UP,RESTARTI

CLR
CLR
INC

A0
Rl
Al

SEQ 0025

MACYll 27(1006) 04-0CT-76 13108 PAGE Il
MAINDEC-II-DZRKJ-O
GET VALUE rOR SOFTWARE SWITCH REGISTER
30-AUG-76 14I4B
OZRKJO.Pll
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
618
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661

002344
002346
002350

002352
002354
002356

000004
005002
012737

002364
002372
002376
002402

012737
012700
012701
005731

002404
002406
002410
002416
002420
002422
002426

005200
001375
012737
005702
001415
104401
000410

002450
002450
002454
002454
002456
002460
002464
002466
002470
002472

002474
002476
002500
002504
002510
002514
002516

BNE
INCB
BNE

001376
105200
001374

002402

001110

002456
177771
001244

000004

002116

000004

R0

11

, I ***************************************************************
TEST THAT lI..L RK11 REGISTERS CAN BE REFERENCED
I*TEST 1
,*THIS TEST CHECKS IF EVERY RKll REGISTER CAN BE
,*REFERENCED WITHOUT TI14ING OI1T. If' A TIME OUT OCCURS THE ERROR IS
IT THERE WAS
I*REPORTEO , AN ERROR FLAG (R2) IS INCREMENTED.
,*AN ERROR DURING THIS TEST, THE ENTIRE PROGRAM IS ABORTED
, I ***************************************************************
TSTlI
SCOPE
R2
CLR
I SET RETURN ADRES FOR LUP
MOV
1T1,'LPERR
,ON EROR (SW9)
ISET UP ADDRESS rOR TIMEOUT VECTOR
MOV
111MOUT, . . 4
I INITIALIZE R0 TO KEEP TRACK OF REGIS REFERENCED
MOV
'-7,R0
,INITIALIZE Rt WITH RKDS ADDRESS
IRKDS, Rl
MOV
~(Rl)+
,REFERENCE THE REGISTER,
TST
Ttl
IIr IT CAN'T BE, TIMEOUT TRAP WILL OCCUR
I SHIFT THE POINTER
,ALL REGISTERS REFERENCED?
R0
INC
8N£
~ H' NOT. LOOP BACK " REFERENCE NEXT REGISTER
MOV
.BADTMO,U4
:WAS THERE AN ERROR?
R2
TST
BEQ
INO,BRANCH
11
,6,.
TYPE
"TYPE ucn STRING
:IGET OVER THE UCIZ
BR
648
, ,6551
.Ascn <1S><12>/PROG ABORTED/

... ,

002430

6481

000137

JMP

005360

'GET42

lIF YES, ABORT THIS ENTIRE TEST

181
000407
022626
014137
104001

BR
TIMOUTI CMP
MOV
ERROR

001162

TST
INC
BR

005721
005202
000744

000004
000005
012700
012701
023711
001005
022171

177772
001246
001250
000200

000000

T5T2
(SP)+, (SP)+
-(Rll,SREG0
1
(Rl)+
R2
Tl+2

nEXIT
l GET ADDRESS OF REGISTER THAT TIMED OUT
:TIMED OUT WHEN REFERENCING RK11
lREGISTERS
: REPOSITION POINTER TO THE NEXT REGISTER ADDRESS
ISET FLAG INDICATING ERROR
: BRANCH SACK " REFERENCE THE NXT REGISTER

: I ******* .. ***************************** .. * .. ********************** ..
CHECK RUI INITIALIZATION
I*TEST 2
: *THIS TEST CHECKS THAT THE CONTROLLER LOGIC IS INITIALIZED
,*CORRECTLY, RKWC, RKDA, RKDA, RKDB SHOULD BE CLEAR AND
:*RKCS SHOULD HAVE 'CNTRL ROY' BIT SET.
:1 ** .. ************ .. ************************* .. *********************
TST21
SCOPE
:ISSUE A BUS INIT
RESET
,SET :OUNT FOR 6 REGISTERS
MOV
'-6,R0
.RKER,R1
:INITIALIZE AD RES
MOV
RKCS,I!IR1
lIS IT RKCS?
CMP
lSI
BNE
2.
:NO
t200,(HRl )
,ONLY BIT 7 OF RKCS SHOULD BE SET i
CMP

MACYll 21(Hl06) 04-0CT-76 13:08 PAGE 14
MAJNDEC-11-DZRKJ-D
CHECK RKll INITIALIZATION
T2
30-AUG-76 14:48
DZRKJD.P11
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
6115
686
687
688
699
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
107
709
709
710
711
712
713
714
7t5
716
117

SEQ 0026

11

002524
002526
002530

001004
000411
005771

002534
002536
002542
002550
002552
002554
002556

001406
011137
017137
104002
005721
005200
001354

002560
002562

000004
012737

002570
002574
002600
002604
002610
002612
002614
002620
002626
002630
002632
002636

012700
010077
017701
"42701
020001
001406
010037
017737
10400)
006300
020027
001356

002640
002642

000004
012737

002650
002654
002660
002664
002670
002672
002674
002700
002706
002710
002712
002716

012700
010077
017701
042701
020001
001406
010037
017737
104003
006300
022700
001356

2$:

000000
001162
000000

3S1
001164
4$1

002574

001110

000002
176450
176444
000200
001162
176424

001164

000020

002654

000100

BEO
MOV
MOV
ERROR
TST
INC
BNE

3$

4S
I!I(Rl)
4$

,Rl,.REG0
'(Rl ".REGl
2
(Rl)+
R0
1$

lBRANCH IF ERROR
,CHECK THAT REST OF REGISTERS
:ARE CLEAR
:BRANCH IF REGISTER IS CLR
:GET ADRES OF REGISTER
:GET CONTENTS or REGISTER
: RUI REGISTER WAS FOUND TO B HOT CLEAR
IINCREMNT POINTER TO NXT REG
:CHKD ALL REGS?
: IF NOT LUP BAK

: 1************"*********·**"*·*********·*************·***********
TEST RKCS FUNCTION 8lTS • 1,2,3
,lITEST 3
,*THIS TEST CHECKS IF THE FUNCTION BIT-I, 2, 3 IN RKCS CAN BE WRITTEN ,
:*READ BACK. R0 CONTAINS THE BIT THAT WAS WRITTEN. Rl CONTAINS THE
,*BITS THAT WAS/WERE READ BACK.
: ,*** •• ************************************************** .. *******
TST31
SCOPE
: SET RETURN ADRES FOR LOPING ON
MOV
'U"LPERR
: ERROR (SW 9)
,INITIALIZE Btl' TO BE WRITTEN IN RKCS
MOV
'2,R0
1$1
MOV
R0,I!IRKCS
I WRITE THAT BIT IN RKCS
,GET RKCS
MOV
tRKCS,Rl
.200,R1
:MASK OUT CNTRL ROY BIT
BIC
IIIIAS REcve BIT SAME AS WRITTEN BIT
CMP
R0,Rl
BEQ
: YES, BRANCH OTHERWISE REPORT ERROR
2.
IGET EXPCTD RKCS, BIT THAT WAS WRITTEN
MOV
R0,SREG0
MOV
,RKCS, .REGI
IGET RECVD RKCS, BIT READ
IBIT THAT WAS WRITTEN WAS NOT READ BACK
ERROR
3
R0
2$1
ISHUT TO WRITE NEXT BIT
ASL
:HAVE U CHKD ALL 3 BITS 1, 2, 3
CMP
R0, '20
BNE
I IF NOT, LOOP BACK " CHECK THE NXT BIT
11

,

0011 10

000020
176370
176364
000200
001162
176344

BNE
BR
TST

001164

: '**********************************************************.****
TEST RKCS EXTENDED MEMORY BITS - 4,5
:*TEST 4
: *THIS TEST CHECKS IF THE 'EXTENDED MEMORY' Bns CAN BE WRITTEN
,llANO READ BACK CORRECTLY.
, ,****.*********************************.*********.*******.******
T5T41
SCOPE
,SET RETURN ADRES FOR LUPING
MOV
.1I"LPERR
ION EROR (SW 9)
,INITIALIZE BIT TO BE WRITTEN IN RKes
MOV
.20,R0
R0,@lRKCS
MOV
IWRITE THAT BIT IN RKCS
lSI
MOV
,GET RKCS
IRKes,Rl
U00,Rl
:MASK
OUT CNTRL ROY BIT
BIC
I illS RECVD BIT SAME AS WRITTEN BIT
CIIIP
R0,Rl
BEQ
,YES,
BRANCH
2S
,GET EXPCTD RKCS, BIT THAT WAS WRITTEN
MOV
R0,SREG0
,GET RKCD RECVD, BIT THAT WAS RUD
MOV
'RKes, • REG 1
~BIT THAT WAS WRITTEN WAS NOT READ lACK
ERROR
3
R0
,SHIFT TO ilJRITE NEXT BIT
2*:
ASL
1100,R0
:HAVE U CHKD BOTH BITS, 4, 5
CMP
I IF NOT, LOOP BACK , CHECK THE NXT BIT
BNE
IS
I
I ,* •• ****** .. **********************************.******************

SEQ 0027

MACYll 21( 1006) 04-0CT-76 1),0' PAGE 15
MAINOEC-ll-DZRKJ-O
T5
CHECK RKCS IDE BIT - 6
U-AUG-76 14.48
OZIUI:JO.Pll
718
719
720
721
722
723
724
725
726
727
728
729
730

731
732
733
734
735
736
737
718
739

0"272111
11102722
002726
002732
002734
002734
002740
002744
002750
"02752
002760
002764

"0"004
012746
012746
"0000'

002766

104412

"02770
002774
002776
003002
003006
003010
003012

022710
001406
01"037
011037
104010
000430
104414

000200

003016

012777

003066

003024
003030
003034
003036
003040
1103042
003044
003050
003054
003056

013746
012746
1100002
000240
000240
000240
012746
IU2746
000002

001266
003036

003056
003064
003866
003070

012777
000402
822626
104012

002202

1'13700
012710
0'2710
001406
"12737
011037
104003

"0U40
002734
001250
000100
000U0
00030"
0"1164

001162

74"

741
742
743
744
745
746
747
748

749
750
751
752
753
754
755
756
757
759
759
760
761
762
763
764
765
766
761
769
769
770
171
772
713

001162
001164
000010
176244

000340
003056

176204

CHECK IIKC8 IDE BIT - 6
,*THIS TEST CHECKS IF IDE BIT CAN BE WRITTEN , READ BACK. THE PROCESSOR
,*STATUS IS SET AT PRIORITY 7 SO THAT UNWANTED INTERRUPTS ARE t.OCKED OUT.
, *THEN IDE BIT IS Ct.EARED AND PROCESSOR PRIORITY IS t.OWERED TO INSURE THAT
, *NO INTERRUPTS OCCUR.
, , ***************************************************************
TST51
SCOPE
1]4",-CSP)
MOV
.648,-(SP)
MOV
RTI
6411
RKCS,RIII
MOV
'SET THE IDE BIT
MOV
'11/10,8110
1)00,IR0
,ns IT WRITTEN CORRECTLY
tMP
BEQ
, YES, BRANCH OTHERWISE REPORT ERIIOR
U
,GET EXPCT RKCS
MOV
1l"0"REG0
,R0,.REGI
:GET RKCS RECVD
MOV
]
JlOE BIT WAS WRITTEN, BUT WAS NOT
ERROR
,READ BACK
:CONTROL
RESET, CLEAII IDE
CNT.RESET
ls.
: THIS IS A CALL FOR THE 'CNTRL:RESET' ROUTINE. A CONTROt. RESET
, IS ISSUED AND AfTER A CERTAIN TIME
, IF THE 'CNTRL ROY' DOES NOT SET
:AN ERROR IS REPORTED. NOTE THAT
, THE PC IN ERROR MESSAGE IS THE
:PC WHERE 'CNT.RESET' IS t.OCATED.
,
DID IDE BIT GET CLRD?
CMP
.,"0"R0
BEQ
2,
: YES, BRANCH
MOV
R0,eREG0
:GET ADRES OF RKCS
,GET RKCS
IoI0V
'Re,tREGl
ERROR
: IDE BIT COUt.D NOT B CLRD
10
BR
TST6
: IEXIT
2$1
,10
DELAY
:WAIT FOR AT LEAST 60 US
ION 11/20 12 US FOR 11/45
MOV
.U,I!IRKVEC
:SET RKll INTERUPT VECTOR TO
, WHICH RKll CAN INTERUPT If' THERE
:IS FAULTY LOGIC
RKPRI,-(SP)
MOV
,t.OWER CPU PRIORITY SO THAT
He,-(SP)
MOV
:RKll CAN POSSIBLY INTERRUPT IF
: THEil IS MALFUNCTIONINIG LOGIC
IITI
NOP
:THE INTERRUPT WOULD OCCUR
411
NOP
NOP
U40,-(SP)
MOV
t65.,-(SP)
IoI0V
RTt
65'1
:PRIORITY
.BADINT,I!IRKVEC ISET UP UNEXPCTD INTRUPT VECTOR
MOV
BR
TST6
: IEXIT
(8P)+, (SP)+
CMP
,RESTORE STACK
111
ERROII
,AN UNEXPECTED RKll INTERRUPT
12
;OCCURED PROBABLY DUE TO FAUt.TY LOGIC

MAINDEC-ll-DZRKJ-D
MACYl1 27( 1006) 04-0CT-76 13'08 PAGE 16
DZRKJD.PI1
30-AUG-76 14148
T6
CHECK RKCS SSE,EXB,FMT,IBA BITS - 8,9,10,11
714
775
716
777
778
179
780
781
7&:2

783
784
785
7116
787
788
789
790
791
792

793
794
795
796
797
798

003072
003074
"03100
003104
"03106
003110
003114

800004
012701
013702
010112
011200
042700
020100

003116
"03120
003124
003130

01U 405
010137
0U237
104003

001162
001164

003132
003134
003140

006301
022701
001361

010000

".**.*************•• *********************.********* •• ***********
,*TEST 6
CH!Cf( RKCS SSE,nB,FMT,I8A BITS - 8,9,10,11
,'tTHIS TEST CHECKS Ir THE SSE, EXB, 1MT r. IBA SITS CAN BE WR!1'!Eii
,*AND READ BACK CORRECTLY
, ,************.**************************************************
TST6.
SCOPE
1400,Rl
JINUIALIZE BIT TO BE WRITTEN IN RKCS
MOV
RKCS,R2
MOV
,WRITE THAT BIT IN RKCS
MOV
Rl"R2
1"
.R2,R0
,GET RKCS
MOY
.,00,R0
,MASK CNTRL ROY BIT ~
8IC
Rl,R0
, WAS THE READ BIT SAME AS THE
CMP
,WRITTEN BIT
BEQ
, YES BRANCH, OTHERWISE REPORT ERROII
Rl,IREg0
MOV
, GET tUTD RKCS
MOV
I!IR2,IR!Gl
J GET RECYO RKCS
,8IT THAT WAS WRITTEN (AS IN 'REGB)
ERROR
3
, liAS NOT READ 8ACK
J SHIrT TO WRITE NEXT BIT
211
ASL
Rl
110000,Rl
CIoIP
,HAVE U CHECKED ALL BITS " 9, 10, 11
8N[
,IF NOT, LOOP BACK , CHECK THE NXT BIT
11

000 ••O
""1250
000200

2'

,

799
880
801
882
803

.,,4
805
8,,6
807

8".
8,,9
810
811
812

.U

"03142
"03144
803150

000004
013700
012710

001250
1702.0

003154
003156
003162

1'111001
042701
822701

01000"
0"0280

083166
00317.
803176
011132.2

001406
"12737
811"17
t 04004

""'02"
001164

814
815
816
817
118
819

820
821
122

823
824
825
826

827
828
829

SEQ 0028

,*TEST 5

00]2"4
0113206
".3212
003216
00323111
0113220

'''0004
812746
012746
000002
013701

000340
IUJl220

001162

, , .*******.*************.******* ••• ***************.*******.******
:*TEST 7
. CHECK READ ONLY BITS OF RKCS
,*THIS TEST CHECKS THAT TRYING .TO SET THE UNUSED BIT OR THE READ ONLY
,*BITS DOES NOT SET THEM OR AFFECT ANY OTHER BITS IN RKCS
, , *****.***.*.***.**.******.******.*****.************************
TST7,
SCOPE
RKCS,R0
MOV
,TRY SETTING TH! UNUSED BIT , RO
MOY
117020', 'R"
,ONLY 8ITS
,GET RKCS
MOV
'R0,Rl
,
MASI( BIT 12
BIC
U00"",Rl
U.0,Rl
,IS 'ROY' 8IT SET? NO OTHER
CMP
,BIT SHOULD BE SET.
, ,OK, EXIT
8!Q
TST10
,GET EXPCTD RKCS
MOV
t2ee,'REG0
,a!T RKCS RECVD
MOV
IR",.REGI
, TRIED TO SET UNUSED , RD ONLY BITS
!RIIOR
4
,or IIKCS
,SHOULD NOT HIIVE AFFECTED ANY BITS
, ,.***.* ••***.*****.****.**.**** •• *** •• * •• ***.***.******.*.******
,*TtST 10
CHECK THAT 'GO' BIT (0) CAN 8E SET
'*THIS TEST eH!CIC8 THAT THE 'GO' 8IT CAN at SET, BY PERrORMING
,*CONTROL RElET' SUING THAT THE EX8 , 18A SET PREVIOUSLY
,*NERE CLEARED.
, , *.***.*•• ** **** •• * •••• ******* ******.* ****** **.*.**.****. ** * ****
TSTUI SCOPE
MOV
1]40,-(8P)
MOV
16U,-CSP)
RTI
64*,
MOV
IIKes,Rl

SEQ 111029

MACY11 27(1006)
04-0CT-76 13108 PAGE 17
MAINDEC-l1-DZRKJ-D
T10
30-AUG-76 14148
CHECK THAT 'GO' BIT (0) CAN BE SET
DZRKJO.Pl1
8)0
831
832
833
834
835
836
837
818
839
840
841
842

943
844
845
846
847
848
849
850
851
852
853
854
855
856
857
8'58
859
86£1
861
862
863
864
965
966
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
985

007576

003224
003230
003232
803234
80)240
003242
003246
003250
003254
003256
003260

012711
085000
800885
022711
001403
011137
104005
012711
005211
005200
105700

003262
003264
003266
003270

100411
105711
100373
022711

003274
003276
003302

001407
011137
104006

001162

003304
003306

000403
004737
! 04007

005424

eHil3312

MOV
CLR
RESET
CMP

000288
001162
1$,

005000

2.,

000200

lSI

17576,'8R1
R0
1200,8Rl

BEQ

U

"IOV
ERROR
MOV
INC
INC
TSTB

,.Rl, SREG0
5
'5300, ,Rl
tRl
R0
R0

BMI
TSTB
BPI.
CMP

3S
trOll
2t
.200, tRl

BEQ
MOV
ERROR

TST11
8Rl, SREG0
6

BR
JSR
ERROR

TST11
PC,GT3RG
7

:

£183314
£1£13315
£103324
8£1333£1
£1£13334
003336
883336
003342
£10334&
£103350
803354
80335&
803362
£1£13366
003370
803374
0e34e2
0e340&
£10341£1
0£13412
00341&
£1£1342£1
£1£13422

0160£1£14
£112737
1612746
012746
1'160£182
0137£1£1
01271£1
£1£15£11£1
£122710
1'£114£15
010037
811£137
1£14£110
0127£11
012737
£1127£15
01£1110
01£1102
£152702
0110£13
1'12£1203
0014£17

080810
0£1e340
£1£13336

8£112£16

001250
£187576
£1£10208
0£11162
0e1164
£1£18002
0834£16
177773

801118

£100200

; '***************************************************************
CHECK RKCS WITH A COUNT PUTERN
,*TEST 11
I*THIS TEST CHECKS THAT RKCS CAN BE CLEARED FROM 7576 THEN A COUNT
,*PATTERN rROM 2 TO 7777 IS RUN. NOTEI ALL PATTERNS WITH BIT £I SET
I*(GO BIT) ARE AVOIDED SO THAT RKll MAY NOT START AN UNDESIRED OPERATION.
I *R1 CONTAINS THE COUNT PATTERN THAT WAS WRITTEN
: '***************************************************************
TST11 1 SCOPE
lite, $TIMES
MOV
: 100 Ie ITERATIONS
f34£1,-(SP)
MOV
t64S,-(SP)
MOV
RTI
6411
RKCS, R0
MOV
17576,8R0
MOV
: SET ALL BITS IN RKCS EXCEPT GO
liIR£I
:CLEAR RKCS
CLR
CMP
; WAS IT CLEARED
'280,~R£I
BEQ
: YES, BRANCH
1$
MOV
R£I, SREG0
: GET ADRES OF RKCS
MOV
liIR8, SREGI
INO, GET RKCS
ERI'I 0 1'1
10
IRKCS COULD NOT BE CLEARED
MOV
: WRITE THIS BIT IN RKCS
lSI
'2,Rl
MOV
fl2S,SLPERR
MOV
'-5,R5
HOV
Rl,liIR£I
2t:
:WRITE IT
MOV
R1,R2
:GET BIT THU WAS WRITTEN
: SET CNTRL ROY BIT
BIS
'20e,R2
MOV
liIR0,R3
R2,R3
CMP
: WAS THAT BIT WRITTEN CORRECTLY?
BEQ
J YES, BRANCH
3S

13108 PAGE 18
04-0CT-76
MAINOEC-I1-DZRKJ-0
MACY11 27(10£16)
T11
CHECK RKCS WITH A COUNT PATTERN
38-AUG-76 14148
DZRKJD.Pll
896
887
898
889
890
891
892
893
994
895
89&
997
898
899
900
9£11
9£12
903
984
905
906
9217
998
999
910
911
912
913
914
915
916
917
918
919
928
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
9]6
937
938
939
940
941

SEQ 0030

; SET ALL BITS EXCEPT GO
I
: ISSUE BUS INIT
; CHECK IF RKCS WAS CLEARED!
;YES, BRANCH OTHERWISE REPORT ERROR
:GET RKCS
; BUS INIT DID NOT CLEAR RKCS
: SET IBA ,. EXB IN RKCS
;SET GO. CONTROL RESET
:KEEP TIME
:HAVE U WAITED LONG FOR CNTRL ROY
:TO SET?
I IF YES, BRANCH , REPORT ERROR
: lIAS CNTRL ROY SET?
: IF NOT LOOP BACK , WAIT FOR IT
I IF CNTRL ROY WAS SET, CHK IF 'CNTRL
:RESET' CLEARED IBA ,. EXB BITS
:IIr YES, EXIT. OTHERWISE ERROR
:GET RKCS
:GO BIT COULD NOT BE SET OR FAULT IN
ITHE 'INIT I.' GENERATING LOGIC
; IEXIT
:GO, GET RKCS, ER, OS
ICONTROL READY DID NOT SET AFTER
:CONTROL RESET

0e3424
8£13438
£183434

01£1237
81£1337
1£14£1£13

£1£1343&
083440
0£13442
0e3446
803452

£105205
£1£11405
0&27£11
£1227£11
£101355

8£13454
eiH456
£1£13462
£1£13466

0000£14
01270£1
£1137£11
012737

£1£13474
£1£13476
0£13500
1:1£13502
1:1£13504
£193519
003514

£I1£11!l11
0111£12
020002
0914£15
310037
010237
1£14811

1!l03516
903520

01!l6390
991365

903522
803524
093532
003536
003542
0£13544
093546
003550
£103554
083560

09£1£1£14
012737
013709
012711!l
005£110
90571£1
9014£15
01£1£137
£111037
18491£1

003562
003564
003570
003576
003600
0£13602
003604
0£13606

095091
012795
012737
010110
011902
0221102
001497
910137

0£11162
0e1164

3S1

000002
010880

0eee81
£1£11252
003474

£1£1111£1

£191162
£101164

9001!l1£1
0£11252
177777

001286

0£11162
£101164

INC
SEQ
ADD
CMP
BNE

R5
TST12
12, Rl
118e00,R1
2S

IGET
:GET
1010
; WAS

EXPCTD WORD
RKCS RECVD
NOT READ SAK THE BIT THAT
WRITTEN

: ,EXIT
:GENERATE NXT PATTERN TO BE WRITTEN
; ALL PATTERNS WRITTEN?
I IF NOT, LUP BAK , CHK NXT PATTERN

I '***************************************************************
;*TEST 13
CHECK RKWC IIITH A COUNT PATTERN
,*THIS TEST CHECKS THAT RKWC CAN BE CLEARED, THEN A COUNT PATTERN
,*FROM 0 TO 177777 IS "RITTEN , CHECKED IF IT WAS WRITTEN CORRECTLY
: '***************************************************************
TST131
SCOPE
MOV
:, DO 10 ITERATIONS
'U,UIMES
MOV
RKWC,R0
MOV
I i 77777,'1'1£1
,SET ALL BITS IN RKWC
8R0
ICLEAR RUC
CLR
TST
: WAS IT CLEARED?
'1'10
BEQ
;YES, BRANCH
11
MOV
R0,.REG0
I GET ADRE& OF RKHC
MOV
:NO, GET RKIIC
'1'1£1, 'REGI
ERROR
10
: RKWC COULD NOT BE CLEARED

001110
2S1

001162

R2,SREG0
R3, SREGl
3

: I ***************************************************************
CHECK THAT RKWC iUT 0-15 CAN BE SET
:*TEST 12
I*THIS TEST FLOATS A '1' THROUGH RKWC BIT 0-15 AND CHECKS THAT IT
,*CAN BE READ BACK CORRECTLY, 1'1£1 CONTAINS THE WORO THAT IS WRITTEN
: : ***************************************************************
TST121
SCOPE
HOV
: INITIALIZE 1'18 FOR THE BIT TO BE ill'ltTTEN IN RKWC
'l,R0
MOV
RKWC, Rl
HOV
.1S,SLPERR
,SET UP RETURN AORES FOR
,LUPING ON ERROR (SW 9)
lS:
MOV
: WRITE THAT BIT IN RICWC
R9,"Rl
MOV
"Rl,R2
R£I,R2
:WAS IT WRITTEN CORRECTLY
CMP
BEQ
2S
: YES, BRANCH, OTHERWISE, ERROR
R0,SREG0
MOV
,GET EXPCTD RICWC BIT THAT WAS WRITTEN
MOV
R2,SREGI
~GET RKWC (THAT liAS READ BACK)
ERROR
:010 NOT READ BACK THE BIT THAT
11
: liAS WRITTEN IN RKWC
1'10
ASL
:SHIFT TO WRITE THE NXT BIT
2$.1
8NE
: IF ALL TNE BITS HAVE NOT BEEN
IS
:OONE, LOOP BACK

111
177773
903576

MOV
MOV
ERROR

CLR
MOV
MOV
MOV
MOV
eMP
BEQ
MOV

Rl
'-5,1'15
n',SLPERR
R1,tR0
'1'10,1'12
Rl,R2

lS
Rl, SREG0

,INITIALIZE COUNT PATTERN
,IIRITE THE PATTERN IN THE REGISTER
,WAS IT WRUTEN CORRRECTLYl
,YES, BRANCH
,GET EXPECTED WORD

SEQ 0031

MAINOEC-l1-DZRKJ-D
MACYl t 27(1006) 04-0CT-'76 13188 P~Gr: 19
)0-AUG-76 14148
Til
CHECK RKWC WITH A COUNT PATTERN
DZRKJD.Ptl
942
943
944
945
946
if7
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
997
998
989
990
991
992
993
994
995
996
997

003612
003616

010237
104011

003620
003622
003624
003626

005205
"01402
005201
001363

081 164

3S1

MOV
ERROR

R2, .REGI
11

INC
BEQ
INC
BNE

R5
TST14
Rl
2,

I,EXIT
, INCREMENT COUNT PATTERN
,LUP BAK , WRITE NXT PUTERN IF NOT
,DONE WITH ALL

J
J '***************************************************************

,*TEST 14

CHECK THAT RKBA CAN BE SET

J *THIS TEST FLOATS ~ '1' THROUGH RKBA BITS 0-15 AND CHECKS THAT
J *IT CAN BE RUD B~CK CORRECTLY. R0 CONTAINS THE WORD THAT WAS

003630
003632

000004
012700

000001

003636
003642

013701
012737

001254
003650

003650
003652
003654
003656
003660
003664
003670

1110011
011102
020"02
001405
010037
"10237
104013

003672
003674

006300
001365

003676
003700
003706
003712
0"3716
003720
003722
003724
003730
003734

000004
012737
013700
,,12710
005010
005710
001405
0100)7
011037
104010

003136
003740
003744
003752

005001
012705
012737
0HH10

0"3754
003756

011002
020102

001110

001162
001164

000010
001254
177777

001206

001162
001164

,*WRITTEN.
J '**************************** * **********************************
TST141 SCOPE
Il,R0
MOV
'INITIALIZE R0 rOR BIT TO BE
,WRITTEN IN RKBA
RKBA,R1
MOV
I18,SLPERR
,SET UP RETURN AORES rOR
MOV
ILUPING ON EROR (SW 12)
R0,(lRI
p.RITE THAT BIT IN RKBA
MOV
UI
IIR1,R2
MOV
R0,R2
I
WAS IT WRITTEN CORRECTLY?
CMP
BEQ
IYES, BRANCH
2.
R0,.REG0
,GET EXPCTD RKBA (BIT WRITTEN)
MOV
IGET RKBA (BIT READ BACK)
MOV
R2,.REGI
ERROR
1010 NOT READ BACK TME BIT THAT
13
,WAS WRITTEN IN RKBA
R0
ISHIFT
Re, TO WRITE NEXT BIT
ASL
2'1
BNE
I IF ALL BITS ARE NOT CHKD, LOOP
18
,BACK' WRITE NXT BIT
'J***************************************************************
CHECK RKBA WlTH A COUNT PATTERN
,*TEST 15
,*THIS TEST CHECKS THAT RKBA CAN BE CLEARED, THEN IT RUNS A COUNT
,*PATTERN FROM 0 TO 177777. Rl CONTAINS THE COUNT PATTERN TO BE WRITTEN.
, '***************************************************************
1ST151 SCOPE
MOV
1l0,STIMES
,,00 10 ITERATIONS
RKBA,R0
MOV
MOV
U 77777, ~R0
,SET ALL BITS IN RKBA
IR0
CLR
;CLEAR RKBA
,R0
,WAS IT CLEARED?
TST
BEQ
; YES, BRANCH
11
NOV
I GET AORES or RKBA
R0"REG0
MOV
,NO, GET RKBA
.R0,.REGI
10
,RKBA COULD NOT BE CLEARED
ERROR
1$1

177773
003752

001110
211

Rt

CLP
MOV
HOV
MOV

'-S,R5
.2S"LPERR
Rl,IR0

MOV
CMP

_R0,R2
Rl.R2

1 INITIALIZE COUNT PATTERN

,WRITE THE PATTEPN IN THE
,REGISTER
J WAS IT WRI ITEN CORRRECTLY?

IlAINOEC-11-DZRICJ-D
MACHI 27( 1006) 04-0cr-76 13108 PAGE 20
OZRICJD. Pll
3~-AUG-76 14149
TIS
CHECK RICU WITH A COUNT PATTERN
998
9C19
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
10t2
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
10211
1029
1030
1031
1032
1033
1014
1035
1036

1037
t038
1039
1040
1041
1042
1043
1044
1045
1046

1841
1848
1049

1050
105t
1052
1053

SEQ 0032

,GET WORD THAT WAS RECVD
I DID NOT READ BACK THE PATTERN THAT
I WAS WRITTEN INTO THE REGISTER

003760
003762
003766
"03772

001407
010U7
01 t037
10.013

003774
003776
004000
"04002

005205
001402
005201
001163

004004
004006
004012
004016
004022

000004
005077
012700
013701
012737

004038
004032
"04034
004036
004040
004044
004050

010011
011102
020"02
001405
,,10037
010237
104015

004052
004054

006300
001365

004056
004060
004066
004072
084076
004100
004102
004104
004110
084114

000""4
012737
01]700
012710
0"5010
805710
001405
U0037
111110]7
184010

804116
884128
1184124
00U32
8"4134

"850"1
11112705
812737
010118

"11""2

01'" 162
001164

3 ..

,
175236
000001
001256
004030

001111/J

001162
001164

BEO

]I

MOV

MOV
ERROR

Rt t.REG0
'R0,'RI!:Gt
13

INC
BEQ
tNC
BHE

R5
TST16
Rl
2S

iYES, BRANCH
, GET EXPECTED MORO
,GET WORD THAT WAS RECVO
I DID NOT READ BACK THE PATTERN THAT
,WAS WRITTEN INTO THE REGISTER
, ,EXIT
'INCREMENT COUNT PATTERN
I LUP BAK , WRITE NXT PATTERN IF NOT
J DO"'E WITH ALL

I '***************************************************************
I*TEST 16
CHECK THAT RICO A CAN BE SET
,*THIS TEST FLOATS A '1' THROUGH RKDA AND CHECU THAT THE WORD WHICH WAS
,*WRITTEN IS READ BACK CORRECTLY
I ,***************************************************************
TST161 SCOPE
CLR
IRKCS
ICLEAR RKCS
MOV
.1,Re
,INITIALIZE R0 rOR BIT TO BE WRITTEN IN RICOA
HOV
RKDA,Rl
,SET UP RETURN ADRES
HOV
'U,eLPERR
I rOR LUPING ON EROR
R0,IIRI
;WRITE THAT BIT IN RKDA
MOV
181
NOV,
IIR1,R2
R0,R2
,WAS IT WRITTEN CORRECTLY
CMf
BEQ
; YES, BRANCH
U
,NO, GET EXPCTO RKD! (Bn WRITTEN)
MOV
Re,'REGe
MOV
R2,IREGI
IGET RKDA (BIT READ BACK)
,010 NOT READ BACt( THE BIT TH~T
ERROR
15
,WAS WRITTEN IN RKDA
,SHIF"l' R0, TOWRITE NXT BIT
R0
2 ..
ASL
,IF' ALL BITS ARE NOT CHKD, LOOP
BNE
Ie
,BACK' WRlTE NXT BIT

,

000818
081256
177777

"01206

001162
e01164

177773
004132

, '***************************************************************
,nEST 17
CHECK RKDA WITH A COUNT PATTERN
,*THIS TEST CHECU THAT RKDA ClAN BE CLEARED, THEN A COUNT PATTERN
,*FROM iii TO 177777 IS WRITTEN AND CHECKED. R1 CONTAINS THE COUNT
,*PATTERN TO BE WRITTEN
, '***************************************************************
TST17. SCOPE
MOV
f10,nIMES
"DO 10 ITERATIONS
RKDA,RII
MOV
, SET ~LL BITS IN RKDA
MOV
U77777"Re
,CLEAR RKOA
CLR
'R0
, liAS IT CLEARED?
TS'1'
'Re
BEQ
,ns. BRANCH
11
,GET ADRES OF RKOA
MOV
R""REG"
,GO, GET RKOA
MOY
'1t8,IREGt
,RKDA COULD NOT BE CLEARED
ERROR
18

1"
001110

211

CLR
MOV
MOV
MOV
MOV

Rl
'-5,R!!
12"'LPERR
RI"R"
tR0,R2

,INITIALIZE COUNT PATTERN
. ,WRITE THE PATTERN IN THE REGISTER

SEQ 01133

MAINDEC-l1-DZRKJ-D
MACYll 27(1006)
04-0CT-76 131'" PAGE 2t
DZRKJD.Pl1
10-1UG-76 14148
T17
CHECK RKDA WITH A COUNT PATTERN
1054
HISS
U56
111157
1058
1059
1060
1061
lI1J62

lIiI63
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076

110;7
1078
1079
1080
1081
1082
10U
1084
1085
1086
1087
1088
1089
ta90
1091

004136
004140
004142
004146
004152

029102
991497
8101]7
010237
104015

004154
004156
004160
004162

905205
001402
005201
001363

001162
901164

INC
BEQ

lSi

HOC
BNE

RI,A:!

3t
Rl, ,REG0
R2,.REGl
15
R5
TST20
Ri

2.

,WAS
,YES,
IGET
,GET
1010
,WAS

nEXIT
I INCREMENT COUNT PATTERN
,LUP BAK , WRITE NXT PATTERN IF NOT
,DONE WITII ALL

004164
004166
004172
004114
004200
004202
S34206
004210
"04212
004214
004216
004220
004224
0042]0

000004
91]790
010002
012701
010103
012720
005201
001314
000005
005712
001405
010237
011237
104017

004232
004234
004236

1105722
005203
001366

001252
177775
177777

001162
001164

004240
004242
004246
004252
004254
004254
004260
004264
004266
004270
004272
004274
004276
004300

000004
012746
012746
00111002
013700
012710
f!l05210
005005
105710
100405
005205
001374
004737

000340
004254
09.11250
007560

005424

IUEST 20
CHECK THAT RKWC,RKBA,RKDA CAN 8E CLEARED 8Y RESET
,*TIIIS TEST CHECKS THAT RKWC, RKBA AND RKOA CAN BE CLEARED BY 8US INIT,
,*REUT INSTRUCTION IS USED
, ,*****.*****************************************.***************
TST201
SCOPE;
MOV
RKWC,R0
: INITIALIZE R0 TO PRINT TO FlKWC
R0,R2
MOV
: SET UP COUNT FOR 3 REGISTERS TO BE CHKO
MOV
Rl
Rt,Rl
MOV
U 77177, (R0) +
,SET ALL BITS IN RllDf:C-ll-DZRKJ-D
MACYll 27(1006)
04-0CT-76
13108
PTtGE 26
DZRKJD. Ptl
30-AUG-76 14: 48
T24
CflECK THAT HI & LO BYTES OF RKloIC, SA, OA CAN BE ADDRESSED
1334
1335
1336

1337
IH8
13)9
1340
1341
1142
1343
1344
1345
1346

1147
IHf3
1349
1350
1351

13';2
1353
1354
1355
IJ';6
13'57
13513
1359
1360
1361
1362
n63
1364
1365
1366
1167
1368
1369
1370
1371
1372

005132
005136
005142
005144

017701
022701
0014teJ
010237

005150
005156
005162

012737
310137
104016

007776
001166

005164
005173
ij05174

012700
013701
1:120102

177772
001252

005176
005200
01ilS202
005206
005210
005214
1'l05216
l:l1il5222
005224
(il0S230
1:1052]2

001433
010105
042705
011503
032701
001003
042703
000402
042703
001016
(il10231

005236

010137

001164

01:15242

012737

000377

005250
005254
005256
005260
005264

032101
001401
000303
010337
lI'l402 1

01:10001

5St

174112
007171:0
1:1.,1162
001164

6S:
76 :

000031
177401il
9$ :
9$:

000377
001162

001170

001166

128 :

~RKCS,Rl

MOV
CMP
FlEQ
MOV

"776,Rl
6$
R2,$PEG0

MOV
MOV
ERflOR

17776,$Rf.Gl
Rl, SREG2
16

MOV
MOV
CMP

#-6, R0
RKWC,Rl
Rl.R2

BEQ
MOV
r;IC
MOV
BIT
8NE
SIC
BR
BIC
8Nf:
MOV

10$
R1,R5
I1,R5
IiIR5,R3
f1,Rl

MOV

Rl,SREGI

8$

#177430,R3
9$
#377,R3
10$
R2,2REG0

MOV

077, SREG2

BIT
BEQ
SWAB
MOV
ERROR

I1,Rl
128

1388
1389

;WAS RKeS ERRONEOUSLY CI,RD?
:1'10, BRANCH
;GET ADRES OF REG-BYTE THAT WAS
:TRIEO TO B ADRESEO & CLEARED.
; GET EXPCTD RKCS
;GET RICes RECVD
: ALL RKll REGISTRS WERE LOADED WITH 1" S
;TRIED TO AORES & CLR 'REGIS-BYTE' (IN ER MSGE)
;RKCS GOT CHANGED AS Tt RESULT.
'(RKCS)EXP'
:CONTAINS EXPCTD RKCS.
'RKCS (RECVD)' CONTAPIS
, R«CS RECVD.
:SET COUNT FOR BYTES
:INITIALIZE PTR TO RKWC
: WAS THE CLEARED BYTE (PTO TO BY R2)
~SAME AS BYTE TO BE eHKD (PTD TO BY Rl)?
;IF YES, 00 NOT CHK THIS BYTE
:STRIP WORD ADDRESS FROM BYTE ADDRS
; IS TI'IE BYTE TO B CHKO LO OR HI BYTE!
:HI BYTE-BRANCH
;MASK HI BYTE
: MASK LO BYTE
,GET lDRtS OF REG-BYTE THlT WAS
;TRIED TO B TtORESED & CLEARED
;GET ADRS OF REG-BYTE THAT GOT
I ADRESED INSTEAD
: GET EXPCTD CONTENTS OF REG-BYTE
~ THAT GOT lDRESED

113
R3,$REGl
21

~GET

CONTENTS RECVD FOR THAT REG-BYTE
REGISTRS WERE LOADED WITH 1'05.
, CLR 'REG-BYT1' (IN ER MSGE)
CHANGD AS A RESULT.
~'BYT2-EXPCT' (IN ER MSGE) IS THE EXPCTD CONTENTS
:OF REG-BYT2.
'BYT2-RECVD' IS THE CONTENTS RECVD.
~ INCREMENT PTR TO NXT REG BYTE
; ALL BYTES CHKD1
:NO, LOOP BACK
: I "ICREfoIENT PTR TO NXT REG BYTE TO B CLRD
; ALL BYTES CLRD1
,LOOP BACK
~ ALL RKll

~TRIED TO AD RES
~'REG-BYT2' GOT

1373
1174
1375
1376
1377
1378
1379
1380
1381
1392
1393
1384
1395
1386
1387

SEQ 0038

WITH l"S.
RKCS
BYTE (ADRES UNDER "BYTE' IN ER
MSGE) WAS AORESED
USlpjG 'CLRB', BUT REGISTER (ADRES
UNDER 'REGIS' IN
ER t-ISG) GOT CHANGED AS A RESULT.

005266
00527(il
005272
0(il5274
005276
005300

005201
005200
01'11340
005202
005204
001253

1081

.SBTTL

INC
INC
BNE
INC
INC
BNE

III
R0
7$
R2
R4

IS

END OF PASS ROUTINE

: , •••••••••••• *.* ••••• * •• * ••••••••• **.* ••• * •••• ** ••• * ••••••••••••
:*INCPE"IENT THE PUS NUMBER (SPASS)
:*INDICATE END-OF-PROGRAM AFTER 1 PASSES THRU THE PROGRAM

SEQ 0039

MUNDEC-U -DZRKJ-D
MACYII 2H UHll6)
. . -oeT-76 13 11111 PAGE 27
10-AUC-76 14148
END or PASS FlOUTINE
DZII!l:JD. PI 1

nxxxx"

,*TYPE "END PASS
(IlHEFlE
,*Ir 1'HI!:RES A MONlTOFl CO TO IT
I*Ir THEFIF. ISN'T JUMP TO STlRTl

1)90
1391
1392
1391

1394
1395
1396

1397
\398
tl99
1400
1401
1482
1403

\48'
140S
1406

\407
140B

1409
14U
140

\412
1413
1414
1415
1416
1417
1418

1419
1420
1421
1422
1423
1424
142S

005302
005302
005304
t'l0S310
1105314
005320
005326
~05330

005312
005334
0053)6
005340
1'105342
00!5146
005352
005354
005160
1'105364
005366
1'105170
005]72
005374
005]76
805400
005401'1
1'105402
005404
005407
005414
005422

SEQ 0040

xx XXX

IS A DECIMAL. NUMBER)

SEOPI
"08004
805037

001102

805037

801216

'05237
042737
805127
00001111
Gl03022
012737
000001
005330
104401
013746

00110'
100001'1

0"

SCOPE
CLF!
CLPI
INC
100

005407
001 UJe

11'I44~5

104401
011700
001405
000005

005404
000042

004710
"'80240
'00248
000240
1'10''1]7
002UI0
177
1'115
050041'1
000043

377
0424\ 2
051501

81'.10
042116
020123

BIC
D1!:C
1E0PCTI .WOFID
BCT
MOV
.ENDCTI .WORO
nOPCT
TYPE
MOV
TYPDS
TYPE
.GETUI MOV
BEQ
RESET
UNDADI JSR
NOP
NOP
NOP
SDOACNI
JMP
SF!TNADI ."ORO
.tNULL, .BYTE
SENOMGI .ASCIZ

nSTNM
*TIMES
SPASS
U001!100,tpUI

(pelt
1
.SOOAr.N
(PC It, II (PC It

, ,ZERO THE TEST MUMBER
" ZEF!O THE NUM8ER 0 .. ITEUTIONS
I,INCREMENT THE PASS 1il/'48ER
J ,DON'T ALLOII l NEG • • UIlBEFI
"LOOli'?
"YES
: I RESTORE COUNTER

1
,UND!IIG
'PlSS,-(SP)
,S[NULL
UU,RII
$OOACN
PC, (flO)

, ,TYPE "END PAsa ••
I,SAVE SPASS rOR TYPEOUT
"GO TYPE--OEClMaL ASCII III11'H SIGN
I,TYPE A NULL CHUACTt:PI
,.CET MONITOR ADDRESS
:, BRANCH Ir NO '40NITOR
I,CLEAR THE WORLO
, ,GO TO MONITOR
, ,lAVE 1I00M
• ,rOFl
" ACT11

'(PC).
I,FlETUIIN
START 1
-1,-1,0
"NULL CHAFllCTE~ STRINCO
<15><12>/F.ND PASS

.1

1426
1427
142B

1429
1410
1411

.SIlTTL

GTlFlGI

FlOUTINE rOF! CETTINC IIKCS, FlltEP, PtKOS

1432
ICT3RG
:SUAROUTINE rOFi TRlNSrERFlINC TNE CONTENTS or RKCS, RIC!:R, PtltDS
:TO tREGO, 'REG1, SFlEG2 RESPECTIVELY IIIErOPtE TYPING OUT AN
,ERF!OFI MEsaaCE.
,CALL'
JSFI
PC,CT3RG

1413
1414
1415

1416
1437
1418

1419
144~

1441

1442

00'5424
005432
005440
005446

017717
017717
0177]7
000207

17362111

0iJ1162

1736HI

Ill'll " 4

171b80

001166

CTlRCI

NOV
MOV
MOV
IITS

,RltCS,IPEG8
'RKEFI,IREGI
IIRKDS,SREC2
PC

,GET IIKCS
:GET RKER
,GET RltDS
,EXIT P'ROM THIS SUIIROU1'INt

1443

1444
1445

MA INDEC-l1-DZRKJ-D
MACHI 27C 1086)
04-0CT-76
13: 08 PAGt 2.
OZRKJD.PII
10-aUG-76 14:48
GU/lC:
IIOUTINE FOR GETTING FlKCS, RitER, RK05
1446

.S8TTL

1447

GTUG:

SEQ 0041

ROUT!NE 1"0/1 GETTl!!G FiKes. lI!I'tFi. 'K"5, IIKOA

1448

1449
14514
1451

1452
1453
1454

1455
14'16
1457

005450
0",5454
005462

004737
017737
00""'117

005424
17357':'

111//\170

IGT4RG
: SUBROUTINE rOR TRANSFERFllNG CO!lTENTS Of' F!KCS, I!KER, "'IS
:RKDA TO SREC8, ,REG1, IIIEG2, .REGl PESPECTIYELY 8E~~~
: TYPING OUT AN EFlROFI MESSAGE.
:CALLI
JSFI
PC.GT4I1C
GT4FlG:
JSR
PC, CTlRC
MOY
'/IKOA ,UEG3
PTS
PC

1458
14'59

• S8TTL

1460
1461
1462
1463
1464
1465

1466
1467
1468
1469
147111

1471
1472
1473

11105464
005472

O17637
062716

1474

005416
0.5502
111115504

O05337
01111375
000002

1475
1476
1477
1478
1479
1480
1481

......

DELaY:

TIME "r;LoU ROUTINE

:DELAY
:THIS ROUTINE PROYlDES A VUU8LE TI"E DELl!. THt CALL roP. TMUI
: ROUTINE IS AN ENCODED 'TFlAP' INSTRUCTION.
:ClLL:
OI':LlY
pN
II IS ANY OCTAL NO. '-'0" 1 TO 177777
:THE DELAY PFlOYIOED IS 7.5N US (CONVEP.T N TO DECIMAL) FOIt 11128
:1.514 IJS FOFl 11/45
I I f THE USER UNTS TO CHANCE THE DELAY TIME (EXMP I '""TER DELAY TO
,GtT A TICHTEFI SCOPE LOOP) Tit! VARUBLE 'N' rOLLOWING 'DELAY' SKOULD
:BE CHANGED TO sun THE INDIVIDUAL NuD.
.,1264

011"0112

DELA. YI MOV
ADO

01111264

lS'

'UP), TIMER
'2, CSP)

DEC
BNE
FlTI

TIMER

.SBTTL

CON.RESETI

:CET 'A!40UNT' (N) FOil WHICH
:DELAY IS TO 8E PIIOVI&E"
,ADJUST STACK POINTER TO SKIP OVEII
,COUNT DOWN TO 0

'N'

is
,RETUFIN TO MAIN PPOGRAM

CONTROL REST ROUTln

14112

UU

lt14
1485
1486

1487
1488

1489
149.

1491

,CON.FlUET
""IS flOUTINE USUES. " C:ONTFIOL !lEaET AND WUTS 'OR
'THE 'CNTRL IIOY' rLAC TO SET.
WKEN THt rLAC SETS
,AN EXIT II MADE OUT or THE IIOUTINE.
I; 'CnRL-II'OY'
,DOES NOT SET WITHIN 1 CERUlli liME AN !I!ROR MtNUI:
,
CNT PDY 01011'1' StT
,
PC-XXXXXI FlICCS-YYYYYY
'IIi CIVEN. IIOTE THAT xxnlX IS THE PC WHERE 'CMT.RESET' Gil 'CMT.flDY'
,rs CALLED.

1492
1493

,CALLI

CNf.IIESE!

1494

1495
1496

1497
1498

.SBnt.

CNT.ROYI

IIUT rOil CONTFIOL REA'"

ROUtINE

1499
151//0
151'11

'CN.RDY
'THIS ROUTINE WUTI rOil THE cOllnot. READY lilT TO SET AIID WHEN IT

MAtNDF.C-l \-DIRI<12>/P~=1

641:
MOV
SUB
TYPOC

000002

0~5612

; 167.:
66S I

005622
"1'15622
005626

01774&
1I!l4402

005630

000002

TypF
BR
.Ascn
MOV
TYPOC

173422

(Sp),-CSP)

.2, (SP)
,67$

66S
I RKCSsl
(lRKCS,-CSP)

;GET RKCS
:GO TYPE IT
; PETURN FROM THIS
:ROUTINE TO THE MUN
;pROGRAM

RTI

ISH
15'5
1516
15n
1',,8
1 '539
1540

:GO TYPE PC IN THE MAIN PROGRAI'l,
I WHERE £R!'IO!'l OCC!.l~Pe:o
; :TYPE ASCll ST~ING
: I GET OVER THE Ascn

: THIS PART OP' THE PROGRAM CONTUNS THE COMMON ROUTINES CALLED
: F'ROM THE SYS"'AC. SML pACKIIGE

1541
.SRTTL

1542
1543
1544
1'545
1'546
\547

SCOPE HANDLER ROUTINE

I 1** *** ************************ **********************************
;*THIS ROUTINF. CONTROLS THE LOOPING OF SUBTESTS. IT WILL INCREMENT
;*AND LOAD THE TEST NUMB£RC$TST:
I*THE SWITCH OPTIONS PROVIDED RY THIS ROUTINE AREI
;*SW14:z1
LOOP ON TEST
:*S"I1=1
INHIBIT ITE~ATlONS
: *SWIIl9= 1
LOOP ON ERROR
:*SW08=1
LOOP ON TEST IN SWR<710>
:*CALL
: ,SCOPE=IOT
SCOPE

I'HA
1549
1550
1551
1552
1553
1554
1555
1556

11~5632

1557

005632

$SCOP£:

1 ~4 407

CKSWR

;: TEST

FOR CHANGE IN SOft-SWR

MAINOEC-ll.0ZIlKJ.O
MIICYII 27(11006)
04-0:::T-76
13:08 PAGE 311
DZRf".JO.Pt t
~II-AUG-76 14148
SCOPE HANDLER ROUTlIlE
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567

1568
1%9
157.,
1571
1572
1573
1574
1575
1576
1577
1578
1579
15A0
1'581
1582
1583

15A4
15A5
1586
1597
1588
15R9
1590
1591
15q2
t!iq3
1594
1595
15q6
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610

1611
1612
1613

005634
005642

173276

1132777
00111 t

0<15644

0"0416

005646
005652
00'5660
005664
00'5670
005672
005674
01/15700
005702
005702
005710
005712
005720
005722
005726
005710
1'l05736
00574111
005746
005750
005756
005760
005764
005770
005772
006{J00
006002
006006
006010
006014
006022
1'l06024
006012
006040
006044
006111'50
006054
"06060
"06066
006074
006100
"06102

013746
A12737
A05737
012637
0"0463
022626
012637
A0A4:n
032777
001404
127737
001462
105737
001421
123737
101015
",32777
001404
913737
000443
135037
0"5037
A00415
1'132777
001011
0057)7
001406
"05237
1123737
01i1202 I
1112737
013737
105237
911617
011637
005037
112737
013777
All7'6
00AA02
300"50

000004
005672
177060
001'1004

0<10004

A00004

000400

173230

173222

001102

01!1110)
001115

001103

00\000

173172

0~1110

0131106

0"110)
1"01206
004000

173140

001100
001104
001206
000001
006102
001102
001106
001110
001210
000"01
001102
00112'6

001104
001104
001206

001115
173046

BIT
'BITI4·,taS ... R
: ,LOOP ON PRESENT TEST?
RNE
SOVER
; :YES IF' 5,.,4=1
;HIII.START OF CODE FOR THE XOR TESTFR . . . . .
SXTSTR: 81'1
6$
::IF RUNNING ON THE "XOR" TESTER CHANGE
: I THIS INSTRUCTION TO A • 'lOP" (NOP"'240)
: I SAVE THE CONTF.NTS OF THE ERROR VECTOR
MOV
llIERRVEC, - (SP)
MOV
IISET FOR TI~E:(lUT
'5$,UERRVEC
nTlME OUT ON XOR?
TST
IIU77"60
CSP)+,I!U£RRVEC
: I RESTORE THE ERROR VECTOR
!lOV
; ,GO TO THE NEXT TEST
SSVLAD
BR
(51')+, (SP)+
: JCLE~R THE STACI< AF'TER A TIME OI)T
5$:
CMP
MOV
(SP)+,IlIERRVEC
, I RgSTORE THE ERROR VECTOR
7$
: ; LOOP ON THE PRESENT TEST
BR
6$11 . . . UEND OF' CODe: F'OR THE XOR TESTERU'"
t8IT08, !iSIliR
I ,LOOP ON SPEC. TEST?
SIT
2,
B£Q
" SR IF NO
SWR<710>
C"IpB
IISWR, STSTNM
; ION THF. RIGHT TEST?
BEQ
:,RR IF YES
'OVER
SF.RFLG
25 :
TST8
: I HAS AN ERROR OCCURRED?
3$
BF.Q
::BR IF' NO
SERIolAX,SERF'loG
CMP8
: I MAX. ERRORS FOR THIS TEST OCCURRED?
BHI
;ISR IF' NO
3S
; ,LOOP ON ERROR?
BIT
.BIT09,~SWR
;;BR IF NO
BEQ
48
7$:
MOV
SLpERR, SLPADR
; I SET LOOP ADDRESS TO LAST SCOPE
E'R
SOVER
4$ :
SERF'LG
II IERO THE ERROR F'LAG
CLRB
STINES
: I CLEAR THE NUMBER OF' ITERATIONS TO MAKE
CLR
BR
: IESCAPE TO THE NEXT TEST
U
3$1
: I INHIBIT 1 TERATlONS?
BIT
'SITl1,IlSWR
BNE
IISR IF YES
IS
:, IF' FIRST PASS OF' PROGRAM
TST
SPASS
BEQ
1$
: I
INHIBIT ITERATIONS
; s INCREMENT ITERATION COUNT
INC
SICHT
n CHECK THE NUMBER OF ITERATIONS MADE
CMP
STIMES, SICNT
SOVER
: I BR IF' MORE ITERATION REQUIRED
BGE
MOV
:IREINITIALIZE THE ITERATION COUNTER
111
'"stCNT
; ISET NUMBER OF' ITERATIONS TO DO
NOV
SMXCNT, STIMES
STSTNM
SSVLADI INce
; I COUNT TEST NUMBERS
MOV
CSP)'$LPADR
; ,SAVE SCOPE LOOP ADDRESS
[51'), SLpERR
MOV
If SAVE ERROR LOOP ADDRESS
S ,CLEAR THE ESCAPE FROM ERROR ADDRESS
CLR
IESCAPE
n ONLY ALLOw ONEC 1) ERROR ON NEXT TEST
MOVB
I1,URMAX
SOVERI
MOV
nSTNM, ~DISPLAY : I DISPLAY TEST NUMBER
$LPADR, (SP)
; ,FUDGE RETURN ADDRESS
MOV
RTI
"FIXES PS
;IM~X. NUMBER OF IT£RATIONS
SMXCNTI 50
1$:

I '***********************************************************************
.SBTTL
;*511115-1
,*5W13-1
s*SWll".'

ERROR HANDLER ROUTINE
HALT ON EPROR
INHIBIT ERIIOR TYPEOUTS
BELL ON ERROI\

SEQ 0043

MAl!lOEC-l 1 -OZRKJ-O
la-AUG-711
DZRKJO.Pll
1614
1615
1616
1617
16,8
1619
1629
1621
1622
1623
1624
1625
1626
1627
1628
1629
163"
1631
1632
16]3
1614
1635
1636
1637
1638
1619
1649
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1669
1661
1662
1663
1664
1665
1666
1667
1668
1669

M~CYlt

e4-0CT-76
Il1e8
PAGE 11
ERROR HANDLER ROUTINE

SEQ 01'144

,.S\II99-1
t.OOP ON ERROR
,.81112-1
CYCLE ON ERROR TO PREVIOUS 'SCOPE'
, .GO TO IERRTYP ON ERROR
096194
996106
906112
1'196114
006122
O06126
006132
096140
096146
096154
096156
"96162
"o6166
"96172
0"6174
006176
09621'19
0"6296
906210
906214
096222
096224
1'196230
1'196234
906236
006242

194497
105237
91'11775
IH 3777
995217
911637
162737
117737
O32777
01'1101114
094737
11'1440'
995777
11'1"002
"01'11'19"
11'144"7
1'132777
09141112
913716
032777
0'H4A2
91]716
905737
901402
913716
800902

091193
99111112
9911 12
001116
090902
172752
92"0""

173021il

"01116
091tl4
172764

91'16244
1'101213
172146

Iille000

172732

091106
1'101099

172716

901110
001219
091210

IERROR. CKSWR
7$1
INCB
8EQ
MOV
181
INC
MOV
SUB
MOVS
BIT
'8HE
JSR
TYPE
TST
2S1
BPI..
HALT
CKSWR
3$1
BIT
BEQ
MOV
BIT
BEQ
MOV
4$1
TST
BEQ
NOV
581
PTl

'CHECK FOR SOFTWARE SWITCH ENTRY REQUEST
,SET THE ERROR FLAG
'DON'T t.ET THE FUG GO TO ZERO
IDISPl.AY TEST NUMBER AND ERROR ft.AG
,COUNT THE HUMBER or ERROPS
,GET ADDRESS OF ERROR INSTRUCTION

SERFLG

7S
STSTNM, (lDISPLAY
SERTTL
CSP),SERRPC
fl, IERRPC
tllSERPPC, UTEMS
ISwt),tIISWR
2.
PC,tIIUERRTYP
"CRLF
IlSWR

, STRIP AND SAVE THE ERROR ITEM CODE
,SKIP TYPEOUT rr SET
,SKIP TYPEOUTS
,GO TO USER ERROR ROUTINE
, HALT ON ERROR
ISKIP IF CONTINUE
,HALT ON ERPOR I
, CHECK FOR SOFTWARE SWITCH ENTRY REQUEST
,Sw 12 SF.T?
INO, BRANCH
,ADJUST RETURN ADRES FOR Sitl12
,LOOP ON ERROR SWITCH SET?
'~R IF NO
,FUDGE RF-TURN FOR LOOPING
I CHECK FOR AN ESCAPE ADDRESS
,BR IF NONE
,FUDGF. RETURN ADDRESS FOR ESCAPE
,RETUIlN

3S
,SW12,f!lSWR
.+6
ILPAoR, CSP)
.SW09,f!lSWR
4$

.LPERR, CSP)
$ESCAPE
5.
'ESCAPE, CSP)

..... ...................................--_.-.-... .-._--....
ERROR MESSAGE TYPEOUT ROUTINE

.SBTTL

,,

__

_

1-THIS ROUTIN! USES THE. -ITEM CONTROL BYTE" ($ITEMB) TO nETERMINE WIIICH
,.ERROR IS TO BE REPORTED. IT THEN 08TAINS, FROM THE "ERROR TABLF" (SERRTR),
,*,ND REPORTS THE APPROPRIATE INf"ORI4ATION CONCERNING THE ERROR.

SERRTYPI

996244
996244
096250
096252
096254
996269

104491
019046
095909
153799
111011'194

006262

1"3746

906266
006271'1
996272
006274
096276
00631'19
096392
096306
096312

194492
909426
005309
906109
006)09
1'196390
06279~

A12037
1il0141'14

091213

TyPE

1il911 14

CLR
8ISB
BNE

, SCRLF
RA,-CSP)
R9
f!lUITEM8,R0
IS

901116

MOV

SERRPC, - (SP)

TYPOC
IIR
DEC
ASL
ASL
ASL
ADD
"'OV
IIEQ

6.
R0
R0
R0
R9
UERRTII,R0
(R9)+,28

~OV

1$1

1'101272
096316

NAINoEC-ll-DZRI(J-o
ruCru
10-AUG-76 14.48
oZRKJo.Pll
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
16U
1682
1683
1684
1685
16116
1681
1688
1699
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1799
1791
1792
1703
1794
1795
1706
1797
1709
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725

27(1096)

14.49

996314
9116316
006320
906124
096330
11116332
9116334
906336
006342
0"6344
006346
006350
906354
9116356
006156
1106169
906362
906364
906366
906372
006374

194401
909000
104491
0120)7
00t404
104401
11111111100
t04491
011000
901904
912600
104491
000207

27(1006)

:, IF ITEM NUIIBER IS ZERO, JUST
, ,'I'YPE THE PC OF THE FRROR
1 :SAVE SERRPC FOR TYPEOUT
: 'ERROR ADDRESS
: ,GO TYPE--OCTAL ASCIHALL DIGITS)
"GET OUT
: : ADJUST THE INDEX SO THAT IT WILL
WORI< FOR THE ERROR TABLE

"

:, FORM TABLE POINTER
: 1PICKUP "ERROR MESSAGE" POINTER
1,SKIP TYPEOUT IF NO POINTF.R

13198
04-0CT-76
PAGE 12
EPROR MESSAGE TYPEOUT ROUTINE

21:
001213
1106334

l8

:, "CARRIAGE RETURN" " "LINE FEED"
:,SAVE R9
1 :PICKUP THE ITEM INDF.X

3S1

4*'
01H213
5 ..
6$1
0012t3

TYPF.
.1II0Ro
TYPE
MOV
BEO
TYPE
.wORD
TYPE
MOV
BNE
MaV
TYPE
RTS

9
,SCRLf'
(R9)+,4$

5$
0
, SCRLF
(R9)'RIil

,.

(SP)+,R9
,SCRLF
PC

SEQ "'11145
: I TYPE THE "ERROR MY-SSAGE"
:, "ERROR T>!ESS~Gf:- POINTER GOES HEPE
1'"CAPIlIAGE Rf:TURN" , "LINE FEED"
"PICKUP "DATA HEADER" POINTER
; ,SKIP TYPEOUT If' 0
, ,TYPE THE "DATA HEADER"
:, "DATA HEADER" POINTER GOES HERE
l ' ·CARRIAGE RETURN" , "LINE rEED"
"PICKUP "DATA TABLE" POINTER
"GO TYPE THE oUA
: ,PESTORE R0
" -CARRIAGE RETURN" , "LINE FEED"
: ,RETURN

7$1
01 )046
1114492
9957111
001770
tl'l4401
900771
1120040
006400

906374

U,

00'"

.S8TTL

MOV
TYPOC
TST
BEQ
TYPE
BR
.ASCIZ
.EVEN

III CR9) +, - CSP)
(R9)

U

,91
7S
I

,ISAVE II(R9)+ FOR TYPEOUT
J ,GO TYPE--OCTAL ASCIUALL DIGITS)
illS THERE ANOTHER NUMBER?
"BR IF NO
,: TYPE TWO (2) SPACES
, ,l.OOP
"TWO(2) SPACES

TTY JNPUT ROUTINE

, , •••••••••••••••••••••••••••••••••••••••• -•••••••• -••• -••••• *•• -

..................•..................................... ..-...

.E"ABL

"
006400
9116406
006410
906414
096416
906422
9"6426
006432
006414
00U42

022737
001074
195777
1000'1
117746
041716
022726
1'1111062
123727
891456

00111176

886444
006458
986454
88646"
896462
986466
006470
006472
91116476

104401
184491
813746
104402
194491
1118511146
005946
195777
10111]75

907125
8071]2
088176

111065111"
0111651J4

117746
842716

172442
17760111

091140

172524
177690
890097

907143

172446

_

,*sorTWARE SWITCH REGISTER CHANGE ROUTI.,r..
I.ROUTINE IS ENTERED FROM THE TRAP HANDLER, AND IIILL
I.SERVICE THE TEST FOR CHANGE I'f SOFTW~RE SWITCH REGISTER TRAP CALL
,.IIHEN OPERATING IN TTY FLAG MODE.
.CKSWR. CMP
UIIREG,SIIR
,JIS THE SOFT-SWR SELECTED?
8NE
15S
" BRANCH If" NO
T8TB
11CHAR THERE?
15.
nIF NO, DON'T NAIT AROUND
8PL
MOV8
uSAVE THE CHAR
"TK8,-CSP)
'·CI77,CSP)
"STRIP-OFF THE ASCII
BIC
17, CSPH
CMP
" IS IT A CONTFIOL G?
, ,NO, RETURN TO USER
SNE
15'
CMPB
UUT08,11
"J.RE WE RUNNING IN AUTO-MODE?
IItQ
15S
I,BRANCH IF YES

.nltS

172510

91111134

LSB

0099111

TYPE
SGUIIRt TYPE
MOV
TYPOC
TYPE
1981
CLR
CLR
TSf!
7$'
8PL
MOV8
fllC

"CffTL~

7t

UECRD THE CONTROL-G C-G)
, , TYPE CURRENT CONTENTS
"SAVE SWREG rOR TYPEOUT
"GO TYPE--OCTAl. ASCII (ALL DIGITS)
, I PROMPT rOR NEW SflR
"CLEAR COUNTER
J ,THE NEW SWR
,iCHAR THERE?
,J Ir NOT TRY AGAIN

IUKB,-CSP)
'-c177'(SP)

" PICK UP CHAR
,,~u!: IT '-BIT ASCII

,'MSIIR
SWREG, - (SP)
"MNEII
-(SP)
-UP)
UTICS

04-0CT .. 76
13 :98
MACYll 27(006)
MAINDEC-l1-DZRKJ-D
3e·AUG~76 14148
TTY INPUT ROUTINE
DZRKJD.pll
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1147
1148
t 749
17~0

1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
t 772
1773
1774
1715
1776
1777
1778
1779
1780
1781

9S1

006510
086514
006516
006522
096526

821627
8111805
104481
862786
008757

81tl0025
007120
0811006

20$:

096530
086534
086536
006542
006544
006552
006556
0116562
006579
006572
006000
006602
006696
006612
006614
006020
006622
1'106626
006632
0066)4
1'106636
1'106640
1'106642
01'16646
006652
996654
006660

021627
001022
005766
991403
016677
0627116
104401
123727
001001
012777
000002
004737
921627
!-""242111
021627
003015
A42726
005766
00t 403
006316
01'16316
006316
01'15266
1'156616
00A707
104491
0A072A

800815

10$1

000004
808002
000006
91:11213
001135

172366
090001

000100

172344

118:
1481

15S1
16$ :

007324
900060

CMp
BNE
T'fPE
ADD
BR
CMp
BNE
TqT
BEQ
MOV
ADD
TYPE
CMPB
BNE
MOV
RTJ
JSR
CMP

BLT
0001tl67
000060
o 1'1 0 Iill'l 2

0"'001'12
177776

17S1

001212

18$:

CMp
RGT
BIC
T5T
BEQ
ASL
ASL
ASL
INC

815

.DSABL

BR
TYPE
SR
LSB

1824
1825
1826
1827
1828
1829
1830
1811
1832
1833
1834
1835
1836
1837

SEQ 0046

(SP),t25

; IS IT A CONTROL-U?
; BRA>JCH If' NOT
,YES, ECHO CONTROL-U (-U)
; IGNORE PREVIOUS INPUT
ILET'S TRY IT AGAIN

Us
,SCNTLU
'6, SP
19$
(SP),115
16$
4(SP)
1U
2(SP),(\ISWR
'6,SP
,SCRLF
SINTlIG,U
15S
1100,(\I$TKS
PC,STYPEC
(SP) ,.60
U!I
(SP), .67
18S
.&A, (51')+
2(SP)
17S
(SP)
(SP)
(SP)
2(SP)
-2(Sp),(SP)
7.
,.QUES
21'1$

: ,IS IT A ?
I; BRANCH IF NO
; ,YES, IS IT THE FIRST CHAR?
: : BRANCH IF YES
: :SAVE NEW SWR
: : CLEAR liP STACK
: I ECHO  AND 
: ,RE-ENABLE TTY KBO INTERRUPTS?
: : BRANCH IF NOT
I I RE-ENABLE TTY KBD INTERRUPTS
IIRETURN
: :ECHO CHAR
I rCHAR < 0?
; !BRANCH If YES
: ICHAR > 7?
: IBRANCH IF YES
: ISTRIP-OFF ASCII
: I IS IHIS THE FIRST CHAR
: J BRANCH IF YES
: INO. SHIFT PRESENT
CHAR OVER TO MAKE
n
ROOM FOR NEIoI ONE.
:r
: ,KEEP COUNT OF CHAR
: I SET 1111 NEW CHAR
:IGET THE NEXT ONE
: I TYPE ?
IISIMULUE CONTROL-U

: I ***************************************************************
,*THIS ROUTlNf, WILL HIPUT A SINGI,E CHAPACTER FROM THE TTY
:*CALL:
ROCHR
: I INPUT A SINGLE CHARACTER FROM THE TTY
:*
RETURN HERE
: : CHARACTER IS ON THE STACK
:*
: ,WITH PARITY BIT STRIPPED OFF
1*
006&62
006664
0A6672
006670
0067A0
006706
006714
006722

011646
01666&
105777
11'10375
t 17766
",4,.,66
026627
001013

1'100094
172246

01tl0902

172242
177600
0AI'I004

0001'104
001'1004
0001'123

eRDClilH MOV
MOV
TSTB
lS:
BPL
MDVB
BIC
CMP
BNE

(Sp),-(Sp)
4(SP),2(Sp)
UTKS
1$

(IISTKB,4(SP)
.-C,4(Sp)
4(SP), '23
35

04 1o OCT-76
13:1'18
MAINDEC-l1-0ZRKJ-n
MACYll 27(1006)
TTY INPUT ROUTINE
30-AUG-7& 14: 48
DZRKJD.pll
1782
1783
1784
1795
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
18f11A
1801
1902
18k'll
1904
1805
1806
1907
1809
1899
1810
1811
1812
1911
1814
1815
1816
18t 7
1818
18t9
1820
1821
1822
1823

PAGE 33

01'16724
096H0
006732
00673&
1'106742
1'106746
1tl06750
1'106752
1'106760
1'106762
00677A
006772
90701'1f11

105777
101'1375
117746
1'142716
022627
001366
A00750
A26627
0A2407
026627
0"'3f1103
042766
01'11'11'11'12

007002
097004
007f1110
007014
f11fII7016
0"'7020
007022
007026
907939
007034
9f117f1136
007942
007f1146
0071'152
1'197054
097060
097064
097066
997970
1'197076
007104
1'11'17106
01'17197
997110
1'107120
007125
007132
007149
1'11'17143
01'17150

01034&
f1112703
022703
101405
lf114410
112613
12271 3
fIIfII1A03
lf114491
990763
111337
104401
122723
001356
195063
104401
012603
011646
016666
012766
0f110002
000
091'1
0f11001 1'1
o52536
136
005015
021'1975
049
03644f11

172211'1
177601'1
01'101'121
1'1001'104

000140

000094

000175

001'1040

000004

SEQ 0047

InKS
: I WAI T FOR A CHARACTER
TSTB
BPI.,
2S
:ILOOP UNTIL ITS THERE
UTKB,-(Sp)
MOVB
: I GET CHARACTER
.-CI77, (SP)
: : MAKE IT 7-BIT ASCII
RIC
CMP
(SP)+,'21
::IS IT A CONTROL-Q?
BNE
2$
: I IF NOT DISCARD IT
BR
1$
I IYES, RESUME
CMp
4(SP),1141'1
: I IS IT UPPER CASE?
3S1
BLT
: I BRANCH IF YES
4S
CMp
4(SP),1175
IllS IT A SPECIAL CHAR?
BGT
4S
II BRANCH IF YES
J40,4(SP)
::MAKE IT UPPER CASE
BIC
II GO BACK TO tlSER
4&:
RTI
: I **.****.***** ••• *** •• ** ••• ***** ••• *** ••••• *.*******.*.*********
I*THIS ROUTINE WILL INPUT A STRING FROM THE TTY
I*CALL:
I: INPUT A STIlING FROM THE TTY
ROLIN
1*
IIETURN HERE
I: ADDRESS or FIRST CHARACTER WILL BE ON THE STACK
1*
I I TERMINATOR WILL BE A BYTE OF UL 0' S
1*
R3,-(SP)
UTTYIN,R3
UTTYIN+9., R3

900
009912
020122

SRDLINI MOV
1$1
MOV
2S1
CMP
BLOS
RDCHR
MOVB
CMpB
lUI
BNE
4$1
TYPE
BR
lSI
MOVB
TYPE
CMPB
BNE
CLRB
TYPE
MOV
MOV
MOV
MOV
RTI
981
.BYTE
.BYTE
UTYINI .BLKB
$CNTLUr • ASCIZ
SCNTLGr .ASCIZ
SMSWRI
• ASCrz

053505

'MNEWI

.ASCXZ

.SBTTL

TYPE ROUTINE

007111'1
00712'"

000177
001212
097106
007106
000015
177777
01'11214

01'15015
006507
053523
090
04704f11
0f110040

PAGE 34

2$:

172214

000004
097110

; :PUSH DOIolN THE PC
I,SAVE THE PS
::WAIT FOR
"A CHARACTER
: ,READ THE TTY
: : GET RID OF JUNK IF ANY
: I IS IT A CONTROL-S?
I: BRANCH IF NO

000f1102
000904

4S
(SP)+, (R3l
tt77,(R3)
3$
,.QUES
11
(R3),9.

,9.

U5, (R3)+
2.
-teR3)
,eLF
(SP)+,R3
(SP),-(sP)
4(SP),2(SP)
UTTYIN,4(SP)
0
0
8.

I-U/<15><12>
I-G/<15><12>
<15><12>/SIIR • 1
NEW •

:,SAVE R3
I I GET ADDRESS
IIBUFFER FULL?
: :BR IF YES
I I GO READ ONE CHARACTER FROM THE TTY
: ,GET CHARACTER
I,IS IT A RUSOUT
:, SKIP IF NOT
: ,TYPE A'?'
: J CLEAR THE BUFFER AND LOOP
IIECHO THE CHARACTER
, ICHECK rOR RETURN
, ,LOOP IF NOT RETURN
nCLEAR RETURN (THE 15)
" TYPE A LINE FEED
:rRESTORE R3
I I ADJUST THE STACK AND PUT ADDRESS OF THE
FIRST ASCII CHARACTER ON IT
II
I ,RETURN
, I STORAGE FOR ASCII CHAR. TO TYPE
J ,TERMINATOR
"RESERVE 8 BYTES FOR TTY INPUT
: rCONTROL au·
: rCONTROL "G"

I

, , ***************************.*************.**** •• * •• *****.******
I*ROUTINE TO TYPE ASCll MESSAGE. MF.SSAGE MUST TERMINATE WITH A 0 BYTE.
,*THE ROUTINE IfILL INSERT A NUMBER OF NULL CHARACTERS AFTEIl A LINE FEED.

13108
04-0CT-76
MACYt 1 27(11'11'16)
MUNDEC-l1-0ZRKJ-0
TYPE ROUTINE
10-AUG-76 t4l48
DZRKJD,Pll
1838
19)9
11'140
1841
1942
11'141
1844
1845
1946
1947
1848
1849
195O
1951
1852
1853
1854
1955
1856
1957
1858
1859
1861'1
1861
1862
1863
1864
1865
1866
1967
1868
1869
1870
1871
1872
187)
1874
1875
1876

lP77
1878
1979
1980
1881
1882
1893
1894
1895
1886
1887
198A
1889
1890
1891
1992
1893

11395
1996
\897
1998
1899
1911le
1901
191'12
1903
1904
1905
t 91'16
191117
191'18
191'19
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1929
1929
1930
1931
1912
1933

1914
1915
19]6
1937
19]8
19]9
1941'1
1941
1942
1943
1944
1945
1946
1947
1948
t949

SEQ 0048

'NULL CONTUNS THE CHARACTER TO BE USED AS THE 'ILLER CHARACTER,
,*NOTEll
"ILLS CONUINS THE NUM6ER or fILLER CHARACTERS REQUIRED,
:*NOTE21
HILLC CONTAINS THE CHARACTER TO 'ILL AFTER,
:*NOTE31
,*
:*CALLI
,*1) USING A TRAP II'lSTRUCTION
, ,MESADR IS FIRST ADDRESS or AN ASCIZ STRING
TYPE
,"'ESADR
,*
,*OR
TYPE
1*
MESAOR
:*
:*
007154
01'17160
1'11'17162
1'11'17164
007166
1'1071'"
1'11'17174
1'11'17176
1'11'1721'10
Ih!7202
1'11'1721'14
1'107210
01'17212
01'17216
1'11'17220
1'11'17224
1'11'17226
007230
1'107232
1'11'17234
007240
1'107242
007246
1'107252
1'107254

105737
1"'01'102
ettl00el'l
1'11'11'1407
911'1046
1'11761'10
112046
01'111'105
1'11'15726
1'112600
1'16:>.716
1'10001'12
122716
I'IIH431'1
122716
1'10101'16
1'11'15726
11'14401
1'11'11213
1051'137
1'11'10755
1'104737
123726
001350
I'll )746

1'11'17260
007264
1'107266
1'11'17272
1'107276

105366
1'102771'1
1'104737
1"'5317
1'11'10771'1

007301'1
1'10731'14
01'173\0
01'17316
007320
1'11'17322
007324
1'11'17330
1'11'17332
007340

\ 12716
0"'4731
132737
01'11372
1'105726
001'1724
105777
100175
116677
122166

1'11'11157

STYPP:!

1$1
1'101'11'11'12
2'1

1'11'11'101'12

61'1$1
3$1

1'101'1011

4$1

1'11'11'1201'1

007370
S$:
68:

007324
01H156
1'11'11154

711

01i1ee01
1'107324
01'17370

TST8
BPI"
HALT
BR
MOV
MOV
"'OVB
BNE
TST
MOV
ADO
RT!
CMPS
BEQ
CMP8
RillE
TST
TYPE
SCRLF
CLRS
BR
.lSI!
C/oIPB
BNE
MOV
DECB
BLT
JSR
OECS
SR

STP'LG

:, IS THERE A TERMINAL?

U

I,SR I f YES
"HALT HERE If' NO TERMINAL
, ,LEAVE
nSAVE R0
:, GET ADDRESS or ASCIZ STRII'lG
" PUSH CHARACTER TO AE TYPED ONTO STACK
: , BR IF IT ISN'T THE TERMINATOR
:, IF TERMINATOR POP IT OFF THE STACK
, ,RESTORE R0
: ,ADJUST RETURN PC
: :RETURN
: ,8RANCH IF 

38
R0,-(SP)
f!i2eSP) ,Re
(RI'I)+,-CSP)
4.
esp)+
(SP)+,Re
'2. esP)
'HT,(SP)
8,
tCRLf'. (SP)

: 'BRANCH IF NOT 

5S
(SP).

 EQUIV
"POP
: ,TYPE A CR AND Lr

SCHARCNT
2$
PC,STYPEC
SF'ILLC. (lIP)+
2$
SNULL,-eSp)

I ' CLEAR CHARACTER COUNT
I J GET NEXT CHARACTER
:: GO TYPE THIS CHARACTER
I: IS IT TIME FOR FILLER CHARS.?
nIF NO GO GET NEXT CHAR.
I ' GET • OF FILLER CHARS. NEEDED
: : AND THE NULL CHAR,
:, DOES A NULL NEED TO BE TYPED?
:, BR IF NO--GO POP THE NULL orF OF STACK
: ,GO TYPE A NULL
: ,DO NOT COUNT AS A COUNT
r ,LOOP

1 (SP)

6.
PC,nYPEC
S::HARCNT
7$

:HDRIZONTAL TAB PROCESSOR
001'1040
01'17324
1'101'1007

8$1
95 :
007370

171620
001'101'12
001'1015

111612
01'1001'12

MOVS
JSR
BITB
8NE
TST
BR
STYPECI TSTB
BPL
Mova
CMPB

t ' , esp)
PC,tTYPEC
17, SCHARCNT
9a
(SP).

28
Ii$TPS
nYPEC
2(SP),f!iSTPB
'CR,2(SP)

MAINDEC-tl-OZRKJ-D
MACY11 27( 1006)
04-0CT-76
1311'18
DZRKJD.Pl I
3;'J-It,UG-76 14148
TYPE ROUTINE
11'94

PAGE ]5

1'107346
091350
1'107354
11107356
1'107364
1'107366
1'107370
"07372

01'1101'13
11'151'137
000496
122166
1'101402
105227
01'11'100'"
01H12"'7

0!l7370
00001'12

lSI

BNE
CLIIS
8R
CMP8
B~Q

INC8
SCHARCNTI,WOIID
STYPEXI RTS

.SBTTL

: 'REPLACE TAB wITH SPACE
I ' TYPE A SPACE
:, BRANCH IF NOT AT
r ,TAB STOP
J ,POP SPACE OFF STACK
" GET NEXT CH~ RACTER
J ,WAIT UNTIL PRINTER IS READY
I,LOAD CHAR TO 8E TYPEO INTO DATA REG.
:, IS CHARAoCTER A CAIIR IAGE IIF-TIIRN?

PAGE 36

IS
$CHII.PC~T

STYPEX
tLF,2eSP)
STYPEX
(PC)+

o

SEQ 01'149
:, BRANCH IF NO
~ 'YES~-CLEAR CH.R!lCTER COUNT
r ,EXIT
nIS CHARACTER A LINE FEEO?
J r BRANCH If' YES
f f COUNT THE CHARACTER
, ,CHARACTER COUNT STORAGE

PC

CONVERT BINARY TO DECIMAL AND TYPE ROUTINE

I : ***************************************************************
,*THIS ROUTINE IS USED TO CHANGE A 16-BIT 8INARY NUMBER TO A S-OIGIT
:*SIGNED OF.CIMAL (ASCII) NUMBER AND TYPE IT. DEPENDING ON WHETHER THE
:*NUMBER IS POSITIVE OR NEG,\TIVE A SPACE OR A MINUS SIGN WILL BE TYPED
:*lIEFORE THE FIRST DIGIT OF THE NUMBER. LEADING ZEROS WILL ALWAYS BE
:*REPLACED WITH SPACES.
,*CALL:
140V
NUM. -(SP)
: I PUT THE BINARY NUMBER ON THE STACK
,; GO TO THE ROUTINE
TYPOS
",,,,7374
01117374
007376
00741'117
007402
007404
01'1741'16
1'107412
007416
007420
1'107422
1'107431'1
1'11'17432
1'107436
1'107442
007444
01'17451'1
007452
007454
007456
01'17461'1
01117462
1'11'17464
01'17466
1'107470
1'107472
01'17414
01'17476
007504
1'11'1'7510
007514
007516
1'107520
IH!7524

$TYPOS:
010046
010146
010246
010346
Bl1ll546
012746
016605
lelll004
005405
112766
1'1051'11'11'1
012703
112723
1'10501'12
11116001
161'1tA5
1'102402
01'15202
000174
061'111'15
1'105702
1'11'1101'12
105716
11'11'141'17
11'16316
10300)
116663
",52702
052702
111'1223
01'15721'1
e2elll27
01'12746

021'1201'1
0001'120

01'11'1055

1'100001

lSI
1'107610
1'11'11'1040
2S1
311

4$1

511
1'11'10001
01'10061'1
01'101'141'1

0001'110

177777
6tl

'*1

MOV
MOV
MOV
MOV
MOV
MOV
MOV
8PL
NEG
MOV8
CLR
MOV
MOV8
CLR
MOV
SUB
BLT
INC
BR
ADO
TST
8NE
TSTB
8MI
IISLB
BCC
MOVB
BIS
BIS
Move
TST
CMP
eLT

R0,-eSp)
Rl,-(SP)
R2.-(SP)
R3,-eSP)
R5,-(SP)
'2020e,-eSp)
20eSP),R5

It
R5
• '-, 1(SP)
RI'I
UDBLK,R3
t ' , (R3)+
R2
'DTBL(Re) ,Rl
Rt ,R5

U
R2
]I
Rl,R5

112
5S
esP)

7.esP)
iii
1(SP),-lCR3l
• '0, 1'12
. ' , R2
R2, (R3).
(Re)+
R0.ue

2.

: f PUSH Re ON STACK
IrPUSH R! ON STACK
: ,PUSH R2 ON SUCK
" PUSH 1'13 ON STACK
f I PUSH RS ON SUCK
I ,SET BLANK SWITCH AND SI GN
: I GET THE INPUT NUMBER
BR IF INPUT IS POSe
nMAKE THE BINARY NUMBER POSe
nMAKE THE ASCII NUMBER NEG.
:, ZERO THE CONSTANTS INDEX
"SETUP THE OUTPUT POINTER
:: SET THE FIRST CHARACTER TO A BLANK
I ' CLEAR THE BCD NUMBER
: I GET THE CONSTANT
II FORM THIS BCD DIGIT
"BR IF DONE
" INCREASE THE BCD DIGIT BY 1

f'

r , ADD BACK TH! CONSTANT
, ,CHECK IP' BCD DIGITae
,,'ALL THROUGH IF 0
: ,STILL DOING LEADING 0'S!
, ,BR IP' YES
f ,MSD7
"BR IF NO
"YES--SET THE SIGN
"MAKE TH! BCD DIGIT UCII
"MAKE IT A SPACE IF NOT ALREADY A DIGIT
; I PUT THIS CHARACTER IN THE OUTPUT BUFrER
J' JUST INCREMENTING
"CHECK THE TABLE INDEX
"GO DO TH! NEXT DIGIT

MAINDEC-U-DZRKJ-D
"IACYl1 27(1006)
04-0CT-76
13108 PAGE 37
DZRKJD. Pll
30-AUG-76 1 U 48
CONVERT RINARY TO DECIMAL UlD T'{PE FOUTINE
1950
1951
1952
195]
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
191'"
1971
1972

001526
007530
007532
007534
007536
007540
007546
001550
001552
007554
"'07556
001560
007562
007566
007574
I}07576
001600
007602
007604
007606
007610

003002
010502
00"764
105726

8$1

100"~3

116663
105013
012605
012603
012602
012601
012600
104401
016666
012616
000002
023420
001750
0>!0144
000012
00"'004

177777

177776
9$1

007619
000c,)02

09901'14

BGT
MOV
8R
TS'I'S
8PL
MOVB
CLR8
MOV
MO.
MOV
MOV
MOV
TYPE
IolDV
MOV

8S
R5,R2
6S
(SP)+
'IS
-I (SP),-2(1~3)
(I'll)

(SP)t,R5
(S!'}+,Rl
(SP)+,R2
(SPl+,Rl
(SPl+.R0
,SDSLK
2(SP).4(SP)
(SP)+, (SP)

RT!
SOTSLI

SEQ 0050

IIGO TO EX!T
,IGET THE LSD
nGO CHANGE TO ASCII
, ,WAS THE LSD THE P'I RST NON-ZERO?
IIBR IF NO
: I YES--SET THE SIGN FOR TYPING
I I SET THE TERMINATOR
I I POP STACK INTO R5
nPOP STACK INTO R3
II POP STACK INTO 1'12
IIPOP STACK INTO I'll
I I POP STACK INTO R0
II NOli TYPE THE NUMBER
: I ADJUST THE STACK
: I RETURN TO USER

10000.
1000.
100.

SDBLKI

h'.
.BLKW

.S8TTL

BINARY TO OCTAL (ASCI!) AND TYPE

i9H

1974
1975
1976
1977
1978
1979
1981'1
19111
1982
t 983
19R4
1985
1986
1987
191!l8
1999
1990
1991
1992
19Q3
1994
1995
1996
1997
1999
1 ~99
200'"
2001
2.102
2003
N04
2005

I '***************************************************************
:*THIS ROUTINE IS USED TO CHANGE A 16-BTT BINARY NUMBER TO A 6-DIGIT
I*OCTAL (ASCII) NUMBER AND TYPE IT.
: *STYPOS---ENTER HERE TO SETUP SUPPRESS ZEROS ANO NUMBER OF DIGITS TO TYPE
,*CALL:
MOV
NU"I,-(SP)
I ; NUfoIBEIl TO BE TYPED
TYPOS
" CALL FOR TYPEOUT
IIN=l TO 6 FOR NUMBER OF DIGITS TO TYPE
.BYTE
"M:l OR l'J
.BYTE
1,1 -TYPE LEA01NG ZEROS
, ,0=SUPPRESS LEADING ZEROS
: *STYPON-·--ENTER HERE TO TYPE OUT WITH THE SAME PARA"'ETERS AS THE LAST
I *STYPOS I)R STYPOC
I*CALLI
MOV
NUM,-(SP)
: I NUMBER TO BE TYPED
I ;CALL FOR TYPEOUT
TYPON

;*
I*STYPOC·--F.NTER HERE FOR TYPEOUT OF A 16 BIT NUMBER
,*CALLI
1*
MOV
NUM,-(SP)
IINUMBER TO BE TYPED
,*
TYPOC
; ; CALL FOR TYPEOUT
1'107620
1007624
0076]2
91'17636
907642
007644
0a7652
907660
IHl7666

017&46
116637
10637
062716
1'100406
112137
112737
111.717
910346

01'10000
000001
010045
000082

010043

$TYPOS: MOV
MOVe
MoVe
ADD

BR
00':!1i!01
000006
000005

019043
010045
010042

$ TYPOC I

Move
"'OVB
STYPON I MOV8
.,OV

II(SP),-(SP)
1(SP),$0FILL·
(SP)+, $OMOOE+l
'2, (SP)
$TYPON
tl,S0FILL
.6,$OMOOE+l
IS,SOCNT
R3,-(SP)

I,PICJ(UP THE MODE
I: LOAD ZERO FILL SWITCH
I: NU"'BER OF DIGITS TO TYPE
: ,ADJUST RETURN ADDRESS
: I SET THE ZERO FILL SWITCH
,:SET FOR SIX(6) DIGITS
:, SET THE ITERATION ~OUN'!'
I:SAVE 113

94-0CT-76
13198 PAGE 38
MAINDEC-l1-DZRKJ-D
MACY11 27 (1096)
BINARY TO OCTAL (ASCII) AOID TYPE
30-AUG-76 14: 48
DZRKJD.Pll
2006
2007
2008
2099
201'"
2011
2012
2"'13
2014
2915
2916
2317
2918
2019
2020
2921
2022
2023
2024
2025
2026
2027
2028
2029
20N
2911
2032
2013
2034
2015
2036
2017
2018
2019
2940
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
20S3
2054
2055
2056
2057
2058
2059
2060
2061

0"'7670
"'07672
007674
097700
097702
007706
007712
007716
007722
007724
907726
097730
007732
l'J07734
I}07736
007140
007742
l'J07746
097759
1<107754
0077S6
007760
097762
007764
007770
007714
01 1'1 >! 00
01l'J004
019010
010012
010014
010016
9101}20
010022
010024
010026
010034
010036
010040
l'J10041
I}10042
010043
010044

010446
01"'546
113704
11'05404
961704
110437
111704
0166(;15
O050"'3
00611}5
030404
0k'J61l'J5
006105
0"'6105
1'110503
1'106103
105317
100d16
l'J42703
1'101002
"'05704
001403
00521'14
052703
052703
110337
104401
105337
1'103347
002402
005204
O00744
012605
012694
O12603
016666
012616
000002
000
090
000
000
900000

0110045
"'0001'16
010044
019043
090012
lSI

MOV
MOV
MOVe
NEG
ADD
MOVB
MOVS
MOV
CLR
ROL
BP

1'101.
ROL
ROL
MOV
)SI
ROL
OEca
8PL
BIC
BNE
TST
BEQ
4$1
INC
BIS
SIS
SSt
MOVS
TYPE
7$1
DECB
IlGT
8LT
INC
BR
6$ I
MOV
MOV
MOV
MOV
MOV
RTI
.BYTE
8S!
.BYTE
.8YTE
SOCNT:
I0P'ILLI .BYTE
.OMOOEI .WORD

2$ I

010044
177779

000060
000040
910040
010040
O10042

000002

900004

.S8TTL

R4, -(SP)
R5,-(SP)
$OMOOE+1. R4
R4
'6,R4
R4, SOMODE
S3FILL, R4
12(SP),R5
R3
R5

3S
1'15
R5
R5
R5,R3
R3
SOMODE
7.
iI177170,R3
4$
R4
59
R4
.'0, Rl
t' , R3
Rl,9S
,8.
.DCNT
2,
6.
1'14
2S
(Sp)+,R5
(SP)+,R4
(SPl+,Rl
2(SP),4(SP)
(SP)+, (SP)
0
0
0
0

°

SEQ 0051
IISAVE 1'14
: ,SAVE RS
;;GET THE NUMBER OF DIGITS TO TYPE
: ISUBTRACT IT FOR MAX. ULOWED
: ,SAVE IT FOR USE
: ;GET THE ZERO FILL SWITCH
I :PICKUP THE INPUT NUMBER
:: CLEAR THE OUTPUT WORD
::ROTATE MSB INTO "C"
: :GO DO MS8
:; FORM THIS DIGIT

:;GET LSB OF THIS DIGIT
: ITYPE THIS DIGIT?
IIBR IF NO
I I GET RID OF JUNK
: ITEST rOR '"
I' SUPPRESS THIS 01
: IBR IF YES
I JDON'T SIlPPRESS ANY140RE 0'S
IIMAK!: THIS DIGIT ASCII
:: MAKE ASCII IF NOT ,.LRE,.OY
nSAVE FOR TYPING
I' GO TYPE THIS DIGIT
I,COUNT BY 1
, J SR IF MORE TO DO
J IBR IF DONE
:, INSURE LAST DIGIT ISN"T A BLANK
:, GO DO THE LAST DIGIT
I' RESTORE RS
IIRESTORE R4
"RESTORE R3
II SET THE STACK FOR RETURNING
I ,RETURN
:ISTORAGE FOR ASCII DIGIT
: ITERMINATOR rOR TYPE ROUTINE
: J OCTAL DIGIT COUNTER
:IZERO FILL SWITCH
I;NUMBER OF DIGITS TO TYPE

TRAP DECODER

"***************************************************************
, *THIS ROUTINE WILL PICKUP THE LOWER BYTE or THE "TR,.P" INSTRUCTION
: *AND USE IT TO INDEX THROUGH THE TRAP TABLE rOR THE STARTING ADDRESS
,*OF THE DESIRED ROUTINE. THEN USING THE ADDRESS OBTAINED IT WILL
,*GO TO THAT ROUTINE.
010046
0111050
010054
0111056

810046
016600
005140
111000

STIIAP:
8011002

MOV
MOV
TST
MOVB

R0,-(SP)
2(SP)'R0
-(R0)
(R0),R0

nSAVE R0
J I GET TR,.P ,.DORESS
"BACKUP BY 2
: I GET RIGHT BYTE or TRAP

~UNDEC-ll·DZRKJ-D

DZRl(JD. Ptl
2062
2061
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2091
2094
2095
2096
2097
2098
2099
2100
2101
2102
2101
2104
2105
2106
2107
2108
2U9
21 to
2111
2112
2ltl
2lt4
2115
2116
21t7

MACYU 27(006)
04-DCT-76
13108
10-AUG-76 14148
TRAP DECODER

010060
010062
010066

006300
016000
000200

010070
010072
010100

011646
016666
000002

010102

ASL
MOV
RTS

000004

nPAP21 MOV
MOV
RTI

PAGE 39

R0
nRPAD(R0l, R0
R0

SEQ 0052
"POSITION FOR INDEXING
; IINDEX TO TA8LE
" GO TO ROUTINE

;,THIS IS USE TO HANDLE THE "GETPRY" MACRO
000002

.SBTTL

(SP),-(SP)
4( SP), 2 (SP)

, ,MOVE THE PC DOWN
II MOVE THE PSW DOWN
: ,RESTORE THE PSW

TRap TABLE

:*THtS TAfILE CONTUNS THE STARTING ADDRESSES OF THE POUTINES CALLED
,*BY THE "TRAP" INSTRUCTION.

,

010102
010104
010106
010110
010112
010114

010070
007154
007644
007620
007660
007374

010116

006450

010120
010122
0t0124

006400
006662
007002

010126

005506

010130

005524

'U0132

005464

ROUTINE
I
ITRPADI .WORD
$TYPE
STYPOC
STYPOII
STYPON
nYPDS

012737
012737
010046
010146
010246
010346
010446
11110546
017746
01111637
012737
000000
00111776

TRAP+1 (104401)
TRAP+2(104402)
TRAP+H 104401)
TRAPH (104404)
TRAP+5 (1 04405)

TTY TYPEOUT ROUTINE
TYPE OCTAL NUMBER (WITH LEADING ZEROS)
TYPE OCTAL NUMBER (NO LEADING l.EROS)
TYPE OCTAL NUMBER (AS PER LAST CALL)
TYPE DECIMAL NUMBER (WITH SIGN)

SGTSWR

IICALL-GTSWR

TRAP+6 (1iI441/16)

GET son-SWR SETTING

SCKSWR
'RDCHR
SRDLIII

" CALLIICKSWR
, ICALLIIROCHR
, ,CALL-IIDLI>!

TIIAP+7( 104407)
TEST rOR CHANGE IN SOFT-SWR
TRAP+10(104410) TTY TYPElN CHARACTER ROUTINE
TRAP+ll (104411) TTY TYPEIN STRING R(lUTI~E

CN.IIST

: I CALL-CNT. RESET

DELA.Y
.58TTL

010134
010142
010150
010152
010154
010156
010160
010162
010164
011'170
011H 74
0t0202
1'1021'4

STRAP2
"CALL-TYPE
, ,CALL-TYPOC
, ,CALL-TYPOS
" CALL-TYPON
, ,CALL-TYPOS

010300
000340

0\!10024
000026

170750
010304
010206

000024

TRAP+12(104412) CONTROL FlESET ROUTINE

IICALL-CNT.RDY

TRAP+l](104413) WAn FOR CNTRL 1I0Y TO SET

, ,C ALL-DELA Y

TRAP+14(104414) TIME DELAY ROUTINE

POWER DOWN AND UP ROUT I NES

" ********.***********.**.***************************************
I POWER DOliN ROUTINE
SPWRDNI MOV
UILLUP,(UPWRVEC IISET rOR FAST UP
MOV
'340,UPWRVEC+2 IIPRIOl7
110,-(SP)
IIPUSH R0 ON STACK
MOV
NOV
Rl,-CSP)
I,PUSH Rl ON STACK
MOV
R2,-CSP)
: IPUSH R2 ON STACK
Rl,-(SP)
IIPUSH Rl ON STACK
NOV
MOV
R4,-eSp)
I,PUSH R4 ON STACK
NOV
R5,-(SP)
:IPUSH R5 ON STACK
MOV
('SIIR,-(SP)
"PUSH UWR OM STACK
SP,SSAVR6
: ,SAVE SP
MOY
MOV
UPIIRUP, UPWRVEC " S!T UP VECTOR
HALT
BR
"HANG UP

04·0CT-76
13108 PAGE 49
MACYl 1 27(1006)
I4AINDEC-ll-0IRKJ-D
POIIER ~OWN AND UP ROUTINES
10-AUC-76 14149
DZRKJD.Pll
2119
2119
2120
2121
2122

2123
2124
2125
2126
2127
2128
2129
213111
21lt
2112
2133
2134
2115
21)6
2137
2118
2119
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2151
2154
2155
2156
2157
2t58
2159
216"
2161
2162
2161
2164
2165
2166
2167
2168
2169
21'70
21'7t
2172
2173

B1020eo
010214
910220
010224
011210
010232
010216
010240
010242
01,,244
010246
010250
010252
1'110260
010266
010270
010272
010274
010276
010300
010102
010304
010306
010114

Bli7H
113706
005037
005237
0,,1375
012677
012605
1'112604
(1260)
1'12602
012601
IH26"0
1112717
012737
104401
191010&
012716
002106
000002
000000
000776
000000
0050t5
000122

!hilt';""
0Ul04
010304
,,11Jl14

10100024

SEQ 111053

II ********** •••• **** ••• * •• * •• *.*.********.* •• ********************
,POWER UP ROUTINE
IPWRUPI MOV
IIILLUP,UPWRVEC IISET FOR n.ST DOWN
MOV
U"VR6,SP
J IGET SP
SSAVR6
J I WAIT LOOP FOR THE TTY
CLR
ISAVR6
UWAIT FOR THE INC
1$1
INC
BNE
IIORD
It
(SP)+,.5WR
STACK INTO tSWR
"'OY
CSP)+,R5
MOY
"POP STACK INTO R5
(SP)+,R4
MOV
"POP STACK INTO R4
(SP)+,R3
MOV
J ,POP STACK INTO R3
MOV
CSP)+,R2
J ,POP STACK INTO R2
(SP)+,Rt
MOV
J ,POP STACK INTO Rl
CSP)+,RI'I
MOV
, ,POP STACK INTO R0
MOV
UPIIRDN,.fPWRVEC "SET UP THE POWER DOWN VECTOR
MOV
U40,UPWRVEC+2 uPRIO.7
TYPE
,REPORT THE POWER FAILURE
" POIIER FlIL MESSAGE POINTER
'PIIRMGI .WORD
'POWER
(PC,., CSP)
MOV
"RESTART AT PFSTRT
r ,RESTART ADDRESS
P'STRT
'P"R"DI .WORD
RT!
ULLUPI HALT
II THE POIIER UP SEQUENCE WAS STARTED
BR
.-2
"
BEFORE THE POWER DOWN WAS COMPLETE
ISHR61 0
r ,PUT THE SP HERE
'POWERI • ASCI! <15><12>-POWER-

nor
"pop

t 70702

010134
000340

000024
000026

047520

042527

.EVEN
,ERROR N!:SUGES
.SBTTL

ERROR MESSAGES

1'10316
0111324
010332
fIIl,,140
01f11346

044524
052t:i15
045522
11143505
000122

042515
047440
030461
051511

047440
020116
051048
042524

EMil

• ASCI!

ITIME OUT ON PKlt REGISTERI

010150
010356·
010364
010]72

042522
"!HI05
041440
042105

044507
047040
042514
"00

052121
0!12117
051101

EM21

.Ascn

IREGISTf!R NOT CLEAREDI

010375
"10402

122
051105

"41511
047522

020123

EM3'

,lIScn

IRKCS ERROR I

0"0122

018410
018416
010424
01111412
010440
010446
0114!14

045522
nU22
020116
"47111
042101
020131
00"

051503
851117
"5112'7
8201111'7
847440
044502

042440
84'7455
052111
042522
046116
051524

EM41

• ASCI!

IRKCS ERROR-ON WRI'l'ING READ ONLY BITSI

010455
010462

102
044516

051525
020124

044440
044504

EM51

.ASCIZ

IBUS INIT DID NOT CLEAR RKCSI

MACYlI 270006 ) 04-0CT-76 11108
M"INDEC-II-DZRKJ-D
30-,.UG-76 14149
ERROR MESSAGES
DZRKJD,Pll
2174
2175
2176
2177
2179
2179
2190
2191
2192
2193
2184
2185
2196
2197
2198
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
221i14
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2229
2229

SEQ 0054

010470
010476
010594

020104
046103
045522

047516
049505
051503

020124
020122
000

010511
010516
010524
010532
010540
010546
IHA554
010562

103
051040
04204'"
020124
029122
020054
052105
043447

052116
051505
042111
046103
045522
047117
047111
021517

046122
052105
023516
040505
051503
051440
020107
000

EM6:

.ASCll

ICNTRL RESET DIDN'T CLEAR liKes, ON SETING 'CO"

010567
010574
010602
010610
010616
010624
010632

103
051040
042111
042523
042524
951124
042523

052116
054504
023516
020124
020122
020114
000124

046122
042040
020124
043101
047103
042522

EM71

.ASCn

leNTRL ROY DIDN'T SET U'TER CNTRL RESETI

010636
010644
010652
010660

042522
051105
341440
04211!15

044507
047040
042514
000

052123
052117

EM101

,Ascn

IREGISTER NOT CLUR[DI

010663
010670

122
051105

053511
047522

020103
000122

EMIli

.ASCIZ

IRKwe ERRORI

010676
010704

045522
051122

040502
051117

042440
000

EM131

.ASCIZ

IRKBA ERROR I

010711
010716
010724
010732
010740
010746

103
051040
042040
020124
020122
052123

052116
051505
042111
046103
042522
051105

046122
052105
023516
040505
044507
000

EM141

.lIscn

ICNTRL RESET DIDN'T CLEAR REGISTERI

010753
010760

122
051105

042113
047522

020101
000122

[ ... 15:

• ASCIZ

IRKDA ERROR I

010766
010774
011002
911010
011016

052502
052111
021516
020122
052123

020123
042040
020124
042522
000122

047111
04211 1
046103
044507

I!:MI7:

.ASCll

IBUS INIT DIDN'! CLR REGISTRI

IH1022
011030
011036
01111J44
011052
011060
011966

042101
044523
051122
044522
020117
051505
030507

051104
043516
051117
042105
042101
020123
920054

051505
042440
052055
052040
051104
042522
947507

[14201

.ASCll

IADDRESSING ERROR-TRUD TO ADDRESS REG1, GOT REG21

051101

MAINDEC-I1-0ZRKJ-O
"'ACYlI 27(1096) 04-0eT-76 13108
19-AUG-76 14: 49
I!:RPOR MESSAGES
DZPKJO.Pll
2230
2211
2232
2233
2234
2235
2236
2237
2239
2219
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
22'59
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2279
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285

PAGE 41

PAGE 42

011074
911102

920124
000

042522

031107

IHll03
011110
911116
011124
011132

194
020124
920122
046040
052131

042111
046103
045522
053517
000105

023516
040505
951503
041040

EM22:

.Ascn

IOIDN'T CLEAR RKCS LOW BYTEt

011136
011144
011152
011160
911166

044504
041440
051040
044510
052131

047104
042514
041513
044107
000105

052047
051191
020123
041040

EII23:

.Ascn

IDIDN-T CLEAR RKCS HIGH BYTI!:I

011172
011200
011206
011214
011222
011230
011236
011244

051124
047524
051101
020123
1'l23505
047101
051047
000947

942511
041440
051040
941047
020954
042507
043505

02011!14
042514
041513
052131
044103
020104
951511

EM24:

.Ascn

ITRII!:D TO CLEAR RKCS 'BYTE', CHANGED 'REGIS"

011246
011254
911262
011279
011276

040506
052049
040595
043595
023595

046111
929117
020122
041055
090

042105
046103
051047
952131

EM251

.Ascn

IrAILI!:D TO CLEAR -REG-BYTE-'

011301
011306
011314
011322
011330
011336
011344

122
046101
020104
042514
029107
041955
000

041513
042524
047117
0511111
051047
052131

920123
042522
041440
047111
943505
923505

I!:M26 I

• .\SCIl

IRKCS ALTERED ON CLEARING 'RI!:G-BYTE'I

911345
011352
911360
011366
011374
011402
011410
011416

124
952049
940595
943505
923461
047101
951047
052131

044522
920117
020122
041955
920054
0425""
041505
023462

942105
046103
051047
052Ul
044103
020104
041055
000

I!:M27 I

.ASCIZ

ITRnD TO CLEAR -REG-BYT1", CHANGED "REG-SYT2"1

911423
011430
011436
011444
911452

125
041595
045522
052116
052129

942516
042524
039461
951105
000

950130
020104
044440
052522

EMUI

.ASCIZ

IURI!:XPI!:CTED RU 1 INTERRUPTI

011456

.I!:VI!:N
.S8TTL

ERROR DATA POINTERS

SEQ 0055

MA I NOEC-ll-DZRKJ-O
"ACYl 1 27 (1006) "4-0CT-76 13,08 PAGE 43
ERROl! DATA POINTERS
DZRKJD.PII
'0-AUG-?6 14.48
2286
2297
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2299
2299
2300
2301
2302
2303
230.
2305
2306
2307
2108
23;1)9
2110
2111
23t2
21tl
2lt4
23\5
2316
2111
231 8
2319
2320
2321
2322
2123
2324
2325
2326
2327
2328
2329
2330
2311
2332
2113
2B4
2315
2316
2337
2338
2H9
2340
2341

0lt456

001116

001162

000000

OT1,

.WORO

URRPC, SREG0, 0

011464
011472

001116
000000

001162

001164

012:

.wORO

URRPC, IIIEG0, 'REG1,0

011474
011502

00tl16
01111166

001162
001170

001164
000000

OT201

.WORD

URRPC. aREG0, .REG1 •• REG2, .REG), 0

011510

001116

000000

OT211

.IIORO

SERRPC,0

"11514
011522

001116
001166

001162
000000

001164

01261

.IiORD

URRPC. *REG0, .REGI. 'R!G2,0

.S8TTL

ERROR HEADERS

011526
011534
011542

020040
051040
042104

041520
043505
000122

020040
040455

DHI:

.ASCI!

PC

REG-ADORI

011546
011554
011562
011510

020040
051040
020104
041505

041520
043505
020040
042126

020040
042101
051040
000

OH21

.ASCI!

PC

REGAOO

011575
011602
011610
011616

040
11120040
052103
041505

050040
042440
020040
042126

020103
050130
051040
000

OH4:

.ASCI!

PC

EXPCT

RECVDI

011623
011630
011636
011644

040
1'120040
042524
1,.0505

05011140
053440
020040
000104

020103
041522
051040

OH31

.ASCI!

PC

WROTE

REAOI

011650
011656
£"11664

020040
020040
000104

041520
042522

020040
053103

010151

.ASCl!

PC

RECVOI

011666
011674
011702
1'JI171o!l

020041.1
1'121'11'140
020105
1'14211'11

041521'1
051t 27
020040
01'1111

020040
1'152117
1'142522

DHll :

.ASCIZ

PC

WROTE

1'111713

040

1'150041'1

01'11'1103

OH21:

.ASCI!

PCI

011720
011726
011134
011742
011150
0111'56
1'111764

020040
02094"
1'121'10416
043505
051050
1'121'1041'1
1'124462

041520
942522
020041'1
1'120062
943595
1'151050
1'11'10

0201'140
03051'17
051040
020941'1
1'124461
043595

DM20.

.ASCI!

PC

UI9I8
irl4-0CT-76
I4AINOEC-II·OlRKJ·O
MACYlI 27(101'16)
ERROR HUDERS
10-AUG-76 14148
DZRK,ID. PI I
2342
2343
2344
2345
2346
2341
2348
2349
2351'1
2351
2352
2351
2354
2355
2356
2357
2359
2359
23&0
2361
2362
2363
2364

2365
2366
2367
2368
2369
2370
2371
2372
2313
2374
2375
2376

REGI

RECVDI

READI

REG2

059040
021'11'141'1
0201'140
051511
024507
051051'1
M1505

021H0l
954592
051940
024040
054195
1'143585
042126

DH24:

.ASCI!

PC

012041
012046
0121654
1'112062

040
020040
0S451'12
1'14151'15

051i1040
042522
042524
042126

020103
02651'11
0511'140
01'19

OH25:

.ASCIZ

PC

REG-BYTE RECVDI

1'141'1

1'120103
026501
024040
050131'1
1'1511'151
1'11'10

DH261

.ASCIZ

PC

REG-BYT

BYTE:

REGIS (REG)EXP (REG)RECVOI

111121'167
012074
012102
012110
012116
012124

05451'12
85151'13
9241'140
1'J4\51iS

1'J50041!1
042522
020124
042451
1'15151'13
1'142126

0121H
1'112136
012144
1'112152
012160
012166
1'112114

041'1
020'-"40
052131
041055
1'13\040
1'152103
941505

1'1501'140
051040
021'1061
1'152131
1'142455
031040
942126

1'J2I'J1IIl3
1'1411'155
051041'1
921'11'162
051'1130
1'151055
01'11'1

OH271

.ASCIZ

PC

R-BYTI

R-8YT2

1'112201
1'11221'16
012214
012222
1'112230
012236

040
920040
051503

050041'1
020040
020040
051105
045522

021'1103
045522
020040
0201'140
05151'14

OHl01

._scn

PC

RKCS

RKER

04552~

020040
000

090001

.END

(REG2)1

SE~

041'1
1'120040
042524
043505
042522
1'120120
05H!51
000

iii 2 1'1 1'1 40

(REGl)

PAGE 44

1'111167
011714
912I'J1iI2
912910
012016
0121'124
0121'132
1'112040

~317

2378
2379
2380

SEQ 0056

(CS)EXP (CS)RECVDI

2-EXPCT 2-RECVDI

RKOSI

9057

MACYl1 27(1006)
13108
04-0CT-76
MAINOEC-11-0ZRKJ-0
SYMBOL TAIILE
l0-AUG-a 14: 48
DZIIKJO.Pll
BAOINT
BAOTMO
BIT0 :II
BIT021
BIT2I1
BITln •
BIT",) a
BIT04 a
BIT0,) ..
BlT06 :II
BIT07 :II
BIT08 ..
BIT09 a
•
BITl
BITle ,.
BIT11 =
BIT12 =
BIT13 ,.
BIT14 :II
BIT15 a
BIT2 a
BIn =
BIT4 :II
BITS
BIT6 ,.
..
BIT7
..
8IT8
BIT9
BPTVEC=
CKSWR ..
CNT.ROa
CNT .RE:
CN.ROY
CN.PST
,.
CR
CRLf
DDISP :
DELAY :II
DEL".Y
DHI
DHtl
OH2
DH20
DH21
DH24
OH25
OH26
OH27
DH3
DH30
DH4
DHS
DISPLA

..

,.

OISPII£
DSWR •
OTl
OT2
OT20
OT21
OT26
EMTVEC·
EMt
EroI10
EMU
EM13
EM14
EM15
EM17
EH2
E"'20
EM22
EM23
EM24
EM25
EM26
E"'-27

002202
002116
000001
21002101
000002
009094
0900U
000020
000940
000100
000200
000400
001000
009002
902000
004000
21100210
029090
040900
le0eee
e0e004
e09010
000020
000040
00010e
0002e0
00040e
001gee
0e0014
104407
104413
le4412
ge5524
ee5506
000"'15
000200
t 77570
104414
005464
01152&
011666
011546
011720
011713
011767
0121341

EM)

EM4
EM43
EMS
EM6
EM7
EPRVEC"
FTITLE
GTSWR
GTlPG
GT4RG
HT
IOTVEC·
I,F
..
MSe3
PFSTPT
PIPQ
PIRQVE:II
PP0
=
..
PRI
PP2
..
PR3
..
PR4
..
PP5
z
PR6
PR7
•
PS
:0
PSW
PWPVEC:o
RDCHR ..

=

=

012.0&7

012131
011623
012201
011575
011650
001142

000174
177570
011456
2111464
01i474
011510
011514
000030
010316
010636
019663
910676
010711
010753
010766
019350
011822
011103
011136
011172
011246
011301
011345
010375
010410
011423
010455
ele511
010567
0000e4
001262
104406
005424
ee5450
0e0011
0021020
00ee12
e0121&
002306
177772
000240
000000
000040
000100
0001416

900200
000240
000300
000340
17777&
177776
000024
104410

001206
001146
001144
000025
001152

• ASS.

012237

STPF'LG
STPS
STRAP
STRAP2
STRP ::

001157
001150
010046
010070
000015

000

EPRORS DETECTED:
0
DEFAULT GLOBALS GENERATED I
DZRKJO, DZRKJO/LI: "IE/NL: MC: MD: CND/SOL/NSQ..DZIIKJO. pll
RUNaTIME: H 24 ,9 SECONDS
RUN-TIME RATIO: 253/69=3.6
CORE USEDI
23K
(45 PAGES)

SEQ 0058

ROLIN • 104411
IIESVEC- 00212110
IIKBA
001254
2101250
IIKCS
901256
IIKDA
RKOB
001260
091244
IIKDS
RKER
901246
RKPRI
001266
001270
RKVEC
RKWC
001252
R6
='009006
a",,09097
R7
STACK
901100
001542
START
902190
STARU
STKLMT. 177774
001140
SWR
001H76
SWREG
00egel
SW0
SW00 .. e000el
.. 000002
SW01
SW02 a 099094
SW0) .. 210e010
510104 .. 0eee20
.. 000040
SW05
SW06 a 00'H00
,. 00e290
SW07
SW08 a 000400
SW09 .. 901000
900002
SWI
002900
SW10
.. 004000
SW11
SW12 ,. 01000e
Slt/13 '" 020000
SW14 = 040000
SW15 .. 100000
= 000004
SW2
S..,3
,. 000010
.. 000020
SW4
SW5
900040
SW6
= 000100
,. 000200
SW7
a 000400
SW8
001000
Sw9
TBITVE= 000014
001264
TIMER
TIMOUT 0ij2456
000060
TKVEC
TPVEC :II 000064
TRAPVE" 000034
TRTVEC:II 000014
002352
TSTl

....

=

=

MAINDEC-I1-0ZRKJ-D
"IACYll 27(1006)
04-0CT-76
13108
DZPKJD. P11
30-AUG-76 14: 48
SYMBOL TA8LE
STI"Igs
STKB
STKS
STN
STPB

PAGE 46

STRPAO
ST8TNM
STTYlN
STYPOS
$TYPE

TST10
TST11
TST12
TST13
TST14
TST15
TST16
TST17
TST2
TST20
TST21
TST22
TST23
TST24
TST3
TST4
TST5
TST6
TST7
TYPOS ,.
TYPE •
TYPOC ..
TYPON ..
TYPOS ..
Tl
SAUTOS
SBOAOR
SBODAT
SCHARC
SCKSWR
SCMTAG
SCM 1 ..
SCM2 ..
SCM3
"
SCNTLG
SCNTLlI
SCRLF
SDBLK
SDOAGN
SDTBL
SENDA!)
BENOCT
SENDMG
SENULL

nop

SEOPCT
SERFLG
SERMAX
SEPROR
SERRPC
SERRTB
SERRTY
SERTTL

003204
003314
003454
003522
003630
003676
004004
9214056
002474
004164
004240
004490
004570
005904
092560
082640
092720
003072
0e3142
le44e5
104491
104402
104404
104403
992402
001134
0"'1122
0e1126
007370
0e640e
ee1100
ee0012
900024
000012
007125
e07120
e01213
0e7610
005400
007600
005370
005336
005407
005404
005302
005330
001103
001115
006104
00111&
001272
00&244
001112

SESCAP
SF'ILLC
SF'ILLS
SGOADR
seOOAT
SGET42
SGTSWR
a
SHO
$lCNT
SILLUP
IINTAG
$ITEMB
eLF
SLPADR
SLPERR
SMNEW
$MSWR
SMlCNT
SHULL
SNWTSTa
SOCNT
SOMOOE
SOVER
SPASS
SPOWER
SPWRAO
SPWRDN
SPWRMG
SPWRUP
SQU£S
SROCKR
SPOLIN
SROSZ ..
SREGAD
SREG0
SPEGI
SREG10
SREGll
SREG2
SREG)
SPEG4
SIIEG5
SREG6
$REG7
SRTNAD
SSAVR6
SSCOPE
SSETUP"
SSTUP •
SSVLAO
SSVPC
SSWII :II
SSWIIMKII

007324
007372
007644
007&60

IXTSTR 005644
$SGET4" 0013000
S0FILL 010043
:0: 012237

=

001210
001156
001155
0011221
001124
905360
006450
009900
901104
019300
001135
001114
001214
001196
0011U
807143
007132
006102
001154
0000el
010942
010044
006066
001100
01e306
0116274
010134
010270
010206
0e1212
0e&662
007002
000910
160116e
001162
001164
001202
001204
001166
001170
001172
001174
00117&
001200
005402
010304
005632
e00117
177777
006040
000204
165400
000000

PAGE 47
SEQ 0059
010102
901102
007110
007374
007154

STYPEC
STYPEX
STYPOC
STYPON
$TYPOS

0076216



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : No
XMP Toolkit                     : Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:56:37
Create Date                     : 2013:11:26 20:07:22-08:00
Modify Date                     : 2013:11:26 20:14:41-08:00
Metadata Date                   : 2013:11:26 20:14:41-08:00
Producer                        : Adobe Acrobat 9.55 Paper Capture Plug-in
Format                          : application/pdf
Document ID                     : uuid:502a9dbb-fe56-4182-88fa-6bc4c9712f7b
Instance ID                     : uuid:3e98aa79-5cf6-4f97-b1bf-1663cd9a7e13
Page Layout                     : SinglePage
Page Mode                       : UseNone
Page Count                      : 36
EXIF Metadata provided by EXIF.tools

Navigation menu