2000F_main Lst Pt1_Aug73 2000F Main Pt1 Aug73

2000F_mainLstPt1_Aug73 2000F_mainLstPt1_Aug73

User Manual: 2000F_mainLstPt1_Aug73

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

Download2000F_main Lst Pt1_Aug73 2000F Main Pt1 Aug73
Open PDF In BrowserView PDF
2000F (OPTION 200/205) TSB SYSTEM
(REV A)

BINARY TAPES

24337-60001
24337-60002
24337-60003

SOURCE TAPES

24337-80001
24337-80002
24337-80003
24337-80004
24337-80005
24337-80006
24337-80007
24337-80008
24337-80009
24337-80010
24337-80011
24337-80012
24337-80013
24337-80014
24337-80015
24337-80016
24337-80017
24337-80018
24337-80019
24337-80020
24337-80021
24337-80022
24337-80023
24337-80024
24337-80025
24337-80026
24337-80027
24337-80028
24337-80029
24337-80030
24337-80031
24337-80032
24337-80033
24337-80034
24337-80035
24337-80036
24337-80037
24337-80038
24337-80039
24337-80040
24337-80041
24337-80042
24337-80043
24337-80044
24337-80045

SOURCE TAPES
CONTINUED

SOURCE LISTING

24337-80046
24337-80047
24337-80048
24337-80049
24337-80050
24337-80051
24337.-80052
24337-90001

PAGE 0001

ASH8,A,B,L

0001

*.

NO ERROHS*

2000f (OPTION

280/285)

TselVlrEM

PAGE 0002 #01

ASMB,A,S,L
20~0F (OPTION 200/200) T88 SYSTEM
0001
VERSION A 8/1/73
0002*
ORG 2002B
0003 02002
0004.
0005* LINKAGE INFORMATION USED BY THE 158 LOADER AND THE
0006.
0007*
0008
0009
0010
0011
00t2
0013
0014
0015
0016

MAG TAPE DUMP.

~2002

~75000

0200J
02004
02005
02006
02007
0201A

072037
000024
057326
057331
001567
171224

0011

02011 001224
02012 070340
02013 114732

0018
0019

02014 031234
02015 000015

OEF
OEF
ASS
OEF
OEF
OfF
ABS
OEF
OEF
JSB
OEF
ABS

LIBRA
SYSTEM LIBRARY PROGRAM ORIGIN
COM6
a> SYSTEM LIBRARY DIIC ADDRESSES
TTY01.TTY00
LENGTH OF A TTY TABLE
TTy00.?DISC
ADDRESS OF USER DISC ADORES
TTY00+1ID
ADDRESS OF ID-NAME
LNAME
ADDRESS OF USER.OEPENDENT ITEMS
USER.PROGS.!
LENGTH Of SWAP AREA
USER
CORE ADDRESS OF SWAP AREA
TSB
SYSTEM STARTING ADDRESS
POWIN,I
TO GO INTO LOC 4.
GMgB
MESSAGE BUFFER GETTER
,SLPL-LIBRA
NUMBER OF LIBRARy PROGRAMS

PAGE 0003

#~1

BASE PAGE

EQU
EQU 1
DE:.ATH fQU 0
FTEL FQU 15

0034

00000
00001
00000
00011
00002
PJ0002
00003
00004
00905
00006
00007
00010
00011
00012

0035

00013 107713

0036

00014 114630

0021

0022
0023
0024
1lJ025
0026
1tJ027
0028
0029
0030

"031

0032
0033

"

A
B

ORG 2

HLT DEATH+2
.JMP
HLT 4,C
HLT OEATH ... 5

102002
024002
103004
102005
10 77 0 6
107707
1141 3 4
102011

114756

.·1

CLoC

CLC
JSB
HLT
JSB
CLC
CLOCK JsB
CH1
CH2
1 SC

A REGISTER ADDRESS

B REGISTER ADDRESS

FILE TABLE ENTRY L.EN1H

fOR SYSTEM
PROTECTION
CHANGED BY lOADER.
PARITY ERROR

6,C

7,e

COMMUNICATION FROM tlO PROCESSOR
DEATH"+118
T35DR,I
CONSOL.E LINK
R140 R ,I

138,C

CLKDR,I

CLOCKLINK

0~38.

0039.*
TE.MPORARIEs AND
0040.
0041 00030
0042 00030 000000 LTEMP
0043 00050 000000 MOVES
0044 0012151 00121000 MOVED
0045 00052 000000 10
0046 00053 000000 MID
0047 00054 001210013 T35CP
00 4 8 00055 090000 TJ5LC
0049 00056 000000 PBPr R
0059 00057 000000
iIMER
SBHED
0051 00060 00121000
0052 000 6 1 000000 SCHL
005J
0054

0055
0056
0057
0058

0059
0060
0061
00 6 2
006 3

01064

0065
0066

000 6 2 00001210

00063 00012100

00064 00012100
00965 12100000
0130 6 6 000000
00067 000000
00010 0012112100
00071 000000
000 7 2 000000
000 7 3 000000
00014 000000
00075 000000
00076 000000
0t1077 000000

TTQ
SCHID
SCHP

seNT
SCHT

POINTERS
oRG 308
BSS 16
eSS t
BSS t

aSS 1
BSS 1
BSS 1

sss

1

BSS 1
aSS t

TEMPS USED BY NONRESIDENT FUNCS.
SOURCE ANO DESTINATION
FOR MOvEw ROUTINE.
USED FOR RESULTS 0' GiTID ROUTIN
T35 BUFfER PNTR FOR LISR.PROGS.
RESULT OF T35tH ROUTINE.
POINTER TO END OF CURRENT PROGRA
POINTS TO CLOCK OF ACTIVE USER,

BSS 1
BSS 1
ass 1
BSS 1

BSS 1

BSS 1
BSS 1

SCHPP BSS 1
CMA
BSS 1
CMS
BSS 1
CME
aSs 1
SVCH2 BSS 1
TeNT ass 1

IDTAD Bss 1
lOlL'" aSS 1

STDAP

ass 1

DISC ADDRESS
lOT TRACK L.ENGTH
SYSTEM TABLE DISC ADDRESS POINTR
a> IDT

->

PAGE 0004 #01

BASE PAGE

0069 •••••••••••••••••••••••••••••••••••••• * •••••••••• *•• ********* •••••• *
1r1070*

0071*
0072.
0073*

"~74.

BEGINNING OF EQUIPMENT TABLE

THE NEXT SECTION, ORIGINfD AT 1008, CONSTITUTES THE RESIDENT
INFORMATION ABOUT THE DISC RESIDENT TABLES, THESE TABLES ARE
INITIALIZED By THE VARIOuS LOADERS AND THEIR CONTENTS ARE
WRITTEN ON DISC BY THE SLEEP ROUTINE.

0075*
0076*
0077.
0078 00100

ORG 100B

~0100

000000

IDEe

BSS 12

0085

0~114

e00000

NIOT

sSS 1

0087

00115

~00000

NOIRT ass 1

NUMBER OF DIRECTORY TRACKS/DISC

0089

(~0116

0000"'0

ADTAl ess 24

0090.
0091.

ADT DISC ADDREss TA8LE
EACH J WORD ENTRV CONSISTS OFt
1) DISC

0092*
0093.
0094 00120

LENGTH IN .WORD~
POINTS TO LENGTH OF DISC

0079

0080*
0081*
0082*
0083.
0084*

2)

ADTlN EQU AOTAT+2

0014 6 000000
~0156 000000
00160 000000
00161 000000
00166 000000
01211 67 000000
00170 000000
001 7 1 000000

DKTBL 8SS 8
OADSL 8S~ 2
DLNSL as 1
sysIO BSS 5
MAGSC BSS 1
NPORT sss 1
yEAR BSS 1
DATIM aSS 2

0106 00173 000000
0101 00174 000000
0108.

HOATE BSS 1
SLEPT ess 1

0096

01tl97
0"'98
0099
0100
0101
0102
0103
0104.
0105*

0109*

0110.

10 TABLE HEADERS
EACH 4 wORD ENTRy CONSISTS Qfl
1)· FIRST 10 ON THE TRACK
2) DISC
3)
ADDRESS
4) LENGTH IN eWORDS
NUMBER OF IO TRACKS

END OF THE EQUIPMENT

ADDRESS

J)

TABL~

~111* ••• **.*.**.** •••• *.***** •• ** •• **.****.* •• **.******* ••

1d112.
0113
0114
0115
0116

0117
0118
011 9

0120

0121

ia122.

0123.

00175 000000
00176 000000
00177 01210000
00200 000000
00201 000000
00202 000000
00203 000000
00204 00000121
0121205 000000

LOBSA BSS 1

LsrDA

BSS
MHAO BSS
GMQ8P BSS
D1sCA BSS

DISCB

aSs

"

DISc SELECT CODE/UNIT NUMBER
DISC ADDREss OF SYSTEM LIBRARy
DISC LENGTH OF SYSTEM LIBRARY
SYSTEM IDENTIFICATION
MAG TAPE SELECT cODE
-NUMBER OF AVAILABLE PORTS
CURRENT yEAR • 0 TO 99
TWO WORD ENTRY FOR TIME Of YEAR
1) HOUR OF YEAR
2) # OF 100M8 UNITS IN HOUR
LAST HIBERNATE DATE
o SEZ SLEPT, ·1 SfZ NO

1
1
1
1
1

MBUSY BSS 1
MWORD BSS 1
OREDP BSS 1

*••••••• ******

DIsC BOOTSTRAP ADDREss
LOADER SEGMENT TABLE ADDREss
ADDRESS OF M. H. DISC TABLE
a> MESSAGE BUffER GETTER
ADDRESS OF DISC DRIVER [NTRY
DISC DRIVER INTERRUPT ENTRY ADOR
OI8C DRIVER BUSY FLAG
DISC REQUESTED WORD COUNT
DISC AUTO RESTART ROUTINE

.>

END OF AREA THAT MUST CORRESpOND WITH THE LOADER

PAGE 0005 #01

BASE PAGE

0124*
0125 ••••••••••••••••••••••••••••••••••••• * ••••••••••••• * •• ****.***.*.***

0126*
0127

~0206

031060

DISCZ DEF ZDISC

0128*

0129*
DISC ERROR ROUTINE POINTERS
0130.·
0131.
0132 00207 061234 SICKp OfF SICK
0133 00210 060524 PTZAP OEF JETPT
0134 00211 060647 SLVAG OfF SALVG
0135 00212 061.303 DEADP OEF DEAD

SYSTEM TRACK CAN'T BE READ
SWAP TRACK CAN'T BE READ/WRITTEN
SYSTEM TRACK CAN'T BE WRITTEN
SYSTEM TRACKS INCOMPATAILE

~137.

0138*.
~139 •••
0140 ••

0141*
0142.
01 43*
0144.
0145.
0146.
0147*
0148.

MUERTO
ALL SYSTEM HALTS CAN BE REFERENCED By THE LA8EL 'DEATH'. THE
FOLLOwING IS A LIST OF THE NALTS AND THEIR MEANINGS A$ ~ELL
AS AN INDICATION OF POSSIBLE RECOVERY OR A MESSAGEDf DOOM,
2

.. ERRONEOUS, NON.RECOVERABLE SYSTEM TRANSFER HAS OCCURRED

5

• A PARITY lRROR HAS OCCURRED,

CHECK THE HAROWARE,

1t)149.

0150.
0151.
0152*
0153.
0154.
0155.
0156.
0157.
0158*
0159.
~160*

0161*
0162.
0163.
0164.
0165.
0166*
0167.
0168*
0169.
0170.
0171*
0172.
0173.

l1B. UNEXPECTED INTERRUPT FROM THE PROCESSOR INTERCONNECT,
TAKE A COLD oUMP OF TMIS UNRECOVERABLE SYSTEM.

308 • DISC DRIVER IS BUSY,
318

w

RECOVERy NOT POSSIBLE.

DISC CALLED IS NOT PRESENT,

NO WAY TO RECOVER,

328 .. DISC ERROR WHI~E WRITING A SySTEM TRACK. SySTEM
TRACK HAS BEEN HOVED AND ALL TABLES HAVE BEEN
UPDATED. RECOVERY IS POSSI8LE.

338

~

DISC ERROR WHILE READING TRACK OR WRITING NONESSENTIAL TRACK. RECOVERY IS POSSIBLE.

348

~

DISC ERROR CAUSING THE SYSTEM TABLES TO BE INCOMPATABLE. RECOVERY IS OUT OF THE QUESTION.

358

~

A DIRECTORy TRACK COULD NOT BE FOUND.
IMPOSSIBLE.

36B • PQWERFAIL HAS OCCURRED.

RECOVERy IS

CHECK RESTART SWITCH POSITION,

378 - BAD AOT DISC ADDRESS GENERATED.

RECOVERy. NO WAy.

PAGE 0096 #01

BASE PAGE

017~.

1/0 PROCESSOR SEND DRIVER OPCOOES
0176.·
0177.
OCT 000000
OUTPUT CHARACTER
0178 00213 "00000 OCR

91,9
S180
0181
0182
018 3
0184
0185
0i66

121187
0188
0189

0190
0191
0192
0193

0194
01 95
°1 9 6

0197
"19S

0199
02°0
0201
0202
0203
0204
0205
02°6
0207
020 8
0209
0210
0211*

00214
00215
00216
00217
00220
00221
00220
00224
00225
0022 6
VJ0227
00230
00231
00232
00233
00234
00235
0°236
00231
0°24 0
00241
,,0242
00243
~0244

STE
GTC
PHO
SPE
sap
RBP

F8P

00222 i60000
00223 160001
16 0 002
160003

160004
160005
16 0 006
160007
1 6 0010
16 00 11

1 600 12
160013
1 60 °14
160015

160016
160017
160020

160021
16 00 22

00245 160023
0024 6 16 0024
00247 160025
00250 16 002 6
02 1 16 002 7
"
5
00252
160030

IN!
UIR
UNR
IwT
HUU
UL.O

Eeo

ECF
TPO
ILl
NUC
KAO

ALI
OWl
IBF

Psc

LPR
LPD
LPS
BKS
Ct'iS

STP
GRP
ABT
WTP
KSN

0213*

0214 ••

OCT 020000
OCT 040000
OCT 060001

OCT 100000

OCT 120000
OCT 140000
EQU SSP

oti

160000
160001
160002
160003
160084
OCT 160095
OCT 16 00 S6

OCT
OCT
OCT
OCT

OCT
OCT
OCT
OCT
OCT
OCT

nCT

OCT
OCT
oCT
OCT
OCT

160007
160t)10

16 00 11
1 60 °12

160013
1 600 14
160015
160016

160017

160020
160021

16 0022
OCT 160823
OCT 16 0024
OCT 16002b
OCT 16 002 6
OCT 16 002 7
OCT 160030

OCT 16"031

STAAT TIMING ENTER
GET CHARACTER
PHONES TIME
BAUD RATE INFO
SAVE BUFFER POINTER
RESTORE BuFFER POINT£R
FREE SAVED SPACE
INliIALIZE SySTEM
USER IS RUNNING
USER NOT RUNNING
INPuT wAIT
HANG USER UP
uSER LOGGED ON
ECHO-ON
ECHO.OFf
TAPE MODE ON
ILLEGAL INPUT1
NEW USER CAl.LED
KILL ALL OUTPUT
ALLOW INPUT
OUTPUT wAlT
IS BUFFER FULL?
LINE PRINTER sELECT tODE
LINE PRINTER REQUEST
LINE PRINTER DISCONNECT
LINE PRINTER STATUS
BACKSPACE IN BUFFER
CHARACTER SIZE
SUBTyPE INFO
GET RECEIVE PARAMETER
USER IS BEING ABORTED
wHAT TERMINAL TyPE?
1/0 PROCESSOR CORI DUMP

SYSTEM STATUS VARIABLES

0215*
0216 00253
0217 00254
0218 00255
0219 00256

000000
000000
000000
000000

PRIST
LfLAG
MAIN
LIB

~00000

DIRWD NQP

00260 000000

HQDIS NOP

0220*
rtJ221 00257
0222*
0223

020000
""0000
06000"
100000
120000
140000

NOP
NOP
NOP
NQP

0224*
0225.
0226 24000
022 7 75000

UL.EN

EQU 10240

LIBRA E-QU 15 000 8

LP INDICATOR
INDICATES USER IN CORE'i IF NONE

.> DISC ADDREss of L.IBRARY

PROGRAM IN CORE o IF NONE
DISC ADDRESS oJ DIRECTORY
TRACK IN CORE, S l ' NONE
• 0 UNLESS HEAD OF QUEUE
IS DISCONNECTED
a>

LENGTH OF USER AREA
SYSTEM LIBRARY PROGRAM ADDRESS

PAGE "'007 #01

BASE PAGE

~229*

11'230**
8231***
0232**
0233.
0234

POINTERS ANO TEMPORARIES

00261 000000

0235*
0236 00262 000000
0237*
0238 00263 000277
0239 00264 000000 .
0240 00265 000266
0241 0°266 005122
0242 00267 042501
00270 042131
0243 0027-1 000272
02 44 00272 000272
0245 00273 A77777
0246 00273
0247.
TTY TABLE
0248**
0249*
0250 00274 000000
0251 00275 00000ttl
0252

00276 0021000

0253 00277 000000
0254 00300 000000
0255.

TJ5FG NOP

TIMEF NOP
T35lN OEF T351.K
LCHCR NOP
RE.ADy OEF *+1
OCT 5122
ASC 2,EADy
MLINK DfF .+1
OfF *
OCT 77777
EQU MLINK+2
INF

FO~

ASR.35 DRIVER
PStuDO.FLAG,HUST BE 11
WORDS BEFORE Tl5CL
• 1 wHEN CURRENT PROGRAM
18 TIMED

If-R
POINTS TO BASIC QUEUE ENTRV.
LINK TO HEAD Of QUEUE.
MAX. PRIORITY USED FOR Q INSERTS

ENTRY FOR TTY35

PSEUDO CLOCK_

T35CL NOP
TJ5RS Nap
T355T NOP
T35LK NOP
T3 5PR NOP

RESTART ADDRESS

STATUS
LINK

PRIORITY

00301 17 1 45 2
00302 171562
00303 074625

T3582 ABS TJ5BF+T35BF CHAR POINTER TO TTV35 BUFFER
T35ND ASS T35BF+T35BF+72 POINTS TO END OF SUFFER
POINTS TO WORD ADDRESS OF ~U'FER
T3581 OEF T358F

02 63
0264

00047
00352
0031214 000000
003 0 5 12156572
00306 056267

MESLN EQU
EQU
MSQCT oCT
MSQPl OEF
HSQP3 DfF
HSQND DEf
M8QBS OEF

02 56
0257
0258

0260
0261

0262
0265

00307 056641

0266

00310 e56267

0268
0 26 9
0279

00311 0121121000
00312 000000
00313 000000

MESBN

T35Ft NOP
T35F2 ~OP
T35F3

NOP

39

LENGTH OF OPERATOR MESSAGES

ME SL N. ME SLN+ ME SL, N+ ME SL N+ ME·SL N+ME SL N
PI
MESSAGE COUNT£R

MSGHD+MESBN-MESLN
MSQHD
MSQHD+MESBN LIMITS
MSQHD
OF MESSAGE QUEUE

SYSTEM
CONSOLE
FLAGS

PAGE

0008 #01

BASE PAGE

0272*
GENERAL USAGE CONSTANTS
0273.·
0214.
SUP
0275
0276 00314 160010 M8184 DEC -8184
0277 00315 111000 H512 DEC .512
0278 00316 11740~ M256 DEC .256
OCT _140
0279 00317 177640 M96
0280 00320 177700 0100 OCT .100
DEC .73
0281 00321 177667 M73
OCT .72
0282 00322 171706 072
0283 00322
11728 EQU 072
0284 00323 117144
DEC .28,-27,-26,-25,_24,-23,.22,-21
0285 00333 177754
DEC .20,.19,.18,-17,.16,.15,.14,.13,.12,.11
0286 00345 177766
DEC .10,.9,.8,.7,.6,.5,.',.3,.2,.1
0281 00357 000000 •
DEC 0,1,2,3,4,5,6,7,8,9
0288 00311 000012
DEC 10,11,12,13,14,15,16,1 7 ,18,19
0289 00403 000024
DEC 20,21,22,23,24,25,26,27,28,29
0290 00415 000036
DEC 30,31,32,33,34,35,36,37,38,39
0291 00427 000050
DEC 40,41,42,43,44,45,46,47,48,49
0292 00441 000062
DEC 50,51
0293 00443 011610 .5000 DEC 5000
81T14 E.QU GTe
~294
00215
0295 00360
lABOR EQU .+1
0296 00361
IINPT EQU .+2
rd297 00362
XOUTW EQU .+3
0298 00363
XSYNT EQU .... 4
0299 00355
XDISC EQU .-2
XENTO EQU .-3
0300 00354
0301
00353
XPl,iN EQU
UNS
0302

.-4

PAGE

0009 #01

BASE PAGE

0304*
1!i305.
0306*. LANGUAGE PRoCtSSOR CONSTAN18 AND ADDREssts
0301.
030 8 0~444 001577 DFILT OEF FLSTS
0309 00445 033027 SBJTB OEF _FaC
0310 00446 031131 SYNTA DEf SYNTX
DEF "SaCK
0311 00447 033463
A0450
177740
MJ2
0312
DEC .32
0313 00451 033304
OEF *f"RCR
DEC 58
0314 00452 000072 .58
OEF
033335
.FPOP
21315 021453
OCT
73
0316 00454 000073 B73
OEF *VROP
0317 00455 034131
0318 ~0456 000074 060
DEC 60
2133603
0319 00457
OEF _ARID
OCT 77
00460 000077 877
0320
OEF _PGIN
0321 00461 034506
0322 00462 900100 8100 OCT 100
DEF tlTBSR
0323 00463 034603
OCT 105
0324 00464 00010!) E
OEF _GTPF
0325 00465 fa34473
DEC 72
0326 00466 0001t0 .72
0327 00467 035214
DEF #LPCK
0328 00470 000140 .140 OCT 1421
OEF .RPCK
0329 00471 034740
0339 00472 000144 .100 DEC 1210
OfF *LTR
0331 00413 034716
0332 00474 000177 B177 OCT 177
OEF #STOP
0333 00475 034730
0334 00476 000200 8 2 00 OCT 200
DfF .eRST
0335 00477 034210
0336 00500 000377 B377 OCT 377
OEF t#OGCK
0337 005~1 034752
4
0338
00502 000400
OCT 400
OEF #LTCK
0339 00503 034764 8
0340 00504 000177 8717 OCT 771
0341 00505 035205
OEF #SBPU
1f}342 00506 001000 1;1000 OCT 1000
OEF #SYCK
0343 00507 9134174
0344 00510 001130 0 6 00 DEC 600
OfF #FINC
0345 00511 04,3627
0346 ~12J512 001177 B1777 OCT 1717
0347 00513 052717
DEF #NMCK
0348 00514 002000 8200" OCT 2000
0349 00515 053111
oEF #MB10
0350 00516 003000 83000 OCT 3000
OEF *0810
0351 00517 053265
0352 00520 004000 84000 OCT 4000
OEF #NRHL
0353 00521 053141
0354 "'0522 020000 820M OCT 2 0 000
0355 00523 053202
OfF .PACK
0356 00524 030000 830M oct 3000ra
0357 00525 052670
OEF #Ov FL
0358
00526 1 0 624 0 D361< ASS 3 0 000+6000
0359
00527 034240
OEF 'DlPR

°"

PAGE

~011cl

#~1

BASE PAGE

0360

00530 030060

1d361

00531 034421
00532 020040
00533 036131

0362
0363
0364
036·5
0366
0367
8368
0369
0370
0311
0372
21373
0374
0375
0316
0371
0378
0379
0380

00534
00535
00536
00!537
00540
00541
00542
00543
00544
00545
~0546

0388

00547
00550
00551
00552
00553
00554
00555
00556
00557
00560
00561
00562
00563
00564

0389

00565

0390

0381
0382
0383
21384
0385
0386
0381

03 9 2

00566
00567
00570

0393

00571

0394
03 9 5

00572
00573
210574
00515
00576
00577
00600

0391

0396

0391
0398
0399
0400
0401
04°2
0403
04 0 4
0405
0406
0407
0408
0409
0410

0411
0412
0413
0414
0415

00601

045000
037001
062000
036441
041000
036573
060000
035173
070000
"33607
0440Q10
A33635
100003
033647
073000
2142377
012000
043547
013000
044006
022000

043426
055090
044661
174003
VJ44612
100777
043347
077000
043330

100017

042350
065000
042020
051000

042111
010000
043571
01601210
043747
043 000
044721

006°2
00603
006 0 4
00605
00606 07 5000
00607 043650
006 10 17 5 0021
00611 043643
00612 176000
00613 043657
006 14 07 43 12
,,0615 043711
00616 A34400
00617 044635

ASC00 ASC 1,00
DEF *FOPS
ASC8R ASC 1,
OEF *SSYM
COHOP OCT 45000
OfF ,ASyM
DATOP OCT 62010
DEF *DCMP
OIMOP OCT 47000

OEF *PNST

ENDOP OCT
OEF
FILOP OCT
OfF
IMGOP OCT
OfF
INlFL OCT

60000

,CUSP
70000

.STRI
44000

.RSTO
100003

OEF 'GTST

LETOP OCT
DEF
LBOP OCT
OEF
LPOP OCT
OEF
MULOP OCT

73000

.FORM
12000

IIISTST
13000

*SBFX
22000

DE.F #PSTR
NXTOP OCT 55000

OEF
OCT
OEF
OPOMK OCT
OEF

OFOP

.OUCK
174003

*TRST
108777

_CMPR

OPMSK OCT 77000
DEF "PCHK
PDFFL OCT 100017
DEF *FTCH
PRTOP OCT 65000
OEF #STDP
REMOP OCT 51000
OEF "FOAT
RPOP OCT 10000
DEF *fSCH
SCOMM OCT 16000
OEF #PSHS
USEOP OCT 43000
DEF #ARIN
'LIB- OfF LIBRA
OEF ,6NOP
#ILlS! DEF LIBRA,I
OEF .STTP
M2800 OCT 176000
DEF .OPCK
ABCK OEF A8CHI<
OEF #RSCK
ACC5A oEF ACCS5
OfF .FAD

PAGE "011 *01

BASE PAGE

0416 ~0620 034307
8417 A0621 044641
0418 00622 053340
0419 00623 2144675
0420 00624 053505
0421 00625 044107
0422 00626 053475
0423 00e21 044130
0424 00630 010024
0425 00631 044017
0426 09632 070041
0427 00633 0521010
0428 00634 070045
0429 00635 050826
0430 00636 070617
0431 ·00631 050345
0432 00640 000030
0433 00641 050436
0434 00642 069524
0435 00643 050416
21436 00644 057324
0437 09645 942355
0438 00646 0017 0 3
0439 00641 051523
0440 00650 001643
0441 00651 051647
0442 00652 041653
0443 00653 051013
0444 00654 091560
0445 00655 051146
0446' 00656 042203
0441 00657 051164
0448 00660 033360
0 44 9 00661 042246
0450 00662 042622
0451 00663 050474
0452 00664 12101364
0453 00665 050466
0454 00666 072041
0455 00667 050450
0456 "'0670 001650
0457 00671 060370
0458 00672 003230
0459 00613 052614
0460 00674 021230
0461 00675 052651
0462 00676 901230
0463 00677 042373
0464 00100 101230
0465 00701 934516
0466 00702 2172231
0467 00703 047303
0468 00704 012331
0469 00705 047252
0470 00706 072330
0471 00707 045122

ACCSA

ANOl
AlAB

ATHEN
CLKDR

DClt,
OCLC2
DEH

OLTEM
DTT32
DTTY0
E HS 3 2

ERstA
ExITA
FCUCA
FOT4A

FOPBS

FRET
FSCHA
FUSS

IHB
L1024
L8192

LIBD
LI8DI
LOGBG

LOGND
LOGPl

DEF
OEF
OEF
OEF
OEF
OEF
DEF
OEF
OEF
OEF
OEF
OfF
DEF
OEF
OEF
OEF
OEF
OEF

ACCST
IWFSB

NOT
NFMP
TAB
*f'DV
THEN

*FLUN

eLKIN
,If IX
CLCl
liENOl
CLC2

.NMOT
EH
'GTOG
LTEHP

NOTLN
oEf TTYJ2
OEF tlEDLM
OEF TTY00
OEF .STPT
OEF ERSEC+3 2
DEF *EXP
OfF ERSEC
OEF #LOG
OfF ExIT
OfF IICHEB
OEF FCUC
DE' #IENT
OEF FOAT4
OEF IIPWR2
OfF QU OTE.2
OfF *INCL
DEF FOR10
OEF "GTCR
OEF FSCH
OEF #BKSP
OEF COM6+2
POINTER TO DIIC ADDRESS Of Fuss
OEF 'OTeR
OEf HB
OEF !flOTIN
OEF LIBUS·1024
DEF *MeOT
OEF LIBUS+8192
OEF #OTST
OEF LIBuS
OEF NSINI
OEF LIBUS,I
OEF flSlDI
PO!NTS TO BEGINNING OF LOGaR
DfF LOGGR
OfF *RDIH
OEF lOGGR+64 POINTS TO ENO OF LOG&R
OEF .VCHK
DfF LOGGR+6J POINTERS TO FIRST AND
OfF .SERR

PAGE 0012 #01
0412
0473
0474
0475
0476
0477
0478
0479
0~8"

0 4 81
0482
0483
0484
0485
0486
0487
0488
0489
0490
0491
0 4 92
0493
0494
0495
0496
0497
0498
0499
05"0
a501
05 02
0503
0504

0505
0506
0507
0508
0b09

0510
0511
0512
0513

,,514
0515
0516
0517
051 8

0519
0520

0521
0522
0523

0524
0525
0526
0527

00710
00711
00712
00713
00714
00715
00716
00717
00720
0°7 21
00722
00723
00724
00725
00726
00727
00730
00131
00732
00733
00734
00735
00736
013737
00740
00741
00142
00743
00744
00745
00746
00747
00,50

RASE PAGE

072330
052677
025230
045112
025063
034550
025224
034571
053317
042043
100001
044055
071623
044324
002000
044442
053516
04A505

056653
035043
062025
037056
062000
043636
011470
056000
071444
056010
074152
056022
07 1 724
056064
072025
00751 056072
00752 134213
00153 056103
00754 074460
00755 Pl56124
00756 051133
00757 056150
B0760 057113
00761 033667
00762 0 4 0031
00763 035017
00764 031753
00765 054006
00766 040055
00767 041027
0077f2' 154360
00771 035223
00772 0000PJ0
00773 073307
00774 116550
00775 043606
00776 154000
00777 051743

LOGP2 OfF
OfF
LULEN OEF
DEF
LW97 OEF
OEF
LWAUS OEF
OEF
MCBOP OEF
OEF
ONE! OEF
OEF
OUTCH DEF

oEF

PBUFF OEF
OEF
POFNS oEF
DEF
powIN OEF
OEF
R140R OfF
S14SC

oEF
OEF
OEF

SCHfN OEF
OfF
SCHIN OfF

seHle
SCaM!
SCOM5
STBAS

TJ5CH
T35DR
TTY35

XECtA

LAST ENTRIES IN LOGGR

L,OGGR+63
.CHOU
LIBUS+UlEN

"HOVE
USER+ULEN-97

*RECR
USER+ULE.N

,FILR

MeBOS
'VlFI
t, I
*RQST
_CUTC
-FILS
PROGB+l
.GTTY
PROFS
'WRSU
POW

'ALCO

R14CM
'RSTP
S14SH
jFENC
8CHEQ
ttMTGl
SCHIQ

LINKAGE FOR INPUT REQUEST.

OE.F *OTLI

OEF
DEF
OEF
DEF
DEF
OfF
OEF
OfF
DEF
OfF
OfF
OEF
OEF
DEF
OEF

SCHLQ
*RUND
COMI
.OTBl
COM5·1
*OTCL
SYNTS.428,I

#DSCH

T35CQ

jMCHR

7TT2
tlEVEP
1T135
*USCK
XECl

OEF 'PFSH
OEF
XEC31
Xfc3
OEF *fRMT
XEC5I OfF XEC5
OfF #EPRU
MAX SN DEC .10010
OEF MSLeK
LOGer NOP
OEF tlLCDL
MLIBO ASS ",LIBuS
OEF *FCUC
HULEN ABS .ULEN
Dff tlEOAB

NUMBER OF ELEMENTS IN LOGGR

PAGE 0013 #01
0528
0529

0530*

0531.·

BASE PAGE

01000 12500k1
00736

FUNCTION EXECUTION ENTRY ADDRESSES

0532*
~100t

050523

0536
0537

01002
01003
01004
01005

0538

~1006

0539
0540
0541
0542
0543
0544
0545
0546
0541
0 54 8
0549
0550

01001

050610
050553
051213
051411
051521
051645
050660

01011 052010
01012 050663
01013 050743
01014 051016
01015 001023
01016 051027
01017 050617
01020 051204
01021 051202
0102~ 052076

0552
0553
0554
0555

01023
01024
01025
01026

0~56

01021 100000
01030 000376

0533
0534

0535

0f)57
0558
0 55 9
0560
0561
0562
0563
0564

POFBS JMP PDFTB .. l,1
S14LP EQU SIAse

01010

023420
001750

PDF-Ts OEF ETAB
OEF E_LIN

OEF ESPA

OfF ElAN
DEF EATN

OEF
OEF
Off
OfF
OEF
OEF

OEF
lDVSR DEF
DfF
OEF

01031 0 4 0000
01032 000000
00320
00316
00356
00355
01027
00514

EASS

ESQR
EINT
ERND

ESGN
DVSRS

DEC 1000

MNEG

OEC 100
DEC 10
OCT 100000

HALF

OCT 376
DEC 0.5

" ....

M64
EQU 0100
HIMSK EQU M256
EOF

EQU ,-I

EOR
EQU ... 2
BIT15 EQU MNEG
A00" EQU 82000

0566. THE FOLLOWING CONSTANTS ARE MASKS

FOR THE 8IT .. FLAG WORD

IN EACH USER'S TTY TABLE

0568*
0569 00350
0510 00361
0571 00363
-0572 00367
0513 00377
0574 00411
0575 00462
0576 00476
0577 00502
0578 0050 6
0579 00612
0580 00520
0581 00600

~AY

DVSRS DEC 10000

0565*
0567*

'LEN' IS DONE IN A SPECIAL

ETYP
ETIM
OEF ESIN
OfF ECOS
DEF EBRK

0""144
000012

EExp
EloG

TERR EQU .+1
CFLAG EQU .... 2
HFLAG EQU ,+4
TAPEF EQU ,+8
UNA8T EQU ."'16
OUTWT EQU ,+32
COMt4 EQU s100
ABTRY EQU 8200
DFcHK EQU 8400
CHNFG EQU e1080
PUALT EQU M2080
MBUST EQU 84000
PBFLG £QU 'RPOP

TAPE ERROR
COMPILE MODE
SHELLO IS RUNNING
USER IN TAPE MODE
UNABLE TO A80RT
OUTPUT BUFFER FULL
COMMUNICATION fROM 21S.'
ABORT ATTEMPT
CHECK FOR DIRTY fILES
CHAIN RUNNING
PROGRAM UNALTERED
MBUSY POSITIVE
ABORT CAPABILITY DISABLED

PAGE 0014 #V'l1

RASE PAGE

CBFLG EQU 820M
0582 00522
0583*
0584*. ERROR JUMP TABLE
0585*
0586 01033 001472 St.RRS OEF SERR
0587

0588
0588
0588

01034 001472
01035 001472
1.31036 001412

0588

01937
01040
01041
01042
01043

1iJ588
0588
0588
0588
0588
0588
0588
11'588
0588
0588
0588
0588
0588

01045
01046
"1947
01050
01051
01052
et1053
01054

0588

01055

0588
0588

01056
01057
01061tl
01061

0588
0588
0588
0588
0588
0588
0588
0588
0588
0588
a588

0588
0588
0588
0588

0589

0590
0591
0591
0591
0591
0591
0591
0591
0591
0691
0591
0591
0591
0591

"'1044

01062
101063
01064

01065

012166
01067
01070

001472
001472
001472
001472
001472
001412
001472
001472
001472
001472
001472
001472
001472
001472
ta01472

001472
001472
001472
001472
0014472
001472
001412
001412
001472
001472
001472

01071 00.1472

01072
01073
01074
01075
01076
010 7 7

001412
0211472
001412
001472
001412
001472

0t10P' 001472

01101
01t02
01103
01104
01105
01106

01101
01110
01111
01112
01113
01114

001472
011472
001472
001412
001472
001472
001472
21014472
001472
0211472
001472
001412

RERRS

REP
OEF
DEF
DEF
DfF
DEF
DEF
oEF
oEF
DEF
DfF
OEF
DEF
oEF
OEF
OEF
DEF
OEF
OEF
OEF
OEF
DEF
OEF
OfF
OEF
DEF
OEF
OEF
OEF
OEF
DEF
OEF
OEF
OEF
OfF
OEF
OEF
REP
oEF
OEF

35
SERR

SERR
SERR
SERR
SERR
SERR
SERR

SERR
SERR
SERR

SERR
SERR

SERR
SERR
SERR
SERR
SERR

SERR
SERR
SERR
SERR
SERR

SERR
SERR
SERR
SERR

SERR
SERR
SERR
SERR

SERf(
SERR
SERR
SERR

SERR
SERR

50
SERR

sERR
OfF SERR
OEF SERR
DEF SERR
OEF SERR
OEF SERR
DEF SERR
oEF SERR
OEF SERR
OEF SERR
OEF SERR
OEF SERR

"BREAK· COMMAND GIVEN

PAGE 0015 #01
0591
0591
0591
1591
0591
0591
0591

0591
0591
0591
0591

0591
0691
0591
0591
0591

0591
0591

0691
0591
0591
05 9 1
0591
0591
05 9 1
0691
0591
0591
0591
0591

0591
0591

0591
0691
a591
0591
0591
0592
0593

0594
0594
059.0594
0594
0594
0594
0594
0594
0594
0594

0594
(d594
0594
0595

0596
1i2591

BASE PAGE

01162

001472
001472
001472
001472
081472
001472
001472·
001472
001472
001472
001412
001412
001412
001472
001472
001412
001472
001472
001472
001472
"01412
001412
001412
001472
001472
001412
001472
001412
001472
001472
001472
001472
001472
£101472
2101472
801472
001472
001472 FERRS

01163
01164
01165
01166
01167
01170
01171
01172
01173
01114
01115
01176
01177
01200
01201

001412
001472
001472
001472
001472
0e1472
001412
001472
001 4 72
001472
001472
0£11472
001412
001472
001 4 72

01115
"1116
01117
01120
01121
01122
01123

01124
A1125
01126
01121
01130
01131
01132
01133
01134
01135

01136
01137
01140
01141
011 4 2
01143
01144
01145
01146
01141
01150
01151
01152
01153

01154
01155
01156
01151
01160
01161

011202 001472

OEF SERR
OEF SERR
OEF SERR
DEF SERR
OEF SERR
OEF SERR
DEF SERR
OEF SERR
OEF SERR

DEF SERR

DEF
OEF
OfF
DEF
OEF
OEF
OEF
OEF
DEF
OEF
OEF
DE'

SERR
SERR

SERR
SERR
SERR
SERR
SERR
SERR

SERR
SERR
SERR
SERR

oEF SERf<
OEF SERR

OEF SERR
OEF SERR
OEF SERR
DE.F SERR
DEF SERR
OfF SERR

OEf SERR
DEF SERR
OfF SERR

DEF SERR
OEF SERR
OEF SERR
OEF SERR
OEF SERR
REP 14
DEF SERR
OEF SERR

OEf SERR

DEF
OEF
OEF
DEF
OEF
DEF
OEF
OEF
DEF
oEF
OfF
WERRS OEF
REP
OEF

SERR
SERR
SERR

sERR
SERR
SERR

sERR
SERR
SERR

sERR
SERR
SERR

9

SERR

PAGE 0016 #01
0597
0591
0597
0Sg7
0597

BASE PAGE

DE'

OEF SERR
OEF SERR
DEF SERR
OEF SERR
OEF SERR

0597

1i11203 001472
01204 001472
01205 001412
01206 001472
01201 001412
01210 001472
01211 001472

0597

01212 001472

SERR

0597

SERR

OEF SERR

OEF

PAGE 0017 #02
1002
8003

1804

"005
0006
0001
0008
.,809

USER AREA

01213 001224
01214 101224
01224
01224
0122. 005610
01225 000310
01226 000080

USE

USEI
USER

AREG
eRES
EREG

OEF
OEF
ORG
EGU

USER

USER,I
12248
..

DEC 3000
DEC 200

NOP

NOP
LIBUS EQu •

01221 0002100
01230

PRE&

01232 2100000
01233 124447
012 34 0000013
01235 124451

saseK

S010
0811.
8812*· SUBRoUTINE RETURN ADDRESSES
0e13.
Nap
0014 01230 2100000 FSC
1015 01231 124445
JHP •• JTD,I
0016

0011

0018

11119
0020
0021

"022
0023

00 2 4
0025

0126
1027
1028

1132

01245 124461
01246 000000
01241 124463
01250 000000
01251 124465
01252 000010

8833
0034
0035
80 36

01253
01254
01255
01256

0029
1030
111031

8031

8038
8839

0040

8041
804 2
0043

11044
9145
"046
8047
0048

0049
BI50
0051
8052

1053
0054
Lo

01236 00918"
01237 124463
01240 090080
01241 124455
01242 000000
01243 124457
01244 002100"

0055
0056

0051

124461
000000

FRCUR
FPQP

VAROP

ARRID

PRGIN
T8SRH
GETPF
LPCK

RPCK

\24411
008000

01257 124473
01260 000080
°12 6 1 124415

01262 000010
01263 124417
01264 0081e0
01265 12.501

LTR
STROP
CHRST

DIGCI<

NOP
JMP
NOP
JHP
NOP
JMP
NOP
JMP
NOP
JMP
NOP
JMP
NOP
JMP
NOP
JMP

NaP

JMP
NOP
JMP
NOP
JMP
NOP
JMP
NOP
JMP
NOP
JHP
NOP
JMP
NOP
JMP
NOP
JHP

01266 000000
01267 124593

LETCK

000000

SBPUO

01211 12 45 0 5
01272 000e00
01273 124501

SYMCK

01214 000080
01215 124511
01276 000000
01277 124513
01300 000000
01301 124515
01302 000000
01303 12451 1

FINCH NOP
JMP
NUMCK NQP
JMP
MBY10 NOP
JMP
Davl0 NOP
JMP

~1210

.-JTD,I
•• JTD,I
•• JTD,I
•• JTD,I
•• JTD,l

.·JTO,I
•• JTD,I
... JTD,I
•• JTD,l
.-JTD,I
•• JTD,I
.·JTD,I
.·JTD,I
•• JTD,I
"·JTD,1
.·JTD,I
•• JTD,I
*.JTD,I
•• JTD,I
.·JTD,I
.·JTD,I

SYSTEM LEVEL CODE
FEATURE LEVEL CODE

PAGE 0018 .02

USER AREA

S8Se
1059
1161
1161

01304 000000
013e5 124521
01306 001000

1162

01311

1164

01312 088090
81313 124527
01314 000000
01315 124531
01316 0130000
01317 124533
61320 000111
01321 124535
01322 000000
01323 124537
01324 000000
01325 124541
013 2 6 000800

.,,63
",,65

8066

0067
BI68

,,"69
".,. ......

DD''''

0071

0172
0073
0014
0175
0076

01307

12~5a3

010e."

01311 124525

",,77

01327 124543

0078

01330 0se000

0119
00e0
1881

01331 124645

01 3.3 2 0021080

1083
8884

11333 1245.7
11334 098800
21 1335 124551
01336 000180

0085

01337 124553

0086

01340 000800

8e82

""87

013 4 1 124566

008a

01342
01343
01344
01345
01346

0097
1098
0099
0100
0101

0080"0
124557
000000
124561
001880
01347 124563
01351 000100
01351 124565
01352 008000
01353 124567
PJ1354 000000
01355 124571
211356 000000
01.357 124573

"102

01360 000000

0089
eSg0
0091
0092
0093

"094
0095

0"96

8103
01 0 4
0105
0106
9101
0108
0109

0110
0111
8112
0113

211361 124515
01 362
01363
01364
01365
01366

01367
01370
01371
01372

000000

124577
0000"0
124601
000000
124603

000000

12'605
000000
01313 124607

NORML NOP
JMP
.PACK NOP
JHP
OVFLW NOP
JMP
DELPR NOP
JMP
FNDPS NOP
JMP
SSyMT NOP
JMP
ASVMT NOP
JMP
DCMPL NOP
JMP
PRNST NOP
JMP
CUSP NOP
JHP
STRID NOP
JMP
RSTOP NOP
JMP
GETST NOP
JMP
FORMX NOP
JMP
STSTR NOP
JMP
SBFIX NOP
JMP
PSTR NOP
JHP
OUCHK NOP
JMP
TRSTR NOP
JMP
COMPR NOP
JMP
PCHK NOP
JMP
FETCH NOP
JMP
SETDP NOP
JMP
FOATA NOP
JMP
FSCH NOP
JMP
PSHST NOP
JMP
ARINV NOP
JMP
BINOP NOP
JMP

.-JTD,I
.-JTO,I
·•• JTD,I

•• JTD,I
.·JTD,I
.·JTD,I
*.JTD,I

•• JTD,1
•• JTO,1
*.JTD,I
•• JTD,I

•• JTD,I

•• JTO,I
•• JTD,I

•• JTD,I
•• JTD,I
•• JTD,I
.-JTD,I
•• JTD,I

•• JTO,I
•• JTD,I
.-JTD,I
•• JTD,I
•• JTD,I

•• JTD,I
.·JTD,I
.-JTD,I

*-JTD,I

PAGE 0019 #02

USER

0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
01 2 8
0129
0130
0131
0132
0133
0134
0135

01374 000000
01375 124611

0136

000000

0137~

00A0~0

01377
01400
01401
01402
01403
01404
01405

124613

0000~0

01407
01410
01411
01412
01413
01414
01415

124623

°1 59

~1452

0161
0162
0163
0164

01453
01454
01455
01456

0140
0141
0142
1ti143
0144
0145
0146
0147

0148
0149
~150

0151
8152
0153
0154

0155
0156
0157
0158

0165

0166
0167
01 6 8
0169

000000

STTOP NOP
JHP .·JTD,I
opeHK NOP
JMP .-JTD,I
RseHK NOP
JMP ... JTD,I
.FAD NOP

.IMP *.JTD,l

.... s8

NOP
.JMP

.FMP
.FDV

124625

NOP

*-JTD,I

JHP *-JTD,I
NOP
JMp *·JTD,l

124633

.FLUN NOP
JMP * .. JTD,I
If Ix Nap
JHP .-JTD,I
ENQUT NOP
JMp .-JTD,I

000000

NU~OT

000000

124627
000000

124631

01416 A00000

0160

01 38
0139

124615
000000
124617
000000
124621

01406

e1417
"'1420
01421
01422
01423
et14 2 4
01425
01426
"1421
0143'"
01431
01432
01433
01434
01435
01436
01437
01440
01441
01442
01443
01444
01445
01446
01447
01450
014 5 1

0137

000000

AR~A

124635

GETDG

124637
000000

OUTlN

124641
000000

EDElM

124643

NOP
JMP
NOP
JMP
Nap
JMP
NOP
JMP
NOP
JMP
NOP
JHP
NOP
JMP
NOP

•• JTD,I
... JTD,I

*.JTD,I
*"'JTD,I

000000

SETPT

124645
0000QJ0
124647

.Ex P

000000

.LOG

00l!1000

.CHfH

124653

JHP .-JlO,I
.IENT NOP
JMP ... JTD,I

124651

0000~0

124655
000000

124657
000000

124661
000000

124663

000000

124665
000000

124667
000000

124671

000000
~1457 124673
01460 000000
01461 124615
01462 000000
01463 124677

.PWR2 NOP
JMP
INCAL Nap
JMP
GETeR NOP
JMP
RCKSP NOP
JMP
OUTeR NOP
JHP
aUTIN NOP
JMP
MeOUT NOP

... JTD,1

*-JTD,I
*-JTO,I

.... JTO,l
*"'JTD,I
.... JTO,I
• .. JTD,l

• .. JTO,I
*.JTD,l

.IMP ."JTD,I
OUTST NOP
JMp ··JTO,I
SINIT NOP
JMP ·"JTO,I

PAGE
0170

0171
0172
0173

0174
0175

0176
0177
a178
0179
0180
0181
0182
0~8J

0184
0185
0186
0187
0188
"'189
0190

0191
0192
0193
019 4

0195
0196

0197

0198
0199
0200
0201
0202
~203

0204
0205

0206
0207
0208

0209
0210
1t)211
0212
0213
0214
0215
0216
0217
0218
0219

0220
0221
0222
WJ223
0224
0225

(']020 #02

01464
01465
01466
VJ1467
014721
01471
01472
01473
01 474
01475
01476
01477

USFR AREA

000000

1247"1
000000

124703
0000021

124705
000~00

124707
000000

124711
1210000121

124713

01500 000000

1211501 124715
015 0 2 0210000
01503 124717
01504 "'0000k1

0151215 124721
01506 ~00000
01507 124723

01510 0021000
e11511 124725
01512 000000

01513 124727
01514 000000
0151~ 124731
01516 000000
01517 124733
~152~

000((J00

01521 124735
015 22 000000
01523 124737
01e24 000000
01525 124741
01526 000000
01527 124743
0153Q) 000000

01531 124745
01532 000000

01533 124747
01534 000000
01535 124751
01536 000000

01537 124753
01 54'"

01541
01542
01543
01544
01545
~1546

000~00

124755
000((!00

124757
000000

124761
000000

01547 124763
01550 000000
01551 124765
01 55 2 000000
01553 124767

BlOIN NOP

JMP
REDIM NOP
JMP
VCHK NOP
JMP
SERR NOP
JMP
CHOUF NOP
JMP
MOVER NOP
JMP
RECRf NOP

... J1D,1
*·JTD,I
*-JTD,I
.-JTO,I
•• JTO,I
.-JTD,I

·JMP

.·JTD,I

JMP
RQSTR NOP
JMP
FllST NOP
JMP
GTTYP NOP
JHP
WRBUF NOP

."'JTD,1

FIlRF NOP
JMP •• JTD,I
vlFIL NOP

JMP

... JTD,I
... J1D,I

··JTD,I
··JTD,I

ALCOM NOP
JMP ··JTD,I
RSTPT NOP
JMP ... JTO,I
NOP
FENCH
JMP .~JTO,I
MTGl NOP
JMP

Dll1

.-JTO,l

~OP
I

JMP ... JTO,1
ROUND NOP
.IMP

.-JTD,I

OUTaL NOP
JMp ··JTD,I
OUTCL NOP
.JMP * .. JTD,I
DSRCH NOP
JMP ... JTD,I
MCHAR NOP
JMP * ... JTD,1
EVEXP NOP
JMP *.JTD,I

USTCK NOP

JMp
PFSRH NOP
JMP
FRMAT NOP
JMP
EPRUS NOP
JMP

.-JTD,l

.-JTD,1
• .. JTD,1
*.JTD,I

PAGE 0021
0226

#~2

USER AREA

Vl1554 0021000
01555 124771
01556 000000
01557 124773
01560 0002100
01561 124775
01562 2100000
01563 124777

STLeK NOP
JMP ."JTD,1
LCDl.P NOP
.JMP ."JTO,I
FCUC NOP
JMp ... JTD,I
EDABR NOP
.JMP ... JTD,I
EQU FSC.SBJTa"'l
JTD

0227
0228
0229
0230
0231
0232
0233
0234 00564
0235*
0236*· GENtRAL USAGE INFORMATION
0231.
0238 01564 000000 RNDXl BSS 1
0239 0156 5 00000~ RNOX2 ass t
0240 01566 00001'0 .LNu M 8SS !
01567 000000 lNAME ass t.
0241
0242 01570 000000 CHRCT BSS 1
0243 01511 000040 BLANK OCT 40
0244 01572 000000 sBPTR BSS 1
0245 01573 000000 SYMTB BSS t
0 24 6 (11157 4 1300000 VALla BSS 1
°247 0157~ 0°2°00 SPROG OfF PROGB+l
0248 01516 000000 vLFLG BSS t
0249 01577 000000 FL.STS ass 4
0250 01603 000000 FILPT BSS 1
0251 P.!1604 000000 FIleT BSS 1
0252 0161215 000000 USESN BSS t
0253 01606 000000 NUMPT BSS 1
0254 01607 000000 ENOUF NOP
0255 01 6 10 00000121 ATIM BSS 1
0256 01611 000000 TEMP BSS 9
0257 01622 0000~0 XTEMP BSS 2
0258 016 24 000000 YTEMP BSS ~
0259 01626 000000 UTEMP BSS 2
0260 0163", 000000 X2TMP BSS 2
0261 0 1 6 32 000000 ATMP BSS 2
0262 01634 000000 BTMp BSS 2
0263 01636 000000 OTMP BSS 2
0264 01640 000000 BINOI BSS 1
0265 01641 1210000121 BIN02 BSS 1
0266 01642 125372
JHP BINOP,I
0267 01643 000000 ERSEC BSS 64
BSS 1
0268 01743 000000 CC
BSS 1
0269 01144 000000 eel
BSS 1
02 7 0 . 01745 000000 CC2
0271 01746 000000 eONTR BSS 1
0212 01747 000000 OP
BSS 1
0273 01750 000000 DPFLG BSS 1
0274 01751 t)00000 EOSTA BSS 1
_0275 01752 000000 FfL.G BSS 1
0276 01753 00012100 EST
BSS 1
0277 01754 0121000121 FFLG BSS 1
BSS 1
027S 01755 00000'" FSP
0279 01756 000000 IfSS ass I
02 8 0 01757 000000 IfSTR ess 1
BSS 1
02 8 1 0176 0 000000 NtH

30~BIT

RANDOM

INTEGER.

PAGE 0022 #02

USER AREA

0282 ~1761 000000 NUMl
0283 " 01762 0000~0 NUM2
0284 01763 00Q1000 " pet

0285

"'1164

000~00

0286

~116!5

0000A0

0287
0288
0289

01766

0090~0

0290
0291

0292
0293
0294
0295
0296
0297
0298
0299

0300
0301
0302
0303
0304
0305
0306
0301
0308
0309
0310

~17bl
~1770

000000
000000
01771 000000
131772 050000
tlI1773 054000
~1714 000000
1212000
01777

01027

0142Q1
"'1643
Pt1266
01316

01320
01322
01324
A1336
01360
01362

01614
01356
01300
01310

PC2
SAD
SijO

PMASK
RETCD
ASINP
DEFOP
FOROP
REpel
PHOGB

FlGaT
GFLAG
pINTG
SIGN
MANTt
MANT2
EXP
EXPON
fFLAG
NMTMP
NMPTR
NUMBF
DIGCT
NT0

0311
0312

01426

0313
0314
0315
0316

012 7 4
01430
01436
01440

OCTMP
LT0
LTI
lT2
lTJ
LT4
Ll5

0317

01442

LT6

0318
0319
0320
0321

01432
0155Qt
01444

0322
0323

0324
0325

0326
0327
0328*

0141210

01450
01374
01510
01512
01476
01472
01474

0329.* SYNTAX
0330.
0331 01574
0332 £)1616
0333 01470
0334 01615
0335 e1402
0336 01404
0337 01406

LT7

LTS

OT1
013
OGCNT

SOURC
DEST
TAPe
TApl
CUt

BSS 1
BSS t

BSS 1
BSS 1
HSS 1
BSS 1
BSS 1
RSS 1

BSS 1
OCT 500160
OCT 54000
ass t
ORG USER+554R
EQu .... 1
EQU MNEG
fQU NUMOT
EQU ERSEC
EQU LETCK
EQU SSYMT
EQU ASYHT
EQU DCMPL
EQU PRNST
EQu FORMx
F.QU sETDP
EQU FOAlA
EQU TEMP+j
EgU FETCH
fQU MBY10
EQU OVFLW
EQU RSCHK
EQU E"DELM
EQU FINCH
EQU SETPT
E.QU .tHEB
EQU .IENT
EQU .PWR2
EQU .EXP
Egu FRMAT
EQU INcAL
EQU BCKSP
EQU STTOP
EQU FILST
EQU GTTYP
fQU MOVER
EQU SERR
EQU CHOUF

INfORMATION TEMPORARIES

EQU VALlB
EQU lEMp+5
EQU VCHK
fQU Tt.MP+4
EQU .FAD
EQU .FSB
LNGTH EQU .FMP

ERRCT
sBuFA
SYNTQ
SSTAK
MAXCR
TABLE

PAGE 0023
ra338
0339
0340
1341
0342
0343

01~10

01432

01436
01440
01442
01306

0344

01412

0345

01617

0346.
0347.·

1102

USER

AREA
SM8GN
SLENG
COUNT
T8LPT
TSPTR
SBT0
Cl>FLG
pFLAG

EQU
EQU
EQU
EQU
EQU

.FDV
.EXP
.tHEB
.IENT
.PWR2
~QU .PACK
EQU .FLUN
EgU TEMp+6

COMPILE INFORMATION TEMPORARIES

0348.
0349 01234
0350
0351

01502

0 3 52

01230

v.l124'-

EQU FRcUR
E.QU FILRF
EQU ARRID
EQU FSC
E.QU FPOP
EQU VAROP
EQU TEMP
STHP2 EQU TEMP+l
VTMPt EQU TEMP
VlMp2 EQU TEMp+l
VTMP3 EQU TEMP+2
VTMP4 EQU TEMP ... 3
VTMPS EQU TEMP ...
COMSN EQU TEMP.4
STPTR EQU TEMP.S
COMpT EQU TEMp+5
STeTl EGU TEMP.6
8TC12 EQU TEJI4P+2
5TCT3 EQU TEMP+J
DCFLG EQU TEMP.6
INFST EQU FRMAT

FLINK
FILTS
STEND
SP1R
NSPTR
SlYPE
STMPl

0353 01236
0354 01240
0355 01611
0356 01612
0357 011611
0358 01612
0359 01613
0360 01614
0361 01615
0362 01615
0363 01616
0364 01616
0365 ~t6t7
0366 01613
0367 01614
0368 01617
0369 01550
0310.
0311.· EXECUTION INFORMATION TEMPORARIE.s
0372.
fCORE EQU S8SCK
0373 01232
0314 "'1500
fCI.JTR EQU RECRF
0 3 , 5 01240
RTRNQ EQU VAROP
EQU ARRID
RTNST
0376 01242
0371 01246
FORQ EQU TBSRH
0378 0125\1
fORST EgU GETPF
0379 01330
TMPST EQU STRIo
EQU RSTOP
OPOST
0380 01332
0381 01~64
OPTRQ EQU BLDIN
0382 01334
PRGCT EQU GETST
0383 01262
"CCNT EQU CHRST

0384

0385
0386
0387
"388
0389
0390
0391
0392
0393

211244
01611
01252
01254
01256

01212
01260
01476
01426
01420

EQU
EQU
EQU
EQU
EQU
EQU
TEMPt; EQU
GlMP EQU
FVT
EQU
EQU
£FN0
NXTDT
TEMPt
TEMP2
TE,ftIIPJ
TEMP4
TEMP5

PRGIN
TEMP
LPCK
RPCK

LTR
SYMCK

STROP
MOVER
fOELM
NUMOT

PAGE 0024 *02
0394

01422

0395
0396
0397
0398
0399
0400
0401
0402
0403
0404
0405
0406
0407
0408
0409
0410

~t424

0411
0412
0413
0414
0415
0416
0 4 17
0418
0419
0420
0421
0422
0423
8424

0425
0426
0427
0428
0429
0430
0431
0432
0433
0434
0435
0436

0437
043 8
0439
0440
0441
0442

01366

01456
t1142A
t{)1420
01476
01354

01550
01470
01456

01572
01350
01352
01312
01314
01622

01623
01340
01364
0163'-·
01633
01634
01635
01636

01637
~1630

USER AREA
EFNl
ffN2
EFNJ
INITf
' If-CNT

RSPTR
HeNT
INTMP
STRLN

EOL
EOPF
BSt
882

aS3
M10
MTI
.MT2
MT3
MOP
HEXIT
MHT"
MMT1
MHT2
MHT3
MMT4
MMT5

01631
01316

MMT6
HMT7
MMTS

01514

100

01362

IDI

01470

RD0

01400

. VTe

'11622
01624
01626
01344
~14J6

0144rf1
01442
01616
01617
01620
01402
01264
0126b

01614

01615
01644

0443

~1647

0444
0445
0446

r.1645

",447

01646
01650
01236

0448

01651

0449

1d1234

EQU GETDG
f"QU OUTLN
EQU PSHST
EQU MCOUT
~.QU NUMOT
EQU NUMOT
EQU MOVER
EQU PCHK
fQU FRMAT
EQU VCHK
EQU MCOUT
EQU SSPTR
EQU TRSTR
EQU COMPR
EQU DELPR
EQU FNDPS
f.QU XTEMP
EgU XTEMP+l
fQU STSTR
E:QU FSCH
EQU A1MP
EQU ATMP+l
EQU 8TMP
E.QU BTMP+1
EQU DTHP
EQU DTMp+l
fQU X2TMP
FQU )(2TMP+l
EQU OPCHK
f.QU WRBuF
EQU FDATA
EQU VCHK
EQU RSCHK
EQU XTEMP
EQU YTEHP

SCALR
MAXE
TOl
EgU
PIVEL EQU
EST1 EQU
EST2 EQU
ESTJ EQU
EGU
A1
EQU
A2
EQU
C1
EQU
F00
EQU
TTl
EQU
TT2
EgU
TTJ
EQU
TT4
RQl
EQU
EQU
RQ2
RQJ
EQU
EQU
RQ4
RQ5
EQU
F8ASE EQU
EORfL EQU
fILE" EQU

UTEMP

PSTR
.CHEB
.IENT
,PWR2
TEMP+f:j

TEMP.6
TEMP+7
.FAD
DIGCK~

LETCK
TEMp+J
TEMP.4
ERSEC+l
ERSEC+4
FRSEC+2
ERSEC+3
ERSEC+f)
FPOP
ERSEC+6

FRCUR

PAGE

0025 #02

8450

01520

0451
0452
0453
0454
0455
0456

01514

0457

01410
01466
01462
01432

0458
0459

0460
0461
1462
0463
0464

A.1652

01653

A1400
01376
"1~06

01344
01402
~1404

0465

01436
01440

0466
0461

0137b

0468

0469
0470
0471
e472
0413
0474
0475

01434
01643
01644
01 646
01647
01650
01726
01727
0173 0

0416

01731

"477
0478
0479

°1132
01133

9480

01737

0481
0482
0483

01749}
01741

048~

0485
0486
0487

0.t736

01742
01410
01550
01554
01466

LISER ·AREA

RCRD' EQU RSTPT
EQU WRBUF
VL0
t-gU
ERSEC+7
DADRR
fILl EQU ERSEC+e
EQU RSCHK
"'PT
EQU OPCHK
NQT
fQU
TNUlL
.FHP
TPRME EQU .fOV
EQU REDIM
PS0
EQU SINIT
PSt
EQU .EXP
CP0
EQU PSTR
CPt
THf-CH EQU .FAD
TRS0 EGU .F58
EQU .tHEA
RT0
EQU .IENT
RTl
LBTHP EQU .LOG
CTMP EQU OPCHK
EC
EQU ERSEC
EQU ERSEC+l
FST
SfLG EQU ERSEC+3
EXPW EQU ERSEC+4
HB
EQu ERSEC+5
HBp
EQU ERSEC+51
EQU ERSEC+S 2
lCH
NAO
Eau ERSEC+53
EQU ERSEC+54
NBD
N8LK EQU ERSEC+55
NH8W EQU ERSEC+56
NUMWI FQu ERSEC+59
NUMW2 EQU ERSEC .. 60
SNFLG EQU fRSEC+6t
TOTDG EQU ERSEC+62
DCTR EQU ERSEC+b3
ELeNT EQU VCHK
ORONO EQU FRMAT
ASaFP EQU STLCK
ASTYP EQU REDIM

46 WORD BUFFEt<

PAGt 0026

#~3

DIREC TABLE

0002*
0003**
8184* ••
DIREC TABLE
8005*·
0006*
DIREC IS A 560 WORD RESIDENT TABLE WHICH CONTAINS INFORMATION
0001*
ABOUT THE DIRECTORY. THE TABLE HAS 80 ENTRIES, ONE fOR EACH
0088*
~U,e9·

""11*
0011*
0,,12*
0013*
8014*
0015*
0016.
0011*
8018*
0819*
0021
0022

POSSIBLE DIRECTORY TRACK. EACH ENTRY IS SEVEN WORDS LONG AND
THE fOLLOWING STRUCTURE.

HAS

.1) LENGTH IN -WORDS
2) SAME AS FIRST
3)
FOUR WORDS OF
4)
DIRECTORY
5)
TRACK
6) DISC
7)
AODRESS
30000
30000 000000

0024

31051

0025

31060

ORG 300006

DIREC BSS 560
OIREL EQU *-7
OIREU EQU *

-> START OF LAST ENTRY
•• FIRST LOCATION BEYOND TAILE

PAGE 0027 #03
0027*
0028*
0029*
0030*
0031*
0032*

DISC DRIVER DRIVER

THIS ROUTINE CALLS THE REAL DISC DRIVER AND WAITS FOR THE
TRA~SFER TO 8~ SUCCESSFULLY COMPLETED.
THE CALLING SEQUENCE
TO THIS DRIVER IS AS fOLLOWS,
JSB 015CZ,1

0033*

A RfGISTER

~

MUST CONTAIN THE ADDRESS OF A DOUBLE
WORD CONTAINING THE DISC AODRES8 (SLOCK
NUMBER) OF THE FIRST REtORD OF TH~ TRANSFER.

B REGISTER

~

BITS 1410 - CORE ADDRESS AT WHICH THE
TRANSfER IS TO BEGIN.
BIT 15
~ TRANSFER CODE
1 • DISC REAO
(d • DISC WRITE

MWORO

~

MUST CONTAIN THE NEGATIVE NUMBER OF WORDS
TO BE TRANSfERRED,

MBUSY

~

SET TO .1 BY THE DISC DRIVER WHILE IT IS aUSY

0034*
0035*

0036*
0037*
003S*
0039*
00421*

0041*
0042*
0043*
0044*
0045*

0°46·
1rJ048
0049
0050
0051
00!;2
0053

0054

1iJ055

0056
0057
0058

31060 000000
31061 A70071
31062 114201
31063 102030

31064 102031

3106fS
31966
31067
3107 0
31e71
31072

060203
002020
027065
002003
037060
127060

lOISc NOP
STA STOAP
JSB DISCA,I
HLT OEATH+38B
HlT DfATH+31B
LOA
58A

MBUSY

JMP ... 2
SZA,RSS
lSZ ZOISC
JM.P ZOISC,I

SAVE POINTER
CALL DISC DRIVeR
DRIVER BUSy
DISC NOT PRESENT
WAIT FOR
COMPLETION
IF NO ERRORS, ADVANCE
RETURN ADDRESS

PAGE 0028 *03

OLOOK ROUTINES

0~60*

&061**
006"2***
ULOOK
0063*.
0064*
DLOOK SEARCHES'THE DIRECTORy FOR A PARTICULAR ENTRY,
0065*
0066*
DESIRED ENTRY IS D~FINEO SY LTEMP(IIJ),
0067*
ENTRY IS fOUND,
0068*
THE APPROPRIATE DIRECTORY TRACK IS IN CORE
"069*
0070*
CLTEMP+4) - POINTER TO DIREC ENTRY
(LTEMP+5) - DIRECTORY MEMORY ADDRESS OF ENTRY
0071*

DLOOK RETURNS TO P+i

0°12*
1013*

ENTRY JS NOT FOUNDs
(LTEPM+4). POINT AT THE lAST ENTRY
(LTEMP+5) LESS THAN THE GIVEN ENTRY
DLOOK RETURNS TO P+2

0074*
0075*

1016*
0011*

0079
0080
0081
0082
0083
0084
0085
0086
0e81

J1073 000000
31074 067230
31075 074034
31076 160001

0089

31077 002002
31100 027104

31101 064034
31102 044350
31103 021£175

OLOKB LDA
STA
LDA
ADA
LOB
JSB

31111
31112
31113
31114
31115
31116

0097
009S
0ftl99
0100
0101
0102
0103
0104
0105

0116
0101
0108

0110
0111
0112

0113
0114
0115

OLOK3
LTEMP+4
, .. 1
OLOKI

31130
31131
31132
31133
31134
31135

31110 000000

0094
00g5
0096

5ZA

JMP
DlOK2 LDB
ADS
JMP

31127 114211

0092
0093

0091"

DLOOI< NOP
LOB DIROL
OLOKI 8T8 LTEMP.4
LDA 8,1

OlOK3 IN8
LOA DLTEM
J8B DIRCH
JHP OLOK2
NOP
LOA lTEHP+4,1
CMA,INA
ADA LIBD
ADA .-12
SrA LTEMP+5
LOA LTEMP+4
ADA ,+5
CPA DIRWD
JMP Dl.OK4
LDA DIRWD
SZA,RSS
.JMP DL.OKB
LDB LIBD
JSB DlSCZ,I
JSB SLVAG,I

31104 006004
31105 06064&
31106 017203
31101 027101

"0ge

THE

160034

003004
040676
040343
070035
06 0034

31117 040364
31120 050251
31121 027137
31122 0 6 0257
31123 002003
31124 027130
31125 064676
31126 114206
160034
070204
060034

040364
064700
1142 0 6

SET LTEMP.4 TO POINT AT
LAST DIRECTORY TRACK
TEST fOR
EMPTy TRACK
NOT £:MPTY
BUMP BACK TO
NEXT TRACK

COMPARE THE FIRST
ENTRY ON THIS TRACK
TO THE DESIRED ENTRY
NOT ON THIS TRACK
fOUND THE
RIGHT TRACK
SET UP INITIAL
POINTER FOR
TRACK SCAN

GET DIRECTORY DISC
ADDRESS POINTER
IS THIS TRAC~ ALREADY IN COR!,
YES
NO w CHECK FOR ANY TRACK IN CORE
NONE, SO JUST READ IN NEW TRACK
yES, WRITE PREVIQUS
TRACK OUT TO DISC
DISC ERROR

LTE"'+4,I SET uP DIRECTORy TRACK
M~ORO
TRANSFER LENGTH
LTEMP+~
SET UP POINTER TO
,+5
DISC ADDRESS
LI8Dl
DISCl,l
READ IN DIRECTORY TRACK

PAGE
0116

~029

31136

#03

OLOOK ROUTINES
JS8 SICKP,I

1142~7

0118. NOW SEARCH DIRECTORY FOR DESIRED ~NTRY. A BINARY SEARCH IS USED,
0119. WITH LTEMP(l'ltb) USED AS POINTERS TO TH~ FIRST AND LAST OF ALL

012,,*
0121*
8122
0123
0124
0125
0126
0127
0128
0129
0130*
0131
0132
0133
0134
0135

01 36
0131
0138
0139
01 4 21

UNTESTED ENTRIES.
31137
31140
31141
31142
31143
31144
31145
31t46

060616

070046
060640
064035
017203
027147
037073
121073

31147 060035
3115~ 070047
31151 0600~6
31152 003004
31153 040047
31154 001100
31155 006400
31156 100 4 00
31157 000373
3116PJ 100200
31161 000373
311 6 2 0 4 0046
31163 070035
31164 064640
31165 0150046
31166 027176

21141
0142
0143
0144
0145*
0146 31167 017203
0147 31170 021173
0148 31171 027147
0149 31172 127073
0150*
0151 31173 060035
0152 31174 070046
0153 31175 027152
0154*
0155 31176 050676
0156 31177 017203
0157 31200 037073
01 5 8 31201 000000
0159 31202 127013

OLOK4 LOA
STA
LOA
LDB
JSB
JMP
ISZ
JHP

LIBD
LTEHP+14
DlTEM
LTEMP+S
DIRCM
DLOK5
OLOOK
OLOOK,l

DLOK5 LOA LTEMP+5
STA LTEMP+15
LDA LTEMP+14
DLOK6 CHA,INA
ADA LTEMP+t5
ARS
CLB .
DIV '. +12

MPy .+12
~DA

srA
LOB
CPA
JMP

SET POINTER TO BEGINNING OF
DIRECTORY.
TEST LAST ENTRY IN TRACK.
LAST ENTRY TOO BIG··START CHOP.
TOO SMALL~.IT'S THE ONE,
LAST ENTRy IS IT,
SET END POINTER.
COMPUTE DIFFER(NCE BETWEEN 'IRST. ,.
AND LAST ENTRIES,
DIVIDE 8YTWO.
ROUND TO A
MULTIPLE
OF TWELVE

LTEHP+t4·GET ADDRESS OF MIDDLE ENTRY.
LTEMP+5
SET INTO RESULT LOCA,10N.
DLTEM.
SETUP FOR JSB DIRCH.
.
LTEMP+14 TEST fOR ONLy 2 ENTRliS LEFT,
DLOK8
THERE ARE •• WEIYE GOT THE RESULT,

JSB DIRCH
JHP Ol.OK7
JMP OLOK5
JHPDL.OOK,I

TEST MIDWAy ENTRY.
TOO SHALL ••GO RESET LT£MP(l.).
TOO 81G~.GO RESET LTCMP(15).
EQUAL ... RETURN.

OLOK7 LOA LTEMP+5
STA lTEMP+14
JMP DLOK6

RESET lTEMP(14).

OLOKe CPA
JSB
ISZ
NOP
JMP

LIBO
0IRCM
DlOOK

If 'LTEMP(14)~>LTEHP, WE KNOW
IT'S LESS, SO wt SKIP TEST.
LESS THAN ENTRV.

oLOOK,I

EQUAL TO ENTRY,

PAGE 0030 #03
0161*
0162.
0163.
0164.
0165.
0166.
0161
0168
0169
0170
0171
0172
0113
0114
0115

0176
0177
0178
0179
0180

0181
0182
0183
0184
°1 8 5
0186

0187
0189
0190
0191

0192

DLOOK ROUTINES

DIRCM COMPARES THE 4 WORD ENTRIlS POINTED TO By A AND 8.
BIT 15 IS NOT USED. IT RETURNS AS FOLLOlttSI
P+1: Ac8
P+2: A>S
P+J A-a
31203 000000
31204 073232
31205 060353
31206 073231
31207 077233
31210 163233
31211 001665
31212 003004
31213 167232
31214 005665
31215 040001
31216 002002
31217 Cit27225
31220 031233
31221 037232
31222 037231
31223 027210
31224 037203
31225 002021
31226 037203
31227 121203

ELA,CLE,ERA
CMA,INA
LOB DIRC2,I
ELB,CLE,ERB
AOA 1
SZA
JMP DIRCA
ISZ DIRC5
ISZ DIRC2
ISZ DIRCI
JMP DIRC3
ISZ DIReM
DIRC4 SSA,RSS
ISZ DIReM
JMP DIReM,I

31230 031°51
31231 000000
31232 ~00000
31233 000000

DIRDL
OIRC1
OlRC2
OlRC5

DIReM NOP

STA DIRc2

LDA

1",,4

SET COUNTER.

STA DIRCl
ST8 DIRC5

OlRC3 LOA DIRe5,I

OEF
RSS
RSS
BSS

OIREL
1
1
1

SUBTRACT WORD FROM B
FROM WORD FROM A.

TEST FOR EQUAL.
NOT EQUAL-GO RETURN.
BUMP
POINTERS.
TEST FOR FINISHED.
DOUBLE ISZ FOR EQUAL.
ONE lSZ If •• B
NONE IF A SyNTAX ••
0341···
••
0342.
FAKE
0343 32017 060552 Lt.T0 LDA LETOP
A
0344 32020 111572
STA SBPTR,l
0345 32021 015450
JSB BCKSP
'LET'
ENABLE A
0346 322122 065572 LETS LDB SBPTR
8T8 SFLAG
STRING VARIABLE
0347 32023 077453
ISZ
MSFLG
TURN
ON 'MULTIPLE STORE' MODE
~31447
0348 32024
JSB
FSC
ANALYZE
FORMULA
0349 32025 015230
ISZ
SFLAG
STRING
VARIABLE
FOUND?
0350 32026 037453
JMP
LET 1
NO
0351 32027 026035
0352 322130 015272
YES, (8) IS LEFT AT .1
JSB SYMCK
DEF AssoP-t
0353 32031 033415
DEMAND ASSIGNMENT OPERATOR
0354 32032 115036
JSB SERRS+3,I NOT FOUND
.JSB RSTOP
RECORD A STRING OPERAND
0355 32033 015332
JMP EOST
OEMAND END OF STATEMENT
0356 32034 026037
ISZ SFLAG
DID A STORE OCCUR7
0357 32035 ~31453 LETt
0358 32036 115036
JsB sERRS+3,I NO
0359.·
0360.** CHECK fOR END OF STATEMENT •••
0361.·
••
0362 32037 050374 EOST CPA .+15B
END OF STATEMENT~
0363 32040 124620
JMP AceSA,l
YES
0364 32041 115037
JS8 SERRS.4,I NO
0365*
0366 •••
0367..  SYNTAX ••
0368**·
0369.
0370 32042 002400 DIMS CLA
FLAG AS OIM STATEMENT
0371.
0372 •••
.*
0373*.  SyNTAX
0374 •• *
.*

*.

••
*.

*.

0375.
0376
0377
0378
0379
0380
0381
0382

0383
0384

0385

32043 ~71412
32044 077445
32045 061572
32046 073453
32047 015240
32050 115040
32051 026055
3212152 006400
32053 055412
32054 11512140

COMS

STASTB
LDA
STA

COFLG
DFLAG
sBPTR
SFLAG

fLAG AS COM STATEMENT
TURN ON 'DIM' MODE ( (8)-, )
ENABLE STHING
VARIABLE
sEEK VARIABLE OPERAND
.JsB VAROP
JSe SERRS+5,1 IMPROPER SUBSCRIPT
COMS0 JMP COMSi
ARRAY OR STRING FOUND
CLB
SIMPLE VARIABLE
cpa CDFLG
'DIM'?
JSB SERRS+5,1 YES .. ~ERROR

PAGE 0035

#~3

STATEMENT SYNTAX PROCESSORS

0386 32055 050374 COMS1 CPA .+158
0387 32056 124620
JMP AceSA,I
cce
0388 322157 007400
0389 32060 015272
JSB SYMCK
OEF COMMA':'t
0390 32061 033363
JSB sERRS+6,I
0391 32062 115041
.JHP COMS ... 2
0392 32063 026045
0393*
0394 •••
*.
0395 ••  SyNTAX
0396.*.
0391.
0398 32064 015256 DEfS JSB LTR
0399 32065 115042
JsB SERRS+7,I
ALF,ALf
0400 32066 001727
0401 32067 031612
lOR TEMp+1
CPA FN
0402 32010 053375
0403 32011 002001
RSS
0404 32072 115042
JS8 SERR5+7,!
JSB LTR
0405 32073 015256
0406 32074 115042
JSB SERRS+7,I
0407 32075 061612
LOA TEMP+1
LOB ,58
0408 32076 064452
0409 32077 015260
JSB STROP
0410 32100 061613
t OA TEMP+2

NO, CARRIAGE RETURN fOLLOWS'
YES
NO
COMMA?
NO
YES

••

••

0411
iJ412

32101 "'15252

0413

32103 171572
32104 015240

0414
0415
0416

0417
0418
0419

0420
0421
0422
0423
04 2 4
0425
0426

0427
0428

3 2 102 031027
32105 000000
32106 115043

32107
3 21 10
32111
32112
32113
32114

015254
007400
015272

033415
115036

12160355

32115 041572
32116 160000
32117 0105~4

32120
32121
32122
32123

071617
015230

T~O

CHARACTERS

yEs

'FN' ?

NO
FOLLOWED BY A LETTER1
NO

yEs,

RECORD
FUNCTION
RETRIEvE FOLLOWING CHARACTER
JSB LPCK
DEMAND LEFT PARENTHESIS
lOR FLGST
SET fL.AG FOR
STA SBPTR,I
FORMAL PARAMETER
JSB VAROP
DEMAND A SIMPLE VARIABLE
NOP
NONE
JSB SERRS.8,I
FOUND
JS8 RPCK
DEMAND A RIGHT PARENTHESIS
ete
ASSlfiNMENT
OPERATOR
JSB S~MCK
NEXT?
DfF ASSOP.l
JaB SERRS+3,I NO
YES,
LOA .-2
ADA SBPTR
ISOLATE
LOA 0,1
AND SAVE
AND 8777
FORMAL
STA PFLAG
PARAMETER
JSB FSC
FETCH DEFINING FORMULA
JSB SBPUD
RECORD END~OF.FORHULA OPERAToR
JMP EOST
DEMAND END OF STATEMENT

015270
0429
026037
0430.
0431.*.
0432.*  SyNTAX
0433.*.

0434.
0435 32124 0 6557 2
0436 32125 071457
0437 32126 12106400
0438 32127 060374
0439 32130 015262
0440 32131 000000
0441 32132 061612

f'IR5i

••
••

.*

IMAGS LOB SBPTR
STB ARVAD
cL8

SAVE CURRENT
BUFFER POINTER

LOA .... 158
JSB CHRST

SET OELIMETER
RECORD STRING CONSTANT

LDA TEMP'" 1

LENGTH

Nap

PAGE 0036 #03
1442
0443
0444
0445
04146

STATEMENT SYNTAX PROCESSORS

32133 040321
32134 002 0 21
32135 115072

32136 163457
32131 ('141612
32140 173457

ADA M73

SSA,RSS
>727
JSB SERRS+31,I YES
LDA ARYAD,I
NO,
ADA TEMP+l
RECORD
STA ARYAD,I
LENGTH
JMP ACCSA,I

0441
0448 32141 124620
0449.
0450 •••
0451.*  & cGOSUB STATEMENT> SYNTAX
0452 •••
0453.
SAVE
0454 32142 A60220 GOTOS LOA SSP
0455 32143 064255
LOB MAIN
INS
0456 32144 006004
BUfFER
lOR 1,1
0451 32145 130"'01
0458 32146 114736
JSB S14SC,I
POINTER
SET INTtK MODE TO
ctA
0459 32147 003400
0460 32150 071420
STA-GFLAG
'EXIT ON ERROR'
0461 3215t (i)15244
JSe PRGIN
SEEK SEQUENCE NUMBER
0462 32152 026212
JMP GOT03
FOUND
eeB
NOT FOUND
0463 32153 007400
0464 32154 045572 GOTOl ADB sBpTR
BACK UP
0465 32155·075572
STB SBPTR
SYNTAX POINTER
0466 32156 161572
E.RASE
LOA SaPTR,I
ANO OPMSK
'INTEGER FOLLOWS'
0 4 67 32157 010570STA SBPTR,i
0468 32160 111572
FLAG
RESTORE
0 46 9 32161 060221
LDA RBP
LOB MAIN
0470 32162 064255
tNS
aUf'FER
0471 32163 00 6 004
lOR 1,1
0472 32164 130001
JSB 5145C,1
POINTER
0473 32165 114136
0474 32166 015230
.}S8 FSC
sEEK FORMULA
END-Of.RECORD?
CPA +158
0 47 5 32167 050374
•
0476 32170 1151it44
JSB SERRS+9,I
YES
NO, DO
0477 32111 001727
ALF,AlF
0478 32112 071612
srA TEMP+l
NEXT
0479 32113 015446
TWO
JSB GETCR
JSB SERRS+9,I
CHARACTERS
04 8 0 32174 115044
0481 32 t 15 03'1612
FORM
lOR TEMP+l
CPA OF
0482 32176 053377
'OF, t
RSS
YES
0483 321 1 1 002001
0484 32200 115044
JSB SERRS .. 9,I NO
0485 32201 060564
LDA. OfOP
RECORD
STA SBPTR,I
0 4 86 32292 171572
'OF' ANO
- JS8 SBPUD
0487 32203 015210
ADVANCE POINTER
0488 32204 015464 GOr02 JaB BlDIN
DEMAND A SEQUE~CE NUMBER
0489 32205 175572
STB sapTR,I
RECORD IT
0490 32206 015270
JSB SBPUD
COHMANEXT?
0491 32201 050433
CPA ,+44
0492 32210 026204
JMP GOT02
YES
JMP fOST
0493 32211 026037
NO, DEMAND ENO OF STATEMENT
0494 32212 050314 GOT03 CPA .+15B
END OF STATEMENT?
8495 32213 026217
JMP GOT04
YES
04 9 6 32214 071420
STA GFLAG
NO, RE.E~ABLE BAD INTfGER ERROR
0497 32215 ~64J5~
LOB .... 2

*.
••
••

PAGE
0498
0499
1580
0501
8502
0503

0504

~~37

N~3

STATEMENT

060220
064255
016004
130001
114136
124620

PROC~SSORS

JMP GOlDI

32216 026154

.32217
32220
32221
32222
32223
32224

~YNTAX

GOT04

LOA FBP
L08 MAIN
INB
lOR 1 , 1
JSB S14se,1
.JMP AceSA,1

950b.

fREE
SAVED

BUfFER SPACE
ACCEPT STATEMENT

••

0506 •••
0507 ••  SYNTAX .*
0508 •••
0509.
lSI SBPTR
0510 32225 035572 IFS
0511 32226 015446
JSB GETeR

••

32227
32230
32231
322·32
32233

115072
171572

JSB
STA

063451
007400
015246
32234 026240

LDA

32235
32236
32231
3.2240

015502
115073
026265

0523
0524
0525

32242

0526

32245

045572
075572
\'1710453
015230

0521
0528
0529

32246
32247
32250
32251

0512
0513
0514
0515
0516
0517
0518
0519

0520
1521

0522

~530

0531

0532
0533
0534
0535

0536
0537
0538
0539

0540
0541
0542
0543
0544
0545

05446
0547

015450
32241 007400
32243
32244

037453
026265

071612
06 4354

32252 17 1 572
32253 063736
32254 015246
3 2 255

0020~1

32256 A26264
3 22 57 061612
32260 064353
32261 015272
32262 033431
32263 115053
32264 015332

32265 171572
32266 035402
32267 060626
32270 007400
32271 015246
32272 115045
32273 015244
32274 026037

0548
0549
0550.
0551.·.
0552 ••

0553 •••

eca

JSB
JMp
JSB

JSB

JMP
JSB

eee

fElCH NEXi
CHARACTER
SERRS+31,! NONE FOUND
SBPTR,I
FOUND, SAVE IT
AENO
LOOK
FOR
TBSRH
'END'
IF0
NoT FOUND
FILRF
FOUND, GET FILE REFERENCE
SERRS+32,I NONE FOUND
IF1+1
fOUND
BCKSP
RESTORE

ADa SBpTR
STe sePTR
5T8

JsB
ISl
JHP
STA
LDB
STA

LDA
JSB
RSS
JMP

LOA
LDB
JSB

OEF

JSB
JSB
5TA

lSI
LDA

ece
JSB
JSB
JSB
JMP

 SYNTAX

TO

ENTRY
STATUS
SFLAG
ENABLE STRING VARIABLE
sEEK DECIsION FORMULA
FsC
SFLAG
STRING VARIABLE FOUND?
NO
Ift.t
TEMp.1
yEs, SAvE NEXT CHARACTER
1 .. 3
MAXCR • 3 FROM FSC
SBPTR,1
MULTICHARACTER
MCREL
RELATIONAL
TBSHH
OPERATOR.,
NO
IF1
YES
TEMP+l
RETRIEVE CHARACTER
.~4
SINGLE CHARACTER
SYMCK
RELATIONAL
RELOS.l
nPERATOR1
SERRS+16,I NO
RSTOP
yES, RECORD A STRING OPERAND
SBPTR,I
sAvE NEXT CHARACTER
MAXCR
BUMP LIMIT TO FOUR CHARACTERS
ATHEN
LOOK
FOR
TBSRH
'THEN'
SERRS+10,1 NOT FOUND
PRGIN
DEMAND A SEQUENCE NUM8ER
EOST
DEMAND END OF STATEMENT

••

••
••

PAGE 0038 #03

STATEMENT SYNTAX PROCESSORS

0554*
0555 32275 015240
0556

0557
0558
0559

0560

0561
0562
0563

0564
0565

0566
0567

0568
e569

0570
0571
0572
0573
0574
0575
0576

0577
0578
6579
058ra
05 8 1
0582

0583

32276 000000
32277 115043
32300 001'00
32301 015272

32302
32303
32304
32305

033415
115036

015230
001727
32306 011612

32307 015446
32310 115046
32311 031612
32312 053316
32313 002001
32314 115046
32315 063740
32316 171572
32317 015230
32320 050374
32321 124620
32322 111572
32323 035402
3232" 063461
32325 007400
32326 015246

32327 11 5 047
3233~ 015230
32331 026037

FORS

JSB VAROP
SEEK A SIMPLE VARIABLE
NOP
NONE
JSB SERRS+8,I
'OUND
eca
DEMAND AN
JSB SYMCK
ASSIGNMENT
OfF ASSOP-l
OPERATOR
JSB SERRS+3,I NOT FOUND
JS8 FSC
RECORD INITIALIZATION FORMULA
ALF,ALF
00
NEXT
STA TEMP"l
TWO
JSB GETeR
JSB SERRS+l1,I
CHARACTERS
lOR TEMP.!
FORM
CPA TO
'TO' '1
RSS
YES
JSB SERRS.!1,l NO
LOA TOOP
RECORD
STA SBPTR,I
'TO'
JSB FSC
RECORD LIMIT FORMULA
END OF STATEMENT?
CPA ".+158
JMP AceSA,I
YES
STA SBPTR,I
NO, IS NEXT
tSz MAXCR
LOA ASTEP
SYMBOL
eCB
JSB TBSRH
'STEP' 1
JSB SERRS+t2,I NO
JS8 FSt
YES, RECORD STEP SIZE
JMP EOST
DEMAND END OF STATEMENT

8584.

0585***
0586**  SyNTAX
0587 •• *

11588.
0589 32332 015240
0590 32333 000000
0591 32334 115043
0592 32335 026037
0593.

••••

••

NEXTS JSe VAROP
SEEK SIMPLE VARIABLE
NOT
NOP
JSB SERRS+8,1
FOUND
JMP EaST
DEMAND END OF STATEMENT

••

0594.*.
0595*. , cEND STATEMENT>, ••
0596**
AND eSTOP STATEMENT> SYNTAX
*.
0591***
0598.
RECORD NULL OPERAND
0599 32336 035572 ENDS ISZ SBPTR
JSB GETeR
END Of STATEMENT?
0600 32337 015446
0601 32340 124620
JMP AceSA,I
YES
JSB SERRS+4,'1 NO
0602 32341 115037

.*

*.

0603.
0604***

0605**  SyNTAX ••
0606***
*~
0607*
0608 32342 ~15270 DATAS JSB SBPUO
0609

32343 00 2 400

(LA

INITIALlZE

PAGE 0039 #03
0610
0611
0 6 12
0613
0614
0615
0616

0617
0618
0619
0620
0 6 21

0622
0623
0624
0625
0626
0627
0 6 28

0629
0630

0631
0632
06 33
0634
0635
0636
0637
0638

0639
06421

STATEMENT SYNTAX PROCESSORS

32344 071266
32345 015446
32346 115050
32347 006404
32350 05".32
3235"1 026400
32352 007400

32353 050434
32354 026400
32355 01 5 2 76

32356 026373

32357
32360
32361
32362
32363
32364

115051

064354
045572
160001
031027
170001
32365 061612
32366 00 14 00
32367 015212
32370 033363
32371

CLB,INB

CPA .+43

'+'

cta

COMMA

?

yES
JMP DATA4
eeB
NO
CPA ,+45
' . ' '1
JMP DATA4
YES
NO, NUMBER?
DATAl JSB NUMCK
JMP DATAl
NO
JSB SERRS+14,I BAD EXPONENT
LOB .-3
NUMBER,
AOB sBpTR
MARK
LDA 1,1
PREVIOUS
lOR FLGST
OPERATOR AS
srA 1,1
'NUMBER FOLLOWS'
l.OA TEMP+1
RETRIEvE FOLLOwING CHARACTER
DATA2

JS8 SYMCK
OEF COMMA.t
JMP EOST
JMP DATAS

026~37

32372 026342
3237 3 0552 66
32374 002001
32315 115052
32376 015334
32377 026366
32400 075266
32401 015446
32402 115052
32403 026355

0641
0642.
0643* ••
0644*.
0645***
0646*
0 6 47 3240 4
0648 32405
0649
32406
0650 324 0 7
0651 3241'='
0652 32411
0653 32412
0654 32413

5TA SIGN
SIGN
JSS GETeR
REQUEST A CHARACT~R
JS8 SERRS+13,1 END.Of.INPUT CONDITION

DAlA3 cpa

RSS

.JS8

NEXT?

NO, DEMAND END OF STATEMENT
YES
SIGN
SIGN fOUND? ( CB) • 0 )
NO
SERRS+15,I YES
GETST
DEMAND A STRING CONSTANT

JSB
JMP DATA2
STe SIGN
RECORD SIGN
JSB GETeR
JSB SERRS+15,I ENO.OF@lNPUT CONDITION
JMP DATAl

••
*.
015500
026413
~50374

124 6 2 121
050454
026414

115041
~15450

READS

*.

RECRF
JMP READt
CpA ,+158
JMP Aces., I
CPA 873
JMP INPTS
JSB sERRS.6,I
JSB BCKSP
~JSB

READ FROM FILE?
NO
yES,
YES
NO, , J' ?
YES
NO

PAGE 0040 #03

STATEMENT SYNTAX PROCESSORS

0656.
0651* ••
0658**  SYNTAX

0659.*.
0660*
0661 32414
0662 32415
066 3 32416
0664 32411
0665 32420
0666 32421
0 66 7 32422
0668 32423
0669 32424
0670 32425
0671*
0672***
0673**
0674*·.
121675.
06 7 6 32426
0617 32427
121678 32430
0679 32431
0680 32432
1216 a 1 32433
0682 32434
32435
0 6 83
0684 32436
0685 32437
9686 32440
0687 32441
0688 32442
121689 32443
0690 32444
0691 32 445
0692 32446
0693 32441
0694 32450
0 6 95 32451
0696 32452
06 97 32453
0698 32454
0699 324155
0700 32456
0701 32451
0702 32460
0703 32461
070~
32462
0705 32463
0706 32464
0707 32465
0708 32466
0709 32467
0710 32470
0711 32471

065572
077453
015240
115054
00000'-'

007400

••
••
••

INPTS LOB SBPTR
ENABLE STRING
STB SFLAG
VARIABLE
Jsa VAROP
SEEK VARIABLE OPERAND
JSB SERRS+17,I NONE FOUND
NOP

eee

Jsa

0152]2
033363

OfF' COMMA-1

~26037
~26414

JMP INPTS

.JMP

SYMCK

EOST

COMMA?

NO, DEMAND END OF STATEMENT
YES

••

**

••
0152,0
~15446

124620
015544
026460
0503'4
1246;?0
007 4 00
015272
033365
115075
015270
015446
115041

171572
015546
026451
071453
015230

0 5 0374

12462((}
007 4 00
015272
033363

PRINS JSB
JSB
JHP
JSB
JMp
CPA
JMP

eea

JSB
OEF
JSB
PRN10 JSB
JaB
JSB
STA
JSB
JMP

SSPUD
GETeR
ACCSA,I
USTCK

PRN01
.+158

AceSA,I
SYMCK

fOLLOWS?
SEMI-1
SERRS+34,I NO
SBPUD
GETeR

ADVANCE SYNTAX BUFFER POINTER
FETCH NEXT CHARACTER
SERRS+6,I NONE FOUND
SBPTR,I
SAVE CHARACTER
PFSRH

SEARCH FOR PRINT FUNCTION

PRN11

FOUND

ST8 SFLAG

JSB FSC
PRNlt CPA ,+158
JMP ACCSA,l

eea

ADVANCE SYNTAX SUFFER POINTER
fETCH NEXT CHARACTER
NONE fOUND
CHECK FOR USING STATEMENT
NONE fOUND
ENO OF STATEMENT?
YES
NO,
SEMI.COLON

SYMCK

ENABLE STRING VARIABLE
LOOK FOR FORMULA

CARRIAGE RETURN
YES
NO,

026441
015500
026471

JSB
DEF
JSB
JMP
JSB
JMP

COMMA.1
SERRS+6,I
PRN10
RECRF
PRIN0-t

007400
075502
050374
124620
050454
026472

8T8

FILRF

CpA
JMP
CPA
JMP

.+158

NULL. WRITE?

AceSA,I

YES

873

NO,

115041'

eee

COMMA?

NO, ERROR
YES
WRITE ONTO FIL.E?
NO
YES, SfT

'FILE' FLAG

YES
PRIN3
SERRS+6,I NO

115041

Jse

01545~

JSB BCKSP

'I'

?

FOLLO~S?

PAGE 0041 #03
0712
0713
0714

0715
a716
0117
0718
0719
0720
0721
0722

0723
0724
0725
0 7 26
0727

0728
0729
0730
0731
07 3 2
0733
073.
0735

0736
0737
0738
0739
0740
0741
0742
0743
0744
0745
0746
0747
0748
0749
0750
,,751
0752
0753
0754
0755
0756
0 7 57
0758
0759
0760
0761
0762
0763*

32412
32473
32474
32475
32416
32477
32500
32501
32502
32503
32504
32505
32 506
32507
32510
32511
32512
32513
32514

STATEMENT SYNTAX PROCeSSORS

015270
015446
026552
0e74A~

075617
05 0 421
002001
026520
()I15334
050374
i24620

007400
075617
050421
026502
064355
015272
033363
006401

32515 026472

32 5 1 6
32517
32520
32521
32522
32523
32524
32525
32526
32527
32530
32531
32532
32533
32534
32535
32536
32537
32540
32541
32542
32543
32544
32545
32546
32547
32550
32551
32552
32553
32554

17557 2
015270
035617
115041
171572
007400
035502
026536
075502

PRIN0 JSB SBPUD
JaB GETeR
JMP PRIN7

eea

srB pFLAG
CPA ,+428
RSS

JMP
PRINt JSB
CPA
JMP
cee
5T8
PRIN2 CPA

PRIN3
GETST
.+158
ACCSA,I

PFLAG
.+428
.1MP PRINt

LOB ,-2
JSB SYHCK
OfF COMMA.l
CL8,RSS
.JMP PRINe

STB
JSB
PRIN3 ISZ
JSB
STA
eCB
ISZ
JMP
STB
LOA
JSB
JMP
JSB
JSB
JMP

015546
026547
026545
015450

PRIN5 .JSB

007 4~HJ
045572
075572
077453
015230
050374

eCB
ADS

015246
026541

015270
015446
124620
0265~7

124620

026507
0355~2

124620
115030

8TB

PRINS 8T8
JSB
PRIN6 CPA
JMP
.JMP
PRIN7 ISZ
JMP
.J5B

" 1
yES

NO
RECORD A STRING CONSTANT
END OF STATEMENT?
YES
NO
" ?
YES
NO
COMMA OR

SEMICOLON1
NO
YES
ZERO NEXT WORD

SBPTR,I
SBPUD
PFlAG
FORMULA OR TAB PERMITTED?
sERRS+6,I NO
yES
SBpTR,I

FILRF
PRIN4
FILRF
AEND
TaSRH
PRINe
SBpuD
GETeR
AceSA,I
.JMP PRIN2
PRIN4 JaB pFSRH
JMP PRIN6
JMP PRIN8

063451

ADVANCE SYNTAX BUFFER POINTER
MORE STATEMENT?
NO
YES, ENABL.E
FORMULA AND TAB

'FIL.E'

MODE?

NO

YES, SET FLAG AGAIN

'END'

NO

?

yEs

FETCH NEXT
CHARACTER

sEARCH FOR PRINT FUNCTION
FOUND
NOT FOUND
RCKSP
BACKUP
TO POINT
SBPTR
FOLLOWING
SBPTR
LAST OPERATOR
Sf LAG
ENASLE STRING VARIABLE
fSC
RECORD FORMULA
.+158
ENO OF STATEMlNT1
AceSA,l
YES
PRIN2
NO
FILRF
'fILE' MODE?
ACCS~,I
NO
YES
SERRS ... 2, I

PAGE 0042

#~4

STATEMENT SYNTAX PROCESSORS

0002.
0003***
0004**
0005***
0006*
0007 32555
0008 32556
0009 32557
0010 32560
0011 32561
0012 32562
0013 32 56 3
0014 32564
0015 32565
0016 32566

.*
*.

.*
015256

115055
"-115266

026677

035572
001727

"'31612
171572
f{!60364

011402

0017

32567 063443

"018
0019

32570 064354
32571 015246
32572 115055
32573 050574
32514 e26621
32575 053741
325 16 0 2 66 05
32577 015500

0020
0021
0022
0023

0024
0025
0026
0~27

0028
0029
0030
0031
0032
0033
0034

0035
0036

0037
0038
0039
0040
0041
0042
0043
0044

0045
0046
0047
0048

012149
0050

rd051
0052
0053
0054
0055
0056

\ij057

32600 12126604
32601 050454
32602 026605
32603 115041
32604 015450
3 2 6 0 5 0 02 4 0 4
32606 073445
32607 015242
32 610 ~15232
3 2 611 000000
32612 050374
32613 124620
32614 007400
32615 015272
32616 033363
32617 115041
32620 026607
32621 015270
32622 015446
32623 115041
32624 015544
32625 026652
32626 050374
32627 124620
32630 007400

32631 015272
3263? 033365
32633 115075
32634 015270
32635 015446

32636 i15041
32637 171572

JSB LTR
fIRSl TWO
JSB SERRS+t8,I CHARACTERS
JSB LETCK
LETTERS?
JMP MATS3
NO
lSZ SBPTR
YES,
AlF,ALF
RETRIEVE
lOR TEMP+1
FIRST CHARACTER
STA SBPTR,I
LOOK
LDA .+5
FOR
STA ~AXCR
'INPUT',
LOA MATIO
,READt,
LOB ,-3
OR
JSB TSSRH
'PRINT'
JSB SERRS+18,1 NONE FOUND
CPA PRTOP
IS IT 'PRINT'?
JMP MATS2
YES
CPA INPOP
NO, 'INPUT' '1
JMP MATSt.2
YES
JSB RECRF
NO, READ FROM FILE?
.J MP MAT S 1-3
NO
CPA 873
YES, t,' ?
JMP MATSt.2
yES
JSB SERRS+6,I NO
JSB BCKSP
CL.A,INA
TURN ON
srA DFLAG
'MATRIX SUBSCRIPT' MoDE
MATS1 JSB ARRID
RECORD AN ARRAY
JSB SBSCK
RECORD SUBSCRIPT
NOP
IF PRESENT
END Of STATEMENT?
CPA .+158
.}MP AceSA, I
YES
CCB
NO, DEMAND
.JSB SYMCK
COMMA
DfF COMMAfI!Il
.JSB SERRS+6,I NOT FOUND
JHp MATS1
MATS2 JSB 5BpUD
ADVANCE SYNTAX BUfFER poINTER
JSB GETeR
FETC~ NEXT CHARACTER
JSB SERRS+6,I NONE FOUND
JSB USTCK
CHECK fOR USING STATEMENT
JHP MAT13
NONE FOUND
cP~ ,+158
CARRIAGE RETURN 1
JMP ACCSA,I
YES
MATS

eea

sEMI ..

SYMCK
COLON
FOLLOWS?
SEMI-1
SERRS+34,1 NO
SBPUD
ADVANCE SYNTAX BUFFER POINTER
GETC~
fETCH NEXT CHARACTER
.1S8 SERRS+6,l NONE FOUND
STA SBPTR,I
SAVE CHARACTER

JSe
DEF
JSB
MAT12 JSB
JaB

PAGE
0058
121059
012160
0061
0062
0063
9064
1a065
·0066
0067
0068
0069
0070
0071

0072
0013
0014
0075
0076
0077
0078
121079
0080

0081
0082
0083
0084
0085

0086
0087
0088
0089
21090
0091
0092

0093
0094
0095
0096
121097
0098
9099
0100
0101

~~43

32640
32641
32642
32643
32644
32645
32646
32647
32650
32651
32652
32653
32654

#04

STATEMENT SYNTAX PRUCESSORS

015546
002001
015242
050314
124620
007400
015272
033363
115041
026634
015500
026611
050454

32655 007401
32656 115041
32657
32 660
32661
32662
32663

075502
01 5 2 4 2
050314
124620
064355

32664 015272
033363

32665
32666
32667
32670
32671
32612
32673
32674
32675
32676
32677
32700
32701
32102
32703
32104
32105

115041
015446
026673
015450
026660
015270
035502
1246210
115035
065572
077457
06161~

171615
064435
015260
061613
3271216 001400
32707 015272

32710 ",33415
32711 115036
32112 015256
32713 026763

0102

32]14 015266

0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113

32715
32116
32717
32720
32721
32722
32723

026773

32724

~15246

035572
001727
~31612

171572
063442
064352

32725 115042

32726 001727
32727 A01723

JSB PFSRH
RSS

JSB ARRIO
CPA ,+1158
JHP AceSA,I

eee

JSB
DEF
JSB
JHp
MAi13 jSB
JMP

SYMCK

COMMA_1
SERRS+6,I
MAT12
RECRF
MATlt

CPA.B73

SEARCH FOR PRINT FUNCTION
FOUND
RECORD AN ARRAY
CARRIAGE RETURN FOLLOWS?
YES
NO,
COMMA?
NO, ERROR

yEs

WRliE ON FIL.E1
NO

CCB,RSS

YES,
yES

,JSB sERRS+6, 1

NO

STs FILRF

MATti'! JSB ARRID
CPA .... 158
.1 MPAC C5 A, I
LOB .-2
JSB SYMCK
OEF COMMA.1
JSB SERR8+6,I
JaB GETeR
JMP .+3
MATt1 JSB BCKSP

',- 'I

NOTE 'FILE' MODE

RECORD AN ARRAY
END OF STATEMENT?
YES
NO, DEMANO
COMMA OR

SEMICOLON
NOT FOUND
END OF STATEMENT?
YES
NO

.JMP MAT10

JSB SBPUO

ISZ FILRF

JMP AceSA,I

UPDATE POINTER

'FILE' MODE?

NO

.J8B SERRS+2, 1

MATS3 LOB
STa
LOA
STA

SBPTR
ARYAD
TEMP+1
SSlAK,I

LDB ,+46

JS8 STROP
LDA TEMp+2

eee

JSB SYMCK
OEF ASSOP .. 1
JSB SERRS+3,I
JSB LTR
.JMP MATS5
JSB LETCK
JMP MATse
lSZ SBPTR
ALF,AlF
lOR TE.MP.1
STA sBpTR,I
LOA MATFN

yEs

SAVE ADDRESS
OF ARRAY OPERAND
RECORD
ANO SAVE

THE ARRAY
IDENTIFIER
RETRIEVE
NEXT CHARACTER

AND TEST FOR
ASSIGNMENT OPERATOR
NOT FOUND
LETTER NEXT?

NO

YES, ANOTHER LETTER7
NO
YES,
CONCATENATE
LETTERS
AND

SEARCH FOR
AN ARRAY
JSB TBSRH
FUNCTION
,JS8 sERRS+7, I NONE FOUND
ALF,AlF
fOUND,
ALF,RAR
CONVERT

Lea ,-5

PAGE A044
0114
0115
0116
011}
0118
0119

0120
0121

0122
0123
0124

0125
0126
0127

0128
0129
01 3 0
0131

0132
0133

0134
0135

0136
0137
013a

0139
0140

0141
0142
0143
0144
0145
0146

32730
32731
32732
32733
32734
32735
32736
32737
32740
32741
32742
32743
32744
32745
32746
32747
32750
32 75 1
32752
32753
32754
32755
32756
32757
32760
32761
32762
32763
32764
32765
32766
32767
32770
32771
32172

#~4

STATEMENT SYNTAX PROCESSORS

030572
2107400
045572
1300~1

170001
011(J504
043744
002021
026750
~15446

124620
006404
077445
015232
115040

026037
00212103
17 1 615
015446
115061

015252
015242
015254
065612
155615
115PJ56
026037
015450
015250
007400
015272
033423

lOR
eea
AOB
lOR
STA
AND

PDFFL
saPTR
1,1
1,1

8777
ADA 0577

TO OPERAND
COMBINE
WITH
OPERATOR
AND RECORD
'INV'
OR

SSA,RSS
JHP MATS4
JSB GETeR
JHP ACeSA,!
CLB,INR

'TRN' 7
YES
NO, END OF STATEMENT?
YES
NO, TURN ON
STB DFLAG
'MATRIX SUBSCRIPT' MODE
JSB saseK
DEMAND SUBSCRIPT
JSB SERRS+5,I NONE FOUND
JMp EOST
DEMAND ENO OF STATEMENT
MATS4 SZA,RSS
ALLOW INVERSION
sTA SSTAK,I
INTO SELF
JSB GETeR
DEMAND
JSB sERRS+22'I LEFT
JSB LPCK
PARENTHESIS
JSB ARRID
DEMAND ARRAY
JSB RPCK
DEMAND RIGHT PARENTHESIS
LOB rEMP.l
sAME SOURCE AND
CPB SSTAK,I
DESTINATION ARRAYS?
JSB SERRS+19,I YES
JMp EaST
NO, DEMAND END OF STATMENT
MATS5 JSB BCKSP
BACK UP ANO
JSB GETPF
DEMAND PARENTHESIZED FORMULA

cee

SEEK

JSB SYMCt<

OEF TIMES.1

'*'

sERR8+20,1 NOT FOUND
ARRID
DEMAND ARRAY
EOST
DEMAND END OF STATEMENT
TEMP+l
RECORD
,+46
ARRAY
STROP
OPERAND
TEMp+2
END Of
,+15B
STATEMENT?
AceSA,l
YES
,-3
NO, SEEK
SYMeK
'.', ,_I,
PLUS-l
OR '.'
SERRS+21,I NOT FOUND
SET
FLAG TO FALSE
MULOP
'*' ?
MATS9
yEs
pFlAG
NO
ARRID
DEMAND ARRAY
7EMP+2
SAVE CHARACTER

0153
0154
0155

115057
015242
Ql26037
32113 061612
32774 064435
32775 015260
32776 061613
32777 050374
33000 124620
33001 064354

JSB
JSB
JMP
MATS6 LOA
LDB
JSB
LOA
CPA
JMP

0156

33002 01~272

0157

33003 033417
33004 115060

JSB
OEF
JSB
CLB
CPA
JMp
MATS7 STB
JSB
STA
ISl pF~AG
'*' ?
JMP MATsa
NO
LeA TEMP~l
VESt DOES ARRAy
~PA SSTAK,I
MATC~ LEFT-HAND sIDE?
JSB SERRS+19,1 YES

0147
0148

0149
0150
0151
0152

0158

0159
0160
0161

0162
0163
0164

33005 006400

3300';
33007
33010
33011
33012

0165

33013

0166

33014

0167

33015
33016
33017

0168

0169

050560
027022
075617
015242
07161J
035617
027020
061612
151615
115056

L08

'*'

PAGE
0170
0171
0172
0173
017 4
0175
0176

0Vl45 #04

3302~

S1 ATEME·NT

061613

33021 0260:57
33022 007400
33023 06 1 612
33"24 15 1 615
3302f) t 15056

33026 027010

SYNTAX PROCESSORS

MATS8 LOA TEMP .. 2
JMP EOST
MATS9

LOA Tt:MP+1
CPA 5STAK,I

NO, RETRIEVE CHARACTER
DEMAND END OF STATEMENT
SET '*' FLAG TO TRUE
DOES ARRAY
MATCH LEFT-HAND SIO~1

JMP MATS7

NO

eeB

.JS8 SERRS+1 9 ,1

PAGE 0046 #04

FORMULA SYNTAX CHECKER

0178.
0179 •••
0180 ••  SyNTAX CHECKER

0181.·.
0182*

0183ft
0184.
01 85.
0186.
0187.
0188.
0189·
0190.
0191·
0192*

0193*
0194.

••

fSC ANALYZES THE INPUT STRING UNDER THE ASSUMPTION
THAT A LEGITIMATE FORMULA IS THERE. EXIT TO ERROR ON
UNRECOGNIZABLE OR OBVIOUSLY INCORRECT INpUT. ExIT TO
(P.l) WHEN CONTINUED INPUT CANNOT BE A PART Of THE
FORMULA AND THE INPUT SCANNED SO FAR FORMS A COMPLETE
FORMULA IN ITSELF CI.E" ••• A+B TO •• , EXITS AFTER
THE 'BI), ON EXIT (A) HOLDS THE FIRST CHARACTER NOT
PARSED INTO THE FORMULA, (8) • ~, AND SBPTR,l • ~
(ENO.OF.FORMULA OPERATOR), DURING THE FORMULA PARSE,
SSTAK,I HOLDS THE COUNT OF UNMATCHED LEFT PARENTHESES.
IF THE FIRST SYMBOL ENCOUNTERED IS A STRING VARIABLE,
EXIT TO ERROR IF IT IS NoT ENABLED ELSE RECORD THE
VARIABLE AND ANy FOLLO~ING SUBSCRIPT AND EXIT TO (P+l)
WITH THE NEXT CHARACTER IN (Al, (8) • ~1, AND SFLAG • -It

0195*
0196.
019 7 •
0198.
0199 33027 0024Qt0
0200 33030 171615
(21201
33PJ31 060362
0202 33032 071402
0203 33033 003400
0204 330134 013455

"020f)*

••
••

Cl.A
ST. SSTAK,l

LOA .+3
STA MAXCR

FSC1

ceA

STA UFLAG

••

SET LEFT PARENTHESIS
COUNT TO ZERO
SET MUlTICHARACTER SEARCH
TO MAXIMUM OF 3 CHAR4CTEAS
ENABLE
UNARY OPERATORS

••
•

0206 ••
0207.
SEeK VARIABLE OPERAND
0208 33035 015240 FSC2 .IS8 VAROP
JMP FSC7
fIRST CHARACTER NOT A LETTER
0209 33036 027142
JMP FSC1J-3
SUBSCRIPTED OR STRING VARIABLE
33037 021242
~210
JSB LETCK
SIMPLE VARIABLE, LETTER NEXT?
0211 33040 015266
JMP FSC13
NO
0212 33041 021245
0213.
0214 •• OoE.s 'AND', 'OR', 'MAX', OR 'MIN' FOLLOW
0215 ••
A SIMPLE VARIABLE?
0216.
0217 33042 064353
LOB .-4
33043 111572
~218
srA SBPTR,I sEARCH FOR
0219 33044 060720
LOA MCBOP
'AND', 'OR',
0220 3304b 015246
JSB TBSRH
'MAxt, AND 'MIN'
0221
33046 002001
RSS
NONE FOUND
.JMP FSC6
0222 33047 027137
FOUND

•
••
••

•

0223.

•
••

0224*. SEE IF OpERAND Is ~ FUNCTION RATHER
THAN A SIMPLE VARIABLE,
0225.·
0226*
LOA TEMP+2
0227 33050 06 1613
0228 33051 001727
AL.F1ALF
WERE
0229 33052 ~31612
lOR TEMP+1
TWO LETTERS
CPA FN
0230 33053 053375
'FN' 1
JMP FSC4
0231
33054 ~27104
YES
0232 33055 171572
STA S8PTR,I
NO,
0233 33056 060730
LOA POFNS
F~EDEF1NE;J

••
•

PAGE 0047 #04

FORMULA SyNTAX CHECK£R

0234
0235

33057 064340
33~6~ 015246

0236

33",61 ~272r;!2
33062 001727

0237
0238

33~H;3

001723
"30572
071612
007400
045572
015572

LOB ,-15
JSB TBSRH
JHP fSC!l

ALF,ALF
ALF,RAR
lOR PDFFL
STA TEMP"'!

0239
024 0
0241
1tl242
0243
0244

3306 4

33071

16~HH::J 1

0245
0246
0247
0248
0249
0250

LDA t,I

33072
33073
33074
33075
33076
33017
33100
33101

010570
031612
171572

AND OPMSK

331~2

~15250

02~1

0252
0253

0254
0255
1t1256
0257
0258

0259
0260
0261
0262

0263
~264

0265
02 66
02"67

0268
0269
0270

33"'65
33066
33067
33070

33103
33104
33105
33106
33107
33110

FSC3

eca

ADB SBPTR
STB SBPTR
lOR TEMP+l
STA SBpTR,!
LOA TEMP+1

~61612

NO

YES,
BUILD
NAME
SAVE FUNCTION
RETRIEvE
PREVIOUS
OPERATOROPERAND
REPLACE
OPERAND
wITH FUNCTION

053737

CPA LENCN

'LEN' ?

027114

JMP FSC0

YES

064346
077447

LOB •• 9

NO, TURN OFF
'MULTIpLE STORE' MODE

021245
015446
115042
015266
115042
040320
33111 0017ltH3
33112 040376
33113 027065
33114 ~35572
33115 015446
33116 115061
33117 015252
33120 A15256
33121 115063
33122 050423
33123 002001
33124 115063
33125 061612
33126 06 4432

FSC4

STB
JSB
JMP
JSB
JsB
JS8
.JSB
ADA

ALF

FSC0

MSFLG
GETPF
FSC13
GETeR
SERRS+7'I
lETCK
SERRS ... 7,1
D100

ADA .+176
JMP FSCJ
ISZ S~PTR
·JsB GETCR

JSB
JSB
JSB
JSB
CPA
RSS
JSB
LOA
LOB
JSB

SERHS+22,I
LPCK

DEMAND PARENTHSIZED
FORMULA
DOES

LETTER
NO
YES,

FOLLOW?

BUILD

FUNCTION
NAME
MOVE TO CORRECT PROGRAM WORD
RECORD

LEFT
PARENTHESIS

LTR
LETTER NEXT?
sERRS+24,1 NO

.+44B

YES, FOLLOWED BY'S' 1
yEs

SERRS+24,1 NO
0271
0272
TEMp+l
RECORD
0273
,+538
STRING
STROP
VARIABLE
0274 33127 ~15260
0275 33130 015446
JSB GETCR
RECORD
0276 33131 115062
JSB SERHS+23,I RIGHT
0277 33132 015254
JSB RPCK
PARENTHESIS
,JMP FSC8
0278 33t33 ~27162
0279.
•
0280 •• CHfCK FOR LEFT PARENTHESIS .*
0281*
• RECORD
0282 33134 ~60556 FSC~ LOA LPOP
'=1283 33135 171572
A '( t
STA SBpTR"I
0284 33136 135615
18l SSTAK,I
COUNT IT
0285 33137 c;,64346 FSC6 LOB .-g
TURN OFF
0286
33140 '1177447
5TB MSFLG
'MULTIPLE SlORE'
,.IMP FSC 1
0287 33141 027~33
MODE
~28H
33142 015270 FSC7 .IS 8 SBPUD
UPDATe POINTER
, (' ?
0289 33143 050427
CPA .+4~

PAGE V1(J148

#~4

CHt:.CK~.R

FORMULA SYNTAX

0290

3~i144

~21134

.JMP FSC5

0291

33145 053745
33146 027134

CPA 8133

yES
NO,

JMP FSC5

YES

0292

,t, "

0293*
*
0294.* CHECK FOR A NUMBER ••
121295*
CL.8
0296 33147 0064~0
SET ' . '
STB SIGN
AS SIGN
0297 33150 075266
0298 33151 015276
SEEK A NUMBER
JSB NUMCK
JHP FSC9
NOT FOUND
0299 33152 027165
03100 33i53 115051
JSB SERHS+14,I BAD EXPONENT
LDB SBpTR
RETRIEVE
0301 33154 065512
0302 33155 Pl44354
ADS .-3
PRECEDING
1. DA 1,1
33156 160001
OPERATOR
~303
lOR FLGBT
SET FLAG TO SAY
0304 33157 031027
03215 3316171 110001
STA 1,1
NUMBER FOLLOWS
030 6 3316 1 "'6 1 612
RETRIEVE CHARACTER
LDA TEMP+1
0301 33162 p}64346 FSC8 LDB e-9
TURN OFF
STB MSFLG
'MULTIPLE STORE'
0308 33163 077447
030 9 33164 027245
JMP FSC1J
MODE

•

03121*
0311**
0312*

0313

0314
0315
0316

0317
0318
0319
0320
0321

0322
121323
0324

CHECK FOR A UNARY OPERATOR
33165
33166
33167
33170
33171
33112
33173

33174
33175
33176
33171
33200

037455
115064
061372
050432
027175
050434
027176
115064
067373
175572
064346
077447
027035

FSC9

037455
027276

FSC11

UNARY OPERATORS PERMITTED?
SERRS+25,1 NO
UNMNC
yES LOAD UNARY MINUS OPCODE

lSI UFLAG

JSB
LOB
CPA
JMP
CPA
JMP
JS8

*.•
*

+43

'+'

?

"
*+4
yES
.+45
NO, ,~, ?
*+3
yES
SERRS+25,I NO
UNPLC
CONVERT (8) TO UNARy
SBPTR,I
RECORD UNARY OPERATOR
.w9
TURN OFF

LOB
STB
FSC10 LOB
STB MSflG
.JMP FSC2

'MULTIpLE STORE'

HODE
0325 33201
0326*
0327.· CHECK POSSJ~ILITY OF 'NOT' RATHER THAN
0328 ••
A SIMPLE VARIABLE
0329*

0330
0331
0332
0333
0334
0335
0336
0337
0338
0339
~34B

0341
0342

0343
03 44

0345

33202
33203
33204
33205
332 0 6
33207
33210
33211
33212
33213
33214
33215
33216
33217
33220

161572
001727
1 7 1572
060622

001400
015246
021276
171572
007400
045572
1600"1

010570
170001
33221 e27177

lSZ UFLAG

JMP FSC14.t
LOA SBpTR,I
ALF,AL.F
STA SBPTR,I
LOA ANOT
eCB
JSB TBSRH
JMP FSc14_1
STA SBPTR,l

eeB

'NOT'
NO
yES

.*•
.*
•
PERMITTED?

SEEK

'NOT'
'NOT' NOT FOUND
FOUND
ERASE

A08 SBPTR

LOA
ANO
STA
.]MP

1,1
OPMSX
1,1
FSc10

SPURIOUS

OPERAND

I.'

OPCODE

PAGE

0049 #V14

FORMULA SYNTAX CHECKE:R

03 4 6*
0347*. CHECK FOR RIGHT pARENTHESIS
0348.
0349 33222 064355 f' SC 12 LOB ... 2
JSB SYMCK
0350 33223 015212
DEF RPARN-t
0351 33224 033377
JMP FSC14
0352 33225 027277
0353 33226 0606((H1
LOA RPOP
STA saPTR,I
°354 33 22 1 171572
LDA .+41
0355 33230 060430
eea
0 3 56 33231 007400
03 57 33232 145615
ADB SSTAK,l
SSB
0358 33233 006020
0359 33234 027277
JMP FSc14
0360 33235 175615
ST8 SSTAK,I
JSB SBPUD
0361 33236 015270
JsB GETeR
0362 33237 015446
JMP FSC14
~363
33240 027277 .
.JMP FSC13
0364 33241 027245
0365.
0366.· CHECK FOR A BINARY OPERATOR
0367*
eeB
0368 33242 007400
cpa SFLAG
0369 33243 057453
0370 33244 125230
JMP FSC,I
0371 33245 050374 FSc13 CPA .+15B
13372 33246 027277
.JMP FSC14
STA UFLAG
0373 33247 073455
STA TEMP.1
0374 33250 071612
0375 33251 064350
LOB ... 7
STA SBPTR,l
0316 33252- 171572
LOA MCBOP
0377 33253 060720
0378 33254 "15246
JsB TBSRH
RSS
1d379 33255 002001
JMP fSC6
0380 33256 "27137
LOA TEMP.., 1
0381 33257 061612
LOB MSFLG
0382 33260 067447
0383 33261 015272
JsB SYMCK
0384 33262 033417
DEF PI.US·l
.JMP ·+4
0385 33263 027267
CpA EXPOP
0386 33264 053742
JMP FSC10
0387 33265 027177
.IMP FSC6
0388 33266 027137
ece
0389 33267 0074",O
0390 33270 015272
JSB SYMCK
. 0391 33271 033415
DEF ASSOP",l
.JMP
F'SC12
13392 33272 027222
0393 33273 060355
LOA .... 2
0394 33274 073453
5TA SFL,AG
JMP FSCl
0395 33275 ~)27VJ33

••"

•

t ) ,

OR

•1 , 1

NO
YES,
RECORD

RETRIEVE

MATCHING

.,
f ) ,

)

LEFT

PARENTHESIS'

NO
YES
UPDATE POINTER

FETCH NEXT
CHARACTER

...

••
•

STRING VARIABLE
JUST FOUND?
yEs

NO, END OF STATEMENT?
yES

NO, DISABLE UNARy ·OPERATORS
SAVE CHARACTER
SEARCH
FOR A
MULTICHARACTER
BINARY OPERATOR
NONE FOUND
FOUND
NO, RECOVER A CHARACTER
SINGLE
CHARACTER

BINARy OPERATOR?
NO
YES,

YEs

,, '

?

NO
AssIGNMENT
OPERATOR?
NO
YES, SET FLAG
To SAy
STORE OCCURRED

PAGE:. 0050 tH~4

"'397.

FORMULA SYNT AX CHECKlR

END OF fORMULA

~398.*

0399.
0 4 00
0401
0402
0403
"'404

33276 061613
33277 00641Z1~
33300 175572
33301 155615
33302 1252J0

~405

33303 115062

•
••
•LOA

FSCi"4

TEMP+2
RETRIEVE CHARACTER
CLB
RECORD
STB SBPTR,I
END-OF-FORMULA
cpa SSTAK,I ALL LEFT PARENTHESES
JMP FSC,I
YES
JSB SERRS+23,I NO

••
••

0406 ••
0407 ••• SAVE LOCAL VARIABLEs OF Fst •••
0408 ••
0409*
0410* SAVING MSfLG, UFLAG, VARUP, GE:.TPF,

RE"ENTRANT SlJRROUTINE,
(d4 11 *
0412* STACK BELOW TH~ ACTIVE
0413* CONTAINS THE NUMBEH OF
1d414.
0415 33304 035 615 #FRCR ISZ
0416 33305 04 5615
ADe
eMS
~417
33306 0~7000
~418
33307 ~44716
ADB
SSB
0419 33310 0060210
0420 33311 115033
JSB
0421
33312 067447
LOB
0422 33313 175615
STB
0423
33314 035610
lSI
LOB
0424 33315 ~67455
0425 33316 175615
STB
(d426 33317 035615
ISZ
LOB
04 2 7 333 20 "'6524°
ST~
0428 33321 175615
0429 33322 035615
IsZ
0430 33323 065250
LOB
0431 33324 175615
ST8
0432 33325 035615
lSZ
LOB
0433 33326 065230
STa
0434 33327 175615
ISZ
0435 3333'" 035615
0436 33331 ~0340~
eeA
ADA
0437 33332 043453
STA
0438 33333 ~73453
0439 33334 125234
JMP
0440 ••
0441...

AND FSC MAKES FSC A
THEY ARE SAVED ON THE SYNTAX
SYNTAX BUFfER. ON ENTRY (8)
WORDS TO BE SAVED.

SSTAK
SSTAK

SPACE
LEFT?
SERRS,I
MSFL.G
SSlAK,I
SSTAK
UFLAG
SSTAKII
SSTAK
VAROP
SSTAK,I
SSTAK

GETPF
SSTAK,I
SSTAK

FSC
SSTAK,I
SSTAK
SFLAG
SFLAG
FRCUR,l

RESTORE fsC LOCAL VARIA8LES

0446
0447
0448
0449
0450
0451
0452

INVERSt OF FRCUR.
33335 07 1 6t2
33336 06~615
33337 044351
3334t11 0756\5

33341

0~)6004

33342 160001
33343 073447

f('

usER

0442*·
0443."

0444*
0445.

SAVE PREVIOUS
SUFFICIENT

NO
YES, SAVE
'MULTIPLE STORE'
FI.AG
SAVE
'UNARY OPERATOR'
fLAG
SAVE
VAROP
RETURN ADDREsS
SAVE
GETPF
RETURN ADDRESS
SAVE
FSC
RETURN ADDRESS
DISABLE
SFLAG
VALUl

.*

•••

••

CAl IS SAVED BUT (8) IS NOT,

#FPOP STA TEMP+l

LOB SSTAK
A08 .",6

STB SSTAK
INB
LDA 1 , I
srA HSFLG

SAVE (A)
RESET
SYNTAX STACK
POINTER
RESTORE
w~ULTIPLE STORE'

FLAG

COUNT

PAGE 0051 #04
0453
04 5 4
0455
0456

0457

3.5344
33345
33346
33347
33J5~

FORMULA SYNTAX CHECKER

INS

006id04
160001
073455
006004
160001

LOA 1,1

srA UFLAG
INB
LOA 1,1

33351 ",71240
33352 "'''6~''4

STA VAROP

0460

33353 104200

Dl.D 1,1

0461

33354 100001
33355 071250
33356 L1;523~

0458

0459

0462

0463
0464

33357 031453

0465

33361 125236

3336~

0467 ••
0468.*.

INB
STA
STB
lSl
LDA
.JMP

~61612

GETPF
FSC
SFLAG
TEMP.l
FPOP, I

RESTORE
'UNARY OPERATOR'

FLAG

RESTORE

VAROP

RETURN ADDRESS
RESTORE GETPF

RETURN ADDRESS AND

FSC RETURN ADDRESS
RESTORE SFLAG VALUE
RESTORE CA,

••
•••
••

SINGLE CHARACTER AND/OR FORMULA OPERATORS

0469*·

0470.
~471*

0472·
0473*

°474·

0475.

BITS 1589 OF TH[ OCTAL wORD ARE THE OPERATOR CODE.
BITS 3-0 ARE THE PRECEDENCE FOR FORMULA OPERATORS,
THE ASCII WORD IS USED TO RECOGNIZE THE OPERATOR ON
INPUT AND TO PROVIDE THE PRINT NAME ON OUTPUT. THE
ORDERING OF THE TABLE FACILITATES SEARCHING,

1a476*
0477 33362 0131000
0478

0479
0480
0481

0482
0483
0484

33363 021040
002P100

33364
33360
33366
33361

026040
003 000
035441()
3337Ei\ 004000
33371 02144 0

~50J

0505
~506

ASC

3~H~0

1, ,

SEMICOLON

~24440

1, )
11v.101
ASC 1 , ]

RIGHT BRACKET

OCT 12"'13

LEFT BRACKET

33407 024040

0504

OCT

RPAR N OCT lkJ0Bl

v;497
0498

3341!?J

SEMI

OF-

33402 011001
33403 056440
33404 012"'13
3340tl 055440

\1499

COMMA

ASC 1 , ,

Pllel001

01400~

0491
0492
0493
0494
0495
0496

0500
0501
0502

OCT 2000

~41506

33372 0150Pt0

33313
33314
33375
33316
33377
33400
33401

334~6

ASC 1 , "

COMMA

011000
047106
052117

\1485

0490

STRING DEL.IMITER

HATCH OCT 4"00
ASC 1'#
llNMNC nCT 15000
UNPLC OCT 14000
RBOP uCT 11000
FN
ASC 1,NF
TO
ASC 1,10

~486

0487
0488
0489

QUOTE OCT 1000

l' Of

Ase
oCr

L~RAC

ASC l ' [

~1301j

~14011

33411 02~440
33412 015011
33413 026440
33414 016"'02
3341~ 026 0 40
33416 017lJ~2
3341 7 03644 0

Ase

SCMMA

ASSOP

HATCH SIGN

RIGHT PARENTHEsIs

OCT 1 JfrlI13
ABC 1 , (
OCT 14011

UNARY PLUS

ASC 1, ...
OCT 15011

UNARY

ASC 1, •
OCT 160~2

SUBSCRIPT SEPARATOR

Ase t , ,
OCT 17"'02
Ase 1'=

LEFT PARENTHESIS

~INUS

ASSiGNMENT

GPE~ATOR

PAGE 0052
121507
0508
0509
0510
0511
1()512
0513
0514

ta515
0516
1'111';41"7

'1.1'" 1 ,

1lJ51 8
0519

121520
00 2 1
~522

0523

0524
~525

0526
0527
0528
0 5 29
~530

!a531

0532
0533
0534

0535
0536
0537

0538
0539
0540
0541

33420
33421
33422
33423
33424
33425
33426
33427
J343~

33431
33432
33433
33434
3343b
33436
33437
33440
33441

.~4

FORMULA SYNTAX CHECKER

02~007

025440
021007
,,)2644l!)
022010
025040
023010
027440
024012

rl5704t')
~~250Q15

037040
Vt26005
036040
027~05

021440
030005
03644121

3344t! ~53573

33443
33444
33445
33446
33447
33450
33451
33452
33453
33454
33455
33456
33457

053432
032004
000000
033003

3346~

el40~H~b

00000~

034006
053421
03500 6
~00000

036005
000000
Vl37~05
~000.00

33461 0535~2
33462 04t@11

PLUS

OCT 20007
ASC

OCT 21007
ABC 1, •
TIMES OCT 22010
ASC

1,*

OCT 23010
Ase 1,1

OCT 24012
ASC
RELOS OCT
Ase
OCT
ABC
OCT
ASC
OCT
ABC
MATfN DEF
MAllO OfF

25005

MULTIPLICATION
DIVISION

EXPONENTIATION
GREATER THAN

1, >
26005
1, <

LESS THAN

27005

UNEQUAL

1, #
30005

t,.

EQUAL

MATFS
10STS

OCT 32004

OCT 33003
MSFLG NQP

neT
OEF
OCT
SFLAG NOP
OCT
UFLAG NOP
OCT
ARVAD NOP
OCT
ASTEP OfF
OCT

SUBTRACTION

l,f

DF-LAG NOP

AENO

ADDITION

j , ..

34006

AND
OR

MINIMUM

EOFOP
3500 6

MAXIMUM

36005

UNEQuAL

37005

GREATER THAN OR EQUAL

40O",5

LESS TAAN OR EQUAl..

STEP
41011

NOT

PAGE 0053
0003 ••
0004 •••
klItH1S ••

1d006.
0007.
0008*
0009.

0010*
0011*
0012.,.

ee13*
0014.
001 5*
0016.,.

0017*
0018.0019*
0020.
\t)(d21.

0022*
0023·
0024.
0025.

#~5

SYNTAX SUBROUTINES

SUBSCRIpT SYNTAX

••
•••

••

saseK ASSUMES A PRIOR ARRAY OPERAND REfERENCED THROUGH
THE POINTER ARVAD. ENTRY IS MADt WITH A CHARACTER IN
(A)' EXIT TO (P+l) IF THIS CHARACTER IS NOT 1(' OR '[',
OTHERWISE ANALYZE THE SUBSCRIPT WHICH MUST FOLLOW,
EXITING TO (P+2), saSCK HANDLES sOTH SINGLE AND DOUBLE
SUBSCRIpTS. Ir DFLAG." THE SUBSCRIpT Is FROM A
 AND THE SOUNDS MUST BE POSITIVE
INTEGERS. If OFLAG-t THE SU~SCRIPT RE.OIMENSIONS A
MATRIX AND A COMMA SEPARATES THE TWO BOUNDS OF A
DOUBLE SUBSCRIpT AND AN END-OF.FORMULA OPERATOR
. FOLLOWS THE LAST BOUND, OTHERWISE A 'SUBSCRIPT'
COMMA SEpARATEs THE TWo pARTS of A DOUBLE SUBSCRIpT
ANO NO END.OF .FORMULA OPERATOR APPEARS,.. IN ALL CASES,
THE ARRAY OPERAND IS HARKED AS ONE- OR TWO-DIMENSIONAL,
IF THE SUBSCRIPT BELONGS TO A STRING VARIABLE IN A
, IT MUST HAVE ONE AND ONLY ONE BOUND
CONSISTING OF A POSITIVE INTEGER NOT LARGER THAN 72.
IN THIS CASE ARYAD HOLDS A DUMMY POINTER SINCE STRING
VARIABLES ARE NOT MARKED WITH DIMENSIONALITY.

0026.

0027

33463 064355

0028

33464 015272

0029

33465 033403

0030

33466 125232

0031
0032

33467 035232
33470 163457
33411 0.&10355

0033
0034
0035

33472 173457
33473 060554
33474 171572
33475 037445

0036
0037
0038 33476 006404
0039 33477 051445
0040 . 33500 027514
0041
33501 064366
0042 335 02 015 234
0043 33503 065232
0044 33504 115615
0045 33505 035 6 15
0046 33506 067457
0047 33507 175615
0048 33510 035615
0049 33511 060346
0050 33512 073447
1d051
33513 015230
0052 33514 007400
0053 33515 045615
00b4
33516 075615
0055

0056
0rl51
0058

33517 164001
33520 077451

#SBCK

LOB
JSa
DEF
JMP

,-2
SYMCK
LBRAC.l
SaSeK,!

ISZ saseK

LDA ARYAD,l
ADA ,-2

STA ARYAD,I
LOA LBOP
STA S8PTR,I
ISZ DFl.AG
ClB,INB
Cp8 DFLAG
JMP SBses
LOB ,.7
JSB FRCUR

,( ,
OR
, [' 'I

NO. RETURN TO (P+1)
YES, SET RETURN TO (P.2)
SET
ARRAY TO
SINGLE DIMENSION
RECORD

, ['

BUMP MAGIC FLAG
DIM
STATEMENT?

YES

NO, SAVE FSC
LOCAL VARIABLES

LOB saseK

SAVE

LOA •• 9

SAVE ARRAY
REFERENCE
RESERvE SPACE FOR
TURN OFF 'STORE
A~LOWED' MoDE
DEMAND SUBSCRIPT
RESTORE

STB
ISZ
LOB
STB
ISZ

SSTAK,!
SSTAK
ARYAD
SSTAK,I
SSTAK

STA MSFLG
JSB FSC

ece

ADS SSTAK

5r8 SSTAK
LOB 1, I

3:;521 067445

STB ARVAD
LOB DFLAG

33522 (2154361

CpB .... 2

RETURN
ADDRESS

ARRAy
REFERENCE
'HATPIX SUBSCRIPT'
MODE?

'(I

COUNT

pAGE

~054

#05

SYNTAX SUBROUTINES

0059

33523 027567

~060

33524 001~"0
33525 015272
33526 033413
33e27 021537

0061
0062
0063
PH,J64
0066

0066
0067

0068
10069
0010

0071
0012
0013
0074
0075
0076
0077
0078
0079
0080
0081
0082
00 8 3
0084
0085

33!531 0064c;,4

33532 057445
33533 021536
33534 015230
33535
33536
33537
33540
33541
33542
33543
33544
33545

002PJ01
015244
007401d
041445
077445

0106

33602 027537

0090
0091

0092
009 3
0094

0095
0096

0097

0098
0099
0100
0101

0102
0103

0104

.JMP SBSe]

JSB F'SC

...
eeB
ADB DFLAG
sre DFLAG
cPa .+1

YES
NO, SEEK
'SUBSCRIPT'
COMMA
NONE FOUNO
SET ARRAY AS DOUBLY.SUBSCRIPTED
DIM
STATEMENT?
YES
NO, DEMAND SECOND SUBSCRIPT

R~e

~

SHSC3 JSB PRGIN

05436'1

1fJ105

~086

ece

JSB SYMCK
DEF SCMMA_t
JMP SBSC3+1
ISZ ARYAD,I
CLa,IN8
cpa Of'LAG

33!S30 137457

015270
064355
015272
33546 033377
33547 115062
33550 063374
33551 171572
33552 015270
33553 015446
33554 rtJ000V10
3355b 00640'"
33556 ~57445
33557 12 5232
33560 007400
33561 ~45615
33562 075615
33563 165615
33564 015232
33565 015236
33566 125232
33567 007400
33570 015272
33571 033363
33572 027537
33573 027530
33574 015244
335 7 5 03 7 4 53
33576 027524
33577 044321
33600 006021
33601 115071

0087
ki088
0089

JMP SBSC4

SaSCl

JSB SBPUD

LOB

.-2

DEMAND SECOND BOUND
RESTORE

ORIGINAL
OFLAG vALUE
'MATRIX SUBSCRIPT' MODE?
YES
DEMAND

JSB 8YMCK
' )' OR
OfF RPARN.l
')
.}SB SERRS+23,I
NOT FOUND
LOA RBOP
RECORD
')
STA SBpTR,I
.JS8 S8PUO
UPDATE POINTER
JSB GETeR
FETCH NEXT
NOP
CHARACTER
DIM
CLB
STATEMENT1
cPa DFLAG
,JMP saseK, I
YES

,

,

eeB

AOB SSTAK
STB SSTAK
LOB SSTAK,I
8r8 SBSCK
.}S8 FPOP

JMP SBSCK,I

SBSC4

eeB

JSB SYMCK

DEF

NO,
RESTORE
THE
RETURN
ADDREsS

RESTORE FSC

LOCAL VARIABLES

COMMA?

COMMA .. t

JMP saSC3+!
NO
JMP SBSCt+4
YES
DEMAND DECLARED BoUND
sBst5 JSB PRGIN
STRING VARIABLE?
ISZ SFLAG
JMP SBSCI
NO
ADB M73
YES, DOES BOUND
SSB,RSS
EXCEED 121
YES
.18B SERRS+3t1, I
.1MP SBSC3+ 1
NO

PAGE 00b5
0108*.
0109*..

#~5

SYNTAX SUBROUTINES

RECORD ARRAY IDENTIFIER

**

•••

~110 ••

**

0111*

tdl12* ARRAY IDENT"IfIlR LEFT IN TEMp.1, ARRAy OpERAND ADDRESS
VJI1J* PUT IN ARYAD. EXIT WITH FOLLOWING CHARACTER IN TEMP.2
0114* AND IN CAl.
0115*
0116 33603 015256 .ARID JSB LTR
FETCH IDENTIFIER
f2J 11 7
33604 11 5'" 6 5
.J SB SERR 5 +2 6 , I
NONE FOUND
LOB ARRID
SET
0iio 33600 065242
~119
33606 075330
SlB STRID
EXIT
0120*.

••

0121...
1d122*.

RECORD STRING IDENTIFItR

•••

.*

0123.

STRING IDlNTIFIER LtFr IN TEMP+1, SFLAG SET TO -I,
ExIT wITH FOLLO~ING CHARACTER IN (A). EXIT TO ERROR
IF A STRING VARIABLE IS NOT PERMITTED IN THIS CONTEXT.

0124*

~125.

0126*
0127·
0128 33607 050423
0129 33610 027620
0130 33611 061572
0131 33612 073457
0132 33613 061612
111133 33614 (164435
0134 33615 015260
0135 33616 061613
0136 33617 125330
0137 33620 063453
0138 33621 051572
0139 33622 0034 0 1
0140 33623 115066
0141 33624 073453
0142 33625 061612
0143 33626 ~64432
0144

33621 015260

0145

33630 0616t5

0146
~147

0148
0149

33631 073457
33632 01 5 446
336 33 A000~0
33634 1253.30

015,,*·
0151*..

RECORD A STRING OP[RAND

0152 ••
0153*
0154.
0155*

0156*

••
••

*.*

DEMAND A STRING VARIABLE OR A STRING CONSTANT. ExIT
TO ERROR IF NEITHER IS FOUND, ELSE EXIT WITh THE NEXT
CHARACTER IN (Al,

0157.

0162

33635 06 1 572
33636 c;,73453
3363} 015 2 4 0
33640 ~27644
33641 037453

0163

33642 115067

0158
0159
0160
0161

#STRI CPA .+448
'S' ?
JMP STRI!
YES
LOA S~PTR
NO, SET POINTER TO
STA ARYAD
VARIABLE LOCATION
LOA TEMP+1
RECORD
LOB ,+568
ARRAY
JSB STROP
VARIABLE
LOA TEMP+2
RETRIEVE FOLLOwING
JMP STRID,I
CHARACTER
STRIl LOA SflAG
STRING VARIABLE
CPA SBPTR
PERMITTED?
CCA,RSS
YES
JSS SERRS+27,1 NO
STA SFLAG
SET FLAG TO 'STRING OCCURREDI
LDA TEMP+1
RECORD
LOB +538
STRING
JSB §TROP
VARIABLE
LOA SSTAK
SET POINTER TO DUMMy
STA ARYAD
VARIABLE LOCATION
JSB GETeR
FETCH
NOP
NEXT
.IMP 5TRID,I
CHARACTER

#RSTO LOA SBPTR
STA SFLAG
JSB VAROP

SEEK
STRING
OPERAND
,]MP RSTO~
1ST CHARACTER NOT A LETTER
S7RING V~RIABLE?
ISZ SFLAG
.J58 SERRS+28,I NO

PAGE 0056 #05

SYNTAX SUBROUTINES

0164

33643 125332

0165
0166

33644 015270
33645 015334
33646 125332

0167

JMP
RSTQl JSB
JSB
.}MP

RS10P,1
SBpUD
GETST
RSTOP, I

~16d**

0169***
0170.*
0171.

YES
DEMAND A
STRING
CONSTANT

FETCH A STRING CONSTANT

••

***

••

tXIT TO ERROR IF CAl # ., UPON ENTRY. ELSE SAVE CURRENT
BUFFf.R POINTER AND PACK THE INPUT STRING INTO THE BUFFER
FOLLOwING THE !NITIAL BUFFER WORD. EX!T TO ERROR IF NO
CLOSING " IS FOUND, RECORD THE OPENING " ALONG ~ITH A
COUNT OF THE STRING CHARACTERS AND EXIT WITH THE NEXT
CHARACTER IN (A), EXIT TO ERROR IF STRING EXCEEDS
72 CHARACTERS.

0172.

0173*
"'174;1;
0175*
0176*

0177*
0178.,.
~179.

"'6557 2

0187

336 4 7
33650
33651
33652
33653
33654
33655
33656

0188

33657 "41612

0180
0181
0182
0183
0184

0185
0186

0189 33660
0190 3366\
0191 33662
0192 33663
0193 33664
0194 33665
0195 33666
0196.*

0197***
0198**
0199*

"'774157
050421
006401
115067
015262
115070
063362

113457
043743
002021

115071
015446
000000

125334

#GTST

LDB SBPTR
SAVE SYNTAX
5T8 ARyAD
BUFFER POINTER
CPA ,+428
" 1
CLB,RSS
yES, SET (8) • 0
JSB SERRS+28,I NO
JSa ChRST
RECORD STRING CONSTANT
JSB SERRS+29,I NO CLOSING QUOTE
LOA QUOTE
RECORD CHARACTER COUNT
ADA TEMP+1
ALONG WITH
STA

ARYAD,!

OPENING QUOTE

ADA 01111
MORE THAN 72
SSA,RSS
CHARACTERS?
JSB SERRS+30,I YES
JSB G£rCR
NO, FETCH
NOP
NEXT
JMp GErST,I
CHARACTER

CHECK FOR USING STATEMENT

••
•••

**

SCAN THE INPUT STRING FOR A USING OPERATOR, IF NONE FOUND, EXIT
TO (P+l) WITH THE INPUT STRING AND SYNTAX HUFFER AS UPON ENTRY.
OTHERWISE, CHECK FOR A LEGAL OPERATOR FOLLOwING THE 'ualNCt ANO
0203. EXIT TO (P.2) AFTeR SAVING IT IN THE SYNTAX BUFFER, WITH (Al
C THE NEXT CHARACTER.
~204*
0205 33667 171572 . #USCK STA SBPTR,I
(A) I NEXT CHARACTER
LOA +5
5 CHARA.CTERS
0206 3367~ 060364
srA AAXCR
0207 33671 A11402
ALLOWED
0200*

0201*
0202*

0208
0209
0210
0211
",212
0213
0214

3367 2 007 4 00

eeB

l.OOK

33673 063734

LOA USTHA

L.OOK

3367. 015246
33675 027725
33676 ~35544

JSB TBSRH
JMP USCKJ
IsZ USTCK

NOT FOUND

33677 015256

0215

33100 027712
33701 050423

0216

33702 002001

0217
0218
0219

33703 115075

33704 065572
337~5

077453

JSB LTR
JMP USCKI

~EXT

'usING'

CHARACTER LETTERt
NO
ePA .+441i
YES, 'Sf FOLLOWS?
yES
RSS
JSB Sf.RRS+34,I NO
LOB SaPTR
ENABLE STRING
STB Sf LAG
VARIABLE

PAGE 0057 #05
0220
0221
0222
0223
0224
0225
0226
0227
0228
0229
0230

l?J231
0232
0233
0234

0235
0236
0237
023 8
023 9
0240
0241

SYNTAX SUBROUTINES

33706 015330
33707 015232
3311~ 000000
33711 125544
33712 050421
33713 021722
33714 015450
33715 007400
33716 ",,5420
33717 015244
33720 125544
33721 115075
33722 01527~
33723 015334
33724 125544
33725 0~74A0
33726 045572
33727 075572
33730 ~60362
33131 071402
33132 015450
33733 125544

JSB STRID
JSB sBseK
NOP
JMP USTCK,I
USCKl CPA .+428
.JMP USCK2

JsB BCKSp

eee

STB
.J8B

JMP
JSB
LJSCK2 .lS8

JSB
USCKJ

JMP

eca
ADS

srB

LOA
ST.
JSB
JMp

STORE STRING

QUOTE?
VES

SEARCH
FON
GFLAG .'
STATEMENT
PRGIN
NUMBER
USTCK,I
FOUND ONE
SERRS+j4,I NOT FOUND, ERROR
SBPUD
ADVANCE BUFFER POINTER
GETST
RECORD STRING CONTSTANT
USTCK,I
RESTORE
SBPTR
BUFFER
POINTER
SBPTR
.+3
RESET FOR
MAXCR
3 CHARACTERS
BCKSP
RESTORE INPUT STRING
USTCK,I

PAGE
1a243
0244
0245
0246
0247
0248
0249
0250
0251
0252

0058 #05

33734
33735
33736
33737
33740
33741

33742
33743
33744
33745

SY"lTAX

{)I53347
053343
",53332
100337
07600{d
063000
024000
176667
171201
000133

SlIBROUTINE::S

usrMA DEF

DfF
OEF
OCT
OCT
OCT
f.XPOP OCT
01111 OCT
D577 OCT
B133 OCT

STTYP
MCREL
LlNCN
TOOP
INPOP

USTMT
STYPS
MRELS
100337
70000

63000
24000
·1111
.577
133

PAGE 0059 #05
0254
~255

0256
0257

STATEMENT SYNTAX PROCESSORS

34000
3 4 000 00"133
34001 177645

34002 032051

ORG 34000B
t 33
.133

OCT
0133 OCT
DCOM0 DEF
SFLGA OEF
(lCT
D5J
M103
DEC
EOSTA OEF
ti~lJ3

COMS"

SFLAG
121258 34003 033453
.53
0259 34004 177725
0260 34005 177631
.103
fOST
0261 34006 "'32037
0262***
*.
0263*.  SYNTAX *.
0264***
0265.
0266 34007 015446 RSTRS JSB GETeR
JMP RSTRt
0267 34010 026014
0268 34011 01·5450
JSB BCKsP
JSB PRGIN
0269 34012 015244
JMP EOSTA,I
0210 34013 12601216
0271 34014 035572 RSTRl ISl SBpTR
0272 34015 124620
.JMP AceSA,I
0273*
0274.**
*.
0275.*  SYNTAX .• *
0276 •• *
0277.

END OF STATEMENT?
YES
NO, DEMANO
SEQUENCE NUMBER
DEMAND END ·OF STATEMENT
RECORD DUMMy OpERAND

••

0278

34016 002401

FILES CLA,RSS

0279*
0280***
0281..  SyNTAX

0282*·*
0283.
0284 34017 060374
0285
0286

REMS

34020 006404
34021 015262
0287 3 4 022 124620
0288.*.
0289.* 
. 0290 •• *
0291.
0292 3 4 023 015332 CHANS
0293
34024 001400
0294 34025 015212
0295 34026 033363
0296 34027 126006
0297 J403~ 007400
0298 34031 176003
0299 34032 015230
0300
34033 126006

••••

••

LOA ,+15B

CLa,INa

JSB CHRST
JMP ACCSA,1

syNTAX

JSB
DfF
JMP
CCB
STB
JSB

SYMCK
COMMA_1
EOSTA,I

SFLGA'I
FSC
JMp EOSTA,!

1213010302 •••

 SYNTAX

0303*.
03041'**
0307
0308
0309

34034
34035
34036
34037

DUMMY STATEMENT TERMINATOR
SET CHARACTER FLAG TO 'LOW HALF'

RECORO REMAINDER OF STATEMENT
AS A STRING

RfQUEST STRING OPERAND
COMMA FOllOWS?
A COMMAl

NO, DEMAND END~Of.STATEMENT
DISALLOW
STRING VARIABLES
GET A FORMULA FOR LINE NO,
DEMAND ENO-oF-8TATEMENT

••••
**

LiJ305.

0306

.** •
••

JSB RSTOP

cca

SUPPRESS BLANKS

015446
115076
035572
007 4~~0

ENTRS JSB GETeR
FETCH FIRST CHARACTER
JSB sERH3+35,1 NGNE FOUND
ISZ SsPTR
eCB

PAGE
0310
0311
0312
0313
0314
0315
0316

0317
031S

0319
0320

0321

0322
0323
0324
V)325
0326

0327
~328

0329
0330

0331
0332
0333
0334
0335
0336
13337
(;)338

0339
0340
~341

0342
0343
121344
0345
0346

~~60

#05

STATEMENT SYNTAX PROCESSORS

3404~

~15272

34041
34042
34043
34044
34045
34046
34047
34050
34051
34052
34053

0333 67

~26055

015240

115076
000000
~50374

026307
007400
015272
12133363

115041
34054 026061
j4055

34055 015451d
34056 00740v)
34057 045572

34rtt60 075572
34061
34061 015~30
34062 0074"'0
34063 015272
34064 033363

JSB SYMCK
FIRST CHARACTER A "'1
DfF HATCH-1
.}MP fNTRl
NO
,JS8 VAROP
YES, SEEK SIMPLE VARIABLE
JSB SERRS+35,I NONE FOUND
NOP
CPA .+158
CR FOLLOWS?
JMP ACCST
YES, ACCEPT STATMENT
NO
eca
COMMA?
JSB SYMCK
OfF COMMA·l
JS8 SERRS+6,I NO
JMP ENTR2
FNTRl EQU
*
JSB BCKSp
BACKUp ONE CHARACTER
eca
RESTORE
ADB SBpTR
BUFFER
POINTER
SaPTR
STa
ENTR2 EQU
.JSB
DEMAND A FORMULA

eeB

JSB
OfF
JSB
JSB
JSB
NOP

34065 115041

340 66 015240
34067 115076
34070 000000

SYMCK
COMMA FOLLOWS?
COMMA_t
SERRS ... 6,I NO
VAROP
DEMAND A SlMP~E VARIABLE
SERRS.35,I NONE FOUND

eee

34071 007400
3 4 072 eJ15272
3.073 ,,33363

SYMCK
COMMA FOLLOWS?
COMMA-1
SERRS ... 6,I NO
SBPTR .
YES, ENABLE
STB SFLGA,l
STRING VARIABLE
JSB VAROP
SEEK VARIABLE OPERAND
JSB SERRS+J5,I NONE FOUND
NOP
JMP EOSTA,1
OEMNAO END.OF.STATEMENT

JSB
OEF
JSB
LOB

34074 115041
34075 065572
34076 176003
34~77 015240
34100. 115076
34101 000000
34102 126006

121347.
0348.* ..
~349.*

 SyNTAX

0350 •••

0351.
0352 34103 115074

US!NS JSB

SERRS+)],I

~"353.

0354...

 SYNTAX

0355**
0356***
0351.

ki358
0361
0362
0363
0364

0365

34113 015231t1

kJ36B

USING ILLEGAL AS FIRST WORD

* ..
**

**

34t04
34105
34106
34107
34110
34111
34112

0359

*.

**

015332

007400

015272
~33363

115041
007400
176003

ASNS

JSB
eCB
JSB
DEF
JSB

RSTOP

SYMCK
RECORD
COMMA.1
A COMMA
SERRS+6,I NOT A COMMA
eeB
DISALLOW
SlB SFLGA,t
STRING VARIABL.E
JSB FSC
RECORD FuRMULA

PAGE 0061 #05

STATEMENT SYNTAX PROCESSORS

0366

34114 007400

0367
0368

34115 015212
34116 033363
34111 11!041
34120 015240
34121 115016

0369

03 7 0
0371
0372
0313

0314
0375
0316
0377
0378

34122 000000

34123 001400
34124 015272

34125 033363
34126 002001
34127 015332
3413CfJ 1"260216

CCS"

JSB
OfF
JSB
JS8
JSB
NOP

SyMCK
REtORD
COMMA.1
A COMMA
SERRS+6,t NOT A COMMA
VAROP
SEEK A NUMERIC OPERAND
SERRS+35,I
NONE FOUND

eee

JS8 SYMCK
OEF COMMA-1

RSS

JSB RSTOP
.1MP EOSTA,I

COMMA

NEXT?
DEMANO A STRING OPERAND
DEMAND END.OF.STATEMENT

PAGE 0062 #05
0380*.
0381...

SYNTAX SUBROUTINES

SEEK A VARIABLE OPERAND

••
•••

0382.·
0383.

0384*
0385*
~386.

0387*
0388.
0389*
0390*
0391*
0392*
0393*
0394.
~395.

0396*
0397*
0398.
0399
0400
0401
0402
0403

••

VAROP SCANS FOR AND RECORDS A VARIABLE OPERAND. IF
THE fIRST CHARACTER IS NOT A LETTER, EXIT IS TO (P+1)
WITH THE CHARACTER IN CAl. OTHERWISE A VARIABLE
OPERAND IS RECORDED AND UPON EXIT (A) CONTAINS THE
FOLLOWING CHARACTER. EXIT IS TO cP.2) AFTER FINDING
AN ARRAY OR STRING VARIABLE ALONG WITH ANY FOLLOWING
SUBSCRIPT. IF A SiRING VARIABLE IS FOUND AND SFLAG •
SBPTR, SET SFLAG • -1' IF SFLAG # S8PTR, NO STRING
VARIABLE IS PERMITTED AT THIS POINT. EXIT TO ERROR.
AFTER FINOING A SIMPLE VARIABLE EXIT TO (P+3) WITH
TEMp+2. CA) AND THE LAST CHARACTER OF THE SIMpLE
VARIABLE IN TEMP+1. IF INSIDE A ,
SIMPLE VARIABLES ARE COMPARED WITH THE PARAMETER AND
MATCHES ARE MARKED.
34131 015256
34132 125240
34133 035240
34134 050427
34135 026155

#VROP JSB
JMP
ISZ
CPA
JMP

LTR
YAROP,I
VAROP
.+508
yAR04

LETTER?
NO, EXIT VIA (P+l)
YES

'C'

?

yES

0404

34136 052000

0405
0406
0407
0408
0409
0410
0411
04 12

34137 026155
3414~ 050423
34141 026155
34142 035240
34143 015264
34144 026165
34145 061612
34146 0444 3 7

CPA BB1JJ
JMP VAR04

NO,. t. ?
YES

CPA ,+448
JMP yAR04
ISZ VARQP
JSB OIGCK
JMP VAR01
LOA TEMP+1
ADS ,+48

NO, 'S' 1
yES
NO
DIGIT NEXT?
NO
yES, LOAD LETTER,
RESTORE DIGIT,

34141 075612

STB TEMP.1

~413

0414
0415
0416
0417
0418

34150
34151
34152
34153

~419

34155
34156
34157
34160
34161
34162
34163
34164
34165
34166
34167

0420
0421
0422
0423

0424
0425
0426
0427
~42a

0429
0430
0 4 31
0432
0433

015260
015446
000000
071613

34154 026111

015330
015232
002001
125240

065240
056e02
115040
125240
061612
~64436

015260

34170 061613

0434

34171 006400
34t72 055617
34173 12524~
3417A 007400

0435

34175 045572

JSB
JSB
NOP
STA
JMP
VAR04 JSB
JSB
RSS

STROP
GETeR

ANO

RECORD

SIMPLE VARIABLE

fETCH
ANO SAVE
TEMP+2
NEXT
YAR02
CHARACTER
STRID
RECORD ARRAY OR STRING VARIABLE
saSeK
FETCH THE SUBSCRIpT
NO SUBSCRIPT
JMP VAROP,I
EXIT VIA (P+2)
LOB yAROP
wAg VAROP CALLED FOR
CPS OCOM0
DIM OR COM SYNTAX?
JSB sERRS.!,! yES •• ERROR
JMP VAROP,I
NO •• EXIT
VAROl LOA TEMP+l
RETRIEVE LETTER,
LOS ,+518
SET INO DIGIT',
JSB STROP
AND RECORD
LOA TEMP+2
sIMPLE VARIABLE
VAR02 CLB
INSIDE A
C~B PFLAG
'DEf' STATEMENT?
JMP VAR~P,I
NO, EXIT VIA (P~3)
eeB
YES,
ADe sBPTR
ISOLATE

PAGE
0436
0437
04Ja
0439
0440
0441

0442
0443
0444
0445

~063

#05

SYNTAX SUBROUTINES

34176 160001
34177 0105~4
34200 051617

34201 0262~4
34202 061613
34203 125240
34204
34205
342ta6
34207

160001
031027
1 7 0001
026202

LOA 1,1
CPA PFlAG
JMP •• 3

0449*
0450.
0451*
0452*
0453*
0454*
0455.
1£1456*
°457*
0458*
045 9"
0460*
04 6 1
0462
0463
04641

0465

0466
0467
0468
0469
0470
0471
0472
0473
0474
0475
0476
0477
0478
0479
0480
0481
0 4 82
0483
0484

yES

VAR03 LOA TEMP.2
JMP VAROP,I
lOA 1,1

lOR FLGBT
STA 1,1
JMP VAROJ

0446*.
0447***
0448*·

LATEST
OPERAND
. IS IT THE PARAMETER?

AND 8777

PROCESS CHARACTER STRING

NO, RETRIEVE CHARACTER
AND EXIT VIA (P+3)
FLAG
OPERAND
AS

PARAMETER

**
•••

*.

UPON ENTRy (A) caNT~INS THE STRING DELIMITER ANO (8)
INDICATES WHETHER THE fIRST CHARACTER IS TO BE STORED
IN THE LOWER HALF OF THE CURRENT BUFFER WORD ( (8) • 1)
OR THE UPPER HALF Of THE NEXT SUFFER WOR~ ( (8) • 0).
EXIT TO (p+l) ON EMPTYING THE INPUT STRING, EXIT TO
(P+2) ON FINDING THE STRING DELIMITER, BlANKS ARE NOT
STRIPPED OUT OF THE INPUT STRING IF (A) # 0 UPON ENTRy, UPON
EXIT SsPTR POINTS TO THE FIRST BUfFER WORD NOT cONTAINING PART OF
THE STRING WHILE TEMp.1 CONTAINS A COUNT OF THE STRING
CHARACTERS BIASED BY THE VALUE Of (8) UPON ENTRY.
34210
34211
34212
34213
34214
34215
34216
34217

34220
34221
34222
34223

34224
34225

0756 12

071613
064371
002002
075571
015446
026234
060001
A51613
026233
065612
006014
026227
015270

34226 001737
34227 131572
34230 171572
34231 075612
34~32 026215
34233 035262
34234 015270
3423~ 064417
34236 075571
34231 125262

'CRST STe TEMP"'1
ST. TEMP+2
LOB ,+10
SZA

STB BL.ANK
JSB GETeR
JMP CHRS3+1

LOA B

CpA TEMp+2
.JMP CHRS3
LOB TEMP+l
SLB,INB
JMP CHRS2
JSB SBPUO
ALF,SLA,ALF
lOR SBPTR,l
ST' SBPTR,I
STB TEHp.l
JMP CHRS1
CHRS3 ISZ CHRST
JSB sBpUD
LOB ,+408
STB 8LANK
JMP CHRST¥I

SET CHARACTER FLAG AND COUNTER
NOTE TERMINATOR CHARACTER
IF (A) # 0

STOP BLANK
SUPPRESSION
FETCH CHARACTER
NONE FOUND
ALLOw LOwER CASE
TERMINATOR?

YES
NO, COUNT CHARACTER
AND SELECT wORD HALF
lOW HALF
HIGH HALF, MOVE TO NEXT WORD
P08I1ION CHARACT~R AND SKIP
COMBINE WITH PREVIOUS CHARACTER
SAVE FLAG/COUNTER
SET EXIT TO (P.2)
ADVANCE POINTER
RESTORE BLANK
SUPPRESSION

pAGE 0064 #05

SYNTAX SUBROUTINES'

.*

0486*.
0487*·* DELETE SOME PROGRAM ***
0488*·
**
0489*
1449"" THAT PART OF THE PROGRAM REflRENCEO BY CORE LOCATIONS
(TEMp+l)+(A, THROUGH (TEMp+l)+(B).l INCLUSIVE IS
0491*
0492. DELETED BV SLIDING UP ALL OF THE PROGRAM FROM
(TEMP+l)+(B) TU (PBPTR)-l (I,E., THE REST OF THE
0 4 93*

0494.
0495*

PROGR4M FOLLOWING THE 'GAP'). PBPTR Is TH£N
UPDATED TO POINT TO LAST WORD +1 OF THE PROGRAM.

1fl496.

0497
0498
0499
0500
0501
0502
0503
0504

0505

0506

0501
1tl508

0509

34240 041612
34241 071613

34242 045612
34243 054056
34244 026252

34245
34246
34247
34250
34251
34252

160001
171613
035613
2106004

026243
061613
34253 070056
34254 125312

#DLPR ADA TEMP·l
STA TEMP+2
ADS TEMP·l
CpB PBPTR
.JMP DELP2
LOA 1,1
STA TEMP.a,I
ISZ TEMP"2
INS
JMP DELPl
DELP2 LOA TEMP+2
STA PBPTR
.JMP OELPR,l

COMPUTE INITIAL
DESTINATION ADDRESS
COMPUTE INITIAL SOURCE ADDRESS
DONE?

YES
NO, TRANSFER

A WORD
BUMP

POINTERS

UPDATE
f!ND-Ofl·PROGRAM
POINTER

PAGE 0065 #05
0511.*

0512...
051J.*
~514

0515
0516

0511
0518
0519

0520
0521
0522
0523
0524
0525
0526
0527
0528
~529

0530
0531
0532

0533
0534
0535

0536
0537
0538

SyNTAX SUBROUTINES

STATEMENT SyNTAX ENTRY POINTS

34255
34256
34257
34260
34261
34262
34263
34264
34265
34266
34267
3427~

0341914
034t03
032124

032043

032022
032042
032064
034017

032142
032225
032275
032332

34271 032142
34272" 032336
34273 032336
34274 032336
34215 032342
34276 032414
34211 032404
34300 032426
34301 034007
34302 032555
34303 034016
343~4 034023
34305 034034
34306 1(132017

SYNTB OfF

DEF
DEF
OEF
OEF
DEF
DEF

DEF
DEF

ASNS

USINS
IMAGS
COMS
LETS
DIMS
DEFS
REMS
GOTOS

OfF IFS
OfF FORS
DfF NEXTS
OEF GOTOS
DEF ENDS
OfF ENOS
DfF ENDS
OEF OATAS
DEF INPTS
OfF REAOS
OEF PRINS
DfF RSTRS
OEF MATS
OfF FILES
OfF CHANS
OEF ENTRS
DEF LETa

**
•••

*.

ASSIGN
USING
IMAGE
COM

LET
DIM
OEF
REM
GOTO
IF
FOR
NEXT
GOSUB
RETURN
END

STOP
DATA

INPUT
READ
PRINT

RESTORE
MAT

FILES
CHAIN
ENTER
'IMPL.IED' LET

0539
0540··
0541... ACCEPT A STATEMENT * ••
0542 ••
0543.
0544. A CORRECT STATEMENT Is ADDEO TO THE PROGRAM SuFFER.
0545* IF ITS SEQUENCE NUMBER IS THE HIGHEST SO FAR, ONLY
0546. THE END~OF.PROGRAM POINTER REQUIRES CHANGE, SINCE THE
0547* STATEMENT IS TRANSLATED IMMEDIATELY BELOW THE PREVIOUS
0548. PROGRAM, OTHERWIsE THE NE~ STATEMENT Is INsERTED INTo
IF ITS
0549* THE PROGRAM IN PROPER SEQUENTIAL POS:TION
0550.

0551*
0552*
0553*
~554*

~555·

kl556*
0557·
0558*

0559*

••
••

SEQUENCE NUMBER COINCIDES wITH THAT OF A PREvIOUS
PROGRAM STATEMENT, IT REPLACES IT, WITH SPACE H~DE OR
DELETED IN THE PRoGRAM AS NECESSARY. ExIT TO EXEC.
IF STATEMENT LENGTH. 0 THE STATEMENT WAS REJECTED DUE TO
A STORAGE OvERFLOw IN TAPE MODE. IF IN KEyBOARD MOD! AND
SVMTd • 4 AT LEAST ONE OVER/UNDERF~OW OCCURRED WHILE ANALYZING
THE STATEMENT so EMIT THE ERROR' OTHERWIsE ECHO A LINE FEED.
IF IN TAPE MODE Movf THE START"OF-RECORO POINTER TO THE START
OF THE NEXT BuFFER ANO IF IT IS COMPLETED SYNTAX IT NOw, ELSE
EXIT TO EXEC.

0560*
05 61
0562
0563

0564
0565
0566

343~7

~656t6

34310 006004

34311 061616
34312 003~04
34313 041572
34314 00201(13

ACCST LDB SBUFA
INS
LDA SBuFA
CMA,INA
ADA SBPTR
SZA,RS8

COMpUTE
STATEMENT
LENGTH
UNPROCESSED STATEMENT?

PAGE 0066 #05

SYNTAX SUBROUTINES

0567
05b8
0569
0510

34315 026413

0571
0572

34321
34322
34323
3432.
34325

0513
0574
0575
0576
0577
0578
0579
121580
0581
0582
0583
0584
0585
0586
0587
0588
0589

0590
0591
0592

0593
0594

0595
0596
0597
0598
0599

0600
0601
0602
0603
0604
0605
0606
0601
0608
0609
0610
0611

121612
0b13
0614

0615
0616
0611
06is
0619
0 6 20
0621
0622

JMP
STA
STA
LOA
LOB
JSB

34316 1721001
34317 071613
34J2~ 06005b

166616
016314

34326 160001
34327
34330
34331
34332

003004
041613
002003
026340

34333 002021
34334 026351
34335
34336
34337
34340
34341
34342
34343
34344
34345
34346
34347
34350
34351
34352
34353
34354
34355
34356
34357

061613
1 64 001
015312
065616

160001
171612
035612
006004

055572
026400
026341

061613
041616
071616

041613
065572
071572
071613
003000

34360 040716
34361
34362
34363
34364
34365

JMP ACC54
,IMP ACCS2

026376
026350
006004

002020
115033
061616
070056
055612

ACCS6
t,I
TEMP+2
PBPTR
SBUFA,I
FNDPS

IN8
LOA t,I
CMA,INA
AOA TEt4p.2
SlA,RSS
.}MP Aces 1
SSA,RSS
.JMP AeCS2.t
LDA rEMp+2
LOB 1,1
.J8B OELPR
ACeSt LOB SBUFA
LOA 1,1
STA TEMp"1,l
ISZ TEMP+l
INS
CPB SBPTR
JMP ACCS~
JMP ACCS1+1
ACC52 LOA TEMP.2
ADA SBUfA
STA SBUfA
ADA TEMp .. 2
LOB sBPTR
STA SBpTR
STA TEMP+2
CMA
ADA lWAUS
SSA

JSB SERRS,I
LDA SBUFA
ACCS3

STA PBPTR
C~8

TEMP.1

34366 026340

JMP ACCSl

34367
34370
34371
34372

003400

CCA

041613
071613

ADA
STA
A08
LOA
STA
JHP
ACCS4 LOA
STA
ACCS 5 LOA
AND
52A
JMP
LOB

34373
34374
34375
34376

044356

160001
171613
026365

061572

34377 070056
34400 060367

34401 110255
34402 002002
34403 026413
34404 055573

TEHP.2
TEMP.2
.-1
1,1
TEMP"2,1
ACC83

YES
NO, STORE LENGTH IN STATEMENT
SAVE IT
FIND STATEMENTIS
SEQUfNTIAl
POsITION
APPEND STATEMENT TO PROGRAM
INSERT STATEMENT INTO PRoeRAM

REPLACE PRIOR STATEMENT
COMPARE LENGTH
OF NEw STATEMENT
wITH THAT OF OLD
EQUAL?

YES
NO, L.ONGER?
yES

NO, SHORTER

LOAD LENGTH OF OLD STATEMENT
DELETE EXTRA LENGTH
LOAD FIRST SOURCE ADDRESS
TRANSFER
A WORD
ADVANCE DESTINATION
AND SOURCE ADDRESSES
DONE?
YES
NO
LOAD SPACE REQUIREMENT

UPDATE POlNTER
TO NEw STATEMENT
REsET
END of STATEMENT
POINTER
INITIALIZE DESTINATION ADORESS
uSER
SPACE
OVERFLOW?
YES
NO, UPDATE POINTER
TO ENO.OF-PROQRAM
EVERYTHING MOVEO,
yEs

NO, BACK UP
SOURCE AND

DESTINATION
ADDRESSES
TRANSFER
A NORD

sBpTR
p8PTR
TAPEF
MAIN"l

REsET poINTER TO
LAST WORD+1 of PROGRAM

ACCS6
SyMTB

~ES

TAPE

MODE?
NO

PAGE 0067 #05
0623
0624

0625
0626
0627
0628
0629
0630

0631

34405
34406
34407
34410
34411
34412
34413
34414

SYNTAX SUBROUTINES

071573
054363

1151]7
06 0 311
015452
124740
064255
006004

34415 160001
34416 PJ30236

0632
0633 34417 114736
0634 34420 124740
0001*·

0002***
0003 ••
0094*

0005*
0006.
0021 7*

0008*
0009*
00121*
0011.

0012*
0013*
0014*

0015*
0016*

0017

0018
0019

0020
0021
02122
0023

0024
0025
0026
0021

0028
0029
0030
0031
0032
0033
003 4
~035

0036
0037
0038
0039
0040
0041
0042

STA SYMTB
RESET UNDER/OVERFLOW FLAG
UNDER/OVERFLOW ERROR(S)?
CPS .+4
JSB RERRS.32,I YES
LOA .+128
JS8 OUTCR
JMP SCHEN,I
ACCS6 LOB MAIN
IN8
LOA 1,1
lOR ALI
JSB 814SC,1
JMP SCHf:N,I

NO,

OUTPUT A

LINE FEED
ALLOW
MORE
INPUT

FIND A STATEMENT'S SEQUENTIAL POSITION

.*
•••
••

UPON ENTRy (Al POINTS TO THE LAST wORD.t OF THE PROGRAM
IF (8) IS LARGER THAN
ANY SEQUENCE NUMBER IN THE PROGRAM, EXIT TO (P.1) WITM
(8) pOINTING TO THE LAST wORD.l OF THE PROGRAM, IF (8)
FALLS BETWEEN lWO SEQUENCE NUMBERS, EXIT TO (P+2) WITH
(8) POINTING TO THE STATEMENT WITH A LARGER SEQUENCE
NUMBER, If A STATEMENT IN THE PROGRAM HAS THE SEQUENCE
NUMBER IN (B), EXIT TO (p+3) WITH (8) POINTING TO THIS
STATlMENT (IF IT IS AN EMBEDDED ERROR MESSAGE, STATEMENT
TYPE • 0, DECREMENT THE ERROR COUNT). IN ALL CAsE8 T£MP+1
• (8) UPON EXIT.

AND (8) HOLDS A SEQUENCE NUMBER.

34421
34422
34423
34424
34425

075612

IIFOPS STB TEMP+1

071614

STA TEMP+3
LOB PBPTR

064056
054726

026471
34426 065575
34427 055614
34430
34431
34432
34433
34434
34435
34436
34437
34440
34441
3444 2
34443
34444
34445
34446

3 444 7
34450

34451
34452

0043

34453

0044

34454

02 6 4 7 1
160001
003004
041612
002003
026446

002020

026470
060001
00200 4
1600tlJ0
~44000

015554
026427
060001
040361
160000
010570
002002
026467
003400

SAVE TEST SEQUENCE NUMBER
SAVE TERMINATION POINTER

CPS PBUFF

JMP FNOp4
LDB SPRaG
FND P l cPS TEMP .. J
JMP FNOP3+2
LDA 1,1
CMA"INA
ADA TEMp ... !
SZA,RSS
JHp FNDp2
5SA

JMP FNOP3+1
l,D.i\ B

INA
LOA
ADB
JSB
JMP
fNDP2 LOA
AOA
LOA
AND

A,I

START WITH FIRST WORD
PROGRAM EXHAUSTED?
YES, EXIT TO (p.t)
NO, Is
PROGRAM

SEQUENCE NUMBER
THE SAME'
yES, ExIT TO (p.3)
NO, GREATER~1
yES, EXIT TO (P+2)

NO, CHECK
STATEMENT

LENGTH AND
sET (8) TO
POINT TO NEXT
STATEMENT

A

STLCK
FNDPl
1

.+2
0,1
OPMSK

LOAD
STATEMENT
ERROR

STATEMENT1

SZA

JMP FNDP3

ceA

NO
YES,

PAGE 0068
0045
"046
0047
0048
0049
0050

#~6

34455
34456
34457
34460

SyNTAX SUBROUTINES

"41574
071574
002002
026467

34461 103100

0052
0053
0054

34462
34463
34464
34465
34466

0055

34467 035314

0051

060360
~0J000

110255
170255
102100

0056 34470 035314
0057 34471 075612
012158 34472 125314
0059.*

0060*.*
0061**

AOA
STA

SZA
JMP FNDpJ
elF
LDA TERR
eMA
AND MAIN,!
STA MAIN,I
STf o
FNDP3 lSI FNDPS
ISZ FNDPS
fNDP4 STB TEMP+1
JMP FNDPS,I

"

FElCH PARENTHESIZED FORMULA

0062*

0063*
0064*
0065
0066

0067
0068
0069
0070
0071
0072
0073
0074
0075

0076**

ERRCT

EHReT

AN

END~OF~FORMULA

34473
34474
34475
34476
34477
34500
34501
34502
34503
34504
34505

YES·.
SET FLAG
TO SAY
INO

EMBEDDED ERRORS'

SAVE POINTER TO
FINAL STATEMENT sEEN
**

***

**

OPERATOR FOLLOWS THE FORMULA

115061

LOB
JSB
JSB
JSB
JSB

015252

,JS8

015230
015270
015254

JSB
JSB
JSB

015236
125250

JHP

064364
015234
015270
0154tt6

DECREMENT
ERROR COUNT
ONLY ERROR?
NO

Jse

,+5
SAvE fsC
FRCUR
LOCAL VARIABLES
SBPUO
UPDATE POINTER
GETeR
RECORD
SERRS+22,I LEFT
LPCK
PARENTHESIS
fSC
DEMAND FORMULA
SBPUD
RECORD END.OF.FORMULA OPERATOR
RPCK
RECORD RIGHT PARENTHESIS
FPOP
RESTORE Fse
GETPF,I
LOCAL VARIABLES

0077*** RECORD AN INTEGER ***
007S.·
**
0079*
0080* PRGIN FLAGS THE PREVIOUS OPERATOR TO SAy 'INTEGER FOLLOWS'.
00S1* STORE THE INTEGER ANO EXIT WITH IT IN (8) AND THE FOLLOWINQ
0082* CHARACTER IN (Al.
0083*
0084 345 0 6 16157 2 #PGIN LOA SBPTR,I
SET
0085 34507 030550
lOR INTfl
'INTEGER FOLLOWS0086 34510 171572
SlA SBPTR,I
FLAG
JSB SBPUD
0087 34511 01527~
ADVANCE POINTER
0088 34512 015464
~S8 BL.OIN
BuILD INTEGER
0089 34513 175572
8TB SBPTR'I
RECORD INTEGER
0090 34514 015270
JSB SBPUD
ADVANCE POINTER
JMP PRGIN,I
34515 125244
0091

PAGE 0069 #06- SyNTAX SUBROUTINES
0093*.
0094*.*

0095 ••
0096*

0107
0108

0109

34516
34517
34520
3452i
34522

0129*

9132*
0133*
01 34*

0135*

"'02400
071643
015446
026540

015264

34523 026540
34524 071644
34525 061643

34526 100200
34527 000371
34530 000040
34531 041644
34532 006043
34533 026517
34534 035420
34535 115034
34536 035244
34537 125244
34540 065643
34541 006103
34542 026534
34543 044770
34544 002040
34545 026534
34546 065643
34547 125464

0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125**
0126 •• *
0127 ••
0128.
0130.
0131*

*BLOI CLA
STA
JSB
JMP
JSB
JMP
STA
LOA
MPY

INITIALIZE TO
PINTG
GETeR
BLOl2
DIGCK
PJLDI2
pINTG ••
PINTG
,+10

CLE
ADA pINTG.,
SEZ,SZ8,RSS
JMP "BLDI.l
lSI GFL,AG
JSB SERRS+-l,l
ISZ PRGIN
JMp PRGIN,I
LDB pINTG
CLE,SIB,RSS
JMP BLDlt
ADS MAXSN
SEz
JHP SLOI1
LOB PINTG
JMP SLDIN,I

ZERO INTEGER,

OIGIT1
NO
yES, SAvE IT
MULTIPly PREvIOUS
INTEGER BY 10
ADD IN

NEW OIGIT

OVERFL.OW?
NO
yEs, RETURN ON ERROR?
NO
YES, EXIT TO
(p.2) Of PRGIN
ZERO
INTEGER?
yES

NO, INTEGER
TOO LARGE1
YES
NO

.

••

***....

IF THE NEXT CHARACTER IS NOT 'I', RESTORE SBPTR AS UPON ENTRY
AND EXIT TO (P+l) WITH THE CHARACTER IN (A), OTHERWISE CHECK
CHARACTER RETURNED IN CA) FROM FILRF. IF IT IS A COMMA OR A
SEMICOLON RECORD IT, EXIT TO (P+2) WITH THE CHAR~cTER IN . THE
9419* AMOUNT OF COM STOHAGf NEEDED IS COMPUT~D, A POINTER (SPAOG) TO
0420* THE START Of THE PROGRAM IS CREATED AND THE PROGRAM IS SHIFTED TO
0421* HIGHER CORE TO ALLOW FOR THE COM STORAGE,
0422*
SAY NO COMMON
0423 35043 006400 #ALeo CLB
srB DEST
ALLOCATED VET.
0424 35044 075512
LDB pBufF
0425 35045 064726
0426 35046 075616
srB STPTR
POINTER To FIRST STATEMENT
0427 35047 1616t6 ALCOI LOA STPTR,I
sAVE STATEMENT
0428 3505A ~71566
NUMBER
STA .LNUM
0429 35051 035616
ISZ STPTR
0430 35052 145616
ADa STPTR,I
STa NSPTR
0431 35053 075236
POINTER TO NEXT STATEMENT
9432 35054 035616
ISZ STPTR
0433 35055 161616
LDA STPTR,I
EXTRACT
AND OPMSK
OPERATOR
0434 35056 010570
0435 35057 050534
CPA COMOP
COM STATEMENT?
yES
JMp ALCo2
0436 35060 027106
0437 35061 061512 ALC06 LOA DEST
GET TOTAL COMMON ALLOCATED
SZA,RSS
~XIT IF THERE WERE
0438 35062 002~"?J3
0439 35063 125516
NO COM STATEMENTS
.IMP ALCOM,!
PROGRAM BEGINNING MOVES BY
ADA PBUFF
044 0 35 0 64 04°7 2 6
STA SPROG
AMOUNT OF COMMON ALLOCATED.
0441 35065 071575
eee
0442 35066 007400
POINTER To FIRST
ADS PBPTR
WORD TO BE MOVED
0443 35067 044056
0444 35070 068001
LOA 1
POINTER ·TO
0445 35071 041512
ADA DEST
FIRST DESTINATION
0446 35072 071512
Sfi DEST
LOCATION
INA
RESET END Of
0447 35073 002004
STA PBPTR
0 44 8 3507 4 070056
PROGRAM POINTER.
MOyE A
0449 35015 160001 ALC00 LOA 1,1
0450 35076 171512
srA DEST,I
WORD
0451 35077 054726
DONE?
CPS P8UFF
JMP AL.COM,I
EXIT
0452 35100 12551 6
NO .... BU MP
0453 35101 044356
ADB .-1

0454
0455

35102
35103
351 8 4
35105
35106
351 0 7

003400
041512
071512
021075
161616
010376
002002

0464

35110
35111
35112
35113
35114

0465
0466
0467

35117

0456
0457

0458
0459
0460
0461
0462
0463

~468

0469

027122
035616
035616

161616
35115 002004
35116 001100
002~04

35120 035616
::)5121 027156

ceA

AOA DEST
STA DEST
JMP ALC00

ALC02 LOA STPTR,I
ANO ,+178
SZA
JMP AlC03
ISZ STPTR
ISZ STPTR
LDA STPTR,I
lNA
ARS
INA
lSI STPTR
.}MP AL.tO?" 1

POINTERS
AND LOOP

EX!RACT
OPERAND
STRING?

NO
yEs ....

EXTRACT

LENGTH
COMPUTE
STORAGE
REQUIRED
BUMP PAST RIGHT BRACKET

PAGE 0077 #c;,6
0470

0 4 71
0472

0473
0474
0475

0476
0477
0478

0479
0480
0481

0482
-0483

35122
35123

SYNTAX SU8ROUTINES

~41l135J

0"2~20
~27127

35124
35125 00240 4
35126 027155
35127 035616
35130 035616
35131 165616
35132 035616
35133 161616
35i34 010570
3513b 050602
35136 027141
35137 060001

0484

35140 027150
35141 060001
0486 35142 035616
0487 35143 100200
35144 101616
0488 35145 006002
0489 - 35146 127172
04ge 351 4 7 03 56 1 6
0491 35150 000066
0492 35151 002 0 61
0493 35152 000035
0494 35153 127172
0495 35154 040361
0496 35155 001000
0497 35156 041512
0498 35157 071512
0499 35160 040472
0 5 00 35:i61 015326

0485

0501
0502

35162 035616

0503

35164 055236

0504

35165 0020OJ1
35166 027106
35167 054056
35170 027061
35171 027047

0505

0506
0507
0508
0509.

35163 065616

ALCOJ ADA •• 4
5SA
.JMP ALC04
CL.A,INA
JMP
ALCQ4 15·Z
ISZ
LOB
ISZ
LDA

AL.t07
STPTR
STPTR
STPTR,I
STPTR
STPTR,I
AND OPMSK
CPA SCOMM
JMP *+3
tDA t
JMP ALC,05.1

• LOA t

ISZ STPTR
MPY STPTR,I

SZB
JMP CUS1A,I
0
ALC 5 ISZ STPTR
CLE,ELA
SEZ,SSA,RSS
SLA,ERA
JMP CUSlA,I
ADA .+2
ALC07 AlS
ADA DEST
STA DEST

AOA
JSB
ISZ
LOB
CPS

.100

CUSP

MUST BE ARRAY
EXTRACT LENGTH
GET NEXT

OPERATOR
SUBSCRIPT COMMA?
YES
NO
COMPUTE
ARRAy
SIZE
TOO BIG7

YES
BUMP PAST
TOO BIG?

NO

YES
ALLOW 4 WOROS FOR DIMENSIONS
DOUBLE EVERYTHING
UPDATE
POINTER
CHECK FOR STORAGE OVERFLOW

STPTR

STPTR
NSPTR

END OF

STATEMENT

YES

RSS

JMP
CPS
JMP
JMP

SIMPl.E VARIABL.E?
NO
YES-- ALLOW T.-;O WORDS

ALC02
PBPTR
ALC06
ALeOl

NO
END Of PROGRAM?
yES

NO

0510 35172 035201 CUS1A OfF CUSPI
0511**
*0512*** iNSURE SPACE FOR NEW ENTRY ***
0513*.
**
0514*
0515* A CHtCK IS MADE THAT THE UNUSED USER SPACE IS AT
0516* LEAST AS LARGE AS THE NUMBER OF wORDS SPECIFIED aY
0517. (A) • EXIT TO ERROH IF NOT SO. (8) IS NOT CHANGED.
05 1a* ON NORMAL EXIT (~) CONTAINS ITS ENTRY VALUE + (PBPTR).
0519*
AT LEAST
0520 35173 040056 #CUSP ADA PBPTR
(A) WORDS
0521 35174 071474
SrA Cut
0522 35175 003000
eMA
Of AVAILABLE
ADA LWAUS
0523 35176 040716
USER
0524 35177 002021
SSA,RSS
SPACE?

PAGE 0078 #06
1525
0526
0527
052a

J520~

~2120J

35201
35202
352 0 3
35204

015322
115111
061474
125326

0529
0530**
0531.**
0532**
0533.

0534.

SYNTAX SUBROUTINES

JMp
CUSP1 JSB
JSB
LOA
JMP

.+3
yES
DCMPl
NO, OECOHPILE
RlRRS.10,1 OUT OF STORAGE
CU1
RETURN WITH NEW
CUSP,l
VALUE OF P8PTR

AOVANCE SyNTAX BUFFER POINTER

••

•••

**

(Al AND (8) REMAIN AS UPON ENTRY

0535.
0536 35205 Vl7 13 06 #SSPU STA SBT0
SAVE CA)
ISZ SBPTR
ADVANCE POINTER
0537 35206 035512
0538 35207 061572
BUFFER
LOA SSPTR
0539 35210 051470
OVERFLOW?
CPA SYNTQ
JSB SERRS+31,1 YES
0540 35211 115072
LOA SBT0
NO, RETRIEVE (A)
0541 35212 061306
~JMP SBPUD,1
0542 35213 125270
0543**
.
**
0544*** D~MAND A LEFT PARENTHESIS ***
0545.*
**
0546*

0547.

INSIST CHARACTER IN (A) BE 1(' OR '[I.

0548*
0549.

AS A '(I.

0550

35214 064355

RECORD IT

,( ,
LDB .-2
JSB SYMCK
OR
DfF LBRAC-l
, t' 'I
JSB SERRS+22,I NO

0551 35215 015272
0552 35216 033403
0553 35217 115061
LOA LPOP
YES, RECORD
0554 3522 0 060556
A '(I
STA SBPTR,I
0555 35221 171572
JMP LPCK,l
0556 35222 125252
0557.*
**
0558*** STATEMENT LENGTH CHECKER ***
05590Q0*
**
0560*
0561* CHECK THAT (A) (THE STATEMENT LENGTH) IS BETWEEN 3 AND 105.
0562* IF NOT, EXIT TO ERROR,
0563 35223 040354 *SLCK ADA .-3
5SA
0 5 6 4 35224 002020
0565 35225 115160
JSB RERRS+4y I I TOO SMALL
0566 35226 042005
ADA M103
f£'567 35221 002020
5SA
0568 3523A 125554
JMp STLCK,I
OK
0569 35231 115160
JSa RERRS+49,I TOO BIG

PAG~

0002
0003

~079

#07

COMPILATION ANn

ORG 360008

360ld0

36000 000371

PHH~5

J6001 037024
36002 V1J7(i1t~

Hkl06

36~03

~41b7J

0007
"''''08

j6rcH~4

"'75e1~5

~004

DECO~PIL'TION

360"'5 "'67"'0~

A.10 DEF .+10
APTR2 DE.F SYMT7
AP1R1 o~F SYMT6
r>ONEA nEF EXITJ
CSVHT OfF CSAV2
MATOP OCT b7A90

Vl~09*

0010* **************************
0011****
**
ifHiJi2*** ·CliMPILE' iHt: PROGRAM it.
0~13****
**
0014* **************************
~015.

0016*

0017.
0~18*
0~19*

0020*
0021*
0022*
~023*

0024*

0025*
0°26*
0027*

SyMTM=0 IMPLIES THE PROGRAM IS IN 'SOURCE's ALL OPERANDS ARf IN
SYMBOLIC FORM. SYMTa#0 AND SPTR:0 IMPLIES THE PROGRAM IS 'SEMl~
COMPILED': VARIABLE OPERANDS ARE POINTERS TO A SYMBOL TABLE ANO
STATLMENl REFERENCES ARE REPLACED BY ABSOLUTE POINTERS,
,
svMT~ = SPTR IMPLIEs THE PROGRAM Is 'COMPILED': THE SyMBOL TABLE
ENTRIES CONTAIN POINTERS TO A VALUE TABLE OR IN THE CASE OF
FUNCTIONS TO THE DEFINING fORMULA, AND A TABLE IS BUILT
CONTAINING INFU~MATJON FOR EACH FILE IN THE PROGRAM. BEfORE
BuILDING THE SyMBOL TABLE, THE INTERPRETER'S PROGRAM COUNTER
IS SlT TO THE STATE~ENT RlFERENCED BY THE 'RUN' COMMAND (THE
LOwEST NUMBERED STA1EHENT IS THE DEFAULT CHOICE).

0028.
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
""048

01049
"'-1050

0051
0052
~053

0054
0055
1d0b6

0057

36006 ~64726
360 0 7 05 40 56
3601~ 1261{HlJ3
3 6 011 006404
.3 6 012 0 75 334
36013 "15462
36~14 015446
3 6 eH5 026024
360.16 015450
36017 015464
3602(;1 075334
36 0 2 1 05 Pt 374
36~22 0020,,1
36023 115113
36024 1031til0
36025 160255
36 0 26 03 0 377
36027 170255
36030 10210~
36A31 064726
36032 055575
36033 015516
.)0034 061573
36Q135 002003
36036 "60056
36037 065334
3604'1 015314
36~4t 126003
.i6042 QI~00017J

CMPLE LOB PBUFF
NULL
CPS PBPTR
PROGRAM?
JMp DONEA,I
yES
CLB,INB
INITIALIZ~
STB PRGCT
PROGRAM COUNTER
JSB SINIT
sIMPLE
JSB GETCR
'RUN' ?
JMP CMP15
YES
JSB BCKSp
NO
JSB BLDIN
DEMAND AN INTEGER
STB PRGCT
SAVE STARTING STATEMENT
CPA .+15R
END Of RECORD?
RSS
yES
JS8 RERRS+12,1 NO
CMP15 elF 0
LOA MAIN,I
DON'T
lOR UNABT
ALLOW
STA MAIN,I
ABORTS
STF 0

LOB PBUfF
CPB SPROG
.JSB ALCOM

LDA SYMTa
5lA,RSS
LOA PBPTR
LOB PRGCT
.lsa FNDPS

JMP DONEA,I
NOP

NO, COM STORAGE ALLOCATtD?
NO-.. OO IT
GET SYMBOL TABLE POINTER
IS PROGRAM COMPILED 1
NO, USE PBPTR
GET STARTING STATEMENT NUMBER
SEEK REFERENCED STATEMENT
NOT WITHIN PROGRAM
SET

PAGE
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070

~080

36043
36044
36 04 5
36046
360 4 7
36050
36051
36052
36053
~'6054

36055

#01

COMPILATION AND OECOMPILATION

~75334

060255
A02004
1600~0

030223
114736
061573
002003
026070
051230
002001
026 0 66
065771

0082

36056
36057
36060
36061
36062
36063
36064
36065
36066
36066
]60 67
36070
3 607 1
36072

0083

36073

0084
0085
0086
0087

36074 044341
36075 130~01
36076"17 00 01
36071 102100

0071
0072
0073
0074
0075
10076
0077
0078
00 79

0080
008 1

006003

027220
015520
061573
071230
!2J26433

071230
026422
071502
10 31 00
060361
~64272

STB PRGCT
CMP14 LOA MAIN

INA
LOA 0,1
lOR UIR
JSB 514lP,1
CMPL0 LOA SyMTB
SZA,RSS
JMP CMP00
CPA SPTR
RSS
JMP CMP16
LOB ASINP
SZS,RSS
JMP VALUE
.J5B RSTPT

PROGRAM COUNTER
TELL 2114

THAT USEH

IS RUNNING
PROGRAM
UNCOMPILED?
yES

NO, COMPILED?
YES
NO, MUST BE SEMI-COMPlLED
ASSIGN STATEMENT SEEN?
NO
YES, FAKE SEMI~COHPILED PROGRAM

LOA SYMTB
STA SPTR
.JMP CMP18

CMP16 EQU '*
STA SPTR
JMP CMP 17
CMP00 STA FILT8
elF 0
LOA CFLAG
LOB MLINK+l
ADa .... ?LINK
lOR 1 , I
STA 1,1
STF

"

SET

PRoGRAM MoDE
TO 'COMPILED'

PAGE 0081
0089*·

0090...

#~7

COMPILATION AND DECOMPILATION

BUILD THE SyMBOL TABLE

0091*·
0092.
0093. THE PROGRAM IS

*.

•••

••

ExAMINED STAT~MENT By STAT~MENT. ALL
VARIAALE OP~RANDS ARE REPLACED AY POINTERS (RELATIVE
0095* TO THE START Of THE SYMBOL TABLE) TO TWO WORD ENTRIES,
0096* SYMBOL TABLE ENTRIES KEEP THE SYHBOL IN THE FIRST WORD
0097. AND INFORMATION IN THE SECOND. FOR FUNCTIONS THE
009S- SECOND WORD CONTAINS A POINTER TO THE DEFINING FORMULA
0099.
(0 BEFORE FINDING THE cOfF STATEMENT», FOR SIMPLE
0100. VARIABLES THE SECOND WORD IS USED TO FORM A LINKED LIST
0101. OF uNMATCHED FOR~YARIA8LfS (OTHERWISE IT IS 0) WITH
0102* . FLINK POINTING TO THE INNERMOST NESTED FOR.VARIABLE.
0103* IF THE SIMPLE VARIABLE APPEARS IN A 
0104. THE SECOND WORD IS SET TO -I, FOR ARRAY AND STRING
0105* VARIABLES THE SECOND WORD IS 0 UNLESS THE VARIABLE
0106- APPEARS IN A cDIM STATEMENT>, IN WHICH CASE IT
0107* POINTS TO THE DIMENSIONS IN THE CODE, OR IT APPEARS
0108. IN A , IN WHICH CASE IT IS THE
0109. NEGATION OF A POINTER TO THE DIMENSIONS.
0110* PROGRAM INTEGERS ARf REPLACED BY A POINTER TO THE
0111* STATEMENT THEY REFERENCE. ON EXIT TO VALUE OR DCMPL,
0112* SpTR POINTS TO THE FIRST WORD NOT PROCESSED.
0~94·

0113.
0114 36100 064056
0115 361°1 075573
0116.

LOB P~PTR
STB SYMTB

CREATE POINTER
TO SYMBOL TABLE

0117- COUNT NUMBER Of STATfMENTS IN PROGRAM
0118.
(LA, INA
INITIALIZE STATEMENT COUNTER
0119 36102 002404
LDB SPROG
0120 36103 065575
0121 36104 006004 CMP01 INS
MOVE TO
ADS
1,1
36105
1440fi'1
NEXT
0122
0123 36106 0 4435 6
ADB .-1
STATEMENT
CPB PBPTR
DONE?
0124 36107 054056
YES
.JMP CMPe2
0125 36110 026113
0126 361t1 002004
INA
NO .. -BUMP COUNTER
JMp CMp01
0127 36112 026104
DIVIDE # OF STATEMENTS
0128 36113 006400 CMP02 CLB
0129 36114 1004210
DIV .+32
INTO 32 PARTS
0130
0131

0132
1£1133
0134
0135
0136

0137

000417
007000
002003
006004
36121 002004
36122 071617
36115
36116
36117
36120

36123

~75613

36124 064650
36125 075606

eMS
SlA,RSS
INB
INA

STA
STB
LDB
STS

STCTl
STCT2
ERSc A
NUMPT

SET 8.~1.# Of OVERSIzE GROUPS,
BUT IF <32 STATEMENTS USE ••
SET A TO SIZE OF lARGER GROUP
SET COUNTER
SET POINTER TO TABLE

PAGE 0082 #07
0139*
0140*
0141*
0142*
·,,143*
0144*
0145
0146
01 41
0148
0149
0150
0151
0152
0153
0154
0155
0156
0157

0158
0159
0160
0161
0162

0163
0164
0165
0166
0161*
0168
0169

0170
0171
0172

COMPILATION AND OECOMPILATION

BUILD A TABLE Of 64 WORDS. THE FIRST 32 CONTAIN THE SEQUENCE
NUMBERS OF STATEMNTS WHICH DIVIDE THE PROGRAM INTO 32 ALMOST
EQUAL PARTS. THE SECOND 32 WORDS ARE THE ABSOLUTE ADDRESSES

OF THESE STATEMENTS
36126
36127
36130
36131
36132
36133
36134
36135
36136
36137
36140
36141
36142
36143
36144
36145
36146
36147
36150
36151
3 6 152
36153

061575
044417
170001
164000
175606
035606
035613
006401
007400
045617
075617
001000

36154
36155
36156
36151
36160
36161

002404
071234
015324

075614

065606
054646
026154
035614

002005
026127

14"'''00
040356
026146

Pl36404

002041
026237

tOA SPROG
CMP03 AOB .+32

STA 1,1
LOB 0,1
ST8 NUMPT,I
ISZ NUMPT
ISZ 5TCT2
ClB,RSS

SET ABSOLUTE ADDRESS INTO TABLE
SET SEQUENCE • INTQ TABLE
BUMP POINTERS
TEST fOR ANY MORE
OVERSIZE GROUPS
cOMPUTE SIZE OF NEXT GROUP

eeB

ADS STeTl
STB STeT 1
eHS

srB STeTl

LOB NUMPT
CPS ERS32

TEST FOR DONE

Jr-tP CMP04

ISz STeTl
INA,RSS
JMp CMp03
ADA 0,1
AOA .-1
JMP *-5

COMPUTE FIRST STATEMENT
IN NEXT GROUP

CMP04 ClA,INA
STA FLINK
JSB PRNST
OfF CMP11
SEZ,RSS

~JMP CMPL3
0173
0174*
0175 •• PROCESS NON~VARIABLE OPERAND
"176*
ADA .",,4
0177 3 6 162 040353
SSA,RSS
0178 36163 002021
0179 36164 026702
JHp PRNS2
0180 36165 035230 CMPll IsZ SPTR
0181 036166 065230
LOB SPTR
CP8 NSPTR
0182 3 6 167 055236
JMP CMP11
0183 36170 026404
0184 36171 064650
L.OB ERSCA
0185 36172 160001 CMP05 LOA 1,1
0186 36173 003000
eMA
0181 36174 141230
ADA SPTR,t
SSA,INA
0188 36175 Pl02024
JMP CMPa6
0189 36176 026206
0190 36177 006004
INS
0191 36200 054646
CPB ERS32
RSS
0192 36201 002A01
JMP CMP05
0193 36202 026172
ADS .... 31
0194 36203 044416

SET FOR.QUEU E TO EMPTY

INITIALIZE

.*•

COMPII.ATION
WAS FLAG BIT SET7
NO

• PROGRAM
INTEGER1
NO, MUST BE A pARAMETER
yES, HOVE
TO NEXT WORD

STATEMENT FINISHED?
YES

BEGIN SEARCH FOR REFERNECED 8THT
fIRST STATEMENT .>SOUGHT STATE.?

FOUND ONE
TEST FOR DONE

PAGE 0083 #07
0195
0196
0197
0198
0199
0200

0201
lt1202
0203
0204
0205
0206

0207
0208
0209
021 0
0211
0212
0213
0214

36204
3620b
36206
36207
3621A
36211
36212
36213
36214
36215
36216
36217
36220
36221
36222
36223
36224
36225
36226
36227

0215

3623ti'

0216
0217
0218
0219
0220

36231
36232
36233
36234
36235
36236

0221

0222*
0223.*

COMPILATION AND DECOMPILATION

061573
026215
044417
002003
026 2 3 0
054646
026235
160001
044356
164"01
071617
161230
006004
144001
044356
055611
026235
150001
026231
026220
164001
175230
035550
"26165
026702
015322
115077

0225

0231
0232
0233
0234
0235
0236
0237
0238
0239
0240

0241
0242

0243
0244

024 5

0246
0247
0248
0249
0250

CPS EHS32

JHP
LOA
ADS
CMP07 LOB
Sr A
LOA
CMP08 INB
ADB

CHPl2
1,1
.-1
t,I
STCTI
SPTR,1

ISZ INFST
JHP
JMP
CMPL2 JSB
JSB

36237
36240
36241
36242
36243
36244
36245
36246
36247
36250
36251
36252
36253
36254
36255
36256
36257
36260
36261
36262
36263
36264
36265
36266
36267
36270

CMPLt
PRNS2
OCMPL
RERRS,I

*.••

071611

CMPL3 STA STMPI

010376
1r350376
026326
002 0 03
026347
040353
002020
026 3 5 2
015316
035230
054534
026317
055773
026300
054562
002001

AND ,+178

0267~j

065234
00602~

00]004
055612
026270
015322
115100
065234

CPA ,+178
JHp CMpL6
SlA,RSS
JMP CMPL9.3
ADA ,-4

SSA
JMP
JSB
ISZ
CpB
JMP
CPS
JMP
CPS

STATEMENT IS IN LAST &ROUP
Sa> fIRST STATEMNT IN GROUP
TEST FOR FOUND
TEST FOR NOT THERE
ERROR
SET Aa> FIRST WORD BEYOND GROUP

SAVE END TEST
GET SEQUENCE NUMBER
BUMP STATEMENT POINTER

t,I
ADS ,-1
CPB STCTl
JMP CMPL2
CPA 1,1
JMP CMPa9+1
JMP CMP08
CMPQJ9 LOB 1,1
STB SPTR,I

PROCESS VARIAHLE OPERAND

0224"
0226
0227
0228
0229
0230

LOA SYMTB
JMP CHPe7
CMPSl) ADB .+32
8lA,RSS
JMP CMPeg

TEST FOR DONE

LABEL NOT FOUNO ... ERROR
TEST FOR FOUND

FOUND •• REPLACE INTEFER
IN 'USING' STATEMENT?
NO
yES
DECOMPILE
NONMEXISTENT STATEMENT NUMBER

SAVE SYMBOL
FUNCTION?
yES

NO, STRING VARIABLE'
yES

NO,
ARRAY?

CMPL9
SSYMT
SPTR
COHOP
CMP41
FOROP
CMPL4
NXTOP

RSS

JMP PRNS2+1
LOB FLINK
SSB
CMB,INB
CPS STMP2
JMP *+3
JSB DCMPL
JSB RERRS+l'I
LOB FLINK

YES
NO, COMPILE
SIMPLE VARIABLE
'COM'?
YES
NO, FOR.VARIABlE OF 'FORt?
YES
NO, FOR.VARIABLE 0' 'NEXT' 1
yES
NO

MAKE
POSITIVE
MATCH LATEST cFOR

STATEMENT~

1

yES

NO, DECOMPILE
NEXT NOT PRECEDED BY PROPER POR

PAG~

0251
0252
0253
025.-

0255
0256

0257
0258
0259
0260
0261
0262
0263
026~

0265
0266
0267
0268
0269
02 70

0271
0272
0273
0274
0275

0276
0277
0278
0279
92 8 0

0281
0282
0283

0284
0285
0286
0287

0288
0289
0290
02 91
0292
0293

0294
0295
0296

0297
0298
"299
0300
0301
0302
0303
0304
0305
0306

008 4 #07

COMPILATION AND DECOMPILATION

161 6 12
PJ71234
006020
007401
006400
175612
026703
1 6 1 6 12
00201212
2102007
926306
015322
115101
065612
161612
002020
001004
06 12 34
171612
075234
03524kJ
02671213

36271
36272
36273
36274
36275
36276
36277
36300
36301
36302
36303
36304
36305
36306
36307
36310
36311
36312
36313
36314
36'315
36316
36317
36320
36321
36322
36323
36324
36325
36326
36327
3633(t11

02 64 02
907400
174000
026703
015316
055772
002001

36332

026~"2

36332
36333
36334
36335
36336
36337
36340
36341
36342
36343
36344
36345
36346
36347

165612

3635~

2161612
164000

2106002

006002
026344

061612
035240
065230
044362
075230
174000
026703
035230
015322

115102

015316
035611

36351 0°2 001

36352 015320
36353 0023210
36354 054534
36355 026361
36356 054540
36357 002101
36360 026702

LDA STMP2,I
STA Fl.INK
SSB
CCa,RSS

eLB

sr B sr MP 2,I

JMP PRNS2+1
CHPL4 LDA STMP2,I
SZA

REMOVE
VARIABLE
WAS VARIABLE IN COMMONt
NO
NO
REsET AS sIMPLE VARIABLE

LOAD SECOND WORD OF TABLE ENTRY
ALREADy IN FOR-QUEUE1
COMMON VARIABLE

INA,SZA,RSS
JMP CMPL5
JSa DCMPL
DECOMPILE
Jsa RERRS+2'J NESTED "FOR'S· WITH SAME VARZABL
CMPL5 LDB STMP2
LOA STMP2,I
58A

CMB,INS
LOA FLINK
STA STMP2,1
SlB FLINK
ISZ STyPE
JMP PRNS2+1
CHP41 LOA STMP2
LOB A,I
SZB

GET POINTER
ALREADy IN COMMON7

JMP eMP10+1

eCB

STB
JMP
CMPL6 JSB
CPS
RSS
JMP
LOB
SIB
JMP
LOA
lSI
CMPl1 LOB
AOB
STB
STe
JMP
CMPL8 lSI
JSB
JSB
JSB
IsZ

A,I
PRNS2+1
SSYMT
DEFOP
PRNS2

sr Mp2,1
CMPL8
STMP2
STyPE
SPTR
.+3
SPTR

0,1
PRNS2+1
SPTR
DCMPL
RERRS.J,J
SSyMT
STMPt

RSS

CMPL9 JSB ASYMT
teE
CP8 COMOP
JMP CMP91
CPS DIMOP
CLE,RSS
JHP PRNS2

FLAG VARIABLE AS
CONTAINED IN COMMON
COMPILE FUNCTION NAME
fUNCTION DEFINITION?
YES
NO
PREVIOUSly
DEFINED?
YES
NO
DESTROy STATEMENT TyPE

ADVANCE
PROGRAM
POINTER
SAVE
POINTER

DECOMPILE
FUNCTION DEFINED TWICE
COMpILE STRING YARIABLE
sET TO 'sINGLY SUBsCRIPTED'
PROCESS POSSIBLE DECLARATION
COMPILE ARRAY VARIABLE
SET 'COM' FLAG
'COM'1
yES

NO, 'DIM'1

yES •• SET -DIM- FLAG

PAGE 0085 #07

COMPILATION AND DECOMPILATION

0307

36361 165612

0308
0309

36362 006002
36363 0264"'1
36364 065230

0318

0311
0312
0313
21314
0315
0316
0311
0318
0319
0320

36365
36366
36367
363 7 0
36371
36372
36373
36374
36375

~44361

002040
007004

17 56 12

065230
044361
061611
002011
04436i
36376 044361

0324

36377 2175230
36400 026704
36401 035230
36402 015322

0325

36403

0321
0322
0323

1151~3

CMP91 LOB STMP2,I

SZB
JMP CMP10
LOB SPTR
AOB .+2
SEl
CMB,INB
818 STMP2,I
LOB SPTR
ADe .+2
LOA STMP1
SLA,RSS
ADS .+2
ADS .+2
STB SPTR
JMP PRNS2 ... 2
CMP10 Isl SPTR
JSB OCHPl
JSB RERRS.4,I

0326.

0321**

PROCESS END OF STATEMENT

0328.
03 2 9

0330
0331
0332
0333

364 0 4 055573
36405 002001
36406 026606

36407 075230
36410 06 12 4"
0334 36411 050542
0335 36412 026415
0336 36413 015322
0331 36414 115104
0338 36415 002404
0339 36416 051234
0340 36417 026422
0341 36420 015322
0342 36421 115105
0343 36422
0344 36422 002400
0345 36423 07 1576
0346 36424 064056
0341 . 36425 075502
0348 36426 060212
0349 36427 040356
ft)350

0351
0352
10353*

36430 160000
36431 050401

36432 126004

WAS VARIABLE
PREVIOUSLY DIMENSIONED'
YES
NO, SAVE POINTER
TO DIMENSIONS
DIMENSIONED IN 'COM' 1
YES ... FLAG IT
NO
RESTORE
POINTER
RETRIEVE SYMBOL
ADVANCE
POINTER
PAST
ONE OR TWO
DECOMPILE
VARIABLE DEFINED TwICE

*
**

•

CHPlt cpa SYMTB
END OF PROGRAM?
yEs
RSS
JMP PRNSl
NO
STB SPTR
INSURE CORRECT SETTING fOR SPTR
LOA STYPE
LAST STATEMENT
CPA ENDOP
AN 'END' ?
JMP CMP12
YES
JSB DCMpL
NO, DECOMpILE
JSa RERRS+5,I MISSING 'ENOl
CMP12 CLA,INA
CPA FLINK
ALL FORS MATCHED?
JHP *+3
YES
JS8 DCMPL
DECOMPILE
JSB RERRS+6'I "ORt WITHOUT 'NEXT'
CMP17 EQU *
CLA
ST. VLFLG
MUST RUN VALUE.
LOB PBPTR
sET POINTER TO
END OF SyMBOL TABLE.
STB FILTB
LOA MLINK+l
IS C8AVE
ADA .+?STAT"'?l..INK
LOA 0,1
RUNNING
CPA .+5+CSAV-COH2
JMP CSVRT,I
YES.~EXIT TO IT

0354* FIlCT • -5 AT THIS POINT UNLEsS THE PROGRAM CONTAINS A
""355. , THE CALL TO seHlB,I LEAVES VALTS •
0356. FILTS.'.(NUMBER OF FILES REQuESTED). IF NO ?
JMP CMP13
NO
0362 36435 026444

PAGE
0363
0364
~365

0366
0367

1r1368
0369

0310
0311

0086 #07

COMPILATION AND DECOMPILATION

36436 114744
36437 072045
36440 115114
36441 115115
36442 115111
36443 021222
36444 0655 0 2
36445 015514
36446 027222

JSB
OfF
JSS
JSB
JSB
JMP

SCHLB,I
FILlS

REQUt:ST FILE TABLE

RERRS+13,I 8AO FORMAT OR ILLEGAL. NAME
RERRS+l.,I MISSING OR PROTECTED FILE
RERRS+10,I OUT OF STORAGE
SUCCESSFUL REQUEST
VALUE+2

CMP13 LDB FILTS

STB VAllS
JMP VALUE+2

SET VALUE TABLE
POINTER.

PAGE 0087 #07
0373.*

0374...

COMPILATION ANO DECOMPILATIQN

DECOMPILE ALL OR PART OF PROGRAM

••

*••

••

0375.*

0376*
0377.
121378*
0379*
0380*

121381*
0382*
121383*
038 4

0385
0386
0387
0388
03 8 9
0390
0391

0392
121393
0394
0395
0396
0397
.03 9 8
0399
0400
0491
0402
041213
0404
0405

IF CFlAG[I] • 0 PROGRAM IS IN SOURCE, EXIT IMMEDIATELy,
ELSE SET CFLAG[Il • 0 AND DECOMPILE PROGRAM. SPTR POINTS
INITIAllY TO LAST WORD+t OF COMPILED PROGRAM. ABSOLUTE
ADDRESSEs ARE REplACED BY THE SEQUENCE NUMBERS TO WHICH
THEY POINT, VARIABLE OPERAND POINTERS ARE REPLACED BY
THEIR SYMBOL. p8PTR IS SET TO LAST WORD+1 OF PROGRAM.
3644 7
36450
36451
36452
36453
36454
36455
36456
36457
36460
36461
36462
36463
36464
36465
36 4 66
3646 7
36470
36471
36472
36473
36474

060361
064212

044341
110001
002003
026552
103100
120001
170001
102100
060056
050726
026550
061230

002003
06 1 57 3
07 1230
~71502

015324
036606
006441
026514

LOA CfLAG
LOB MLINK+l
ADS ._?LINK
AND t,I
SZA,RSS
JMP DCMP4
elF 0
XOR 1,1
STA 1,1

5TF

~428

36515 101117

TO 'UNCOMPIL.ED'

NULL
PROGRAM?

YES
SPTRlJa TO FL.AG
SEHI ... COHPILED ?
YES •• RESET IT TO CORRECT VALUE

SET TERMINATION

ST. FIlTa

JSB PRNST
OEF PRNSl
CLB,SEZ,RSS
JMP DCMP2

0426.

36514 040356

NO
YES
SET PROGRAM MODE

lOA PBPTR
CPA pBUFF
JHP DCMP3+2
LOA SPTR
SZA,RSS
LOA SYMTB
STA SPTR

PROCESS VARIABLE OPERAND

0427

COMPILED?

((I

0406.
041217.. PROCESS NON-VARIABLE OPERAND
1d408.
ADA .... 4
0409 36475 040353
0410 36 4 76 002021
SSA,RSS
36477 026702
0411
JHp PRNS2
0412 36500 035230 DCMpl ISZ SpTR
0413 36501 065230
LOB SPTR
Cp8 FILTB
0414 36502 055502
JMP DCMP3
0415 36503 026546
epa NSPTR
0416 365~4 055236
JMP PRNS1~1
0417 36505 02 66 0 7
LOA SPTR,I
0418 36506 161230
LOA 0,1
0419 36507 160000
0420 36510 171230
STA SPTR,I
0421 36511 035550
IsZ INFST
JMP OCMPl
0422 36512 026500
JHP PRNS2
0423 36513 026702
0424.

0425..

PROGRAM

OCMP2 ADA .-1
RRR 15

•

ADDRESS

INITIALIZE
DECOMPILATION
WAS FLAG BIT SET?
NO

.".•

•PROGRAM
INTEGER?
NO

yEs, MOvE TO
NEXT WORD
DONE1
YES
NOt STATEMENT DONE'
YEs
NO, REPLACE
ABsoLUTE ADDREss
WITH SEQUENCE NUM8ER
IN 7
NO
YES

••

•

COMPUTE
SYMBOL TABLE

PAGE 0088
0429
0430
0431
0432
0433
0434
0435
0436
0437
0438
0439
0449
0441
0442
0443
0444
0445
9446
0447
0448
0449
0459
0451
0452
0453
0454
0455
0456
0457
0458
0459
0460
046 1
0462
0463
0464
0465
0466
0467
,,46S
0469
0470
0471
0472
0473

#~7

COMPILATION AND DECOMPILATION

36516 045573
36~17 161230
36520 010570
36521 130001
36522 t71230
36523 065240
36524 054540
36525 0265jl
36526 054534
36527 002001
36530 026702
36531 065230
36532 006004
36533 055502
36534 026546
36535 006004
36536 010376
36537 040353
36540 002021
36541 026702
35542 040363
36543 0020~3
36544 002004
36545 026374
36546 061573
36547 070056
36550 00240121

36551 071573
36552
36553
36554
36555
36556
36557

170632

064726
055575
026567
054 0 56
026561

36!6~

015512

36561
36562
36563
36564
36565
36566
36567

061515

075575
064"'56

015476
065512
014056
114614
3657~ 160634
36571 170632
36572 125322

ADB SYMTB
LOA SPTR,1
AND QPMSK

lOR
STA
LOB
CPS

1,1
SPTR,I
STypE
OIMOP

.JMP DCMP6

CPB COHOP
RSS
.JMP PRNS2

OCMP6 LOB SPTR
INB
CpS FILlB
JMP OCMPJ
INB
AND ,+178
ADA .-4

SSA,RSS
.JMP PRNS2

ADA ,+4
SZA,RSS

INA
JMP CMP10.e
DCMP3 LOA SYMTB
srA PBPTR

CLA
STA SYMT8

DCMP4 srA Delc1,I
LOB
CPB
JMP
CPB

PBUFF
SPROG
DCMPS
PBPTR

·JMP DCMP5

STB DEST
LOA SPROG
STB SPROG
LOB PBPTR
JsB MOVER
LOB DEST
STB PBPTR
DCMP5 JSB ABCK,I
LOA OCLC2,I

STA DeLc1,I
JMP OCMPL,1

ADDRESS

EXTRACT
OPERATOR
REPLACE OPERATOROPERAND pAIR IN CODE
'DIM' ,
yES
NO, 'COM'?
yES

NO

OONE1
YES
NO
STRING
SIMPLE
VARIABLE?
YES
NO, STRING
VARIABLE?
YES, SET TO SINGLE SUBSCRIPT MOO
SET ACTIVE USER AREA POINTER
TO LAST WORD.t OF PROGRAM
ZERO
POINTER
BL.OCK CLOCK
COMMON ALLOCATED?
NO
YES, NULL PROGRAM?
yES

NO
SET UP

POINTERS
FOR MOVE
REMOVE COMMON AREA
RESET -END.OF ...

PROGRAM POINTER
ABORT ATTEMPT DURING COMPILE?
NO ... UNBLOCK
CLOCK

PAGE 0089 #A7

COMPILATION AND DECOMPILATION

••

0475*.
0476 ••• PROCESS NEXT STATEMENT OF PROGRAM •••
0477 ••
0478.
0479. USED By CMPLE AND DCMPL TO SCAN THROUGH THE PROGRAM.
0480. A 'JSB PRNST' INITIALIZES THE SCAN. (P+l) IS A POINTER
0481* TO THE CODE FOR HANDLING THE ENO--OF-STATEMENT CONDITION,
0482* .LNUM HOtOS THE SEQUENCE NUMBER OF THE STATEMENT BEING

••

0483.
0484.
0485*
0486.
0487.
0488.
0489.
121 49 0
0 49 1
0492
0493
0494
121 49 5

0496
0497
0 4 98
0499

0500
0501
0502
0503
fE1504

0505
0506
0507
0508
0509

rtJ510
0511
0512
0513
0514
0515
0516
0517
0.518
0519

PROCESSED, SPTR POINTS TO THE WORD OF THE PROGRAM BEING
PROCESSED. PRNST HANDLES , ,
STRING CONSTANTS, NULL OPERANDS, NUMERICAL CONSTANTS, AND
. OTHER CASES EXIT TO (P+2), PRNST Is
RE~eNTERED DIRECTLY, LEAVING THE INITiALIZED tXli ADDRESSES
UNCHANGED THRoUGHOUT PROCESSING OF THE PROGRAM.

36573
36574
36575
36576
36577
36600
36601
36602
36603
36604
36605
36606
36607
36610
36611
36612
36613
36614
36615
36616
36617
36620
36621
36622
36623
36624
36625

161324
~71242

035324
060444
011603
002400
011615

011605
060352
071604
065575

015230
161230
071566
035230
145230
075236

035230
161230
010570
071240
050534

#PNST LOA
STA
lSZ
LOA
STA
CLA
STA
STA
LOA
STA

LDB
PRNSt STB
LDA
STA
lsZ
ADB
STB
Isl
LOA
AND
STA
CPA

PROCESSING ROUTINE
INITIALIZE POINTER TO
 TABLE
INITIALIZE
COM FLAG
AND USING FLAG
INITIALIZE cFILES
STATEMENT> COUNTER
INITIAL PROGRAM POINTER
SET PROGRAM POINTER TO STATEMENT
SAVE STATEMENT
SEQUENCE NUMBER
COMpUTE
LENGTH
SAvE POINTER TO NEXT STATEMENT
EXTRACT
STATEMENT
TYPE
SAVE IT
'COM' ?

JMP •• 3

yEs

STB COMSN
.JMP PRNS4
LOB COMSN
SlB,RSS

NO.~CLEAR

JMP PRNS2+1

NO

065615
006003

36626 026 7 03

050546
36641 026704

0529

36642 050544

0530

36643 002001

RSS

0525

.-5
FILeT
SPROG
SPTR
SPTR,I
,LNUM
SPTR
SPTR,I
NSPTR
SPTR
SPTR,l
OPMSK
STypE
COMOP

END~OF.STATEMENT

075615
026634

0526
0527
0528

0523
1d524

COMSN
USESN

SET POINTER TO

~26624

LOB
ADB
STB
JSB
JSB
PRNS4 CPA
JMP
CPA
JMP
CPA
JMP
CPA

0520
0521
0522

PRNST,I
STEND
PRNST
DFILT
FILPT

36627 065230
3663~ 044355
36631 ~75230
36632 015322
36633 115151
36634 050516
36635 02 67 ,,4
36636 050536

36637 "'26704
3664~

COM FLAG.

NON.COM
STATEMENT SEEN?

SPTR
YES, RESET
,-2
STATEMENT
SPTR
POINTER
OCMPL
ERROR
RERRS+42,I 'COM' OUT OF ORDER
REMOP
IREM' 1
PRNS2+2
YES
DATOP
NO, DATA?
PRNS2+2
yES
IMGOP
NO, IMAGE?
PRNS2+2
yES
FILOP
NO, 
LOB NSPTR

JMP PRNS2+2
PRNS5 LDB SPTR
CpA MATOP
INB,RSS
JMP .+3
LOA B,I
AND OPMSK
CPA PRTOP
INB,RSS
JMP PRNS6
LOA 1,1
AND OPMSK
CPA USEOP
CCA,RSS
RSS

STA usESN
PR NS6 aTA INFST
RSS

PROCESS NEXT WORD OF STATEMENT
36702
36703
36704
36105
36706
36707

035230
065230
055502
026546
055236
125242

36710 161230
36711
36112
36713
36714
36115
36716
36717
3672VJ
36721
j6722
36723
36724
36725
36726
36727
3673 0

010510

050506
026723
121230
002003
026702
001 265

"'02003
026337
125324
121230
"40362
001100
041230
071230
0267 0 3

NO

PRNS2 ISZ SPTR
LOB SPTR

cPs FILTs

JMP DCMP3
CPB NSPTR
JMP SlEND,I
LOA SPTR,I
AND OPMSK
CPA 81000
JMp PRNSJ
XOR sPTR,l
SZA,RSS
JMp PRNS2
RAL,CL.E,ERA
SZA,RSS
.JMP CMPL,1

JMP PRNST,I
PRNS3 xOR SPTR,I
ADA • +3
ARS
ADA SPTR
STA SPTR

JMP PRNS2+1

SKIP OyER REST

OF STATEMENT

'MAT' STATEMENT?
YES, BUMP TO NEXT WORD
NO
ExTRACT
OPERATOR
'PRINT' STATEMENT?
YES, BUMP TO NEXT WORD
NO
EXTRACT
OPERATOR
.USING. STATEMENT?
YES, SET (Al
NO
sET 'usING sEEN' FLAG
sET INTEGER FOLLOW! FLAG

*
**
* TO
MOYE
NEXT WORD
DECOMPILE FINISHED?
yES

NO, STATEMENT FINISHED?
YES
NO, ISOLATE
OPERATOR

"

"
yES

NO, GET OPERAND
NULL OPERAND?
yES

NO, PUT FLAG BIT IN
NUMBER?
yES

NO
ExTRACT L.ENGTH
COMPUTE
POINTER
TO CLOSING
QUOTE

(E)

PAGE 0091 #07

COMPIL~TI0N

AND DECOMPILATION

0581**
**
'COMPILE' A SYMBOL ***
0588***
0589**
0590*
0591* ENTER ~lTH A SyMBOLIC NAME IN STMPl AND SEARCH THE
IF NO ENTRY IS
0592* SYMeOL TABLE FOR A MATCHING ENTRY.
0593* FOUND, AppEND A NEW TWO WORD ENTRY WITH THE SYMBOL
0594* IN THE FIRST WORD AND 0 IN THE SECOND. THE SYMBOL IN
0595* THE PROGRAM IS REPLACED WITH THE ORDINAL NUMBER OF
ITS SYMBOL TABLE ENTRY, EXIT WITH THE NEW PROGRAM
0596*

••

059i*

WORD IN (A), A POINTER TO THE SECOND WORD OF THE

0598. TABLE ~NTRY IN STMP2, AND THE STATEMENT TYPE IN (8),
0599*
INSURE SPACE
0600 36731 060363 _*SSYM LDA ,+4
.JS8 ·CUSp
FOR NEW ENTRY
36732 015326
0601
LDA STMP1
RETRIEVE SYMBOL
0602 36733 061611
LDB SYMrB
0603 36734 065573
SYMBOL TABLE EXHAUSTED?
06 04 361 3 5 05 40 56 SYMT1 CPB PBPTR
yES
0605 36736 026755
.JMP sYMr3
0606 36737 15 00121 1
CPA t,I
NO, IS NEXT SYMBOL A MATCHl
JMp SyMTS
yES
0607 36740 026765
0608 36741 044361
AOB .+2
NO, HOVE
JMP SYMTt
TO NEXT ENTRY
0609 36742 026735
0610*
ttJ611** HANDLE UNMATCHED ARRAY SYMBOL

0612.
0613 36743 051611 SYMT2 CPA STMP1
RSS
0614 36744 002001
0615 36745 026755
JMP SYMT3
ISz PBPTR
0616 36746 034056
ISZ PBPTR
0617 367 41 034056
0618 36750 061612
LOA STMP2
INA,SZA
0619 36751 002006
JMP
SyMT4
0620 36752 "'26760
36 7 53 \7 0 001
0621
STA 1,1
ADB ,+2
0622 36754 044361
0623*
*
0624** CREATE A NEW TABLE ENTRY ••
ki625.
0626 36755 034056 SyMT3 ISz PBPTR *
0627 36756 034056
ISZ pBpTR
CLA
0628 36757 00240~
,,629 36760 006004 SYMT4 INB
STA 1,1
0630 36761 17A001
0631 36762 044356
ADB ,-I
0632 36763 0616tl
LOA STMPI
STA 1 , I
0633 36164 170001
0634*
'COMPILE' PROGRAM wORD ***
0635**
0636*
•
0637 36765 006~04 SYMT5 INB
~638
36166 075612
STB STMP2
",639
CMB
36767 et01Pt00
0640 3677V1 045573
ADS SYMTB
CMB,INB
0641
36771 007004
0642 36772 ~05100
8RS

•
••

*"DON'T KNOW" SYMBOLt

yES
NO, MAKE NORMAL TABLE ENTRY
ALLOCATE SPACE
FOR NEW ENTRY
WAS A SINGLE OR DOUBLE
SUBSCRIPTED ENTRY FOUND?
yES, INCLUDE POINTER IN ENTRy
NOp SAVE SPACE FOR LATER ENTRY
WITH NUMBER OF DIMENSIONS

ALLOCATE SPACE
FOR NEW ENTRY
INITIALIZE
SECOND
WORD
PUT SY"4BOl.
IN FIRST
WORD

COMPUTE
RELATIVE
ADDRESS

PAGE A092 *0'
0643
0644
0645
0646
06 4 7
0648

36173
36774
36175
36716
36717
370"~

COMPILATION AND DECOMPILATION

161230

010510
03 00P11

111230
06 5240
125316

LDA
AND
IOR
STA
LOB
JMP

SPTR,l
OPMSK
1

SPTR,I

STYPE
SSYMT,I

REPLACE SYMBOL
IN PROGRAM
wITH RELATIVE
ADDRESS

LOAD STATEMENT TYPE

PAGE 0093 #08

COMPILATION AND Of COMPILATION

0001*.

0002.*.

0003*.
0004*
0005*
0006*
0007*
0008*
0009*
0010*
0011*
0012*
~01J*
~014*
0~15.

0016*
0017*
0018*
0~19.

~020*

0021*
0022
0023
0024
0025
0026
0027
0028

0029
0030

0031
0032
0033
0034
~035

0036
0037
0038
0039
004 0
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053

0054
0055
0056

PROCESS ARRAY SYMBOL

••
•••
••

ENTER WITH AN ARRAY NAME IN STMP1. IF A MATCHING
SYMSOL TABLE ENTRY EXISTS, PROCEED A8 IN SSYMT. ELSE IF
THE ARRAY IS SINGLY OR DOUBLY SUBSCRIPTED (LAST FOUR
BITS OF NAME ARE 0001 OR 0010): EXIT IS TO ERROR ON
FINDING A CONFLICTING ENTRY, ON FINDING ONLY A "DON-T
KNOW" ENTRY (LAST FOUR BITS 0011), PROCEED AS IN aSYMT,
pLACING THE APPROPRIATE ENTRY IN THE TWO WORDS ABOVE
T~E "DON'T KNOW" ENTRY AND SETTING A POINTER TO ITS
SECOND WORD INTO THf SECOND WORD OF THE "DON'T KNOW"
ENTRY. IF THE SYMBOL IS AN UNMATCHED "DON'T KNOW"
ARRAY NAME, APPEND A SYMBOL TABLE ENTRYI IF A SINGLY
OR DOUBLY SUBSCRIPTED VERSION OF THE ARRAY HAS BEEN
PREVIOUSLY FOUND, PLACE A POINTER TO THE SECOND wORD
OF THE PREVIOUS ENTRY INTO THE SECOND WORD OF THE ~EW
"DON'T KNOW" ENTRY' OTHERWISE LEAvE TWO WORDS ABOVE
THE NEW ENTRY,
37001 061320
37002 071316
31 0 03 003400
37004 071612
37005 062002
37006 071320
37~H~7 060363
37010 015326
31011 065573
37012 061611
372113 030362
37014 027027
37015 040355
37016 150001
31011 2127 0 3 2
37020 002"'04
37021 150001
37022 027032
37023 002004
37024 150~01
31025 027046
37026 044361
37027 054056
3703A 026743
37031 125320
370052 051611
37~j3 026765
37034 030362
37035 051611
31036 027041
31037 015322
:~7040 115112
37041 075612
37042 066001
37043 075320

tlASYM LDA ASYMT
STA SSYMT
CCA

STA STMP2
LOA ApTRt
STA ASYMT

LDA
JSB
LOB
LOA

lOR

.JMP
SYMT6 ADA
CPA
.JMP

INA
CPA
JMP
INA
SYMT7 CPA
JMP

,+4

CUSP
SyMTB
STMPi
,+3
SYMT1+3
,-2
1, I
SYMT8
1, I
SyMT8

t,I
SYHT9
ADe ,+2
CPS PBPTR
JMP SYMT2

SET RETURN
ADDRESS

SET HATCH
FLAG FALSE
INTIALIZE
SEARCH LOOP
INSURE SPACE
FOR NEW ENTRY
RETRIEVE SYMBOL
SET ARRAY SYMBOL
TO "DON'T KNOW"
MATCH AS

'SINGLE SUBSCRIPT.,
YES
NO, MATCH AS

'DOUBLE SUBSCRIPT'?
yES

NO, MATCH AS

"DON'T KNOW"?
YES
NO, MORE SYMBOL
TABLE ENTRIES1

NO
JMP ASYMT,I
YES
SYMT8 CPA STMP1
DOES ENTRY MATCH SYMBOL?
.IMP SYMT5
YES
lOR ,+3
NO, IS SYMBOL OF
CPA STMPl
TYPE "DON'T KNOW"?
JMP *+3
yES
NO, DECOMPILE
JSB DCMPL
JSB RERRS+l1,I SUBSCRIPT CONFLICT
STB STMP2
SAVE POINTER TO ENTRY
l.OB AplR2
CONTINUE- SEARCH
STB ASYMT
FOR POSSIBLE

PAGE

0~94

0051

37044
0058 37045
0059 37046
0060 J7~47
0061
3705'"
0062 37051
0063 37052
0064 37053
11'065 37054
0066 37055
0061**
0068.**
0069.*
007S.

0071*

0072*

0073*

0074*

0075*
~076.

#08

COMPILATION AND DECOMPILATION

065612
027026

05t611
026765
006004.
A600t711

044355
t14~00

"'02400
026761

LOB
JMP
SYMT9 CPA
JHP
INS

STMP2
SYMT7+2
STMPI
SYMT5

LOA 1
AOB .-2

S18 o,1
CLA
JMP SYMT4+1

"DONfT KNOW"
ENTRY
DOES ENTRY MATCH IVMeOL1
YES
NO, NEW ENTRY TO BE MADE
SET POINTER TO
NEW ENTRY INTO
"DON'T KNOW. ENTRy
MAKE NEW
ENTRV

.*....
**

USED By CSAVE TO RESTORE THE SyMBOL TABLE TO ITS APPEAR'"CE
BEFORE VALUE HAS BEEN RUN, I.E- THE POINTERS TO DIM AND COM
STATEMENTS ARE PLACED IN THE SECOND WORD OF ARRAY AND ITRING
ENTRIES IN THE SYMBOL TABLE, 'DON'T KNOW' ENTRIES.ARE LINKED
TO THE CORRESPONDING KNOWN ONE AND THE SECOND WORD OF DEFAULT
ENTRIES IS SET TO ZERO.

0077.

0078

37056 065575

0079
0080

37057 075230

"'081
0kl82

37061 027146
37062 035230
37063 145230
37064 075236
37065 035230

0083
0084
0085
0086
10087
0088
0089
0090
0091
0092
0093
0094
0095

0096
0091
0098
~099

0100
0101
01t712
0103

0104
0105
0106

0107
0108
0109
~t10

0111
0112

37060

~55573

37066 16 12 3 0
37067 010570
372170 050534

37071 027'-"76
37072 050540
37073 002001
3707 4 027057
37075 006400
37076 075617
31077 161230
37100 010566
37t01 (2140356
37102 001000
37103 (2141573
37104 071611
37105 160000
3711lJ6 010376
37107 040353
3711(21 002020
37111 027124
37112 003400
37113 065611
37114 2106004
37115 170001
37116 065230
37117 0060((14
37t2~ 075230

*RSTp LOB SPRaG
STB SPTR
cPa SYHTB
JHP RSTP5

ISZ

SPTR

ADS SPTR,l
STB NSPTR

ISZ SPTR
LOA SPTR,1
AND OPMSK
CPA COMOP
.IMP RSTP1+1
CPA DIMOP
RSS

JMP #RSTP+1
RSTPI CLB
STB DCFLG
RSTP2 LDA SPTR,I
AND OPOMK
AOA .-1

ALS

ADA SYMTB
STA STMPt
LOA 0,1
AND .+178
ADA ... 4

SSA
JHP RSTP4
CCA
LDB STMPl
INS
STA 1, I

LOB SPTR
RSTP3 INS
STB SPTR

INITIALIZE PROGRAM
POINTER
FINISHED PROGRAM SCAN?
yES

NO ... COMPuTE
NExT STATMENT
POINTER

t:XTRACT
OPERATOR
'COM'?
YES
NO,

YES

'OI .."?

NO

SET COM.DIM FLAG
COMPUTE
POINTER
INTO
SYMBOL
TABLE
E.XTRACT

SYMBOL
SIMPLE
VARIABL.E?
NO

yEs
FLAG
AS

'IN

COMMON'
UPDATE
STArt:MENT

POINTER

PAGE 0095 M08
0113

0114
0115
0116
0117
011a

37121
37122
37123
37124
37125

COMPILATION AND DECOMPILATION

055236
027057
027077
~65230

044361

37126 061617

0119
0120

37127

0121
0122

37131 061611
37132 002004
37133 174000
37134 065230
37135 044363
37136 "'55236
37137 027057

0123

1d124
0125
°126

0127

0128
0129
0130
0131
0132

0133
0134*

0135*
0136.

0~2002

37130 001004

37140

~44356

37141 160001
37142 010570
37143 "'50602
3714.t 044361
37145 027117

111140

3715rl1 027214

0141
0142
0143
0144

31151 075611

0146

0147
0148
0149

0150
0151
~152

0153
0154

01 55
0156
0157
0158
0159
0160*

0161*
0162*

LOA DCFLG
SZA

(MA,INB
LOA STMPt
INA
STB A,I
LOB SPTR
ADS .+4
CPB NSPTR
JMP MRSTP+l
ADS .-1
LOA 1,1
AND OPMSK
CPA SCOMM
ADB .+2
JMP RSTP3

END OF STATEMENT?
yES

NO
SET POINTER
TO DIMENSION

-COM'?

YES.~COMPlEMENT POINT~R

STORE

IN SYMBOL

TABLE
FINISHED

STATEMENT?
yES

NO, TWODIMENSIONAL"

YES •• BUMP PAST SECOND DIMENSION
NO

SCAN SyMBOL TABLE FOR 'DON'T KNOW' ENTRIES AND
DEFAULT DIMENSION ENTRIES

0137*
0138 37 1 46 06557 3
01 3 9 371 4 7 0555 02

0145

cPS NSPTR
JMP *RSTP+l
JMP RSTP2
RSTP4 LOB SPTR
AOB ,+2

37152
31153
37154
37155
37156
37157
37160
31161
37162
37163

16A001
010376

RST P5 LOB SYMTB
CPS FILTs
.JMP RSTPg
5T8 STMPl
LDA 1,1
AND ,+178

050362

CPA .+3

027174
040354

JMP RsrP1

002021
027171

SSA,RSS
JMp RSTp6
tNB

006004

1600f11
003004

37164 041573

37165 002021
37166 027111
37167 002 400
37170 170001
37171 065611
37172 044361
37173 027147
PROC~SS

ADA •• 3

LOA t,I
CMA,INA
ADA SYMTB
SSA,RSS
JMP RSTP6
CLA
STA 1,1
RSTP6 LDB STHPI
ADS .+2
JMP RSTP5+t

INITIALIZE TABLE POINTER
FINISHED SYMBOL TABLE SCAN?
yES

NO •• SAvE POINTER

DON'T
KNOW
ENTRY?
yES

NO, STRING
OR ARRAY?
NO
YES
DEFAULT

DIMENSIONS?
NO
YES~~STORE

A ZERO

IN SYMBOL TABLE

BUMP TO
NEXT SYMBOL

'DON'T KNOw' ENTRY

~75612

0163

37174

0164
0165
0166

37175 065573
37176 003400
37177 141612

0167

3720~

150001

0168

37201

0272~7

RSTP7 STB STMP2
LOB SYMTB
CCA

AUA ST~P2,I
CPA 1,1
JMP RSTP8

IS THERE
A MATCHING
TWO.DIMENSIONAl
ENTRY?
yES

PAGE 0096 *08
0169

0170
0171
0172
1.1113

37202
37203
37204
37205
372~6

COMPILATION AND OECOMPILATION

040356
150001

ADA .-1
CPA 1, I

027207

JMp RSTp8

044361

ADa .+2

027116

.JMP RSTP1+2

0174

37207 006004

0175
0176

37210 061611
372\1 0020~4
37212 11412100
37213 2127171
37214 0024"'0
37215 071576
37216 074056
37217 125520

0177

0178
0179
0180
0181
0182

RSTP8 INS
LOA STMPI
INA

srB

0,1

NO, MATCHING ONE.
DIMENSIONAL ENTRY!
yES

No·-aUMP TO
NEXT SYMBOL
LINK 'DON'T
KNOW' ENTRY
WITH MATCHING
KNOWN ONE

.JMP RSTP6

RSTP9

elA
STA VLFLG
STs PBPTR
JMP RSTPT,I

SET SlORAGE
UNALLOCATED FLAG
RESET END~OF-PROGRAM POINiER

PAGE 0097 #08

COMPILATION AND DECOMPILATIQN

0184.·

0185 •••

BUILD THE VALUE TABLE

~186*.

0187*
0188.
0189.
0190·
0191*
0192.
0193~

0194*
0195*
0196*
01 97*
0198.

0199*
0200.
0201*
0202*
020 3*
~204*

~205·

0206*
0207*

0208.

0209*
0210*
0211*
0212.

f?J213.
0214*

0215.

0216*

0217*
~218*

0219*
0220*

'1221*
",222*
0223*
0224*
0225.
0226
0227
0228
0229
0230
0231

0232
0233
0234
0235
0236
0237
0238
0239

••

•••

••

IF NO VALUE TA~LE EXISTS, ONE IS BUILT FROM THE SyMBOL
TABLE AND INITIALIZED, IF IT ALREADY EXISTS, IT IS
INITIALIZED. IN BUILDING THE VALUE TABLE, EACH ENTRY
IN THE SYMBOL TABLE 18 CHECKED. FOR FUNCTIONS THE
EXISTENCE OF A DEFINING FORMULA IS CHECKED' fOR SIMPLE
VARIABLES TWO WbRDS ARE ALLOCATED AND SET TO 'UNDEFINED'
AND A POINTER TO THEM IS PLACED IN THE SECOND WORD OF
THE SYMBOL TABLt ENTRYJ FOR ARRAYS FOUR WORDS ARE
ALLOCATED FOR THE DfCLARED AND DYNAMIC DIMENSIONS,
THE DIMENSIONS AqE INITIALIZED EITHER FROM A
 IN THE PROGRAM OR THE DEFAULT
DIMENSIONS, ARRAY SPACE IS ALLOCATED AT TWO WORDS PER
ARRAY ELEMENT CONTIGUOUS WITH THE DIMENsIONS, THE
ELEMlNTS ARE INITIALIZED TO 'UNDEFINED,' AND A
POI~TER TO THE FIRSl ELEMENT IS PLACED IN THE SECOND
WORo Of THE SYMBOL TABLE ENTRY; FOR STRINGS FOLLOW THE
PATTERN FOR ARRAYS WITH ONE WORD HOLDING THE PHYSICAL
DIMENSION IN BITS 15-8 AND THE DYNAMIC DIMENSION IN
BITS 7.0 (DIMENSION HERE MEANS LENGTH AS NUMBER OF
CHARACTERS), STRING SPACE IS ALLOCATED ONE WORD PER
TWO CHARACTERS, AND THE DYNAMIC LENGTH IS INITIALIZED
TO ZERO. FOR "DON,T KNOW" ARRAY ENTRIES, THE SECOND
WORD Of THE SYMBOL TABLE ENTRY IS COPIED FROM THE
ASSOCIATED sINGLY OR DOUBLY SUBSCRIpTED ENTRY (OR
EXIT TO ERROR IF NONE ~XISTS).
~OR VARIABLES WHICH HAVE 8EEN DECLARED IN A , STORAG~ IS ALLOCATED IN THE COMMON AREA
WHICH RESIDES AHEAD OF THE PROGRAM, FOR ARRAYS AND
STRIN~S, THIS AREA IS LEFT UNDISTURBED IF THE DIMENSIONS
DECLARED IN THl  MATCH THOSE FOUND IN
THE cOMMON AREA, AND THE OYNAMIc DIMENSIONS ARE CONSISTENT
IF A VALUE TABLE ALREADY EXISTS, VARIABLES IN COMMON ARE
LEFT UNTOUCHED, VALUES OF SIMPLE VARIABLES AND ARRAY
ELEMENTS ARE SET TO 'UNDEFINED' AND DYNAMIC ARRAY
DIMENSIONS ARE SET TO DECLARED DIMENSIONS' THE DYNAMIC
LENGTHS OF STRINGS ARE SET TO ZERO, EXIT TO XEC IF
PROCESSING IS SATISFACTORILY COMPLETED.
37220
37221
37222
37223
37224
37225
37226
37227
37230
37231
3723?
37233
37234
37235

065232
~74056

064126
075616

065573
002001

VALUE Loa FCORE
STB PBPTR
,- LoB PBUFF
STB COMPT
LOB SYMTS
RSS

027554

VAL.Ut INS
CPB FILTS
JMP VAL99
LOA 1 , I
INS
SZA,RSS
JMP vAL14

01~376

ANO .+178

~06004

055502
027661

160001
0060~4

002003

INSURE CORRECT
SETTING FOR P8PTR
INITIALIZE
COMMON POINTER
SET (s) TO
SyMBOL TABLE
SYMBOL TABLE
EXHAU5TED"I
YES
NO, LOAD SYMBOL
POINT (8) TO VALUE TA8LE POINTER
NULL SYMBOL?
yES

NO

pAGE 0098 #08

COMpILATION AND OECOMpILATION

~242

37236 050376
37237 027300
37241li 002003

~243

37241 027556

0240
0241

CPA .+17B
JMP VALU4
SZA,RSS
JMP VALl5
ADA .-4
5SA
JMP VALU5

37242 kJ40353
0245 37243 002020
0246 37244 02 7 305
0247.
0248** INITIALIZE SIMPLE VARIABLE
0244

0249.
0250 37245 061576
0251 37 24 6 002003

fd252
0253
0254
111255

0256
0257
0258

0 25 9
0260
0261
0262
0263
0264

0265
0266
0267
0268
0269
0270

0271
02 7 2
0273
0274
0275
0276
~277*

37'247 ~27262
37250 160001
37251 003004
37252 040001
37253 002021
37254 027226
37255 16121001
37256 07 16 11
37257 0034P.10
37260 171611
37261 027226
37262 160001
37263 002020
37264 027273
31265 060361
37266 VJ15326
37267 ~70056
37270 040355
3727t 17000i
37272 027256
3727 3 06 1 616
37';74 170001
37275 040361
37276 071616
37277 027226

FUNCTION?
YES
NO, STRING VARIABLE?
YES
NO,
ARRAy?
YES
*
**
*

LOA vLFLG
SZA,RSS
.JMp VALU3
l.OA 1,1
CMA,INA
ADA 1
SSA,RSS
JHP VALut
LOA t,I
VALU2 STA VTMpt
CCA
STA VTMP1,I
JMP VALUt
VALU3 LOA 1 , I
SSA
JMP VAl31
LDA .+2
JSB CUSP
STA PBPTR
AOA ... 2
STA 1 , I
JMP VALU2
VALJt LOA COMPT
STA 1,1
ADA .... 2
STA COMPT
JMP VAlUt

SIMPLE VARIABLE
STORAGE ALLOCATED?
NO
YES
VARIABLE
IN
COMMON?
yES

NO
SAVE POINTER TO VALUE
SET
VALUE TO
UNDEFINED
VARIABLE
IN COMMON1
YES
NO •• ALLOCATE
STORAGE
FOR VALUE
PUT VALUE POINTER
INTO SYMBOL TABLE
ALLOCATE STORAGE
IN COMMON
UPDATE COMMON
POINTER

•

0278** CHECK FUNCTION *.
0279.
0280 37300 160VlVll VALU4 *LOA
0 2 81 37301 002002
SZA
JMP
~282
37302 027226
JSB
0283 37303 015322
0284 37304 115106
JSB
0285.
*
0286** INITIALIZE ARRAY **
0287.
*
111288 37305 050356 VALU5 CPA
0289 373 0 6 027545
.JMP
STS
rd290 37307 075611
0291 37310 002P.J04
INA
~292
STA
37311 071612
lDA
0293 37312 (}I61576
029 4 37 313 0~2002
5ZA
0295 37314 027405
JMP

1,1

WAS fOUNt TION
DEFINED?

yES
VALUI
DCMPL
NO, DECOMPILE
RERRS+7,1 UNDEFINED FUNCTION

.... 1

VAL13
VTMPI
VTMP2
VLFLG
VALi2

IS ARRAY TYPE "DON'T KNOW" 1
YES
NO, SAVE POINTER TO SyMBOL TABLE
SAVE INFOHMATION ON
NUMBER OF DIMENSIONS
STORAGE
ALLOCATED?
yES

PAGE 0099 #08

COMPILATION AND DECOMPILATIQN

0296
0297
0298
0299

37315 16001211
37316 002020

~300

37321 060056
37322 0716t3

0J01
0302
~303

"'304
0305
0306

0307
0308
0309
0310
~311

0312
0313
0314
0315
"'316
0317
0318
0319

0320

1tl321

37317 027421

37320 165611

LOA .+4

37324 015326
37325 070056
37326 171611
37327 12106003
37330 027402

.18B CUSP

37331 i6Vi00i
31332 044361
31333 035612
31334 006405
37335 164001
37336
37337
37340
37341
j7342
37343
37344
37345
37346
37347
37350
37351

171613
"'35613

175613
035613

171613
(135613
175613
10"200
101613
~060~3

002020
02741210
37352 071614

0326

37354
37355
37356
37357
37360
37361
37362
31j63
37364
37365
37366
37367

0328
0329
0330
0331
0332
0333
0334
0335
~336

0337
0338

0339
0340
0341
0342
0343
0344
0345
0346
0347
0348
~349

111350

SSA
JMP VAL5t
LOB VTMP1,I
LDA PBPTR
STA yTMP3

37323 "'60363

0322
0323
0324
0325
0327

LDA 1,1

yTMPJ,I
VTMP3
VTMP3,1
VTMP3
VTMPJ,I
VTMPJ,I

SZB,RSS
5SA

002020
027400
061614

LO-A VTMp4

071612
065613
~06004

004056
027370
003400
17A0(211
044361
035612
027361
065611
027226

3737v.t

37370 040443

0010~"

015326

3737 6 07 0 056
37377
37400
37401
37402
37403

ISZ VTHP3

STa
VALU7 ISZ
STA
tSZ
STB
MPY

JMp VAL10
STA VTMp4
CMA/INA
Sf A VTMP2
LDB VTMPJ
INB
CPB PBPTR
JMP VAlU9
VALU8 CCA
STA 1,1
ADB .+2
ISZ vrMP2
.JMP VAlU8
LOB vTMPI
JMP VAlUI
VALLJ9 E.QU •
ADA .5000
SSA
JMp VAL10

37353 003o",4

37371
37372
37373
37374
37375

ST. PBPTR
STA VTMP1,I
SZB,RSS
JMP VALli
LDA i,l
AD8 .+2
VALU6 ISZ VTMP2
CLB,INS,RSS
LOB 1,1
SlA VTMP3,I

027361
0115322
115107
060371
066000

ALS
JSB
STA
JMP
VAL10 JSB
.ISB
VALlt LOA
LOB

CUSP
PBPTR
vALu8
OCMPL
RERRS+8, I
.... 10
A.i0

NO
IN COMMON?
YES
~O, LOAD POINTER TO DIMENSIONS
SET POINTER TO
OIHENSIONENTRy
ALLOCATE
SPACE
FOR ENTRY
SyMBOL TABLE POINTER TO ARRAy
DEFAULT DIMENSIONS?
yES
NO, LOAD ROW DIMENSION
BUMP POINTER
TWO O'IMENSIONAl?

NO, SET COLUMN DIMENSION TO 1
yES, LOAD COLUMN DIMENSION
PUT
DECLARED DIMENSIONS
IN VALUE TABLE
PUT

DyNAMIC DIMENSIONS
IN
VALUE TABLE
COMPUTE NUMBER OF ARRAY ELEMENTS
TOO
LARGE?
yES
SAVE POSITIVE
ANO NEGATIVE
COUNT
HAS

ARRAY BEEN
ALLOCATED?
NO

INITIALIZE
ARRAy EL.EMENT
TO 'UNDEFINED'

DONE?
NO
yES

ARRAy
TOO LARGE1
yES

NO
ALLOCATE
SPACE
FOR ARRAY
DECOMPILE
ARRAY TOO LARGE
LOAD CA) WITH 10
LOAD (8) WITH

pAGE 0100 #08
0351
"3~2

16353
1()354
0355
.~3f>6

~357

Vl358
k1359
~j360

~361

0362

0363
0364
0365

COMpILATION AND DECOMPIlAT10N

37404 027333
3741.!'5 160~1lI1
37406 003~04
37407 ~40001
3741'" 0020'1

37411
.37412
37413
37414
37415
37416
37417
37420
37421
37422
37423
37424

.JMP VAlU6
VAL12 LOA 1,1
CMA,INA
~OA 1
SSA,RSS

.JMP V AlU 1

yES

t 616 11

LOA
ADA
STA
LOA
ISZ
LOB

NO."LOAD

040353
~71613

161613
035613
165613
027341
165611
007004
075 6 15
175611

VTMP1,I
.-4

VTMPJ
VTMPJ,l
VTMPJ
VTMPJ,l

JMP VALU7
VAL51 LOB VTMP1,I
CMB,INB

~373

37425 061616
37426 071613
37427 040363
37430 171611
37431 160001
37432 15t6t3

0374

37433 002001

0375

37434 027503

0376

37435 044361

ADS .... 2

0377
1r1378

37436
37437
37440
37441

LOA vTMP2

0369

0370
0371
03 72

0379
03 8 0
~381

03 8 2

0383
0384
03 8 5

0386

H387
0388
0389
03921
0391
0392

0393

",394
0395

0396

37442
37443
37444
37445

061612

027503

37446 161616
37447 100200
37450 101613
37451 006003
37452 002020

37453 0275V!3
37454 071614
37455 040443
37456 0020221
37457 027503
3746~ 035613
37461 161613
37462 035613

37463 100200
37464 101613

0398
0399

37465 006003

0400
0401
0402
0403

37467 027503
37470 003007
J747! ~2750J
37472 041614
37473 002020

37466 £10217120

SET
DIMENSION
POINTER
POSITIVE
SET
POINTER
IN SYMBOL
TABLE
PHYSICAL ROW DIMENSION
SAME AS DECLARED DIMENSION?
yES

NO

SZB,RSS
SSA

TOO
LARGE?

.JMP VAL52

yES

STA VTMP4
ADA ,50210

NO."SAV E SIZE

006405
155613
002001

DIMENSIONS

LOA COMPT,I
MPy VTMP3,I

CPA ,-..2

CLB,INB,RSS
LOB 1,1
ISZ VTMP3
CPS VTMP3,I

t 64001
035613

DECLARED

B-> SECOND DIMENSION
TWO
DIMENSIONAL1
NO.~SET COLUMN DIMENSION TO 1
YES"-~OAD COLUMN DIMENSION
PHYSICAL COLUMN DIMENSION
SAME AS DECLARED DIMENSION
YES
NO
COMPUTE SIZE OF
ARRAy AS DECLARED

(')50355

03 97

1i1404

IN COMMON1

027226

STB VTMP5
STS VTMP1,I
LOA COMPT
STA VTMPJ
ADA .+4
STA VTMPt,I
LOA t,I
CPA VTMP3,I
RSS
JMP VAL52

0366
0367
0368

ADDRESS OF 10
IS ARRAY

RSS
.IMP VAL52

58A
.JMP VAL52

lSZ
LOA
ISZ
MPY

VTMP3
VTMP3,I

VTMP3
VTMPJ,I

100

LARGE?
YES
NO
COMPUTE SIZE
AS SPECIFIED By
DYNAMIC DIMENSIONS

SZ8,RSS
TOO
55A
LARGE?
JMP VAL52
YES
CMA,INA,SlA,RSS
JMP VAL52
CHEESl ITI DYNAMIC DJM •
ADA VTMP4
DYNAMIC SIZE
5SA
> DECLARED SIZE

e

PAGE
0405
0406
0407
04218
~409

0410
0411
0412
0413

0414
0415
0416
0417
0418
0419
0420

0421
0422
0423

0424
~425

ki426
0427
~428

0429
0430
0431
"04J2
0433

0434
1iJ435

0436
0437
0438
0439
0440
0441
0442
0443
0444
04-45

0446
0447
0448
0449
0 4 50
0451
0452
0453

~101

#~8

COMPILATION ANO DECOMPILATION

37474 "27 5 03
3141 5 161611
37476 041614
37417 ~41614
375o", 071616
37501 A65611
37502 ~27226
37503 065615
37504 160001
37505 044361
37506 035612

37507

0064~5

37510 164001
37511 171616
3751~ 035616
37513 115616
37514 035616
37515 11161637516 035616
37517 175616
37520 100200
37521 101616
37522 006003

JMP
LOA
ADA
ADA
STA

VALb2
VTMP1,I
VTMP4
VTMP4
COMPT
LD8 VTMPI
JMP VALut
vAL52 LOB VTMP5
LOA t,l
ADB .+2
ISZ VTMP2
CLB,INB,RSS
LOB 1,1
STA COMPT,I
ISZ COMPT
5T8

ISZ
STA
ISZ
5T8
MPY

002020

SZB,RSS
S8A
JHp VAL10
(MA,INA
STA VTMP2
CMA,INA
ADA .5009
5SA

027400

JMP VALlO,

37523 ~02020
37524 027400
37525
37526
37527
37530
37531
37532
37533
37534
37535
37536
37537
37540
37541
37542
37543
37544
37545
37546
.]7547
3755A

COMPT,!
COMPT
COMPT,l
COMPT
COMPT,I
COMPT,l

00300 4

071612
003004
~40443

ISz COMPT
LOB COMPT

035616
065616
003400

170001
044361
035612
027536
075616
065611

027226
061576
002002
027226

160001

37551

160000

37552
37553
37554
37555

170001
027226
015322
115110

ceA

VAL53

ST. 1,1
.40B • +2

ISZ
JMP
srB
LOB
JMP
VAl13 LOA

VTMP2
vAL53
COMPT
VTMP1
VALUl
vLFLG

SZA
,JMP VALUl

LOA 1,1
LOA ~,l

STA 1,1
JMp VALut
vAL14 JSS DCMPL

Jse"

YES
• COMPT+4
UPOATE
COMMON POINTER
~ESTORE

(8)

ROW DIMENSION

S>

-> COLUMN DIMENSION
TWO.DIMENSIONAL?
NO~·LOAD DEFAULT DIMENSION

PUT

DECL.ARED
DIMENSIONS IN
COMMON AREA
PUT
DyNAMIC
DIMENSIONS IN
COMMON AREA
cOMPUTE NUMBER OF ARRAV ELEMENTS
TOO
LARGE?
yES

COMPLEMENT
Of NUMBER OF ELEMENTS
ARRAY
TOO
LARGE?
YES
NO
NO.~SAVE

INITIALIZE
ALL
ELEMENTS
TO
UNDEFINED
UPDATE COMMON POINTER
RESTORE (8)
STORAGE

ALLOCATED?
YES
NO, GET
AND STORE
POINTER TO
VALUE TA"BLE

DECOMPILE

RERRS"'g, I NUMBER OF DIMENSIONS NOT KNOWN

PAGE

~1~2

#08

COM.PILATION AND DECOMPILATION

•

0.55.
0456 •• INITIALIZE STRlNG VARIABLE ••
04!57.
045ij 37556 ~75611
VALIS STB VTMPI
045q
LOA VLFLG
37557 ~61576
0460 37!§6~ 0~20((12
5ZA
JMP
VALt7
37561
'-127611
0461
0462 37562 160001
LOA 1,1
saA
0463 37563 A02020
JMP
VALt8
0464 37564 027624
LOB VTMPt,I
~465
37565 165611
0466 37566 060056
LOA PBPTR
0467 37567 011613
STA VTMPJ
INA
0468 37570 00200 4
0469 37511 v.150716
CPA LWAUS

•

0470
0471
0472
fd473
0474
0475
0476
0477
~478

0479
0480
0481
04 82
04 83
0484

0485
0486
0487
~48ij

0489
0 4 9121
0491
~492

0493
0494
0495
0496

0497
0498

0499

37572 115111
37573

070~56

37574 1716t1
37575
37576
37577
37600
37601
37602
37603
37604
37605
37606
37607

006003
0024",5
16121001
171613
001727
002004
001100
015326
07 0056
06 5 6 11

376t~

027226

001727

37611 160001
37612 003004
37613 040001
37614 002021
37615 027226
37616 007400
37617 145611
37620 160001

37621 010316
37622 170001
37623 027607
37624 003004
37625 071613
31626 061616
37627 002004
3763~ 170001
37631 16 16 16
37632 001727

SAVE (8)
STORAGE
ALLOCATED?
YES
NO
IN COMMON?
YES
NO, SAVE LENGTH POINTER

SET POINTER TO
LENGTH ENiRV

MORE
USER SPACE?
JSB RERRS+10,1 NO
STA PBPTR
YES, SET POINTER TO STRING
STA VTMP1,I
INTO SYMBOL TABLE ENTRY
SZ8,RSS
DEFAULT LENGTH?
CLA,INA,RSS
YES, SET (A) - 1
LOA 1,1
NO, LOAD DECLARED LEN'TH
ALF,ALF
STORE P~YSICAL LENGTH
STA VTMP3,I
ALONG WITH ZERO
ALF,ALF
LOGICAL LENGTH
INA
ALLOCATE
ARS
SPACE
JSB CUSP
FOR
STA PBPTR
STRING
VAL16 LOB VTMPI
RESTORE
JMP VALUI
(8)
vALl7 LDA 1,1
CMA,INA
STRING
AOA 1
IN
SSA,RSS
COMMON?
JMP VALUl
YES
eca
NO •• RESET
ADS VTMP1,I
LOA 1,1
LOGICAL LENGTH
AND M256
STA 1,1
TO ZERO
.IMP vAL16

VALl8 CMA,INA
STA VTMPJ
LOA COMPT
IN~

StT POINTER POSITIVE
.> DIMENSION INFORMATION
SET VALUE
POINTER IN
SYMBOL TABLE
EXTRACT PHYSICAL
LENGTH FROM
COMMON AREA
SAME AS DECLARED lENGTH?

0503
0504

37633 01050.10
37634 1516t3

STA \,1
LOA COMPT,!
ALF,ALF
ANO 8377
CPA VTMPJ,l

0505

37635 0020",1

RSS

yES

0506
0507

37636 027647
37637 161616
3764~ 0105A0
37641 003004
3764f,) 141613

JMP VAL2"
LOA COMPT,!
AND 8377
CHA,INA
ADA VTMP3,I

NO
LOGICAL

0500

°5 0 1
l4502

050~

0589
0510

LENGTH .-

PAGE "'103 #08
0511
0512
0513
0514
0515
0516
0517
051a
0519
0520
0521
0522

0523
~524

0525
0526

0527
(1)528
t(J529

0530
0531
0532
0033
0534
0535
0536

0537

0538
0539
0540
0541

37643
37644
37645
37646

COfi4PILATION ANO

002020

027647

161613
027653
376 4 7 16 1 613
3765~

001727

37651
37652
37653
37654

171616
"'01727
002004
001100

37655

~02004

37656
37657
37660
37661
37661
37662
37663
37664
37665

041616

37666

37667
37670
37671
37672
37673
37674
37674
37675
37676
37677

2171616

021226

5SA
.IMP

VAL20
LDA VTMP3,I
JMP VAL19
VAL20 LOA VTMPJ,I
ALF,ALF
STA COMPT,I
ALF,ALf
VAL19 INA
ARS
tNA
AOA COMPT
STA COt4PT
.JMP VALUI

VAL99 EQU
061576
002002 .
027674
061605
f102003
027674
060056
071756
060466
015326
A7"''''56

002404
071576
060056

071232

DECO~PILATION

•

LDA VLFLG

SZA
JMP VAL98
LOA tlSESN
SZA,RSS
JMP VAL9a
LOA P8PTR
STA IFSS
LOA .72
JSB CUSP
STA PSPTR
VAL98 FQU •
(LA,INA
STA VLFLG
LOA Pf;PTR
STA FCORE

PHYSICAL LENGTH!
NO
LOAD PHySICAL LENGTH
RESET PHYSICAL LENGTH TO
OECLARED LENGTH AND
LOGICAL LENGTH TO ZERO
UPDATE:.
COMMON

POINiER
HAS STORAGE
BEEN ALLOCATED'
YES
NO, ANy tPRINT
USING' STATEMENTS?
NO
YES,
ALLOCATE
SPACE fOR
FORMAT
STACK
SAY STORAGE
ALLOCATED
POINTER TO ENO

OF FIXED TABLES

PAGE

01~4

#~8

MAIN EXECUTION LOOP

004,3.

0544. *************************
0545****
***
0546*** lXlCUTE THE PROGRAM *.*
0547.***
•••
0548* .************************
0549*
0550*
0551* THE CORE.RESIDENT fILE BUFFE~5 FOLLOW THE VALUE TABLEI ONE
0552* RECORD-SIZED BLOCK OF CORE 15 ALLOCATED FOR EACH FILE REQUESTED
0553* IN THE . FIVE STACKS EXIST DURING EXECUTIONI
0554* SINCE SiACK POINTERS ARE ASSUMED TO REFERENCE THE TOPMOST
ft1555* ENTRY IN THEIR STACK THEY APE INITIALLY SET ONE ENTRY BELON
k1556* THE PHYSICAL START OF THl STACK, THUS THE FIRST ENTRY ADVANCES
0557* A STACK POINTER TO THE FIRST WORD OF ITS STACK SPACE, GOSU8S
0558* QUEUE THEIR RETURN ADDRESSES IN THE RETURN STACK, WHICH HAS A
0559* FIXED LENGTH Of NIN~ WORDS ALLOCATED IMMEDIATELy FOLLOWING
°56°* THE FILE SUFFERS, THE FOR-STACK (SIX-WORD ENTRIES) CONTAINS
0561* ALL INFORMATION pERTAINING TO ACTIVE FOR-NEXT LOOpS' INITIALLY
0562* EMPTY, ITS CORE SPACE IS ALLOCATED DYNAMICALLY AS NEEDEO. THE
0563. TEMPORARY STACK HOLDS INTERMEDIATE RESULTS DURING FORMULA
0564* EVALUATION; IT IS INITIALIZED TO HOLD TEN TEMPORARIES AND
1d565* EXPANDS DyNAMICALLY AS NECESSARy. THE OPERAND AND O'iRATOR
0566'- STACKS FOLLOW WITH THEIR ONE-WORD ENTRIES OCCUPYING ALTERNATE
0567* LOCATIONS, EXPANDING INTO FREE USER SPACE ON A DEMAND BASIS,
056 8* THE TOP OF THE OPERATOR STACK, ALWAYS AT LEAST ONE WORD AHEAD
0569* OF THE OPERAND STACK, IS PBPTR SO THAT ALL ACliVE USER SPACE
°57°* IS KEPT WITHIN THE SWAP REGION. SINCE ALL STACKS EXCEPT THE
~571*

RETUHN STACK EXPAND DYNAMICALLY, STATIC AND DYNAMIC NES1ING

0580.-

IN THE FILE TABLE AND NOTIFy USER OF ANy REQUESTED FILES

0572* OF FORMULAS AND FOR-NEXT LOOPS IS FREELY PERMITTED UP TO
0573* THE EXHAUSTION OF USER SPACE.
0574*
0575 ••
**
0576*** INITIALIZE EXECUTION * ••
0577**
**
0518*
05 79* PRINT THt PROGRAM NAME.
INITIALIZE FILE STATUS INFORMATION
0581* WHIcH ARE REAO-ONLY, ALLOCATE A 64 WORD BUFfER FOR EACH fILE.
0582* ALLOCATE RUN~TIME STACKS, INITIALIZE POINTERS TO THE DATA BLOCK,
0583* AND MOVE TO A FRESH TELETYPE LINE.
0584*
0585 37700 002400
CLA
0586 37701 170632
STA DCle!,I
CLOCK
13581 3770~ 114614
JSB ABCK,I
ABORT ATTEMPT DURING COMPILE1
0588 3771t1.3 160634
NO ...... UNBLOCK
LOA oCLC2,I
0589
STA DCle1,I
CLOCK
377 0 4 17 0 632
0590 377~5 \60255
LOA MAIN,I
0591
37106 "10506
AND CHNFG
1tJ592 377rJ7 071252
ST. TE~P2
5 AVEe HAI NFL A·G
0593 37710 002003
SZA,RSS
WAS THIS PROGRAM CHAINED TO?
0594 37711 027717
JMP xEC01
NO
0595 37712 103100
elF 0
YES
0596
37713 120255
XOR MAIN,1
CLEAR
0591 37714 170255
CHAIN ~lAG
STA MAIN,I
STF 0
~598
37715 1132100

PAGE 0105 #08
0599

0600

1601
0602
0603

9604
0605

0606
0607
0608
0609
0610
0611
0612
06 1 3
0614
9615
0616
0617
0618
0619

0620
9621
0622
06 23
0624
0625

0626
0627
0628
0629
0630

0631
0632
0633
0634
0635

0636

0 63 7
e638

06 3 9
0b40

0641
8642
,,643

0644
0645
0646
0647
0648
0649

0650
0651
0652
0653
0654

37716
37717
37720
37721
37722
37723
37724
37725
37726
37727
37730
37731
3ii32
37733
37734
377 3 5
37736
37737
37740
37741
37742
37743
37744
37745
37746
37747
37758
37751
37752
37153
37154
37755
37756
37757
37760
37761
37762

MAIN EXECUTION lOOP

027734
060371
015452
061567
071426
040360
1600£10
010273
002003
021734
006400
015274
060354
015460
002 .. 00
07 15 00
°7 1242
07 1607
071771
065502
055514
027777

JMP XEcra
XEctal L.OA ,+128

JSB OUTeR
L.INE FEED
LOA LNAME
STA LT1
ADA .+?NAME-?IO
LOA A,I
REMOVE RUN.ONLY
AND INF
BIT ANO CHECK POR
SZA,RSS
NULL PROGRAM NAME

JMP XEca

XEC0

XEC2

0355021

061252
002002
027153
160001
002020
124766
061027
044363
110001
044354
160001
001423
1708211
044366
37763 015326
37764 07 0 056
37765 170001
37766 12106004
37767 170001
37770 006004
37771 002400
37772 170001
37773 044363
37774 1700°1
37715 006004
37776 0277.2
37777 061500
40000 01212003
40001 026007
."002 060502
40003 103100
40004 139255
40005 170255

DON'T PRINT NAME
ECHO

CLB
ST8
LOA
JSB
CLA
STA
STA
STA
STA

LOB

CPS
JHP
ISZ
LOA

aZA

lT2
.-3
OUT8T

FCNTR
RTNST
ENOUF
ASINp
'ILTB
vALTS
XECA
FCNTR
TEHP2

JMp )(EC3
LOA 1,1
SSA

XEC3

XEC4

.JMP XEC 5 I, I

LOA BIT15
AOB ,+4
STA B,I
ADa ,-3
LDA B,I
ALR,RAR
STA 8,1
ADS .+7
JSB CUSP
STA PBPTR
STA 1,1
INB
8TA 1,1
INS
CLA
STA 1,1
ADB .+4
STA 1,1
INB
JMP XEC2
LOA FCNTR

YES

NO
OUTPUT
PROGRAM

NAME

ZERO

FILE COUNTER

AND MESSAGE FLAG
TURN OFF OVER/UNDERFLOW
SET NO ASsIGN PROCESSED

LOAD ADDREss OF FILl TABLE
DONE7
YES
NO, COUNT 'ILE
WAS THIS PROGRAM CHAIN!D T01
yES

READ
ONLy?
YES
NO
SET NULL
RECORD ADDRESS
GET RECORD
SIzE AND
CLEAR BITS 14 AND 15
ANO STICK BACK IN FILE TABLE
ALLOCATE

BUFFER FOR
THE FILE

8ET

'RECORD FULL'
CONDITION
SET
'NO EOF ExIT'
CONDITION
POINT TO MASK
CLEAR PROTECT MASK
pOINT TO NEXT ENTRY

SZA,RSS

ARE THERE
ANY FILES?

.JMP XEC9

NO.

LOA DFCHK
elF "
lOR MAIN,I
STA MAIN,I

yES, SET
POSSIBLE DIRTY

fILES BIT IN
TTY TABI.E

PAGE 0106 #08
1655
0656
1657
0658

0659
0660
0661
0662
0663
0664

0665
0666
;661
0668

1669
9671

121671
0672

MAIN EXECUTION LOOP

40006 102100
40007 061252
40019 002002
4001t 026120
40012 060374

XEC9

40016 060371

016452
064056
044356
315240
40023 075242
40024 04436J
40025 075246

XEC8

40026 015430

421021 065515

8673 40030 01e360
1614.
067S ... EXECUTE STAT£MENT
0616 •.

0677.
0678.

0679.

WAS THIS PROGRAM CHAINED TO'

JHP )CEC8

yES

LOA ,.158

NO, OUTPUT A
CARRIAGE RETURN

JSB OUTeR
LOA ·,+128
JSB OUTeR

4S013 015452
40014 060311
40015 015452
40017
40020
40021
40622

STF "
LOA TEHP2
SZA

LDA
JSB
LDB
ADS
STe
STB
ADS
8T8
JSB
LOB
JSB

•

,+128
OUTeR
PBPTR
,-I
RTRNQ
RTNST
,+4
FORQ
IETPT
SPROG
aETDp

AND

TWO
LINE FEEOS·
SET POINTERS TO
TOP AND BOTTOM
OF RETURN STACK
SET
EXECUTION
POINTERS.

SET POINTERS TO
FIRST 

**

*

SAVE SEQUENCE NUMBER FOR POSSIBLE USE By ERROR RQUTINE,
AOVANCE PROGRAM COUNTER TO NEXT STATEMENT AND BRANCH TO
CODE FOR EXECUTION OF CURRENT STATEMENT,

0680.
8681*
1682 40031 065334 XECl
0683 .0032 160001
1684 ."033 011566
8685 40034 060001
1686 40035 002004
1687 40036 160000
1688 40031 015554
0689 40040 060001
1690 40041 002104
0691 40042 144000
1692 40043 015334
1693 40044 002804
1694 40045 071611
0695 40046 161611
e696 40041 010510
0691 4 0 050 001727
069S 40051 001300·
8699 40052 043'66
0100 40053 011234
0701 40054 124000
0102.
0703** OUTPUT READwONLY

0704.
11705 ""055
0706 40056
0701 40057
0708 40060
0709 40061
8710 40062

075240
064212
044346
160001
2110612
05e514

LOB PRGCT
LOA 1,1
STA ,L·NUM
LOA 8
INA
LOA A,I
JSB STLCK
LDA 1
INA
ADS e,I
8T8 PRGeT
INA
STA TEMPt
LDA TEMPt,I
AND OPMSK
ALF,ALF
RAR
AOA XECBR
8TA FILE'
JMP e,I

.*

SAVE CURRENT
SEQUENCE
NUMBER

CHECK
STATEMENT
LENGTH
COMPUTE
ADDRESS
OF NEXT
STATEMENT
SET INTRASTATEMENT POINTER
COMPutE
BRANCH
ADDRESS
FOR CURRENT

STATEMENT· TYPE

SET 'NO FILE' FLAG·

BRANCH TO APPROPRIATE ROUTINE

*
XEt5 STe RTRNQ *
WARNING
LDB
A08
LOA
AND
CPA

SAVE (8)
MLINK.t
,.7IO.?lINK
1,1
GET ID
M2000
IS IT
A&0e

AN ,,'1

PAGE 0107 *08
11711
e112
1113
0114
.715
1716
0117
0118
0719
0720

,,721

1122
1123
0124
0125
0126
0721

40063
40064
40065
40066
40067
40010
40071
40012
"0073
40014

JMP XEC7
ISZ RTNST
JSB, WERAS+8,t
ceA
STA IftTNST
438
LOA
JSB UTeR
LOA FCNTR

026107
03!242
115211
003400
0712-12
060422

0.

015.52

061500
040345
002020
4"2175 026103
40076 060440
40011 015452

e731
0732

40110

2140425
002801
040452
12115482
06"411
015462
065240
12~764

yES

NO, FIRST TIME THROUGHt
yES, EMIT MESSAGE
8ET fLAG FOR
M£SSAGE SUPPRE8SION
OUTPUT

'*'

A
OUTPUT

ADA ,.10

S8A
JMP
LOA
JsB
LDA

40100 061500

401211
421102
40103
40104
40105
40106
40107

8728
·0729
0730

MAIN EXECUTION LOOP

FIL.E #>97

XEC6

,+618

OUTeR
FCNTR

AOA ,.468
RSS

XEC6

xEC7

ADA .58

JSB
LDA
JaB
LOB
JMP

OUTeR
,+408

OUTeR
RTRNQ
)(EC3t,I

NO
YES
OUTPUT A '1'
OUTPUT
SECOND
DIGIT
OUTPUT SINGLE DIGIT
OUTPUT
BLANK

RETRIEVE (8)

PAGE 0108 #09

STATEMENT EXECUTION PROCESSORS

e""2*

,,003*.*
~004.*

1009
0010

ELET

40113 015336

JSB fORMX

40114 026031

JMP XECl

1012.*.

eS13*.

EXECUTE 

0i114***
e81S.
40115
40116
40117
40120
40121

ee17
0018
0019
0020
0021
0022
0023

40122
40123
40124
."125

0024

40126
4 0 127
40130
4 0 131
40132

1125

""26

8021
1128

035611

EIF1

015504
035236
035611

115236
1042""

ElF

101611

05.S42
002020
002405
026115
071410

40133 015356

0029
0030
0031

.*

**

ISZ TEMPt
JSB VLFIL.
ISZ 'BASE
ISZTEMP1

40134 002003
40135 026031

EOF

CPB ENQOP
SSA
CL.A,INA,RSS
JMP £IF1
STA EDL
J8B FETCH
SlA,RSS
JMP XECl

OPERATOR?
NO
YES
ALLOW8TRING CONSTANT
EVALUATE DECISION FORMULA
RESULTANT 'TRUE' 1
NO

0032*

0034.. EXECUTE 
1035***

*·

0040*.
0041 ..

110 .. 2*
0043

40137 001400

40140 075416

0145

40141 065611

&046

,"'8048
47
0049
8150

40142 006"04
40143 161611
40144 010e66
40145 0505!5fJ

1154
0055

."146 026161
40141 015356
40150 015342
40151 026831
40152 045611
40153 0"6004

"056

40t54 060001

"051

efa52
0053

*.

**

.*

SET FLAG TO 'GOTe. MODE

EGOTO CLB,RSS

EXECUTE 

0044

E'OSS

EOF LABEL
TO
FILE TABLE

STB FBASE,I
JMP XEC1
OLD TEMP1,1

""33**_

0036*
0037 40136 006401
0038.
0039 •• *

EVALUATE
FILE REQUEST
TRANSFER

LOS TEMP1,I

165611
026031

ALLOW STRING CONSTANT
IN FORMUL.A
EVALUATE
FORMUl.A

ClA,tNA
STA EOl

0011*

ei16

*..*
••

EXECUTE 

0005* ••
0006.
9007 40111 002404
8008 40112 071410

.

••••
••

eea

SET FLAG TO

l.DA TEMP1,I

COMPUTE SIMPLE 8RANCH
'ADDRESS' ADDRESS
SIMPLE
BRANCH
STATEMENT?

STB GrMP
LDB TEMPt
INB

AND OPOMK

CPA INTFl
JMP EGOS!
JSB FETCH
JSS 8BFIX
JMP XECl
ADS TEMPt
IN8

LDA 1

'GOauS' MODE

yES

NO, COMPUTE
BRANCH INDEX
UNSUITABLE RE8U~T
COMPUTE

'ADDRESS'

ADDRESS

PAGE
0057
0058

~l~Q

4~155

#~9

STATEMENT EXECUTION PROCESSORS

003~00

0061
0062

40156 041334
40157 002020
40160 026031
40161 164001
40162 035476

0~63

4~163

~26032

1rJ064
0065

40164
40165
40166
40167

061334
035242
171242

0059
0060

0066
0067
0068 4017~
ft1069
40171
0070 40172
0071
40173
0072.
0073**.

0074.*

061242
040345
051240

115116
0260J2

~55250

026231
071420
075512
065250

044365
061512
040365
015476
061420

026230

161611
010504
0714 2 6
001000
041573
040356
160000
065250

055246
026225
150001
026174

40223 E44351

0101
0102

4022 4
4022 5
40226
40227

0111
~112

*.

*.

**

0100

0104
0105
0106
0107
0108
0109
0110

wITHIN

ADA PRGCT
STATEMENT
SSA
RANGEl
JMP XECl
NO
yES, LOAD BRANCH ADDRESS
FGOSI LOB 1,1
 'I
ISZ GTMP
JMP XEC1.l
YES
LOA PRGCT
NO, STACK
RETURN
ISZ RTNST
STA RTNST,I
ADDRESS
NESTING
LOA RTNST
ADA .-10
10
CPA RTRNQ
DEEP?
.J5B RERRS+15,1
YES
Jt4P XEC1+1
NO

fXECUTE 

0075.*.
0076.
0077 40114
0078 4017b
0079 40176
0080 40177
40200
0081
0082 40201
0083 40202
0084 40203
0085 40204
0086 40205
0087 40206
0088 40207
0089 40210
0090 4 0 211
1ti091
40212
0092 40213
0093 40214
0094 40215
0095 40216
0096 40217
0097 40220
0098 40221
0099 40222

0103

eM.

026217
065 2 5 0
044365
015430
4023~ 171250
40231 015336
40232 061250
4°233 002 0QJ 4
4 0 2 3 4 07 t.~$20
40235 040361
40236 V!71422
120237 040361

EFOR0 CPB FORST
JMP EFOR5+1
STA EfN0
STB DEST
LOB FORST
ADB .... 6
LOA DEST
ADA .+6
JSB MovEH
LOA EFNra
JMP EFOR5
EFOR LOA TE.MPt,!
AND B777
STA FVT
ALS
ADA SYMTB
ADA .-1

LOA
LOB
EFoRt CPS
JMP
CPA
JMP
ADB
JHP
EFOR2 LOB

0,1
FORST
FORQ
EFOR2
1, I

EFORQJ
.-6

EFORl

FORST ADS .+6

JSB
EFOR5 STA
JSB
LOA
INA

sErPT
FORST,I
FORMX
FORST

STA EFN0
ADA .+2

sr A EFNl
ADA .+2

TOP ENTRY?
yES
NO, SAVE (A)
SET DESTINATION ADDRESS
COMPUTE MOVE
TERMINATION ADDRESS
COMPUTE
SOURCE ADDRESS
DELETE FOR.TABLE ENTRY
RETRIEVE CAl
EXTRACT
AND SAVE THE
FOR-VARIABLE
COMpUTE

ADDREss
OF ITS

vALUE
LOAD POINTER TO FOR.STACK
AT BOTTOM Of fOR-STACK?
YES
NO, ENTRY FOR THIS FOR.VARIABLE?
yES
NO, CHECK
LOWER ENTRY
MOVE TO SPACE
FOR ENTRY
RESET ExECUTION POINTERS
SAvE ADDRESS OF VALUE IN ENTRy
INITIALIZE FOR.VARIABLE
SAvE. POINTERs TO
ENTRY FOR
LIMIT VALUE
AND-

STEP sIZE
SAVE ADDRESS OF

PAGE 0110
0113
~114

0115

0116

0117
0118
0119
0120

0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134

#~9

STATEMENT

4~240 065334
40241 1'14000
40242 015356
40243 104400
4~'-44 101420
4024b ",61611
40246 V151JJ4
40247 026304
40250 015356

40251 104400
40252
40253
40254
40255
40256
40257
40260
40261
40262
40263
40264
40265
40266

035334
065334
006004

4~267

et50562

101422
006400
002020
007400

075424

1600~1

071366
044356

0145
0146
0147
0148

LOA
CPA
JMP
JS8
EFOR3 OST

Tf:..MPl
PRGCT
E.FOR6
FETCH
EFN1,!

IMPLICIT
STEP SIZE?

CLB
5SA

eea
STB EfN2
ISz PRGCT
LOB PRGCT
ffOR4 INS
LOA 1 , I
STA fFNJ
ADS .-1

AND OPMSK
CPA NXTOP
RSS
JMP EFOH4
XOR EFNJ
CPA FVT
RSS
JMP EFOR4

4°2 71 "26261

0144

fOLLOWING STATEMENl
IN ENTRY
COMPUTE AND SAVE
LIMIT VALUE

010510

40270 002001

0143

PRGCT
0,1
FETCH
Ef"N0,1

AOB 1,1

0136
0137
0138
0139
121 140
0141
0142

021366
051426
002001
0262~1

40276 044356
40277 075334
40300 165250
40301 104 2 "0
·40302 le0001
40303 026346
40304 061031
40305 064361
40306 026 2 5 1

ADS .-1
STB PRGeT

l.OB FORST,!
DLD t I I

JMP
EfOR6 LOA
LOB
JMP

ENEX3
HALF
.+2
EFOR3

0149.
0150.**

0151** EXECUTE 
0152**.
0153*
0154
0155
01 56
0157
0158
0159
0160
0161
0162
0163
0164
0165

40307 161611
4031£'1 0105A4
40311 001000
40312 041573
40313 040356
40314 160000
4 0 315 06525 0
40316 055 24 6
40317 026031
4~320

150001

40321 026324
40322 044351

PROCESSORS

LOB
STB
JSB
05T

144001

0135

40272
4 0 273
40274
4 0 215

~XECUTION

SET SIGN FLAG
TO -1 fOR

NEGATIVE STEP SIZE,

o fOR POSITIVE STEP SIZE
LOAD
TyPE wORD OF
STATEMENT FOLLOWING
THE cFOR STATEMENT>
SAVE IT
COMPUTE POINTER
TO ITS SUCCESSOR
 'I
yES
NO
SAME
FOR-VARIABLE?
yES

NO
SET PROGRAM COUNTER
PAST 
LOAD
INITIAL VALUE OF

FOR.VARIABLE
LOAD
DEfAULT
Of 1.0

••
.***

ENEXT LOA TEMPt,l
AND B777
ALS
ADA SYMTB
AOA .-1

LOA Pt,I
l.OB FORST
ENEXI CPS FORQ
JMP XEC'1
CPA 1 , I

JMP F.NEX2
4DB • ",,6

yES

NO, COMPUTE STEP SIZE
AND SAVE VALUE

EXTRACT
fOR.VARIABLE
COMPUTE
ADDRESS

OF ITS
VALUE
LOAD POINTER TO FOR-STACK
BOTTOM OF STACK?
yES, IGNORE 'STATEMENT
NO, ~ATCHING ENTRY?
yES
NO,~HECK

0166
0167
0168
0169
0170
0171

0172
0173
0174

0175
°176
0177

~17a

0179
0180
0181
~182

0183
~184

0185
0186
0187
0188
0189
0190

0191
0192
0193
0194
0195
0196

40323 026316
40324 071422
4~325 055250
40326 026331
40327 015430
40330 065250
40331 VJ06004
40332 075420
40333 044361
4033.4 060355
4 0 J35 071424
40336 t042~0
40337 10012101
40J4\t1 002020
40341 "'30424
40342 0154~2
40343 101422
40344 1044ftl0
40345 101422
40346 0154~4
40347 101420
40350 035424
40351 001600
4 0 352 00202~
40353 026360
40354 061250
40355 040364
40356 164000
4035 7 02612132
40J6~ 065250
40361 ~44351
40362 015430
40363 ,,26031

JMP
ENfX2 STA
CPB
JMP
JSB
LOB
INS
STB
ADB

fNEX1
EFNl
FORST
.+3
SETPT
FORST

LOWER ENTRY
SAVE FOR-VARIABLE VALUE ADDRESS
TOP ENTRy OF FOR. STACK?
YES
NO, RESET
EXECUTION POINTERS
SAVE ADDRESS
OF LIMIT VALUE

EfN0
.+2

SET SIGN FLAG TO SAY
POSITIVE STEP SIZE

LOA ."2

STA EfN2
DLD t,I

LOAD STEp SIZE

5SA

ISz
JSB
OfF
DST

EFN2
.fAD
EF N1,I
EFN1,I

fNEX3 JSB .Fsa
DfF EFN0,I
ISZ EFN2
ElA
5SA

JMP ENEX4
LOA FORST

SUBTRACT
LIMIT VALUE
IF STEP SIZE POSITIVE,
INVERT SIGN OF RESULT
LIMIT VALUE EXCEEDED?
yES

ADA .+5
ENEX4

POSITIVE?
NO, RESET SIGN FLAG
ADD STEp SIZE
TO VALUE OF FOR.VARIABLE
SAVE NEW VALUE

LOB
JMP
LOB
ADB
JsB

0,1
XEC1+1
FORST

.JMP

XECl

•• 6
SE.TPT

NO, LOAD ADDRESS
OF STATEMENT
FOLLOWING THE


0197*
k1198***
0199**
0200***
0201*
0202 4 03 64
0203 40365
0204 40366
13205 40367
0206 40J70
0207 4037t
0208 40372
0209*

**
**
**
06124 2
051240
115117
1640"0
040356
071242
026"'32

ERTRN LOA
CPA
. JSB
LOB
ADA
srA
JMP

RTNST
RETURN STACK
RTRNQ
EMPTY?
RERRS+16,I YES
0,1
NO, POP
.~1
RETURN ADDRESS
RTNST
FROM STACK
xEC1+1

~210***

**
**
**

0211**
~212.**

0213*
"'214
0215
0216 '
0217
1tl218
1d219

4037.3 002400
40374 071476

EINPT

~71456

E I NP!.

4~375

40376 002400
40377 071 4 70
40400 ~15444

CLA
STA

srA

MCN·r

INITF

CLA
STA SYN1Q
JSB INCAL

TURN OFF
MATRIX INPUT COUNTER
SAVE ADDRESS FLAG
REQUEST
FIRST
'.INPUT RECORD

PAGE 0112 #09
0220
0221
0222
0223
0224
0225
0226
0227
0228
0229
0230

40401
40402
40403
40404
40405
40406
40407

1d231
0232

40414
40415
40416

0233
0234
0235
02 3 6
0237
0238
0239
0240
0 2 41
0242
0243
0244
0245
0246
0247
0248
0249
0250
0251
0252
0253
0254
0255

0256

0257
0258
0259
0260
0261
0262
0263
0264
0265
0266
0267
0268
0269
0270
0271
0272
0273

0274
0275

4041~

40411
40412

40413

40417
40420
40421
40422
40423
40424
40425
40426

STATEMENT EXECUTION PROCESSORS

035420
00 3 400
051456
026415
015336
165332

EINP2 ISZ
CCA
CPA
JMP
JSB
LDB

£lH~6020

SSB

026521
061332
040355
071332
075572
002400
071266
(1171354
026424
075266
015444
035420
015446
026422
007400

JMP
LDA
ADA
STA

IFCNT
INITF
EINPJ
FORMX
OPDST,I

EIN13
OPDST
,-2
OPDST
STB SBPTR

EINPJ (LA
STA
S1A
JMP
STB
JSB

SIGN
INlMP
EINP4
SIGN
INCAL

ISz IFeNT

.-3

EINP4 JSB GETCR
JMP
CCB

COUNT INPUT QUANTITy
MATRIX
INPUT'
yES

NO, EVALUATE NEXT ADDRESs
IS IT A
STRING VARIABLE?
YES
NO,
UNSTACK
ADDRESS

sAVE DESTINATION ADDREss
SET SIGN
TO POsITIvE
FLAG REQuEST FOR NUMBER
RESET SIGN TO POSITIVE

FETCH
FIRST
CHARACTER
TURN OFF
OVER/UNDERFLOW FLAG

40427 ()I75472

STB SERR

4043~

CpA ,+45

, .. , 1

.JMP E IN11

YES
NO

05~434

40431 026506
40432
40433
40434
40435
40436

006404

(2150432
0265 0 6
~15276

026471
40437 026475

40440 064417
40441 075571
40442 035476

40443 002001
40444 127771
40445 065611
40446 055334
40447 026512
40450 035472
40451 026456
40452 050374
40453 026400

40454 050433
40455 026465
40456 115201
40457 065420

CLB,INB
CPA ~+43
JMP EIN1i
EINP5 JSB NUMCK
JMP EINP1
JMP EINP8
EINP6 LOB ,+408
STB BLANK
ISZ MCNT
RSS
JMP MIOEN,I
EINP0 LOB TEMPt
CPB PRGCT

yES

DID OVER/UNDERfLOW OCCUR?
YES
NO, END OF INPUT RECORD?
YES
NO, COMMA NEXT?
YES
NO
OUTPUl NEXT
ITEM
NUMBEH
OUTPUT
CARRIAGE RETURN

.IMP E I NP2-1
,+548

CPA
JMP
EINP9 JSB
LOB
INS

J58
LOA
JSB
JMP
EIN10 JSB
JMP
JSB
JMP

060374
015452
026400
015446
026456
40,1467 015450
4~'47~ 0126401

NO, NUMBER?
NO
BAD EXPONE:NT
TURN ON
BLANK SUPPRESSION
MATRIX COMPLETED?
NO
YES

SATISFIED?

ISZ SERR
JMP EINP9
CPA ,+158

006~04

40462
40463
40464
40465
40466

YES

.JMP EIN12

40461 V]15454

4046e1

, ... , 1

EIN10
WERRS,I
IFCNT
QUlIN
.+158
OUTCR
EINP2 ... 1
GETeR'
EINP9
BCKSp
EINP2

END of INPUT RECORD?
YES
NO

PAGE 01tJ
1fJ276
0277
0278
0279
~280

0281
0282
0283
0284
0285
0286
0287
0288
0289
0290
0291
0292
0293
0294
0295
0296
0297
0298
0299
0300
0301
0302
0303
0304
0305

0306
0307
0308
0309
0310
0311
0312
0313
0314
0315
0316
0317
0318
0319
03221
0321
0322
03 2 3
~324

0325
0326
~327
~328

0329
0330
0331

40471
40472
40473
40474
40475
40476
40477
40500
40501
40502
4 0 5°3
40504
40505
4°5 0 6
40507

~09

STATEMENT

05Q1421

E.INP7 CPA ,+428

026470
055266

JMP
CPB
.JMP
EINP8 JSB
LDB
JSB
LOA
JSB
CLB

~26424

115201
065420
015454
060374
015452
006400
055354
026421
026535
075266
015446

40510 026475
40511 026435
4~512 050374
40513
40514
40515
40516
40511
4052 0
40521
40522
40523
40524
40525
40526
40527
4053(11

002401
115210

071570
060371
Q}15452
~260Jl

007000
160001
001727
01051210
003000
141330
"71410
003400
40531 015344

40532 065406
40533 075354

40534 026537
4Q1535

0154~4

40536 035420
~0537
4054~

015446
026535

4"541
40542
40543
40544
40545
40546
40547

AI2I7400

4(2155~

075472
050421

EIN13 CMS
LOA 1.,1

ALF,ALf
AND B377

eMA
ADA TMPST,I
STA

ceA

TPRME

JSB PSTR
LOB TNUlL
STB INTMP
JMP .+3
EIN14 JSB INCAl
ISZ IFCNT
JSB GETeR
JMP *-3

eeB
STB

SERR

CPA .+428
RSS

JSa
CLB
STB
LOA
JSB

40554 026600
40555 055462
40556 ~26574

EINP8
SIGN
EINP4
WERRS,I
IfCNT
QUTIN
,+158
OUTeR

JMP EINP4 .. J
JMP EIN14
EINli STB SIGN
JSB GETeR
JMP EINPS
JMP EINP5
EIN12 CPA ,+158
CLA,RSS
JSB WERRS+7,1
STA CHRCT
LOA .+12B
JSB OUTCR
JMP )(£C1

QI~200t

0554~6

PROCESSORS

cpa INTMP

015450
006400
075571
06371121

40551 01535121
40552 006400

40553

~XECUTION

CLB

RCt(SP
BLANK
FINeA
TRSTR

cpa TNULL
JMP EIN21

cps pst

4v.1557 071354

JMP fIN2~
SrA INTMP

4056VJ 003400

CCA

?
YES
NO, SIGN FOUND?
NO, IGNORE CHARACTER
yES
OUTPUT
ITEM NUMBER
OUTPUT
CARRIAGE RETURN
NUMBER
REQUESTED?
n

yES
NO

SAVE SIGN
OUT~Of.DATA

ERROR

END OF RECORD?
YES
NO
zERO CHARACTER COUNT
OUTPUT A
LINE FEED
EXTRACT
PHYSICAL
LENGTH OF
DESTINATION STRING
SET IT AS END

OF UNSPECIFIED

DESTINATION STRING
PREPARE
DESTINATION STRING
SAVE LENGTH
ALLOWANCE
FETCH
fIRST
CHARACTER
TURN OFF
OVER/UNDERFLOW FLAG
" ?
yES
NO, STRING BEGINS HERE
TURN OFF
BLANK SUPPREsSION
POINT TO INPUT BUFFER
TRANSfER STRING
ALL REQUESTED
CHARACTERS

TRANSFERRED?

YES
NO, TRANSFER LENGTH SPECIFIED?
NO
yES, SAvE (Al
FINISH

PAGE
0332

0333

0334
0335
0336
0337
0338

~114

40561
40562
40563
40564
40565
40566
40567

#09

STATEMENT EXECUTION PROCESSORS

071410
041406
071406
~60664

015350
~61354
~50374

0339 4057~ ~26440
0340 40571 015446
0341 40572 000000
0342 . 40573 (1126440
0343
0344
0345
034 6
0347
0348

lt1349
~350

0351
0352
0353
0354
"-'355

0356
0357
0358

40574 165260
40575 045406
40576 175260
40·577 02 6 5 67
40600 055462
40601 026607
40602 015446
40603 026440
40604 Ql50421
40605 026571
40606 026602
40607 015446
4061~ 026440
40611 050421
40612 026571
40613 061354
40614 071406
40615 061572
40616 071272
40617 060417
4062~ 071571
4 0 621 026475

ST"
ADA
STA
LDA
JSB
LOA
fIN18 CPA
JMP
EIN19 JSB
NOP
JHP
EIN20 LOB
AOB
STB

TPRME
TNULL
TNULL
FSCHA
TRSTR
INTMP
.+158

EINP6
GETCR

EINP6
TEMP6,I
TNULL
TEMP6,I
.JMP EIN1e

EIN21

cpa

pst

JMP fIN15
EIN16 JSB GETCR
.}MP fINP6
CPA .+428
JMP EIN19
JMP EIN16
EINt5 JSB GETCR
.JMP EINP6
CPA .+428
JMP EIN19
LOA INTHP
STA TNUll
LOA sBPTR
STA TEMP5
LOA .+408
srA BLANK
JMP EINP8

0359
0360
0361
kJ362
0363
0364
0365.
0366***
**
0367.* EXECUTE  **
0368***
**
0369*
0370 4 0 622 015504 EREAD .JSB VLFIL
JMP EREA1
0371
40623 026640
JsB FORMX
0372 40624 015336
0373
40625 161332
L.OA nPDST,I
5SA
0374 40626 002020
0375 40627 026644
JMP ERfA2
STA SBPTR
0376 4 0 63 0 07 1 572
0377 4 0 6 31 061332
LOA OPDST
0378 40632 040355
ADA ... 2
STA OPOST
0379 40633 071332
0380 40 6 34 006 4 04
CLB,INB
JSB FDATA
0381 40635 015362
0382 4 0 6 3 6 1 0 4400
DST saPTR,l
421637 101572
0383
40640 "'61611 EREA1 LOA TEMP1
0384 4~641 VJ51334
CPA PRGCT
0385
JMP )(ECl
40642 026031
~1386
40643 ~l\26624
JMP EREAO+2

TRANSFER
WITH BLANKS

RESTORE (A)
TRANSFER ENDED BY ENO .. Of .. INPUT?
yES

NO, wAS A ..
EXIT WITH
NExT CHARACTER
SET LOGICAL
TO ACTUAL
STRING L.ENGTH
LENGTH OF TRANS,ER SpECIFIED?
NO
yES

IMPLIED CLOSING QUOTE
" ?

yES

NO, LOOK FOR " OR END-Of-INPUT
END-Of-INPUT NEXT1
YES
NO, CLOSING It ?
YES
NO, DESTINATION STRING EXCEEDED
RESTORE
DESTINATION STRING
PARAMETERS

sET To
SKIP BLANKS

LOOK FOR FILE REQUESl
FILE REQUEST FOUND
EVALUATE DESTINATION ADDREss
STRING
VARIABLE?
YES
NO, SAVE AND
UNSTACK
DESTINATION
ADDRESS
FETCH
NUMBER
ST:'RE NUMBER
ENO OF
STATEMENT?
yES

NO

PAGE
0387
038tt
0389
0390
0391
~392

~115

#09

STATEMENT EXECUTION PROCESSORS

40644 064361
40645 015362
40646 003400
40647 015344
40650 060664
40651 015350
40652 fl'26640

EHEA2 LOB .+2
.JS8 FOATA
eCA
.1S8 PSTR
lDA FSCHA
JSB TRSTR
JMP EREAl

PREPARE
SOURCE STRING
PREPARE
DESTINATION STRING
TRANSFER STRING

0393
0394.
0395.**
**
0396·· EXECUTE 
0391 •• *

••
*.

'139~*

0399
0400
0401
0402
0403
0404
04S5
0406

0418

40653 002404
40654 015552
40655 002400
40656 071754
40657 015504
40660 021017
40661 "'26671
40662 061234
40 66 3 002021
40664 ~26670
4 0 665 002400
4°666 05 1 47 0
40667 015426
40670 003401
40671 002400
40672 071470
40673 161611
40674 12110566
40615 002002
40676 026722

",,419

413677 035611

0420
~421

40100 065611
40101 055334

0422

407212 0270t4

13423

40703 161611
40704 ~10570
4~705 050514
40706 026662

0407
040a

0409
04113

0411

0412
0413
0414
0415

0416
It'417

0424

0425
0426

0427
0428
~429

0430
0 4 31

0432
0433
0434
1cJ435
~436

0437
0 4 38
0439
0440
111441
0442

40707
40710
40711
40712
40713
40714
413715
40116
40717
40720
40721
40722
40723
40724
40125
40726

EPRIN CLA,INA
JSB EpRUS
CLA
STA FFlG
.JSB- VLF IL

JMP EPRI2+1
LOA FILE*
SSA,RSS
JMP EPRI2
CLA
CPA EOl
JSB EDELM
CCA,RSS
eLA
STA EOl
EPRI3 lOA TEMPt,I
AND OPDMK
~PRll

SZA

JMP EPRI5
ISz TEMP1
EPRI4

JMP EPR12
ANO OPMSK

cPA 82000

JMP EPRll
CpA 83000

026746

015336
165332

"06020

LOB TEMPt

cpa PRGCT
LOA TEMPi,I

050506

071470

FLAG AS
NON .. FORMATTED
VALIDATE FILE REQUEST

,JMP EPR 13

050516
026670

050542
027006
002003
026673
003400
041611
071611
003400

FLAG AS 'PRINT'

CHECK FOR usING STATEMENT

EPRI5

JMP EPRI2
CPA 81000
JMP EPRI8
CPA ENDOP
JMP EPRll
SZA,RSS
JMP fPRI3
eCA
ADA TEMpt
STA TEMP1
CCA

STA EOl
JSB FORMX
LDB OPDST,1
SSB

NO FILE REQUEST fOUND
FILE
MODE?
yES
NO, EXECUTE COMMA
UNLESS PRECEDED BY
A 'TAB' (EOl • 1)
TURN oFF tENO.OF.LINE' FLAG
TURN ON
'END~OF_LINE' FLAG

ExTRACT
NEXT OPERAND
NULL.?

NO, B~GINS FORMULA
yES
STATEMENT

FINISHED?
YES
NO, EXTRACT
NEXT OPERATOR
cOMMA?
YES
NO, sEMICOLON?
YES
NO f " 7
yES
NO, 'END' ?
yES

NO, NULL?
yES
NO, MUST BE FORMULA
REsET TO PRIOR
NULL OPERAND
TURN OFF
'TAB' FLAG
E.VALUATE FORMULA
IS IT A
STRING VARIABLE?

PAGE 0116
0443
0444
0445
171446

Pl447
044~

0449
0450
0451
0452
045 3
0454
0455
0456
0457
0458
0459
0460
0461
0462
0463
0464
0465
0466
0467
0468
0469
0470
0 4 71
0472
0473
0474
0475
0476
0477
0478
0479
0480
0481
0482
0483
A484

0485
0486
0487
0488
~489

11..

0490
0491
0492
1t' 4 93
0494
0495
0496
'1497

40727
40730
40731
40732
4"1 33
40734
40735
40736
40737
40740
40741
4°74 2
40743
40744
421145
4£'1746
40747
40750
40751
40752
40753
40754
40755
40756
40757
40760
40761
40 7 6 2
40763
40 76 4
40765
40766
40767

#~9

STATEME.NT EXECUTION

JMP EPRI8+1
JSB OPCHK
LOA fILESSA,RSS
JMP EPRI7
ISZ EOl
.JMP EPR I 4
OLD 1,1

026747
015376
0161234
002021
02 6 7 42
035470
~26700
10420~

1"0001
015416

JSB ENOUT
JMP EPRI4

~26700

075572
064355
"'15510
026700
015340
060355
015344
071256
075410
064354
061234
002021
026744
002400

EP~I7

8TB SBPTR

LOB
JSB
JMP
EPRI8 JSB

,-2
FILST
EPRI4
STSTR

L.DA _-2
JSB PSTR
STA TEMP4
SrB TPRME

LOB ... 3
LOA FILE,
SSA,RSS

061406
003004
041570

YES
NO, UNSTACK VALUE ADDRESS
TO BE WRITTEN
ON A FILE?
YES
NO, A 'TAB' "

YES (E.OL • 1 NOW)
NO, OUTPUT

A NUMBER
SAVE VALUE ADDRESS
WRITE 'NUMBER
ON fILE

STACK STRING CONSTANT
PREpARE
PRINT
STRING
PRESET TO WRITE ON FILE

TO BE WRITTEN

CLA

ON A FILE?
YES
NO, TURN ON

STA EOl
LOA TNULL

ENOU&H

JMP EPRI7+2

~71470

'ENO .. OF .. LINE' FLAG

(MA,INA

SPACE
ON

ADA CHRCT
ADA M7 4

~43772

002021
"'15424
027003
4077~ 015364
40771 060417
40772 ~50375
40773 0160371
40774 050376
40775 002001
40776 027002
40777 060374
410010 015452
41001 002400
41002 015452
41003 0354~6
41004 026770
41005 026700
41006 071651
41007 015512
41010 05121362
41011 026677
41012 007400
41013 026744
41014 03547fti
41015 015424
41016 026031

PROC~SSORS

SSA,RSS
JSB OUTlN
JMP EPR10
EPRI9 JSB FSCH
LOA .+408

CPA .+t68
LOA .+128
CPA .+178

RSS
~JMP

EPR10 .. t

LOA
JSB
CLA
JSB
EPR10 ISZ

OUTeR
TNULL

JMP

EPRI9

.+158

OUTeR

JMP EPR14
EPR11 STA EORFL
JSB
CPA
JMP
eCB
JMP
EPR12

CURRENT

LINE"
NO

YES

FElCH
CHARACTER

PSUEOO LINE FEED?
YES
PSUEDO CARRIAGE RETURN?
YES
NO
OUTPUT
CARRIAGE RETURN
AND A NUll
OUTPUT CHARACTER

MORE STRING?
YES
NO
fILE

GTTYP
.+3
EPRI4 .. 1

FULL?

ISz EOl

YES
NO. WRITE
ENO-OF .. FILE
'END",OF.LINE'

JSB OUTLN
JMP XECl

yES
NO

EPR17+2

fL.AG SET?

PAGE
0498
0499
0500
0501

0502
0503
0504
0505

~117

41017

*'19

STATEMENT fXECUTION PROCESSORS

~44347

41020 160001

4tPl21 ,,31027
41022
41023
41024
41025
41026

170001
065611
055334
026031
026670

EPR13 ADS
LDA
lOR
STA
LDB
CPB
.IMP
JMP

• .,8
8,1
RITl5

SET HUFFER

B,I

BIT
NULL
PRINT'l
yES
NO

TEMP1
PRGCT
XEC 1
EPRI2

0001.
0002.*
0003*.
0004 ••
0005*
EXIT TO (P+1)
0006*

0007.
0008*
~009

41027 071754
41030 ~65611
41031 160001

0012

41032

0013
0014
0015
0016

41033

41034 125552

0011
0018
0019
0020
0021
0022
0023
0024
0025

41040
41041
41042
410 4 3
41044

0027
0028
0029
0~30
~031

0032
0033
0034
0035
0036

0037
0038
0k' 3 9

0040
0041
0042
0043
0044
0045
0046
0047
0048

**
**

••

If NO USING OPERATOR FOUND, OTHERWISE PREPARE
fORMAl SPECIFICATION STRING AND CALL FORMATTED OUTPUT ROUTINE.

0010
0011

0026

DIR ...
TY

#EPRU STA FfLG
LOS TEMPt

SAVE fORMAT FLAG

l OA B, I

41036 125552

CPA PRTOP
JNB,RSS
JMP EPRUS,1
CPB PRGCT
JMP EPRUS,I

NULL OPERAND?
YES
NO, CAN'T BE USING S1ATEMENT
END OF STATEMENT7
YES

4\037

16~001

LDA B,1

NO,

010570

AND OPMSK
CPA USEOP

~b0574
~06005

4 10 35 ~55334

050604
002001
125552
1200~1

41045 075611
41~46

~02021

41~47

027065
41050 0060c;,4
4 10511 64 0" 1
41052 A44361
41053 16 000 1
41054 010570
41055 050546
4105(; "02001

41057 115145
41061(1
41061
41062
41063
41064

035611

035611
002400
071760
015550
4106~ 002003
41066 027135
41067 ~15336
41070 060355
41071 ~15344

41072 161260
41073 01~500
4t{l'74 1?l020ti13
41075 026 0 31

41e.76 003004

RSS

'USING'

OPERATOR
NEXT?
YES

JMP EPRUS,I
NO, EXIT
XQR B,I
GET OPERAND
5TB TEMPt
SAVE POINTER
SSA,RSS
INTEGER FOLLOWS?
JMP EPRUI
NO
INS
LOB B,I
GET ADDRESS OF IMAGE
ADS .+2
=> L~NGTH WORD
LOA R,I
ANO OPMSK
GET OPERATOR
CPA IMGOP
IMAGE?
RSS
yES
JSB RERRS+38,I NO, ERROR
ISZ TEMPt
BUMP TO POINT
ISZ TEMP1
TO FIRST OPERAND
CLA
STA NCH
JSB FRMAT
CALL FORMATTER
EPRUl SlA,RSS
NULL OPERAND?
JMP EPRU4
YES
JSB FORMX
NO, FETCH
LOA .-2
STRING
JSB PSTR
OPERAND
LOA TEMP6,I
GET
AND 8377
LENGTH
SIA,RSS
NULL STRING?
JMP XECl
YES
CMA,INA
NO, SAVE

ST~TEMENT

0049
0050

41077 071550

0051
0054
0055
0056
0057
0058

41101 "44361
41102 160001
41103 003004
41104 006004
41105 134001
41106 027112
41107 002400
41110 071760

0059

4111,1 02712!:j

0060

41112 140001
41113 002003
41114 026031

0052
0053

0~61

41100 rlI65330

0062
0063 41115
0064 41116
0065 41117
0066 4112~
0067 41121
0068 41122
0069 41123
0070 41124
00 7 1 41125
0072 41126
0073 41127
0074 4113V1
0075 41\31
0076 41132
0077 41133
0078 41134
0079 41135
0080 41136
0081
41137
0082 4tt4Q1
0083 41141
0084 41142
"085 41143
0086 41144
0087 41145
0088 41146
0089 41147
0090.
0091.·.
0092 ••
0093**·
0094.
0095 41150
0096 41151
0097
41152
0098 4t15j
°"99 41154
0100 41155
'1101 41156
0102 ..
0103 ....
0104 ••

STA 5TRLN
LD8 TMPST
ADB .+2
LOA B,I
CMA,INA
INB
ISZ A,I
JMP EPRU2
CLA
STA NCH
JMP EPRU3
EPRU2 ADA B,1
SZA,RSS
JMP XECl

"LENGTH
GET FIRST SUBSCRIPT
NEGATE IT
SECOND SUBSCRIPT EXIST?
yES

NO, SET
CHARACTER COUNT

COMPUTE DIFFERENCE
NULL. STRING?
yES

115153
071760

NO, NEGATIVE?
.ISB RERRS+44,I YES
STA NCH
NO, SAVE DIFFERENCE

P!03400

CCA

5SA

~02020

140001
041 55 0
~02021

115153
044356
160001
041550
002 0 2 1
115153

160001
065260
01555~

006004
160001
010566
002004
001100
041611
040361
071611

ADA B,1
SECOND
SUBSCRIPT
ADA STRLN
SSA,RSS
VALID1
J5B RERRS+44,I NO
EPRU3 ADB .-1
YES
LOA B,1
fIRST
ADA STR~N
SUBSCRIpT
SSA,RSS
VALID?
JSB RERRS+44,I NO
LOA B,I
YES, LOAD IT
LDB TEMP6
a> FIRST WORD OF STRING
JSB FRMAT
CALL FORMATTER
INS
a> 1ST WORD OF STRING
l,DA B,I
UPDATE
AND OPDMK
INA
INTRAARS

ADA
ADA
STA
CLA
SrA
JSB

002400
07176~

015550

STATEMENT

TEMPt
.... 2
TEMPt

POINTER

NCH
FRMAT

CALL FORMATTER

••
••
••
161611
03~611

065575
002020
165611
015360

02612131

E~STR

LDA TEMPt, I
lSZ TEMPt
LOB SPROG
SSA

LOB TEMP1,I
JSB SE'fOP
JM~ xEC1
**

.'1\'

LOAD FLAG WORD
ADVANCE STATEMENT POINfER
SET (B) TO START OF PROGRAM
'LABELLED RESTORE'
YES, RESET (8) TO STATEMENT
SET DATA POINTERS

PAGE 0119 #10

STATEMENT EXECUTION PROCESSORS

0105.**
01216.
0107 41 U57 161611
~108 . 41160 010566
01°9 41161 002~HlJ2
" 110 4116~ ~27214
0111 41163 065611
0112 41164 006004
0113 41165 160001
0114 41166 010510
0115 41167 ~50520
0116

4117!2' 002001

0117
0118
0119

41171 021214
41172 075611

0120

41174 165332
41175 075572
41176 061332
41177 040355
41200 071332
41'-01 064255
41202 00 6 004
41203 160001
41204 001727
41205 105120
41206 171572
41207 035572
41210 175572
41211 06 16tl
41212 051334
41213 026031
41214 QJ15356
41215 015414
41216 ~00000
41217 060001
41220 010500
41221 002003
41222 002004
41223 071610
41224 060255
41225 002004
41226 05 0 25 3
41227 115212
41230t 060400
41231 015452
41232 06(1)214
41233 031610
41234 114742

0121
0122
0123
0124
0125
0126
0127
0128
0129
0130

0131
0132

0133
0134
0135
0136
0137
0138
0139
0140

0141
0142

0143
0144

0145
0146
0147

0148
0 14 9
0150

0151
0152

41173 015336

0153
0154
0155
0156

41235 027253
41236 015336
41237 165332

~157

41240

0158
01!:S9

4124\ 061332
41242 (JI40355
41243 VJ71332

~160

41235

~75572

.**

ElNTR L.DA
AND
SZA
JMP
LOB
INS

TE.MP1,I
OPDHK
EENT3
TEMPt

LDA 8,1

AND OPMSK
CPA 84000
RSS
JMP EENTJ
STB TEMPt
"S8 fORMX
LOB OPOST,I
STB SBpTR
LDA OPDST
lOA .-2
STA OPDST
LOB MAIN
INS
LOA 1,1
ALF,ALF
nCT 105120
srA SBPTR,I
ISZ SBPTR
S18 SBPTR,I
LOA TEMPt
CPA PRGCT
JMP XECl
EI:.NT3 JSB FETCH
JSB IFIX
NQP

LOA 1
AND B377
SZA,RSS
INA
STA ArlM
LOA MAIN
INA
CPA PRIST
JSB WERRS+9,1
LOA .+218
JSB OUTeR
LOA STE
lOR ATIM
JSB SCHIN,l
EN,Rr EQu *
JMP EENT6
JSB FORMX
LDB OPOST,I
STB S~PTR
LDA OPDST
ADA .-2
5TA OPOST

.>

FIRST OPERATOR

IS
NO

' *, PRESENT?

GET NEXT OPERATOR

'*'1

YES
NO

EVALUATE ADDRESS
a> SyMBOL
UNSTACK

ADDRESS
-> USERS TTY # IN TELETYPE TABLE
GET TTY t# AND
RIGHT JUSTIfY
CONVERT TO FLOATING POINT
STORE

TTY

NUMBER
ENTER STATEMENT
FINISHED?
yES
NO~.FETCH ALLOWED TIME
CONVERT
TO
SECONDS
MASK TO 8 BITS
IF 0, SET
TO 1

DOES THIS USER
HAVE THE
LINE PRINTER?
YES " RELEASE IT
OUTPUT
AN X-ON
START
ENTER
TIMING
INPUT ENTERED
TIMEOUT OCCUR EO
a> RESPONSE
TIME
UNSTACK
ADDRESS

PAGE 0120 #10
~161

0162
0163
0164
0165

0166
0167
016S
0169
0170
0171
0172
0173
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
0184
0185
0186

0187
0188
0189
0190
0191
0192

0193
0194
0195
0196

0197
0198
0199
0200
0201
0202
02fl13
0204
0205
0206
0207
0208
0209

0210
0211
0212
0213
0214
0215
0216

41244
41245
41246
41247
4125 0

STATEMENT EXECUTION PHOCESSOHS

060316

105120
171572
~J5572

175572
41251 127252
41,52 041425
41253
41253 006400
41254 075571
41255 015446
41256 000000
41257 064417
41260 075571
41261 050362
41262 124652
41263 015450
41264 015336
41265 165332
41266 075572
41267 075420
41270 Pl61332
41271 040355
41272 071332
41273 064255
41274 044377
41275 160001
41276 105120
41277 171572
41300 035572
41301 175572
41302 015336
41303 165332
41304 006020
41305 027341
41306 061332
41307 040355
41310 071332
41311 075572

LDA
OCT
STA
ISl
STB
JMP
OEF
EE.NT6 EQU
CLa
STa
JSB
NOP
LOB
STB
CPA
JMP
JSB
JSB
LOB
STB
5T8
LOA

071266
015446
A27414
007400
075607
050434
027326
006404
050432
002001
027331
07 5266
015446
41330 027414
41331 0.15276
41332 000A00

SET
RESPONSE

TIME
TO
-256

•

BLANK
GETeR
.+408

BLANK
,+3

EXITA,I
BCKSP
FORMX
OPDST,I
SBpTR
RSPTR
OPOST

DON'T SUPPRESS
BLANKS

FIRST
CHARACTER A
SUPPRESS
BLANKS
CONTROL C1
YES
NO
EVALUATE ADDRESS
RESPONSE TIME

a>

UNSTACK

ADA , .. 2

STA
LOB
AoB
LOA
OCT
STA
lSI
STB

JSe
LOB
SSB
JMP
LOA

OPDST

MAIN
.+?RTIM
1,1
SBPTR

SBpTR,I
FORM X
OPoST,I
fEN10
OPDST

ADA ,-2

eea

STB ENOUF
CPA .+55a
JMP EENT7
CLB,INB
CPA .... 538

JMP EENTS
EENT7 STB SIGN
JSB GETeR
.IMP

GET RESPONSE
TIME
STORE
IT

EVALUATE ADDRESS
IS IT A
STRING VARIABLE?
YES
NO,
UNSTACK
ADDRESS
SAVE DESTINATION ADDRESS
SET SIGN
TO POSITIVE
FETCH FIRST CHARACTER
NONE FOUND.~ERROR
TURN OFF
OVER/UNDERFLOW FLAG

'-''1

YES
NO

'+'1

YES

RSS

EENT8

ADDRESS

105120

SBpTR,1

STA OPDST
STB SBPTR
CLA
STA SIGN
JSB GETeR
JMP EEN17

41312 002400

4 13 13
41314
41315
41316
41317
41320
41321
41322
41323
41324
41325
41326
41327

M256
105121£'
SSPTR,l
SBPTR
SBPTR,I
.+1,1
EEN1e

EEN11

JSB NUMCK
NOP

NO
SET SIGN
GET NEXT CHARACTER
NONE FOUND
NUMBER?
NQ""yERROR

,if>

PAG~~0121

#10

STATEMENT EXECUTION PROCESSORS

i0i.'~

0217
0218
0219
0220
Pl221

0222
0223
0224
0225
0226
0227
0228
0229

0230

41333
41334
41335
41336
41337
4134((1
41341
41342
41343
41344
41345
41346
41347
4135~

0231

41351

0232
"'233

41352
41353

0234
0235

41354

121236

41355
41356

0237

41357

027414
035607
027414
050374
027425
021414

007000
160001
A01127
010500
003000
141330
071410
003400
Qlt5344
065406
075354
!2106400
075571
063767
015350

0238

41360

0064~0

0239

41361
41362
41363
41364
41365
41366
41367
41370
41371
41372
41373
41374
41375
41376
41377

055406
027401
055462
027375
071354

0240
0241
0242
0243
0244
0245
02,46

0241
8248
02'49

0250
0251
0252
0253
02:54
02:55

0256

4140~

41401
41402

003400
071410
041406
071406
060664
~15350

027425
165260
045406
175260
027425
055462
027406
015446
027425
027403
015446
027425
061354
071406
061512
071272
161420

0257

414~3

0258

41404
41405
41406
41407
41410
41411
41412
41413
41414
41415 ~35420
41416 165420
41417 015370
4142~ t75420
41421 007400
41422 0454 20

((j259

0260
0261

0262
0263
0264
0265
0266
0267
02 6 8
~269

0270

0271
0272

JMP EEN17
ISZ ENOUF
JMP EEN17
CPA .+158
JMP EEN18
JMP EEN17
Et.:N10 eMB
LOA t,l
ALF,ALF
ANO 8377

eM.

AOA TMPST,I
STA TPRME
CCA
.IS 8 PSTR
LOB TNuLL
STB INTMP
CLB
STB BLANK
LOA FENC.
"S8 TRSTR
CLB
CPB TNULL
JMP EEN14

CPB
JMP
STA
ceA
srA
ADA
STA
LOA
JSB
JHP
E£N13 LOB
ADB
5T8

pst

EEN13
INTHP
TPRME
TNULL
TNULL
FSeHA
TRSTR
EEN18
TE MP 6,1
TNULL
TEMP6,I

BAD EXPONENT~~ERROR
DID OvER/UNDERFLOw OCCUR?
YES"·ERROR
NO, CARRIAGE RETURN FOLLOWS?
yES
NO ... E.RROR
EXTRACT
pHYSICAL
LENGTH OF
DESTINATION STRING
SET IT AS END
OF UNSPECIFIED
DESTINATION STRING
PREPARE
DESTINATION STRING
SAVE LENGTH
ALLOwANCE
TURN OFF
BLANK SUPPREssION
POINT TO ENTER CHAR ROUTINE
TRANSFER STRING
ALL REQUESTED
CHARACTERS TRANSFERRED?
YES
NO, TRANSFER LENGTH SPECIFIED?
NO
'lESe-SAVE CA)
FINISH
TRANSFER
WITH BLANKS
SET LOGICAL
TO ACtUAL
STRING LENGTH

.}MP fE-N18

EEN14 cPa
.IMP
E.EN15 JSB
JHP
.IMP

EEN16 JSB
JMP
LOA
STA

PS1
EEN16

GETCR
EEN18
EEN15
GETeR
EEN18
INTMP
TNULL
SSPTR
TEMP!'

LOA
STA
EEN17 LDA RSPTR,I
ISZ RSPTR
LOB RSPTR,I
,Jse AR:NV
STB RS?TR,I

eta

ADB RSPTR

LENGTH Of TRANSFER SPECIFIED1
NO
yES

CARRIAGE RETURN
LOOK FOR CARRIAGE RETURN
ENO.OF.INPUT NEXT?
YES
NO~.DESTINATlaN STRING EXCEEDED
RESTORE
DESTINATION STRING
PARAMETERS
TAKE
ARITHMETIC
INVERSE Of
RESPONSE TIME
STORE
IN
VALUE

PAGE 0122 #10
0273
0274
~275

0276
~277
~27a

0279
~280

0281

41423
41424
41425
41426
41427
4143 0
41431
41432
41433

STATEMENT

170001

EXECUTION PROCESSORS

STB ENOUF

002400

EEN18 CLA
STA CHRCT
lOA .+40H

~71570

060417

TABLE

STA 1,1

~75607

~71571

STA BLANK

P.02400

(LA

~15452
~26031

JSB OUTeR

CLEAR OVER/UNDERFLOW FLAG

ZERO CHARACTER
COUNTER

RESTORE
BLANK SUPPR~SSION
OUTPUT A
NULL.

JMP XEC1

0282*
0283...
••
0284.. EXECUTE  ••
0285...
.*

0286*
0287 41434
0288
0289

0290
0291

0292

41434
41435
41436
41437

EASN
060354

A71440

071771
067765
41440 063764

[Qu.
LOA .-3

STA LT5
ST. ASINP
LOB ASBFA

~29J
~294

41441

41441 170001

LOA OBLNK
EASN0 EQU •
STA B,I

0295
0296
0297
0298
0299
0300
0301
0302

41442 006004

INB

41443 035440
41444 ~27441
41445 002404
41446 071470
41447 015336

4145@ 060355

0313

41451
41452
41453
41454
41455
41456
41457
41460
41461
41462
41463
41464

0314

41465

0303
0304
0305
0306
0307
0308
0309

0310
0311

0312"
0315
0316
0317
0318
0319
0320
0321

41466

41467

~326
~327

41470
41471
41472
41473
41474
41474
41475
41476
41477
41477
41500

0328

4150J

~322

0323

0324
0325

015344

071256
002400
011466
054356
021514
075410

065256
004~65

160001
002041
001727
010500
006404
050423
027474
~50431

006005
027477
075466
035256
035410
061410
040366
002~20

SET FLAG TO SAY ASSIGN OCCURRED

BLANK OUT 3 WORDS

ISZ LT5
JMP EASN0
CLA,INA
STA EOl
JSB FORMX

l.OA .-2
JSB PSTR
STA TEMP4
CLA
STA ASTYP
CPB ,-1
JMP EAS02
STB TPRME
LOB TEMP4
CLE,ERB
LOA 8,1

ALLOW STRING
CONSTANT
EVALUATE STRING
PREPARE STRING OPERAND
SORCE POINTER
INITIALIZE TO
LOCAL LIBRARY
NULL STRING?
YES
SAVE STRING LENGTH
GET FIRST

SAVE

CHARACTER

SEZ,RSS
ALF,ALF

ANO 8377
CLB,INB
CPA .+448
JMP EAS01
CP4 .+52e
INB,RSS
JMP EAS00
EAS01 EQU •
STB ASTYP
ISZ TEMP4
ISZ TPRME
EAS00 FQU •
LDA TPRHE
ADA .+7
SSA

OF STRING
SET FOR PUBLIC LIBRARy
'S'1
YES
NO, '*11
YES, SET FOR GROUP LIBRARY
NO

SAVE LIBRARY TYPE
BUMP SOURCE POINTER
BUMP LENGTH

LENGtH

~

61

PAGE 012j #10

STATEM~NT

0329

41502 01212400

0330
0331
0332
0333
0334
0335

4 1 503 04035121
415"'4 "'71410

0336

0337
033tJ

0339
0340
0341
0342

0343
0344
0345
0346
0347
93 4 8
0349

035121
0351
~352

0353

0354
0355
0356
0357
0358

0359

036121
0361
0362
0363
0364
0365

0366
0367

41~05

~7141216

41506 063765
41507 011554
41510 A010f210
41511 071272
41512 060654
41513 015350
41514 015356
41515 015342
41516 064506
41517 075550
41520 015336
41521161332
41522 071633
41523 050363
41524 105120
41525 104400
41526 101633
41527 015316
41530 061550
41531 003000
41532 041500
41533 003021
41534 026031
41535 006400
41536 061550

41537 100200
41540 000376
41541
41542
41543
41544
41545
41546
41547
41550
41551
41552
41553
41554
41555
41556

041502
040364
071236
040362
164000

e4 03 S 0
160000

001423

41561
41562
41563
41564
41565
41566
41567

003004
040001
071645
015514
061236
040352
071236
006400
174000
040375
174000
075770
114744
072047
"27646

0381

t1157~

035770

03 82

41571

03577~

036~

0369
0370
0371
0372
0373
0374
0375
0376
0377

el7a
0379
0380

41557
41560

EXECUTION PROCESSORS

CLA
AOA
STA
STA
LOA
5TA
ALS
STA
LOA
JSB
EAS02 JS8
JSB

,.,.7

yES,
NO

TPRME
TNULL
ASBFA
ASBFP

POINTER TO
NAME. BUfFER

TEMP5
FCUCA
TRSTR
FETCH
5BFIX

DESTlNATION STRING POINTER
UPPER CASE CHARACTERS ONLY
MOVE NAME
EVALUATE NUMERIC OPERAND
ROUND TO INTEGER

LDB 81000

STB ORONO
.)SB FORMX

LOA
STA
LOA
OCT
OST

OPOST,l
ATMP.l
,+4
105120
ATMP+l,I

JSB OPCHK
LOA ORONO
eMA
ADA FCNTR
CMA,SSA,RSS
JMP xEC1
CL8
LOA ORONO
MPy ,+FTEL
ADA FILTS
ADA +5
STA 'BASE
ADA ,+3
LOB 0,1
AOA ,"'7
LOA 0,1
ALR,RAR
CMA,INA
ADA 1
STA RQ3
JSB WRBuF
LOA FBASE
ADA , .. 5
STA FSASE
CLB
STB 0,1
ADA ,+14

STB 0,1
STa RETCD

Jse sCHLB,I
OEF ASNI8
JMP [ASN4
ISZ PETco
rSZRETCD

SET

TO 6

SAVE SPECIFIED ORDINAL NUM8ER
LEAVE NEXT VARIABLE ON TOP Of ST
SAVE ADDRESS OF USER VARIABLE

DEFAULT

RETURN CODE

TO

~ON.EXISTENT

FILE

UNSTACK VALUE ADDRESS
DOES
REQUESTED
fILE
EXIST?
NO, DONE

LOCATE
CORRECT

FeB
DIsC ADDREss AND SAVE IT
GET CURRENT BUFFER ADDREss
CLEAR BITS 15 AND 14

WRITE OUT RE.CORD
RESTORE
FCB
POINTER

INITIALIZE
INITIALIZE PROTECTMASK TO 0

INITIALIZE RETURN CODE

CALL IN
ASS·IGN OVERL.AY
FILE RECORD SIZE TOO LARGE
FILE DOESN'T EXIST OR PROTECTED
'READ ONLY' ~ GROUP OR A000

PAGE

~124

#10

STATEMENT EXECUTION PROCESSORS

0383

41572 035770

0384

41573 061611

0385

0389

41574
41575
41576
41577
41600

1rJ390

4t6~1

0391
0392

41603

0386
0387
~J88

0393
1ii394
0395
0396

0397

0398
0399
0400

0401
0402
0403
0404
0405
0406
0407
0408

1d409
0410
0411
0412
0413
0414
0415
0416
0417
0418
0419
0420
0421
0422
0423

41602
416~4

41605
41606
41607
41610
41611
41612
41613
41614
41615
41616
41617
41620.1
41621
41622
41623
41624
41625
41626
41627
4163~

051334
027644
1600~0

010570
050514
002001
027644
002404
071470
015336
06 0 355
Q.l15344
011256
075410
063765
011554
001000
011 2 7 2
060354
Vl71440
065554
063764
170001
0060~4

'-"35440
027622
060350
071406
~60664

41631 015350
41632
41633
41634
41635
41636
41637
41640
41641
41642
41643

061554
002004
104200

\00000
141554
~20001

030221
065236
"44375
17~001

ISZ
LOA
CPA
JMP
LOA
AND
CPA

RETCD
TEMPt
PRGCT
fASNJ
0,1
(lPMSK
B2000

'READ ONLV' • FILE IN USE
END OF STATEMENT?
YES
TEST FOR A COMMA
COMMA FOLLOWING?

RSS

.IMP f ASNJ
CLA,INA
STA EOl
JS8 FORMX
LDA ... 2
.)5B PSTR

STA
STB
LOA
STA

TEMP4

TPRME
ASBFA
ASBFP

~.L.S

STA
LOA
STA
LOB

TEMp5
.... 3
lT5
ASBFP

NO
ALLOW
STRING CONSTANT
VES, ~VALUATE STRING OpERAND
PREPARE
SOURCE
STRING

GET CHARACTER
POINTER TO
PASSWORD' BUFFER

LDA OBLNK
STA 1,1
INS
ISl lT5
JMP *-3

FILL PASSWORD
BUFfER WITH
BLANKS

LOA .-7

SET LENGTH (IN CHARACTERS)
OF PASSWORD BUFFER

STA
LOA
JSB
LOA
INA
DlD

TNULL
FSCHA
TRSTR
ASBFp

MOVE PASSWORD TO BUFFER

~,I

ADA AS8fp,I
XOR !
lOR RBP
LOB FBASE
ADB ,+14
STA t,I

ADD WORD1 AND WORD2
EXCLUSIVE OR • WORD3

INCLUsivE OR BITS 14 AND 15

STORE PROTECTMASK IN FeB

0424.
0425
0426
0427

EASN3 LDA RETCO

41645 002001

RSS

0428

41646 060364
41647 105120

0429

4165~

1044~0

41651

101633

41652

'~26031

0430

I..

41644 06177 0

EASN4 LOA .+5
OCT 1~5120
DST ATKP.l,I

JMP XECl

A • RETURN COOE
fLOAT RETURN CODE ANO

STORE IN USER VARIA8LE
DONE

PAGE 0125 #10

11'

STATEMENT FXECUTION

0432*
0433*·*
0434*. COMPLETE EXe;CUTION
~435* ••
~436*
~4J7

1ri4J8
\t1439

"'440
0441

0442
0443
0444
0445
0446
0447
044ij
0449

0450
0451
0452
0453
0454
0455
0456
0457
'0458

0459
0460
0461
0462
0463
0464
0465
0466
0 4 67
0468
0469
0470
0471
0 4 72
0473
0474
0475
0476
0477
0478
0479
0480
lr1 4 81
0482
0483
0484

416f)3
41653
41654
41655
41656
41657
4166eJ
41661
41662
41663
41664
41665
41666
41661
41670
41671
41672
41673
41674
41675
41676
41677
41700
41701
41702
41703
41704
41705
41706
41707
41710
41711
41712
41713
41714
417 1 5
41716
41717
4172.C?I
41721
41722
41723
41124
41725
41726
41727
41730
41731

~485

41732

kJ486
0487

41733

41]34

fXIT
103tf.iJ0
160255

030377
170255
102100
061500
003000
071500
002004
071550
061232
065502

044364

*.

.*

••

f- QU

elF
LOA
lOR
STA
STF
LOA
CMA
STA
INA
STA
LOA
LOB

•

~

MAIN,!
UNABT
MAIN,!

'-'

FCNTR

NUMBER OF FILES
SAVE 2'S COMp~EMENT fOR
LCD's FILE COUNT
LoAD FIRST BuFfER ADDRESS
LOAD POINTER TO
FIRST DISC ADORESS (lOW WORD)

fRMAT
FCORE
FILlS

~35500

027750
015556
006400
174632
114614
160634
170632

.JMP

160255
010363

002002
003401
060353
064255
006004
064253
002001
027721
063735
071426
060345
0216400
,,74253
006400
075274
01546'"
060255
002004
160000
030224
114736
060363
064255
015562
12 4 740

EXIT2

JS8 LCOlP

EXIT3 (LB

srB

ABORTS
SET COUNTER TO
lIS COMPLEMENT

ADS .+5

JSB
LOA
STA
LOA
STA
LOA
AND

INHIBIT

FCNTR

EXIT0 ISZ FCNTR

~63773
~71426

PROCESSO~S

DCle1,I
ABCK,I
DCLC2,I
DClel,I
EXITt

LTl

ur

MORE FILES?
YES
UPOATE LAST CHANGE DATE
OUTPUT

COMPLETION

MAIN,1
HFLAG
MESSAGE UNLESS
sHELLO PROGRAM

SZA

CCA,RSS
LDA .-4
LOB MAIN
INS
CPS PRIST

UOES USER

HAVE LP?

RSS

JMP
LOA
STA
LOA
CLB

EXIT4

EXT1A
lTI
.-10

NO.
YES.

RELEASE IT AND

PRINT MESSAGE

STB PRIST

EXIT. CLB
STB LT2
JSB OUTST
LOA MAIN
INA
LOA 0,1
lOR uNR
JSB S14LP,I
l.OA .+4

LOB MAIN
JSB EOABR
JMP SCHEN,I

TELL 2114

THAT USER IS
FINISHED RUNNING
CLEAR PBFLG AND CeFlG

BITS.

PAGE 01'6 #10
0488
0489
0490
0491

1tJ492
0493
0494
",,495
0496
04g7
0498
21499
0500
0501
0502
121503

0504
0505
0506
0507
0508

taf>10
0511
111512

(d513
0b14

0515
0516
0517

41735
41736
41737
4174{r1
41741
41742
41743
41743
41144
41745
41746
41747
41750
41751

STATEMENT EXECUTION PROCESSORS

041735
011423
006412

EXTIA OEF •
oCT 11423
OCT 6412

ASC 3,LP FRE

046t2~

020106
~511~5

EXT1
~424t2

006412
042117
047105
006412
075236
071645
41752 015514
41 7 53 065236
41754 044372
41755 160001
41756 001423
41757 003004
41760 044366
41761 140001
41762 044354
41763 027670
41764 0~0040
41765 001737
41766 142254
41767 001522
41770 VJ01274
41771 046174
41772 177666
41773 041743

f:QU

•

OCT 42412
OCT (;412
ASC 2, DONt:.

OCT 6412
EXIT2 STB FBASE
STA RQ3

JSB WR8UF
. LOB FBASE
ADB .+FTEL-4
LOA 1,1
ALR,RAR
CMA,INA
ADB ,+7
ADA 1,1
ADB .-3
JMP EXIT0
OCT
DEF
DfF
OEF
OfF
OfF
M74
DEC
EXIT1 DfF

DBLNK
ASSFA
XECBR
FENCA
FINeA
MIOEN

WRITE
OUT
RECORD
GET RECORD
SIZE OF NEXT FILE
CLEAR BITS 14 AND 15
GET END OF FILE BUFfER
COMPUTE FILE BUFfER STARTING ADD
POINT B TO FIRST DISC ADDRESS

20040

ERSEC+60
XECTB.42A,I

FENCH

f- INCH

MID7

-74
EXT1

PAGE 0127 #11
0002
0003
1lt004
0005
H006

k1007
1rJ00ij

UTILITY ROUTINES

42000
42000 142672
42001 177712
42~02

041673

42003 ~"~00~)
42004 t7767'A.
42~05 000111

ORG
ARBAS OfF
OCT
066
EXTJA D~F
ITEHP BSS
M72

.73

420006

FOJT.12B,I
.66

EXIT3
1

DEt .72
DEC 73

~009.

••

16010 ••
~011***

EXtCUTE 

0012.*
0013*
0014
0015
0016
0017
001ij
k1019
0020

0021

~~22

0023

42~06
42~07

114744
~72~51

42010 115146
42011 115157
42012 115147
42013 11515~

42014
4-2015
42016
42017

115156
115161
126017
036051

***
**

t\T~'"
ECHAN .J88 SCHLB,1
CALL SYSTEM TO EXECUTE ""v,,",
OEF CHLIB
JSB RERRS+J9,1

.JSB pERRS+48,I

JSB
JSB
JSB
JSB
JMP

RERRS+40,1

RERRS+41,I
Ri::RRS+47,I

RERRS+50,I BAD LINe NUMBER
.+1,1
GO COMPILE IT
OEF CMPL0

0024.*

0025 •• *
0026.*
0027*
0"'28*
'/1'129.
0030.
\1'131.
0032*
"'033*
0034
0035
00.36
0037
0038
0039

0040
0041
0042
0043
0044
0045
0046

0"'47
~048

0049

SET POINTERS TO DATA STATEMENT

SlARTING wITH THE STATEMENT REFERENCED BY (8) uPON
ENTRY, FIND THE NEXT  AND SET THE DATA
BLOCK POINTERS APPROPRIATELY. IF NO 
IS FOUND, SET lHE POINTERS To THl 'OUT OF DATA'
CONFIGURATION AND ExIT wITH (A) • -1.
42020 055573
42021 026037

42022 044361
42023
42024
42025
42026

160001
044356
010570
Cil50536

42027 026033
42030
42031
42032
42033
42034
42035
42036

144001
044356

026020
160001
{l!060~4

003004
002 00 5

42037 0034~0
4204'" ~71262
42041 075244

#STDP CPS
JMP
ADB
LOA

SYMTS
SETD2
.+2
1, I

ADS ,-1

AND OPMSK

CPA OATOP
JMP SETD!
ADB 1 , I
A08 ... 1

JMP #SToP
SETD! L.OA 1,1
INB
CMA,INA
INA,RSS
sEr02 CCA

STA DceNT
STB NxTDT
0052
42042 125360
.JMP SE TOp, I
0053.*
**
~004***
VALIDATE A fILE REQUEST *.*
0055.*
**
il"HS0

L:i051

l_

~056.

0057.

.*.••••

EXIT TO (P+2) IF (TE MP

t, . .

l

PROGRAM EXHAUS1ED?
YES, SET 'OUT Of DATA' CONDITION
NO,
STATEMENT
OF
TYPE
'DATA'?
YES
NO, COMPUTE
ADDRESS OF
NtXT STATEMENT
LOAD ST~TEMfNT LENGTH

SET
DATA
COUNTER
TO
1.STATEMENT LENGTH
SET POINTER ONE WORD
ABOVE FlRST DATA CONSTANT

DOES Not; BEGIN A FILE REFERENCE,

PAGE "'128 #11

ELSE EVALUATE THE FILE REFERE~CE AND VERIFY ITS CORRESPONDENCE
WITH A REQUESTED FILE. IF A REcORD REFERENCE IS ALSO PRESENT,
EVALuATE 11 AND CALL FOR ITS SWAPPING INTO THE CORE BUfFER,

0058*
005 9*
0060*
0061.
0062
1t!)063
0f)64

0065
0066
0067

0068
0069
02170
0071
0072

0013
0074
0075
0076
0077
0078
0079
13080
0i181

0082
0083

0084
0085
~086

0087
0088
0089
0090
0091
0092
0093
\1094

0095
0096
0097
0098
0099

UTILITy ROUTIN'ES

4204j
42044
42A45
42046
42047
42050

~65611

006f?104
055334

#VLFI L.OB TEMPt
INB
CpS PRGCT

160001
010570

-42053
42054
42055
42056
42057

03550 4

42061
42062
42063
42064

006400
075514
035611

125504
0"'740~

161611
~10570

42060 050574

JMP VLFll
VLFIA ISZ VLf'IL
JMP VLFIL,I
VLFIl eC8
LDA TEMPt,l
AND OPMSK
CPA PRTOP

42105 015356
421~f)

~15342

A '"

?

NO, tXIT
TO (P+2)
SET
'11.0 • 0

FOR

'PRINT',
El.SE

5TB

FILE'

LOA TEMPi, I
AND OPMSK
CPA 92000
JMP VLFIJ

ceB

VLfI2 5TB
SSB
LOB
LOA
ISZ
eMA
JSB
JMP
VLFI3 JSB
JSB

fETCH DATA ITtM

YES, SAVE IT
NEXT

OPERATOR
A COMMA?
YES
NO, USE NULL RECORD

.-2

RECORD?
YES, DO NOT ADJUST FILE POINTER

f'ILE*
VL0

WRITE REQUEST?

NUL.L

yES

RQSTR

VLFIL,1
FtTCH
SBFIX
LDB INF
JMP VLFI2

42107 064273
42110 026075

0100.*
0101***
0102.*

YES

VL0
'ILl .. -1
EVALUATE
ISZ TEMP1
JSB FETCH
FILE REFERENCE
JsB sBFIx
15.BIT INTEGER?
JSB RERRS+35,I NO

015356

42104 125504

OPERATOR

(LB
STB

42065 015342
42066 115142
42067 075234
42070 161611
42071 01057L1
42072 050514
42013 026105
42"74 007400
42075 075520
42076 006020
42077 064355
42100 061234
42101 035514
42102 003000
42103 015506

NEXT

.JMP VLf'I0
LOA I, I
AND OPMSK
CPA 84000

026053

42051 el50520
42052 026055

IS

VALIDATE FILE/RECORD REQUEST

EVALUATE RECORD REFERENCE
15 e 81T INTEGER?
NO, LOAD IMPOSSIBLE RECORD
YES

**
***
**

0103.

0104.
0105*
0106*
12J107·

0108*
0109*
01 ua*

0111
0112

0113

UPON ENTRY (B) • 1 IF A NUMBER 15 REQUESTED OR eBl • 2 If A
STRING IS REQUESTED. FDATA FILLS THE REQUEST FROM A fILE IF
ONE IS REFERENCED By THE CALLER, ELSE FROM THE DATA BLOCK.
TYPE MATCH IS CHECKED. NUMBERS RETURN IN CA) AND (8), STRINGS
ARE PREPARED AS SOURCE STRINGS. FOATA MOVES TO NEW FILE
RECORDS OR S AS NECESSARY.
~612J4

#fDAT LOA FILE#

42112 002021
42113 026164

SSA,RSS
JMP FDAT3

42111

READ FROM
FILE?
YES

PAGE 0129

Iil1

UTILITY ROUTINES

035262
026125

0130
0131

42114
42115
42116
42117
42120
42121
42t22
42123
42124
42125
42126
42127
421J0
42131
42132
42133
42134
42135

0132

42136 104200

0114
0115

0116
0117
0118

0119
0120
0121
0122

0123
0124
0125

0126
0127
012a
~129

075212

065244
015360

065272
035262
002~01

115124
035262
161244
035244
005300

020001

}(OR t

00202~

SSA
DATA?
JSB RE.RRS+22,I NO
SSB,RSS
YES, STRING?
YES
.IMP FDAT2
OLD NXTDT,l
NO, LOAD NUMBt.R

115125

006~21
~26144

42137
42140
42141
42142
42143
42144
42145
42146
42147

101244
035244
035244
035262
125362
161244
035244
12165244

0141

005000
42150 075256

0142

42151

~10500

~14J

42152 003000
42153 071410
4215 4 0030et4
42155 001100
42156 064000

0133
0134
rall5
~136

0137

0138
0139
0140

0144
01 4 5
0146
0147

0148
0149
0150

0151
0152
1tl153

0154
0155
0156
0157
~158

0159

0160
~161

0162
0163
0164
~165

~166

0167
~168

42157
42160
42161
42162

041244
071244
045262

42163

125362
061236
040364
160000
071767
075272

42164
42165
42166
42167

42170
42171
42172
.i2173
42174
.i2175
42176
42177
4 221!1 eI

NO, DATA IN CURRENT STATEMENT?
lSZ DCCNT
yES
JMP FDATI
ST8 TEMPS
NO, SAVE (8)
LOB NXTDT
MOVE TO NEXT
JSB SETDP
cDATA STATEMENT>
LOB TEMP5
RETRIEVE (8)
ISl DCCNT
DATA FOUND?
yES
RSS
JSB RERRS ... 21,I NO, OUT OF DATA
INCREMENT COUNTER
fOATt tSz DCCNT
CORRECT
LOA NXTDT,I
ISZ NXTDT
RBR
TYPE OF

£'175262

065520

075651
015512

051272
026213
050363
026203

050362

42201 002001
4220t! 115125
4 220 j 171 35 2 36

ISZ NXTOT

lSI NXTDT

. ISZ DCCNT
JMP FDATA,I
FDAT2 LOA NXTDT,I

ISZ
LOB NxTDT

NxTDT

BlS
5TB TEMp4
AND 8377
eMA
~TA TPRME
CMA,INA

UPDATE
. POINTER

LOAD STRING LENGTH

SET

START.OfwaSTRING
CHARACTER
ADDRESS
SET
TRANSFER STRING
LENGTH
UPDATE

ARS

LOB
ADA
STA
ADB
STB
JHP
FDAT3 LOA

~

NXTDT
NXTDT
DCCNT
DCCNT

FDATA,I
FBASE

OAlA
POINTERS

GET

ADA .+5

PROTECT
MASK
SAVE DATA REQUEST TYPE
GET TYPE
Of NEXT ITEM
IN FIL.E
MATCHING TyPES?
YES
NO, ENO .. OF ... RECORD1
YES
NO, END.OF.FIL.E?
YES
RSS
NO, TYPE MISMATCH
.JSB RE~RS+2211
fDAT4 ISZ FBASE
LOAD
LOA 0,1
STA PMASK
srB TEMP5
LOB RCRD*
STB EORFL
JSB GTTYP
CPA TEMPS
JMP FOAT5
CPA .+4
JMP FDAT4
CPA .... 3

PAGE
0169
0170
0171
0172
!d173
0174
a175
0176
0177
~178
~179

0180
!dlSl
0182
0183

0184
0185
0186

0187
0188
0189
0190
0191
·0192
0193
0194
0195
0196

0197
!d19S

0199
0200
0201

~13Vl

42204
42205
42206
42207
42210
42211
42212
42213
42214
42215
42216
42217
42220
42221
42222
42223
42224
42225
42226
42227
42230
42231
42232
42233
42234
42235
42236
42237
42240
42241
42242
42243
42244
42245

#11

UTILI1Y ROUTINES

EOf/fOR ADDRESS
NULL?
RERRS+37,I
YES, UNPROTECTED EOF/EOR
NO .
PRGCT
FORST
CLEAN UP
SETPT
EXECUTION STACKS

165236

LOB FBASE,1

~06003

SZB,RSS

115144
075334
065250

JSB

015430

124762
165236
002011
026231
104200
t"00~1
0020~3

"'26226
0121767
101100
021767

101100
t.35236

135236
125362
160001
006004
005000
07 5 256
005100

STB
LOB
JSB

JMP xECIA,1

FOAl5 LOB FBASE,!
SLA,RSS

LOAD DATA ADDRESS
STRING?

JMP FDAr6

yES

DLD t,l

NO, LOAD NUMBER

SZA,RSS
.IMP FOAT7

ZEROS ARE
NOT MASKEU

XOR

pMASK

MASK

SWP
XOR PMASK
SWP
FOAT] ISZ FBASE,I
lSZ FBASE,l
.JMp FOATA,I
FUAT6 LOA t , I
INS
BLS
ST8 TEMP4

DATA

ADJUST RECORD POINTER
PAST DATA

LOAD STRING HEADER

SET

SOURCE
ADDRESS

BRS

01B500

ANO 8377

003000
071410
003004
001100
044000
175236
125362

CMA

STA TPRME
CMA,INA
ARS

ADB {{I
5T8 F8 ASE,!
.}MP FOATA,I

SET

TRANSFER
LENGTH

ADJUST
RECORD POINtER
PAST

STRING

PAGE 0131 #11

UTILITY ROUTINES

••

0203 ••

0204...

•••
••

REQUEST AN INPUT RECORD

0205 ••
~206.

SERVICES REQUESTS FOR TELETyPE INPUT. IF (A) • 0 EMIT A'"
AND 'X-ON' ELSE EMIT A L1NE FEED, TWO '1', AND AN -X-ON',

0201*
~208·

021!19.

021rJ
0211
0212
1a213
0214
0215
0216

ft1217

t1218
0219
0220
0221
0222
0223
~224

0225
0226

0227
~228
~229

0230
0231
0232
0233

((1234

0235
0236
0237
0238
0239
0240
0241
0242
02 4 3
0244
0245
0246
0247
0248
0249
0250.·

42246 072003
42247 ~60255
4225~ 002004
42251 050253
42252 115212
42253 0620eJ
42254 002002
42255 0263~5
42256 "'61570
42257 0420e4
42260 002020
42261 026266
42262 et60374
42263 015452
42264 060371
42265 015452
42266 060460
42267 015452
42270 060400
42271 ~15452
42272 12102400
42273 071570
42274 07 1 420
42275 12160225
42276 114742
42277 015446
4230((J 026305
423~1 050362
42302 124652
42303 "'15450
42304 125444
423 0 5 06°255
42306 002004
4 230 7 05 02 5 3
42310 115212
42311 060371
42312 015452
42313 060460
42314 015452
42315 026266

0251...

#INCL STA ITEMP
SAVE FLAG
DOES THIS USER
LOA MAIN
INA
HAVE THE
CPA PRIST
LINE PRINTeR,
JSB WERRS+9,I YES • RELEASE IT

LOA ITEMP

SZA
JMP INCL2
LOA CHRCT
ADA M72
55A
JMP INCLl
LOA .+15B
·JSB OUTeR
lOA .+128
JSB OUTeR
INCLt LDA 877
JSB OUTeR

LDA ,+218
JSB OUTeR
CLA
STA CHRCT
STA IFCNT

LDA IWT
JSB SCHIN,I
JSB GETeR
JMP INCl2

NO
YES
LINE
FULL?
NO
YES, OUTPUT
CARRIAGE RETURN
AND
LINE fEED
OUTPUT
,?

f

OUTPUT
AN X.ON
RESET
OUTPUT CHARACTER COUNTER
AND INPUT ITEM COUNTER
REQUEST INPUT RECORD

FIRST
CHARACTER A
CPA .+3
'CONTROL C. 1
.JMP EXITA,I
YES, TERMINATE EXECUTION
JSB BCKSP
NO, RETURN
TO CALLER
JMP INCAL,I
IF USER
LOA MAIN
INA
HAS THE
CPA PRIST
L.INE PRINTER,
JSB WERRS ... 9,I
RELEASE IT
OUTPUT A
LOA .+128
JSB OUTCR
LINE FEED
LOA B71
AND
.158 OUTCR

A '1'

JMP INCLl

.*
••
EASN

EXECUTION BRANCH TABLE

0252 ••
0253 42316 041434
025 4 42317 ~400Jl
1a255 42320 040031
0256 42321 £'140031
~257
42322 040111
0258 42323 040031

RESTORE FLAG
INITIAL REQUEST?

Xf.:CTB OEF
DEF
OEF
OfF
OfF
DfF

**.

)(EC1

A.SSIGN
USING
IMAGE

XECl

COM

ELfT

LET

XECl

XECl

DIM

PAGE 0132 #11
0259
0260
0261
0262
0263
0264
0265
0266
0267
0268

0269

42324
42Jt?5
42326
42327
42330
42331
42332
42333
42334
42335
42336
42337
42340
42341
42342
42343
42344
42345

UTILITY ROUTINES

0140031
040031
040136
040124
~40207
0403~7

04Q1137
04 0 364
041653

041653
040031
04 0 373
040622
0 40 65 3
041150
046023
040031

DEF Xf:.Cl
DE.F XECl
OEF EGOTO
OfF ElF
OEF EFOR
OfF ENEXT
DEF EGOSB
DEF ERTRN
OfF EXIT
OfF EXIT
OfF XECl
DfF EINPT
OEF EREA£)
OfF EPRIN
OEF FRSTR
DfF EMAT
OEF XfC1 .
OEF ECHAN
OfF EENTR
OEF ELfT

0270
0271
0272
0273
0274
0275
~42k)06
0276
VJ271 42346 041157
0278 42347 040111
0279.*
0280.*. FETCH FORMULA VALUE

END

STOP

DATA
INPUT
READ
PRINT

RESTORE

HAT

fILES

CHAIN
ENTER

'IMPL.IED'

••

L~T

•• *

0281**
0282*

DEF
REM
GOTO
IF
FOR
NEXT
GOSU B
RETURN

••

RETURN wITH THE RfSULT IN (A) AND (8)

~283.
~284.

0285
0286
0287

VJ288

42350

~15336

42351 015376
42352 104200
42353 100001
42354 125356

0289 ••
0290...

#F1CH JSe FORMX
JSB OPCHK
OLD t,I

JMP FETCH,!

SET EXECUTION POINTERS

0291.·

1r1292.
0293*
1d294*
0295.

0296*
0297
0298
0299
0300
0301
0302

1d303
0304
0305
0306
0307
0308
lii30g

0310

EVALUATE FORMULA
UNSTACK ADDRESS
LOAD RESULT

••

•••

••

SETS POINTERS TO THOSE STACKS WHUSE LOCATION MAY CHANGE
EXECUTION, USUALLY DUl TO INITIATION OR COMPLETION
OF FOR-LOOPS.

DURI~G

42355
42356
42357
42360
42361
42362
42363
42364
42365
42366
42367

075250
044363
075330
044403
075332
044362
075464
007000

044716
006020
115111
4237~ 065464
42371 07 4 056
42372 125430

~311.*
~312.**
~J13*.

#STPT STB FORST
ADB .+4
STB TMPST
ADS .+20

STB OPDST
ADS .+3

STs OPTRQ
eMS
ADS LWAUS

SET TOP Of FOR-STACK
SET POINTER TO TOP
,

OF TEMPORARy ST ACK

sET POINTER TO TOP
OF OPERAND STACK
SET POINTER TO BOTTOM
OF OPERATOR STACK
OUT
OF

STORAGE?
JSB RERRS+t0 . . 1 YES
Loa nPTRQ
NO, SET POINTER TO TOP
5TB PBPTR
OF OPERATOR STACK
JMP SETPT,I
5SB

INITIALIZE FOR PROGRAM MODIFICATION

••
•••
••

PAGE 0133 #11
0314
03 1 5
0316
~317

UTILITY ROUTINES

42373 (l}60417
42374 071571
42375 07142 0
42376 125462

#SINI LOA .... 408
STA BLANK

STA GFLAG
Jr1P SINlT,I

TURN ON
BLANK SUPPRESSION.
TURN OFF INTEGER ERROR.SUPPRESS

PAGE 0134 #11
0319.·
0320**.
~321*·

0322*
0323*
0324*
0325*
0326*

0327*
0328*
0329*
0330*
0331*

0332*
0333*
0334.
0335*

0336*
033 7*
0338*

0339*
0340.

FORMULA EVALUATION ROUTINES

EVALUATt A FORMULA

••
••

•••

ENTER WITH TEMPt POINTING TO THE FIRST OPE~AND OF THE
FORMULA. UPERATORS AND THE ADDRESSES OF OPERANDS ARE
STACKED SEPARATELY. OpERAND ADDRESSES ARE STACKED A8
SOON AS THE OPERAND IS SCANNED. AN OPERATOR IS NOT
STACKED WHILE THE OpERATOR ON TOp OF THE STACK HAS EQUAL
OR HIGHER PRECEOENCf, INSTEAD THE LATTER IS UNSTACKEO
AND EXECUTED, THUS AN OPERATOR FORtES EXECUTION OF THOSE
PREVIOUSLY STACKED, DOWN TO THE LATEST ONE STACKED WHICH
HAS A LOWER PRECEDENCE, THE OPERATOR STACK IS INITIALIZED
WITH AN END.OF.FORMULA (LOWEST PRECEDENCE) OPERATOR. THE
ACTION OF OPERATORS IS IN GENERAL TO COM8INE THE TOP TWO
OPEHANDs sTACKED. THE ADDRESS OF THE PARTIAL RESULT THUS
OeTAINED REPLACES TH~ ADDRESSES OF ITS CONSTITUENT OPERANDS
ON THE STACK (VALUES Of PARTIAL RESULTS ARE KEPT ON THE
TEMPORARY STACK), UPON EXIT TEMP1 POINTS TO THE FIRST PROGRAM
WORD WHOSE OPERATOR DOES NOT MANIPULATE THE STACK (THIS
MA Y f3E AN END-Of I!I'FORMULA, 'THEN', 'OF', EtC.).

0341 42377 015366 #FORM JSB PSHST
0342 42400 006400
tLB
0343 42401 174056
STa PBPTR,1
0344.
*
0345*. PROCESS NEXT OPERAND
0346*
*
0347 42402 161611 FORMj LDA TEMpt,I
0348 42403 03b6t1
ISZ TEMp1
034 9 424VJ4 01~56b
AND OPDMK
SZA,RSS
0350 42405 002(~e3
0351 4241.16 026447
JMP FORM2
03~2
42407 035332
ISZ OPOST
0353 424t~ 035332
ISZ OPDST
S5A
0354 42411 00202 0

.*

STACK
BEGINNING~OF~FORHULA

OPERATOR

EXTRACT
NEXT

OPERAND
NULL OPERAND?
YES
NO, BUMP POINTER
TO OPERAND STACK
VARIABLE OPERAND?
NO

Jt1P fORM6
0355 42412 026525
0356*
0357*. STACK NON-fUNCTION VAWIABLE OPERAND ADDRESS
~358*

.**
*

0359*
FOR SIMPLE VARIABLES,
51360* THE ADDRESSES STACKED ARE AS FOLLOWS,
0361. A POINTER TO THE VALUE; FOR ARRAYS, THE BASE ADDRESS' FOR
0362* STR1NG VARIABLES, THE NEGATION OF THE BASE ADDRESS.
0363*
ADA .-1
0364 42413 A40356
COMPUTE
ALS
POINTERS
0365 42414 001000
~366
ADA SyMTB
42415 041573
TO SYMBOL
0367 42416 06400~
LOB PI
TABLE
0368 42417 006004
INS
ENTRY
0369 42420 160000
PROGRAMMER,.
LDA 0,1
AND .+178
l-1370 42421 010376
DEFINED
0 3 ,1 42422 ~50376
CPA 0+ 1 78
FUNCTION?
0372 42423 026557
JMP FORMS
YES
0373 42424 164~01
t>.tO, lOAD VALU~ POINTER
L 08 t , I
0374 42425 ~02002
STRING VARIABLE?
SZA

PAGE 0135 #11
0375
0376
0377
037t5
0379
0380
0381
0382
0383
0 38 4
0385
0386
0387

42426
42427
4243A
42431
42432
42433
42434
42435

FO~MULA

026446
~61611

051334
026436
161611
010570
050554
026445
42436 075256
42437 015400
42440 002400
42441 ~074A0
42442 104400
42443 101330
42444 065256
42445 007004
42446 175332

EVALUAT10N ROUTINES

FORH2.1
TEMP1
PRGCT
FORM0
LDA TEMPt,!
AND OPMSK
CPA LBOP
JHP FORM2 .. 2
FORMA STB TE.MP4
JSB RSCHK
eLA
JMP
LDA
CPA
JMP

eeB

DST TMPST,1

NO
YES, END
OF FORMULA?
YES
NO,
FOLLOWED BY
SUBSCRIPT?
YES
NO
CREATE TEMPORARY
RECORD
(0,-1)

LOB TEMP4
0388
RETRIEVE AND
eMB,INS
NEGATE STRING ADDRESS
0389
STB OPDST,I
STACK ADDRESS
0390
0391*
*
0392** PROCESS NEXT OPERATOR .*
0393*
*
FORMULA
0394 4 2 447 061611 F'ORM2 lOA TEMPt
2
0
PRGCT
051334
CPA
0395
EXHAUSTED?
4 45
JMP FORM3
YES
0396 42451 026465
LOA TEMP1,1
NO,
0397 42452 161611
0398 42453 010570
4ND OPMSt<.
EXTRACT
ALF,ALF
0399 42454 001727
NEXT
0400 42455 0640tH1
LOB 0
OPERATOR
CPA .... 2
STRING CONSTANT?
42456 ~50361
0401
1d402 42457 026657
JMP FOR13
YES
ADA .-208
NO, NON.FORMULA
0403 4246~ Pl40337
1d404 42461 002020
58A
OPERATOR?
CLB
0405 42462 0064,,0
yES
NO, NON-FORMULA
ADA 066
0406 42463 042001
OPERATOR?
0407 42464 002021
SSA,RSS
yES
0408 42465 006400 FORM3 CLB
NO
CLA
0409 42466 002400
SZB,RSS
ENO-OF·FORMULA?
04 10 4 2 467 1210 6 00 3
JMP •• 4
yES
0411
42470 026474
0412 42471 044660
NO, LOAD OPERATOR
ADB FOPBS
INFORMATION WORD
LOA 1,1
0413 42472 160001
0414 42473 010500
ANO 8377
SAVE
0415 42474 071252
ST. TEMP2
PRIORITY
XOR 1,1
SAVE
0416 42475 120001
041 7 424 7 6 001100
ARS
INTERNAL
0418 42477 071254
STA TEMP3
NAME
0419*
*
0420 •• STACK PRESENT OR EXECUTE PREVIOUS OPERATOR

**

~421.

0422
0423
0424
0425
0426
0421
0428
0429

42500
42501
42502
42503
42504
42505

160056

010500
003000

,,41252

0et2020
026515
4251!1b 061252
42507 ~50372

FORM4 LOA PBPTR,I
AND a377
eMA
ADA TEMP2
SSA

JMP FORMS
LOA TEMP2
CPA .+138

DOES OPERATOR *
ON TOP
OF STACK
HAVE HIGHER
PRIORITY?
YES
NO
CORRECT

PAGE 0136 #11

FORMULA EVALUATION ROUTINES

CLA,INA
0430 4251~ 002404
STACK PRIORITY
0431
ADD NAME
42511 031254
lOR TEMP)
0432 42512 015366
JSB PSHST
STACK
STA PBPTR,!
OPERATOR
0433 42513 170056
0434 42514 026402
JMP FORM1
POP
0435 42515 160056 fORM5 LOA PBPTR,I
0436 42516 064355
OPERATOR
LOB .-2
A08 PBPTR
fROM TOP
0437 42517 044056
0438 42520 014056
ST8 pBpTR
OF STACK
ALF,ALF
BRANCH
0439 42521 001727
0440 42522 010500
AND 8371
TO
APPROPRIATE
ADA ARBAS
0441 42523 042000
~JHP 0, I
0442 42524 1240((t0
ROUTINE
0443.
0444 •• STACK CONSTANT OR pARAM~TER ADDRESS *.
0445.
0446*
0447. FOR NUMERICAL CONSTANTS STACK A POINTlR TO THE VALUE
0448* tMBEDDED IN THE PROGRAM, FOR PARAMETERS STACK THE
04491r PA~AMETER ADDRESS.
0450.
ERASE FLAG Bl1
0451
42525 001665 FORM6 ~LA,CLE,ERA
CONSTANT?
5ZA
0 4 52 42526 002002
JMP FORM7
NO
0453 42527 026534
0454 42530 065611
LOB TEMPt
YES,
0455 42531 035611
ISZ TEMPt
STACK
0456 42532 035611
ISZ TEMPt
ADDRESS
0457 42533 026446
JMP FORM2.1
0458 42534 011252 FORM7 STA TEMP2
PRE0459 42535 010376
AND .+178
DEFINED
1t1460 42536 050376
CPA .+178
FUNCTION?
yES
0461
42537 026542
JMP *"'3
LOB OPTRQ,I
0462 42540 165464
NO, STACK
JMP FORH2_1
0463 42541 026446
PARAMETER ADDRESS

•
•

0464.
0465*
0466*
0467.
~468·

0469.

FOR FUNCTIONS RECURSION ON FORMX EVALUATES THE PARAMETER

AND, FOR PROGRAMMER DEFINED fUNCTIONS, THE VALUE.
FUNCTION VALUES ARE LEFT ON THE TEMPORARY STACK AND A
POINTER THERETO 15 PLACED ON THE OPERAND STACK.
'LEN' IS HANDLED IN A SPECIAL WAY.

0470*
0471.
~472**

EVALUATE PRE-OEFINED FUNCTION

0473*
0474
0475
0476
0477
0478
0479
0480
~481

0482
0483
0484
1tj485

42542
42543
42544
42545
42546
42547

021252
001727
001700
050374
026636
041000
4255~ 015366
42551 170056
42552 061336
42553 \71332
42554 ~15336

42555

~15314

XOR TEMP2
ALF,ALF
ALF
CPA .+158
JMP FOR12
ADA PDFBS
JSB PSHST
STA PBPTR,I
LOA FORMX
srA OPOST,!
JSB FCHMx
.JSB STTOP

•

**

•IDENTIFY
FUNCTION

,LEN q ?

YES
NO, STACK

JUMPlO
ENTRY POINT
SAVE FORMX
RETURN ADDRESS
EVA~UATE ARGUMENT
'BRANCH TO

PAGE 0137
0486

~11

FORMULA EVALUATIDN ROUTINES

42556 124A5b

.IMP PBPTR,I

, I

SUBROUTINE

PAGE

~138

#1J

FORMuLA [VALUATION ROUTINES

..
..

"'488.
",489 •• ~, V AL1I ATE Pq 0 GRAM MER - 0 EfIN ED fUN CTION ••
0490.
FORM8 LOA 1 , I
0491
LOAD ADDRESS OF FORMULA
42~57 1600~1
0492 42!S60 1(\15366
JSB PSHST
SAvE VALUE of
0493 42561 ~653J~
LOB TMPST
CURRENT poINTER TO
STB PBPTR,l
TE.MPORARY STACK
0494 42562 174056
JSB PSHST
0495
SAVE ADDRESS OF
42563 ~15366
42564 170056
rtJ 4 96
51A PBPTR,I
DEFINING FORMULA
0497 42565 061336
LDA FORMX
SAVE FORMX
0498

0499
0500
0501
0502
0503
~504

0505
0506
050 7

1t1508

0509
~f)10

0511
0512
0513
~514

0515
~516

0517
0518
0519
0520

0521
0522
0523
0524
0525
0526*

425 66
42567
42510
42571
4257~

171332
015336

161332
165464

175332

42573 171464
42574 ~51330
42575 015400
42576 061611
425 77 16 405 6
4260~ 075611
42601 170056
42602 015336
42603 165332
42604 060355
42 6 05 041332
42606 071332
42607 161332
4261~ t71464
42611 175332

42612 160056
42613 071611
42 614 06 005 6
42615 040355
42 616 07 0 056
42617 160056
42()2(~ 071330
42621 015374

OPOST,I
JSB FORMX
tDA OPuS",I
LOB OPTRQ,I
STB OPOST,1
STA OPTRQ,I
CPA TMPST
JSB RSCHK
LOA TEMPt
LOB PBPTR,I
5T8 TEMPt
STA

STA PBPTR,l
JSB FORMX
LDB OPDST,I
LOA .... 2
ADA OPOS1
STA OPDST
LOA OPOST,I
STA OPTRQ,I
STS OPDST,l
LDA PBPTR,1
srA TEMPI
LOA PBPTR
ADA .... 2
STA PBPTR
.LDA PBPTR,!
S1A TMPST
JaB STTOP

RETURN ADDRESS
EVALUATE ARGUMENT
SWAP
OLD AND NEW
ARGUMENT
ADDRESSES
PROT~CT PARAMETER
ON TEMPORARy STACK
SWAP ADDRESSES
OF CURRENT
AND FUNCTION
FORMULAS
EVALUATE FUNCTION
POP
OPERAND
STACK,
SAVING
RESULT ADDRESS
ANO ADDRESS OF

OLD PARAMETER

RESTORE
FORMULA POINtER
POP
OPERATOR
STACK
RESTORE ORIGINAL
TEMPORARy STACK POINTER
LOAD fUNCTION RESULT

0527 •• RECORD RESULT OF FUNCTION ••*
0528*
•
0529.
0530* PRl.DEFINEO FUNCTIONS RETURN TO THIS POINT wITH THEIR
0531*, RESULT IN CAl AND (8).
0532*
0533 42622 104400 FOR10 OST TMPST,I
SAVE RESUL.T
42623 101330
0534 42624 161332
LDA OPOST,I
RESTORE FORM X
0535 42625 071336
STA FORH}(
RETURN ADDRESS
0536 42626 061330
LOA TMPST
RECORD LOCATION
~537
42627 171332
STA OPDST,I
OF RESULT
0538 42630 "64056
LDB PBPTR
POP
0539 42631 044355
AOB .-2
FUNCTION
0540 42632 fi'74056
5T8 PBPTR
ADDRESS
0541 42633 035611
ISZ TEMPi
OF RESULT
0542 42634 035611
ISZ TEMPt
ON TOP OF'

PAGE 0139 1#11
~54J

FORMULA EVALUATION ROUTINES

42635 026447

0544*

•

OPERAND STACK

JMP FORM2

••

0b45.· f'VALlJATE 'LEN'
0546.
,,547 42636 fd1540'1 FOR12 * JSB
~548
LOA
42631 161611
0549 42640 010566
AND
0550
42641 040356
ADA
0f)Sl 42642 001000
Al.S
ADA
0552 42643 041513
INA
0553 42644 002004
05b4 42645 1600100
LOA
ADA
0555 42646 ~40356
0556 42647 160000
LOA
AND
0551 4265A 010500
OCT
0558 42651 105120
0559 42652 104400
OST
42653 101330

RSCHK
TEMPI,!
OPOMK

CREATE SPACE ON TEMPORARV STACK

FIND
STRING'S
SYMBOL.

.-1

syMTB
0;1

,-1
0,1

TABLE

ENTRY
LOAD ADDRESS
OF STRING
EXTRACT
STRING

L.ENGTH

8377

105120.

TMPST,I

io1560
42654 061330
LOA TMPST
0561
42655 111332
STA OPOST,I
JMP FOR12-J
0562 42656 026633
0563*
0564 •• PRoCESS STRING CONSTANT

STACK
STRING L.ENGTH
ADDRESS
OF RESULT

STACK

•

**

•

0565*
0566*
0567*

1d568*
0569*

0570*
ViS71*
0572*
0573*
0574*
0575*
0576*
0571.
0518.

WHEN STRING CONSTANTS ARE STACKED, AN APPROPRIATE
ENTRY 15 PLACED ON THE TEMPORARY STACK SO THAT ALL
STRING OPlRANDS HAVf THE SAM~ FORMa A NEGATED BASE
AODR~SS ON THF OPERAND STACK AND A TWO WORD ENTRY ON
THE TEMPORARy STACK CONTAINING THE START.Of.STRING
ANO ENO-OF-STRING DESIGNATORS BIASED BY .1 (DEfAULT
START-of-STRING DEsIGNATORS HAVE A STACK VALUE of I,
DEFAULT ENO.OF.STRING DESIGNATORS HAVE A STACK VALUE
OF -1). IN THE CASE OF SUBSCRIPTED STRING vARIABLES,
THE TEMPORARY IS CREATED. WHEN THE '1' IS SCANNED' TME
ENTRY fOR NQ.N-SUBSCR IpTED STRl NG o-pERANDS IS CREATED
WHEN THEY ARf SCANNED.

rd579*
0580
0581
~b82

0583

42657
42660
42661
42662

002404
051470
015340
026465

FOR13 CLA,INA
CpA EOl
JSB STSTR
JMP FORM3

PRINT STATEMENT
STRING CONSTANT?
NO, STACK STRING CONSTANT
EXECUTE END-Of-FORMULA

PAGE

~140

0585*
0586 ••

#11

RECO~O

FORMULA EVALUATION ROUTINES

RESUlT Of OPERATION

0587.
0588.

OPERATORS CRlATING

~589.

•
•

••

IN1ERM~DIAT~

~ESULTS

RETURN TO

HfR~.

0590.
STACK
05 9 1 4266j ~353J2 FURt4 ISl OPDST
lSZ OPDST
TEMPORARY
0b 9 2 42664 035332
0593 42665 104400
08T THPST,l
REsULT
~2666 101330
LOA TMPST
0594 42667 ~61330
SAVE
0595
42670 171332
STA OPOST,I
ADDRESS ON
JHP FORM4
OFERAND STACK
0596 42671 026500
0597.
0598 •• EXIT FORMULA EVALUATOR
0599*
0600*
THIS wORD IS ACTUALLY PART OF THE FORMULA OPERATOR JUMP
0601*

•

••
•

TASLl.

~602·

THE WORDS BETWEEN IT AND FOJT CORRESPOND TO

0603* opERATORS WHICH ARE NoT EXECUTEO, So
0604. TO UTILIZE THIS SPACE.
0605*
OEF FORMX,1
0606 42672 101336
0607.·
0608... SET LOGICAL VALUES •••

CoDE IS INSERTED HERE

••

06((19 ••

0610
0611
0612
0613
rtt614

0615
0616 ••

42673
42674
42675
42676
42671
42700

0617...

el0240~

FALSE CLA

006400
026663
061031
064361
02666 3

(LB

0622.*
0623**·
0626

427~5

0627

42706

0628
0629

427~7

0630
,,631
0632
~633

0634
0635
~b36

10637

0638
0639

TRUE

4271'"
42711
42712
42713
42714
42715
42716
42717
4272(.1
4,2721
42722

DA HALF
LDB .... 2
JMP FOR14

l

.*.*

JMP FOR14

FOJT

.JUMP T ABLt:.

'043265

OfF
ofF
DfF
DfF
OfF
OfF
OfF
DfF
DfF
OEF
DEF
OEF
OEF
DEF

~43255

OEf" EEQL

~42734

042402
042500
042701
042743
043017
043125
043131

043134
043137

C'J43142
043243
~43247

ZERO

LoAD
1.0

• ••

EUHIN JSB STrOp
JSB ARINV

fORMULA OPERATOR

0624 ••
0625
42704

LOAD

JMP FOR14

EXECUTE UNARV.

0618*.
0619
42701 015374
0620 42702 ~15370
0621
42703 026663

.*

ELBRC
FORMi
FORM~

EUMIN
ESCMA
f:STR

EFAO
EFSB
EFMP
FFDV

UNSTACK AND LOAD TOP OF STACK

NEGATE IT
STORE IT

.*.••••
[
(

UNARY +
UNARY •
SUBSCRIPT COMMA
ASSIGNMENT OPERATOR
+

•

•I

E.PWR

t

EGTRT

>

ELST

<
#

ENEQL

'.

PAGE
"'040
0041

0642
~643
~644
~o4b
~b46

0647
~648

~141

#11

FORMULA EVALUATION ROUTINES
NOP
OfF EAND
OfF EIOR
OEF EMIN
DEF EMAX
DEF ENEQL
OfF EGORE
OEF fLORE
DfF ENOT

42723 000000
42724 043312
42725 043J2~
42726 (il433~0
42727 ~4J271
427Jt1 04326b

42731 ~4J251
42732 043261
42733 0433,6

0649 ••
0650...

~XlCUTE

LEFT BRACKEr

UNUSED
AND
OR

MIN
MAX
<>
>-

e.
NOT

.*

•••

0651*·
••
0652*
0653* LOAD A DEFAULT SECOND SUBSCRIPT AND ENTER THE CODE FOR

0654*
0655*
0656
10657
0658
06b9
121660
0661

A SUBSCRIPT
42734
42735
42736
42137

061332
04035b
160000
007400

42740 002021
4 2 741 006400
42742 026753

0662
0663*.
0b64...

~671·
~672.

L!)682

0683
0684
0685
L1686
0687
0688
0689
0690
0691
~692

1d693
0694

-1

fOR A
STRING,

o

CLB

JMP fSCM1

FOR
AN ARRAY

*.
***

••

80TH SUBSCRIPTS ARE ROUNDED TO INTEGERS ANO TESTED TO BE
POSITIVE. FOR STRINGS, THE TWO INTEGERS ARE SAVED ON THE
TEMPORARY STACK AS A PSUEDO.ENTRV LATER USED BY PSTR. FOR
ARRAYS, THE SUBSCRIPTS ARE CHECKED AND IF WITHIN THE cURRENT
BOUNDS THEY ARE COMBINED WITH THE BASE ADDRESS Of THE ARRAY,
THE ARRAy ELEMlNT ADDRESS THEN RtplAC~S THE BASE AODRESS ON
THE OPERAND STACK, UNSUITABLE SUBSCRIPTS EXIT TO THE ERROR
ROUTINE.

0673*
0614*
0675*
0676 42743 015)76
0677 4 2 744 10 4 2 00
0678
0679
0680
0681

LOAD

fl8RC LOA OPDST
ADA .-2
LOA 0,1
eCB
SSA,RSS

ExECUTE SUBSCRIpT COMMA

~665*.

0666*
0667*
0668.
0669.
0670.

COM~A.

42745 100001
42746 015342
42747 115120
42750 060056
42751 040355
42752 070056
42753 075256
42754 015374
42755 015342
42 , 5 6 115120
42157 175330
4276~ t61332
.12761 002021
42762 026770
42763 061330
42764 002~~4
42765 ",65256
42 766

1740~0

ESCMA JSB OPCHK
OLD 1,1

UNSTACK
SECOND SUBSCRIPT

JSB SSFIX
ROUND TO INTEGER
JSe RERRS+17,1 UNSUITABLE RESULT
LOA PBPTR
UN8TACK
ADA .~2
THE
STA PBPTR
, l'
SAVE RESULT
ESCMt STB TEMP4
JSB STTOP
POP FIRST SUBSCRIpT
JSB SBfIX
ROUND TO INTEGER
JSB RERRS+17,I UNSUITABLE RESULT
STB TMPST,I
STORE IN TEMPORARY STACK
LDA OPOST,I
STRING
SSA,RSS
VARIABLE?
JMP ESCM2
NO, ARRAY VARIABLE
LOA TMPST
yES,
INA
SAVE
LOB TEMP4
SECOND SUBSCRIPT IN
STB 0,1
TEMPORARY STACK

pAGE 0142 #11
0095
~696

0691
~69a

0699
~700

0701
0702
0703
0704
0705
0706
0707
0708
0709
0710
0711
{tj712
0713
0714
0715
0716

42767
42170
42771
42172
42173
42774
42775
42776
42777
43000
43001
43002
43003
43004
43005
43006
430((t7
43010
43011

026402
~40355

fSCM~

104200

43013
43014
43015
43016

115120
075272
007004
045256
006021
115120
161330
1002~0

0rd1272

AOA TEMP4
ALS
ADA OPDST,I
STA OPOST,l
LOA TMPST
ADA •• 2
STA TMPST
JMP FORM1

041256
001000
141332
061330
040355
011330
026402

EXE.CUTE STORE

43017 065252
4302~

~060A2

0025
~k'26

43~j3

0019
0~20

0021
0022
~023

r1024

••
•••
••

ADD COLUMN DISPLACEMENT
DOUBLE FOR CORE WORDS
STORE ACTUAL
ELEMENT ADDRESS

POP UNUSED
TEMPORARY
STACK
ENTRY

IN ORDER TO AlLO~ MULTIPLE ASSIGNMENT STATEMENTS, NO
ASSIGNMlNT CAN TAKE PLACE UNTIL THE RIGHT-HAND FORMULA
IS ~VAlUATED' I.E. ONLY AN ENO-OF~FORMULA OPERATOR CAN
FORCE AN ASSIGNMENT OPlRATOR OfF OF THE STACK. ASSIGNMENTS
MAY tlE NUMERICAL TO NUMERICAL TYPE OPERAND, IN WHICH CASE
THE ASSIGNED QUANTITY IS SAVED FOR POSSIBLE ADDITIONAL
ASSIGNMENTS; OR STRING TO STRING OPERAND. IN THE LATTER
CASE AN INTERMEDIATE STRING IS NECESSARY IF THE HEAD OF
THE DESTINATION STRING LIES IN THE TAIL OF THE ACTUAL
SOURCE STRING.

027120
055254
027036
161332
071260
43~26 104200
43027 101254
43030 104400
43~31 10126'"
43032 £161332

0018

LOAD COLUMN
AND ROW ROUNDS

(MA,INA
IS SPECIFIED
AUA THPST,l
ROW
SSA,RSS
LEGAL?
JSB RERRS+17,I NO
STB TEMP5
YES
CMB,tNB
IS SPECIfIED
ADB TEMP4
COLUMN
SSB,RSS
LEGAL?
JSB RERRS+17,I NO
LOA TMPST,l
YES, COMPUTE ROW
~pY TEMP5
DISPLACEMENT

~015*

0016
0017

JMP FORMI
ADA .-2
OLD A,I

10~0~0

003004
141330
002021

43012 171332

0001**
0002**.
0003**
"004*
liHJ05*
0006*
0007*
0008.
0009·
0010*
0011*
0012*
0013*
0014*

FORMULA fVALUATION ROUTINES

43021
43022
43023
43024
43025

QJ40355

0027

43034 071332

0~28
~029

43P1Jb 0265P10

0030

4312137

43036 161332
~0~020

ESTR

LOB TEMP2

SZB
.JMP ESTR5

CPS
JMP
ESTRt LDA
STA
DLD

!

TEMP3
ESTR2
OPOST,I
TEMP6
TEMP3,I

NEXT OPERATOR AN
ENO",OF .. FOHMUlA?
NO
yES, fIRST STORE OF FORMULA!
YES
NO, SET
DESTINATION ADDRESS
TRANSFER

DST TE.MP6,I

THE NUMBER

LOA OPDST
ADA .: .. 2
STA OPDST
JMP FORM4
LDA OPOST,I
SSA

UNSTACK
DESTINAlION
CPERAND
STRING
OPERANDS?

PAGE 0143 #12
0031

0032
0033

161634
0~35

0036
"037
0~38

0039

0040
0041
0042
0043

0044
0045
0046

0047
1d048

0049

0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
~060

0eJ61

0062
0063
0064
0065

0066
0061
0068

0ft169
007121
0071

0072
0073
13074

0075
0076
0077
0078
00 7 9
0080
1(1081

FORMULA EVALUATION ROUTINES

43040 "'27044
43~41 A15376
43042 075254
43043 021024
43044 060355
43t'145 015344
43~46 ",,71256
43047 075410
4305'" ~03400
43051 015344
43052 06 4 056
43053 075436

43054 061256
43055 003000
43~56 04 1272
43057 0B2a20
43060 027113
43061 041410
43062 040361
43063 002021
43064 021113
43065 c;,61272
43066 071440
4 3 067 006004

43~70

005000

43071
43012
43073
4307 4
43075
43",76
43071
43100
43101
43102
43103

",75272
061406

071442
003004

ARS
.}S8 CUSP

~01100

015326

070056
060664

015350
061442
0714~6

43104 071410

061436
002004
001000
071256
061440
43112 071272
43113 060664
43114 015350
43105
43106
43107
43110
43111

43115 061436
4311 6 07 005 6

43117 026515
4312~

ESTR3
,J8B OPCHK
5T8 TEMP3
JMP ESTRI
fSTR3 LDA •• 2
JSB PSTR
STA TEMP4
ST8 TPRMf
CCA
JSB PSTR
LDB PBPTR
5TB EST1
LOA TEMP4
eMA
ADA TEMP5
SSA
JHP ESTR4
ADA TPRME
ADA .+2
SSA,RSS
JMP ESTR4
LOA TEMP5
STA EST2
INS
Bls
5T8 TEMP5
LOA TNUlL
STA EST3
CMA,INA
.JMP

034056

43121 (1)34056
43122 063125

0082 43123 170056
0083 43124 0265~6
0084.
0085 43125 0~7402
0086··

STA
LOA
JSB
LOA

PBPTR
FSCHA
THSTR
ESTJ
srA TNULl
STA TPRME
l.OA EST!
INA
ALS
STA TEMP4
LOA EST2
STA TEMP5
ESTR4 LDA FSCHA
JSB TRSTR
LDA EST1
STA PBPTR
JMP FORM5
fSTR5 ISZ PS-PTR
ISZ PBPTR
LOA BASSO
STA PBPTR,l
JMP FORM4+6
BASSO OCT 7402

**

yES

NO, UNSTAC~ SOURCE
AND SAVE VALUE ADDRESS
PREPARE

SOURCE

STRING

PREPARE
DESTINATION STRING
SAVE CORE
POINTER
TRANSFER

TO
HIGHER

CORE?
NO
YES,
OVERLAPPING
TR4NSFER1
NO
YES, SAVE
DESTINATION ADDRESS
SET DESTINATION
ADDRESS TO START
Of' FREE CORE
SAVE TRANSFER
LENGTH
ALLOCATE
SPACE FOR
INTERMEDIATE
STRING
TRANSfER STRING TO FREE CORE
RESTORE TRANSFER
LENGTH
RESET ACTUAL SOURCE LENGTH
SET SOURCE
ADDRESS TO
INTERMEDIATE

STRING
RESTORE ORIGINAL.
DESTINATION STRING
COMPLETE TRANSFER
RESTORE FREE
CORE POINTER
lXECUTE END.OF.FORMUlA
OEFER
EXECUTION

PAGE 0144 #12

FORMULA EVALUATION

0087... EXECUTE +
0088*·
~~89
43126 015J72
~~90
43127 ~1S402
0091
431J~ ~2666J
0092*·
0093*.. EXlCUTE0094*.
009S 43131 015372
0096 43132 015404
0091 43133 ~26663
0098 ••
0099*.. EXEcUTE.
0100*.
0101 43134 ~15372
0102 43135 0154~6
0103 43136 026663
0104.·
0105*.* EXlCUTE I
0106 ••
0107 4 3 137 015372
0108 43140 015410
0109 43141 026663
0110*.
0111*.. EXECUTE f
0112.*
0113.

0114*.

REAL POWER

•••
••
E-f-AD

~OUTINES

JSB RINOP
JSB .FAD
JMP FOR14

••

***
.*

BINOP
JSB .FSB
JMP F OR14

,JSB

EFSB

••

• ••

••

JSB BINOP
JSB .FMP
JMP FOR14

EFMP

••
•••
**

.JS8 BINOP
JSB .FDV
JMP fOR14

EFDV

*.
*.*
.*

•
•

**

0115*
0116*
0117* EXIT TO ERROR IF RASE IS NEGATIVE. E.l.SE COMPUTE
0118* RESULT AS EtCPOWER.LNCBASE)),
0119.
1£1120 43142 165332 EPwR LOB OPDST,I
LOAD
POWER
OLD 1,1
0121 43143 104200
43144 100001
JSB IFIX
1NTEGE.R?
0122 43145 015414
0123 43146 027151
JMP
NO
SOS
43147 11212301
yES, 16 .. 81T1
~124
0125 43150 027164
JMP IPWR
YES
JSB BINOP
NO, UNSTACK
~126
43151 015372
0127 43152 002001
RSS
ARGUMENTS
JSB PCHK
CHECK ARGUMENTS
0128 43153 015354
0129 43154 LJl02020
SSA
NEGATIVE 8ASE?
JSB RERRS+30,1 YES
0130 ·43155 115135
LOB BINOI
NO, LOAD BASE ADDRESS
43156 065640
~131
43157
015434
0132
JSB .LOG
TAKE NATUAL LOG
Vl133 43160 015406
JSB ,FMP
MULTIPLY
0134 d3161 101641
BY POWER
DEF BIN02,I
01 35 43162 01543 2
JSB ,EX?
EXPONENTIATE
JMP FOR14
0136 43163 026663
0137.

..

~lJ8.*

0139*
0140*
0141*

••....

PAGE 0145 #12

FORMULA EVALUATION ROUTINES

0142* TO SPEED PROCESS.
0143* FOR ~INAL RESULT.
·0144*
0145 43164 ,,75264 IPWR
0146

43165

0147
0148

43166 007004

0149

015e

43167
43170
43171
43172
43173
43174
43175
43176
43177

00602~

015372
002001

RSS

0168
0169
l£1170
0171
~172

43217

~64361

k117J
0174
0175

43220
43221
43222
43223
43224
43225
43226
43227

015410

0153
0154
0155
0156
rl'157
0158

0159
0160
0161
0162
0163
0164
0165
0166
0167

0176
0177
0178
~179

0180

0181

0182
0183
0184
0185
01 8 6

0187
0188
0189
0190
13191

001614
026663
075266
061640
065641
015406
001614

071614
43231 075615
43232 ~65266
43233 027206
4 3 2 3 4 06164 0
43235 065641
43236 0154e16
43237 001640
43240 071640
43241 "'756 4 1
43242 027202
4323~

STB TTl
SSB
CMB,INB
STB TT2
JSB BINOP

~75266

015354
065640
071640
075641
061031
071614
43200 060361
43201 ~716t5
43202 065266
43203 004031
43204 027223
43205 075266
43206 006e102
43207 027234
43210 061264
43211 002020
43212 027216
43213 061614
43214 065615
43215 026663
43216 ~610Jl

0151
0152

IF POWER IS NEGATIVE., TAKE RECIPROCAL

.1SB PCHK
LOB BINOI
ST. BINot

SAVE SIGN
FORM ABSOLUTE.
VALUE OF POWER
SAVE IT

UNSTACK
ARGUMENTS
CHECK ARGUMENTS
STORE

BAsE

STB BIN02

LOA HALF

INITIALIZE

STA TT3

RESULT
TO
t .0

LO. .+2

STA 1T4
IPWRt LOB TT2
SlB,BRS
JMP IPWR4
STB TT2
IP wR2 SZB

JMP
LDA
55A
JMP
LDA

IPWR5

TTl

IPWR3
TT3

LDB TT4

JMP FOR14
LOA
IPwR3
HALF
LDB .+2
JSB .FDV

DIVIDE POWER
BY 2
ODD POWER
EVEN POWER
ZERO?
NO

YES

POSITIVE POwER?
NO

YES, RETURN
WITH

RESULT

TAKE
REC'IPROCAL
FOR

FINAL

OEF TT3
JMP FOR14
IPWR4 STS TT2
LOA BINOl
LOB BI N0 2

JSB .FMP
OfF TT3

STA TT3

STB TT4
LOB
JMP
IPWR5 LOA
LOB
JSB
OEF
STA
STB
JHP

TT2
IPWR2
BINOI
BIN02

RESULT
SAVE POWER
LOAD

BASE

MULTIPLY BY
RESULT SO FAR
SAVE NEW
PARTIAL
RESULT

SQUARE

.FMP
BINOl

BASE

BINOi
BIN02

RECORD
NEW

IPWRl

BASE

pAGE

~146

#12

FORMULA EVALUATION RoUTINES

0193**

0194...

EX~CUTE

>

*.

•••
••
EGTRT

0195.*
0196 43243 015352
0197 43244 002020
0198 43245 A26673
0199 43246 027266
0200 ••
0201**. EXECUTE <
0202 ••
0203 43247 015352 ElST
0204 4325~ 0030~1
0205 ••
0206.** EXECUTE >c

••

JSB COMPR
SSA
JMP FALSE
JMP ENEQL+l

COMPARE OPERANDS

.158 COMPR
CMA,RSS

COMPARE OPERANDS
REVERSE COMPARISON SENSE

c ?

YES
NO

•••

*.

.*

0207 ••
0208 43251 015352
0209 43252 002020
0210

0211

43253 026673
43254 026616

0212 ••

0213...

EXECUTE.

0214 ••
0215 43255
0216 43256
0217 43257
0218 43260
0219.*

0220*..
0221*·

EXECUTE <.

0222 43261
0223 43262
0224 43263
0225 43264
0226**

0227...

015352
002002
026613
026676

015352
002020
026676
027256

EXECUTE

#

•••
*.

EGQRE JSB COMPR
55A
.]MP FALSE

••
•••
••
EEQL

NO

JSB COMPR

COMPARE OPERANDS

SZA

• ?

*.

ElORE JSB COMPR
SSA

JMP TRUE
JMP EEQL"'l

*.••

JSB COMPR

0239

43274 027304

0240

43275 1 04 2 00

COMPARE OPERANDS

>NO

?

YES

JHP TRUE
JHP FALSE

COMPARE OPERANDS
?
NO
YES

JSB BINOP

SUBTRACT THE

SSA,RSS
JMP ARGI
OLD BIN02,I

TOP OPERAND LARGER?

SZA

.---.

43272 015404
43273 002021

NO
YES

•• *

OR <>

0228**
0229 43265 015352 ENEQL
0230 43266 002002
0231
43267 026676
0232 43270 026673
0233.*
0234.*. EXECUTE 'MAX'
0235.*
0236 43271 015372 EMAX

0237
023a

YES

.IMP TRUE

JMP FALSE
JMP TRUE

••
•••

COMPARE OPERANDS
c 1

••

JaB .Fsa

43276 101641
43277 026663

JMP FOR14
0241
0242·*
••
0243... ExECUTE 'MIN'
* ••
0244 ••
0245 43300 015372 EMIN .1SB BINOP
0246 43301 015404
JSB ,FsB
SSA,RSS
0247 43302 002021

••

II

ToP TWo opERANDS

NO

YES, RETRIEVE

ITS VALUE

SUBTRACT THE
TOP TWO OPERANDS
iTOP~OPERAND: LARGER!

PAGE 0147 #12
0248
0249

025rtJ
0251

0252
~253

43303
43304
43305
43306
43307
43310
43311

FORMULA EVALUATION ROUTINES

02727 5
035332
035332

ARG1

165332

104200
\00001
026665

0254.*

JMP
ISl
ISZ
LOB
OLD

ARG2
OPDST
OPDST
OPOST,I
1,1

.IMP

fO~14+2

EXECUTE 'AND' •••
0256.*
**
1tJ257 43312 015372 EAND JSB BINOP
0258 43313 002001
RSS
SZA,RSS
0259 413314 002003
JMP FALSE
0260 43315 026673
LOA BIN02,1
0261
43316 161641
0262 43317 027266
JMP ENEQL+l
0263.*
**
0264*.* EXECUTE tORt * ••
0265**
**
0266 43320 015372 flOR .JSB BINOP
0267 43321 002001
RSS

",277.*
0278.**

EXECUTE 'NOT'

0287
~288

~289

0290
0291

0292
0293
0294
0295
0296

0297
0298
~299

OPERAND

ENOT

UNSTACK
OPERANDS
TOP OPERAND ZERO?
YES

NO, CHECK
NEXT-TO·TOP OPERAND

UNSTACK

OPER.NDS

TOP OPERAND
YES

NO, CHECK

NON~ZERO?

NEXT~TO~TOP

••

OPERAND

••
JSB STTOP
JMP EEQL+l

.*.

LOAD TOP OPERAND
GO TO CHECK

**
**

INSURES THAT AtS HAS ACCEPTABLE ARGUMENTS. A-Bille IS A NON.
RECOvERABLE ERROR. A'0 AND 8c0 PRINTS-A WARNING MEssAGE AND
RETURNS THE MAXIMUM POSITIVE NUMBER AS THE RESULT.

VJ284*
0285 43330 0756 40
~286

VALUE OF
NEXT.TO.TOP

•••

INSURE VALID POwERING

0279.*
0281*
0282*
0283*

.}MP TRUE
LOA BIN02,I
JMP ENEQL+l

43325 027266

0274..
0275 43326 ~15374
0276 43327 ~27256

0280*

SZA

43322 002002
43323 026616
43324 16!6 4 1

0272*·
0273...

RETRIEVE

**

~255**.

0268
0269
0270
0271

NO
YES,

43331
43332
43333
43334
43335
43336
43337
43340
43341
43342
43343
43344
43345
43346

165641
002002

027344
006~H.1I3

115134
006021
026673

115203
060273
064355
026663

006003
026676
125354

#PCHI< STB BINOl
LOAD HIGH PART
LOB BIN02,I
OF POWER
SZA
BASE ZERO?
JMP PCHKl
NO
Sl8,RSS
YES, POWER ZERO?
JSB RERRS+29,1 YES
SSB,RSS
NO, pOwER pOSITIvE?
JMP FALSE
YES
JSB WERRS+2,I NO
LOA INF
USE POSITIVE

LOB .-2

JHP FOR14
PCHKl 5IB,RSS
JMP TRUE
JMp pCHK, I

INFINITY

FOR RESULT
POWER ZERO?
YES, TAKE RESULT AS 1.0
NO:

PAGE A148 #12
0301**
0302***

FORMULA EVALUATION ROU1INES

COMPARE TOP opERANDS OF STACK

~303.*

0304.
0305.
~306.

ON fXIT CA) IS NEGATIVE IF THE TOP OPERAND Of THE
STACK IS GREATlR THAN T~E NEXT-TO-TOP OPERANO,
POSITIVE IF IT IS LfSS, AND lfRO IF THEy ARE EQUAL.

0307.
0308.
0309 43347 161332
0310 43350 002020
43351 021355
0311
43352 015372
~312
0313 43353 015404
0314 43354 125352
0315 43355 PJ60355
0316 43356 015344
0317 43357 ~71256
0318 4336~ 07541121
0319 43361 061406

0320
f'321
f'322
111323
0324
0325

V3326
0327

0328
1d329

0330
0331
0332

43362 071432
43363 060355
43364 015344
43365 075344
43366 035330
43367 035330
43370
43311
43372
43373
43314

035432

027374
006400
027377
015364

43375 060417
43376 064000

0340
0341
0342

43377 035406
43400 027410
43401 0024P.t0
43402 007004
43403 0400A1
43404 002003
43405 006003
43406 125352
43407 027370
4341~ 061344

0343
0344

43411 002006
43412 027415

0345
0346
0347
0348
0349
0350
0351

43413
43414
43415
43416

0333
0334
0335
0336

0337
0 33 8
0339

0352
0353
0354

0355

••
•••
••

060417

027402
071344
061272

43417 000065
43420 160000
43421 002041
43422 001727
43423 01(;1500
43424 ~35272
43425 ~274o.t2

#CMPR LOA OPDST,1
5SA
.}MP COMP1
JSB BINOP
JSB .FSB
.IMP COMPR,I
COMPt LOA .-2
JSB PSTR
STA TEMP4
ST8 TPRME
LOA TNUL.L
STA CP0
LOA .-2
.JSB PSTH
STB CPt
ISZ TMPST
ISZ THPST
COMP2 ISZ CP0
JMP COMPJ

CLB

JMP COMP4
COMP3 .1S8 FSCH
LDA .+408

LDB
COMP4 ISZ TNULL

"

.JMP COMP6
(LA
COMPS CMB,INS
ADA 1
SZA,RSS
SZB,RSS
JMP COMPR,I
JMP COMP2
COMP6 LDA CP1
INA,SZA
JMP COMP1
l.OA .... 40B
JHP COMPS
COMP7 srA CPt
LOA TEMPS

STRING
ARGUMENTS?
YES
NO, COMPARE
NUMERICAL
OPERANDS
PREPARE
COMPARISON
STRING
SAVE SPECIFIED
LENGTH
PREPARE
TEST STRING
SAVE ACTUAL LENGTH
RESERVE SPACE
FOR RESULT
MORE SPECIFIED STRING?

vEs

NO, LOAD A
NULL CHARACTER
LOAD NEXT
CO~PARISON

CHARACTER
MORE SPECIFIED TEST STRING?

YES
NO, LOAD NULL CHARACtER
COMPARE
CHARACTERS
EXIT ON NOT EQUAL
OR 80TH NULL
CHARACTERS

MORE ACTUAL

TEST STRING?

YES

NO, LOAD A BLANK
E)(TRACT

CLE~ERA

LDA 0,1
SEZ,RSS
AlF,ALF
AND 8377
ISl TEMP5
JMP CQMPS

NEXT

TEST
CHARACTER

PAGE 0149 #12

FORMULA EVALUATION ROUTINES

*.*.

0357 ••
0358.*. PREPARE STRING OPERAND
0359**
*.
0360*
0361* THE STRING ADDRESS ON TOP OF THE OPERAND STACK IS COMBINED
0362* WITH THE SUBSCRIPTS IN A PSUEDO.ENTRY ON THE TEMPORARY STACK
CA) • • 2 UPON ENTRY FOR A SOURCE
0363. TO FORM A STRING OPERAND.
0364. STRING, CA) • ·1 FOR A DESTINATION STRING. THE ADDRESS OF
0365. THE FIRST CHARACTER OF THE STRING OPERAND IS LEFT IN TEMPel
0366. FOR SOURCE STRINGS (A) • TEMP5 UPON EXIT. THE REQUESTED
0367* STRING LENGTH (IN CHARACTERS) IS LEFT IN TNULL, FOR SOURCE
03 68* STRINGS THE ACTUAL STRING lENGTH -(WHICH MAY 8E LESS THAN THE
0369* REQUf:.STED LENGTH) Is IN (8) UPON ExIT. THE FOL.LOwING
0370. CONDITIONS EXIT TO ERROR: NEGATIVE SlRING LENGTH, REQUESTED
0371* DESTINATION STRING WOULD EXCEED PHYSICAL STRING BOUNDARY, OR
0372* REfJUESTED DESTINATION STRING WOULD PRODUCE A STRING QUANTITY
THE LOGICAL LENGTH OF A
0373. wITH TwO uNCONNECTED PARTS.
0374* DESTINATION STRING IS ADJUSTED AS NEEDED.
0375*
0376
43426 071466 #PSTR STA PS0
SAVE MoDE FLAG
0377 43427 015376
JSe OPCHK
UN.TACK OPERAND
0378 43430 075462
STB pst
SET fLAG POSITIVE
BLS
SAVE ADDRESS OF FIRST
0379 43431 005000
5T8 TEMP5
CHARACTER Of STRING
0380 43432 075272
BRS
SAVE
0381 43433 0051021
ADB .... 1
POINTER TO
0382 43434 044356
03 83 43435 07 5 260
STe TEMP6
STRING LENGTH
43436 065330
LOB TMPST
0384
LOAD
ADB ,+2
START.Of.STRING
0385 43437 044361
3
t
,
I
0
DESIGNATOR
1621001
LOA
0386
4 44
0387 43441 ~7140~
STA MPT
SAVE IT
ADA TEMP5
0388
43442 VJ41272
RECORD CHARACTER ADDRESS
STA TEMP5
OF START.OF.STRING
0389 4344.1 '171272
0390
43444 A71572
SBpTR
SAvE ADDREsS
STA
INS
LOAD
43445 006004
0391
LOA t,l
END-Of-STRING DESIGNATOR
43446 16~H~01
tJ392
INA,SlA
~393
43447 002006
SPECIFIED?
0 3 94 43450 027463
JMP PSTR2
YES
CCA
NO
0395 43451 003400
CPA PS"
tSOuRCE' MODE?
0396 43452 051466
JMP
NO
0397 43453 027457
PSTRt
LOA TEMP6,I
yES, LOAD STRING.S
0398 43454 161260
0399 43455 010500
AND 8377
LOGICAL LENGTH
JMP PSTR2
1tl400 43456 027463
SET FLAG TO -1
0401 43457 071462 PSTRt STA PSt
LOA TPRME
COMPUTE
0402 43460 061410
0403 . 43461 003000
eMA
ENO·OF-STRING
0404 43462 041400
ADA MPT
DESIGNATOR
0405 43463 071376 PSTR2 STA NQT
SAvE IT
eMA
0406 43464 003000
IS LENGTH
0407 43465 Ql41400
ADA MPT
OF SPECIFIED STRING
SSA,RSS
43466 002021
NEGATIVE?
~408
0409 43467 115121
.JSB RERRS+ 18,1 yES
13410 43470 PJ714~6
STA TNUlL
ADA ,73
>721
1tl411 43471 042005
58A
0412 43472 002020

PAGE
0413
0414
0415
0416
0417
0418
0419
0420
0421
0422
0423
0424
0425
0426
0421
0428
0429
0430
0431
0432
0433
0434

0435
0436
""437
0438
0439
0440
0441
0442
0443
~444

0445
0446

0447
0448
0449
0450
0451
0452
0453
0454
~455

0456

~150

43413
43474
43475
43476
43477

FORMULA [VALUATION ROUTINES

t15123
161260
010500
00300~

035466
002004
43501 041400
43502 002021
43503 027522
4350~

~3504

161260

43505 035466
43506 001727
43507 010500
43510 003000
43511 041376
43512 006404
43513 055466
43514 ~27527
43515 0654A6
43516 ~02004
43517 002021
43520 Qt44000
43521 027525
43522 035466
43523 115122
43524 ~07400
43525 061272
43526 125344
4~i527 002021
43530 115123
43531 035462
43532 027540
43533 161260
43534 010316
43535 ~31376
43536 171260
43537 125344
4354" 161260
43541 010500
4 3 542 00300~
43543 041376
43544 002021
43545 027533
43546 125344

0457.*
0458***
~459**

#12

PSTR3
PSTR4
PSTR5

PSTR6

PSTR7

JSB RERRS+20,I
LOA TEMP6,1
DOES
AND 8311
START.OF~STRING
eMA
CHARACTER
ISZ PS0
RELATE TO
INA
PREVIOUS
ADA MPT
VALUE
SSA,RSS
OF STRING.,
JHP PSTR3
NO
LOA TEMP6,I
YES, EXTRACT
ISZ PS0
END-OFALF,ALF
PERMITTED.STRING
ANO-S377
DESIGNATOR
eMA
COMPUTE DIFfERENCE FROM
ADA NQT
END OF SPECIFIED STRING ~1
CLB,INS
'SOURCE'
CpB pse
MODE?
JMP PSTR5
NO
LOB TNULL
YES, SPECIFIED SOURCE STRING
INA
CONTAINED WITHIN
SSA,RSS
DEFINED SOURCE STRING?
ADB 0
NO, CORRECT LENGTH
JMP PSTR4
OF ACTUAL SOURCE STRING
ISZ PS0
'SOURCE' MODE?
JSB RERRS+19,I NO
eeB
yES, SET ACTUAL LENGTH TO e
LOA TEMP5
LOAD START.OF.STRING
JMP PSTR,I
CHARACTER ADDRESS
SSA,RSS
PHYSICAL STORAGE OVERFLOW?
JSB RERRS+20,I YES
ISZ PS1
ENO~OF.STRING SPECIFIED?
JMp PSTR7
yES
LOA TEMP6,I
NO,
AND M256
RESET
lOR NQT
LOGICAL LENGTH
STA TEMP6,I
OF STRING
JHP PSTR,I
LOA TEMP6,I
IS NEW
AND 8377
DESTINATION
eMA
S1RING
ADA NQT
LONGER
SSA,RSS
THAN OLD?
JMP PSTR6
YES
JMP PSTR,!
NO

STACK STRING CONSTANT

**
***
**

0460*
0461* SEE NOTE AT FORt3 OF ROUTINE FORMX
0462*
0463 43547 17.135332 #STST rsz OPDST
STACk
0464 43550 035332
ISl OPOST
NEGA'TIVE
0465 43551 ~61611
LDA TEMPt
OF
0466 43552 003~00
eMA
SlRI'NG
0467 43553 171332
srA OPDST, I.
ADDRESS
0468 43554 1616"11
LDA TEMPt" Ii
COMPUTE

PAGE 0151 *12
0469
0470
0471
0472
0 4 73
0474
0475
0476
0477
0478

0479

43555
4 3 556
43557
43560
43 561
43562
43563
43564
43565
43566
43567
43570

FORMULA FVALUATION ROUTINES

010500

007400
0440A0
040362
001100
041611

071611
015400
002400
104490
101330
125340

AND 8377

ST~ING

eea

LENGTH
.1

ADB 0

ADA
ARS
ADA
STA
JSB
CLA
OST

.+3

UPDATE

TEMP1
TEMPt
RSCHK

INTRA-STATEMENT
POINTER
pAST STRING
CREATE TEMPORARY

RECORD

TMPST,I

(0,(8) )

JMP STSTR,I

••
0481... FErCH SOURCE CHARACTER •••
0482.·
*.
0483*
0484. CHARACTER ADDRESS IN TEM P4, SOURCE CHARACTER COUNT
0485* IN TPRME (IN l'S COMPLEMENT), EXIT TO (P+l) ON NO
0486. MORE CHARACTERS (TPRME • .1) ELsE ExIT TO (p+2) wITH
0487. NEXT CHARACTER IN (A),
0488.
MORE
0489 43571 06141 0 MFSCH LOA TPRME
INA,SZA,RSS
CHARACTERS?
0 49 0 43572 00200 7
JMP FSCH,1
NO
0491 43513 125364
STA TPRME
YES, UPDATE CHARACTER COUNT
0492 43574 0714t0
LDA TEMP4
LOAD CHARACTER
0493 43575 061256
0494 43576 00006 5
CLE,ERA
ADDRESS
0495 43577 160000
LOA 0,1
ExTRACT
0496 43600 002041
SEZ,RSS
NEXT
ALF,ALF
CHARACTER
0497 43601 001727
0498 43602 010500
AND 8317
0499 43603 035256
ISZ TEMP4
UPDATE CHARACTER ADDRESS
ISZ FSCH
0500
43604 035364
JHp FSCH,l
0501 43605 125364
048~.·

0502 ••

0503...

FETCH SOURCE CHARACTER (UPPER CASE)

0504 ••
0505.

°5 0 6*
0507.
0508.
0509
0510
0511
0512
0013
0514
0515
0516
0517
0518
0519
~520

0521
~522

0523

*.

***
**

SAME AS FSCH, EXCEPT LOWER CASE CHARACTERS ARE CONVERTED TO
UppER CASE, USED By CHAIN AND AssIGN STATEMENTs.
43606
43607
43610
43611
43612
43613
4361.1
43615
4 3 616
43617
43620
43621
43622

061410
002007
125560
071410
061256
000065
160000
002041

001727

LOA TPRME
INA,SlA,RSS

JMP FeuC,I
srA TPRME
LOA TEMP"
CLE,ERA
LOA A,I
SEZ,RSS
ALF,ALf

MORE
CHARACTERS?
NO
YES, UPDATE CHARACTER COUNT
LOAD CHARACTER
ADDRESS
EXTRACT
NEXT
CHARACTER

AND B377

010500
04 0 317
002021

SSA,RSS

LOwER CASE

04121450

.ADA fl.i32

NO'

ADA .140
I SZ TEMP4;

UPDATE CHARACTER ADDRESS

43623 040470
43624 "'35256

ADA M96

YES

PAGE 0152 #t2
0524

FORMULA EVALUATION

43625 035560

ROUTI~ES

ISZ Feuc

JHP FCUC,I
0525 43626 125560
ta526.*
*.
0527.** FETCH INPUT CHARACTER * ••
0528.*
.*

0529.
0530*
0531*

°532'"
0533",

EXITS NORMALLY TO (P+2) WITH NEXT INPUT CHARACTER IN (A),
IF T~E CHARACT£R IS A M OR THE INPUT RECORD IS EMPTY,
EXIT TO TRSTR,I (TH~ ONLY CALLER WHO CAN ENCOUNTER THIS
CONDITION).

0534.
0535

0536
0537

0538
0539
0540
0541

43621
43630
43631
43 6 3 2
43633
43634
43635

~J5274

015446
125350
060001
050421
125350

125214

#FINC lSI FINCH
JSB GETeR
JMp TRSTR,I

tDA B
CPA .+428

.JMP TRSTR,I
JMP FINCH,I

FETCH NEXT CHARACTER
NONE IN BUfFER
ALLOW LOWER CASE
" ?

yES, TERMINAL EXIT
NO

PAGE

~153

#12

FORMULA EVALUATION ROUTINES

..*.

...
0543 ••
0544*.* FETCH lNTER CHARACTER
0545**
*.
0546*
0f>47. SAME AS FINCH EXCEPT IT DOES NOT CHECH FOR A QUOTE
1d548*

0549
0550
0551
0552

0553

43636 035522
43637 015446
43640 125350
43641 060001
43642 125522

0554.",
0555.**

*fENC ISZ
JSB
JMP
LOA
JMP

FETCH TOP OF STACK

0556**

FENCH
GE.TCR
TRSTR,l
B
FENCH,I

fETCH NEXT CHARACTER
NONE IN BUFFER
ALLOW LOWER CASE
CHARACTER FOUND

**.
**

0557*

EXIT wITH TOP OPERAND IN (A) AND (8) AFTER UNSTACKING
IT. CREATE EMPTY SPACE ON TEMPORARY STACK FOR FUTURE
INTERMEDIATE RESULT.

~558.

"559·
0560*
1i1561.

0562
0563
0564
0565
0566**

43643 015376
43644 015400

43645

t0420~

43646 100001
43647 125374

0567***
0568**

#STTP JSB OPCHK
JSB RSCHK
OLD t,l

UNSTACK OPERAND
CREATE SPACE FOR TEMPORARY
LOAD TOP OPERAND

JMP STTOP,I

EXECUTE A BINARY OPERATOR

~569.

0~70*

0572.

0573*
0574.

0575*
0576*
0578
0579
0580
~581

0582
~583

AND (8),
43650
43651
43652
43653

161372

071640
035372
015376

43654 075641
43655 015374
43656 025640

.SNOP LOA 8INOP,1

ST. SINOI
ISZ BINOP
JSB
STB
JSB
JMp

OPCHK
BIN02
STTOP
BINOt

0584.·
~585*..

0586**
0587.
0588*
0589*
059"*
0591*
~592.

••

ON ENTRY (P+I' cONTAINS A SUBROUTINE CALL FOR A BINARY
OpERATION. THE TOp TWO OpERANDS ON THE STACK ARE
UNSTACKED AND V~RIFIEO AS NOT BEING 'UNDEFINED.'
THE
APPROPRIATE SUBROUTINE IS CALLED WITH THE TOP ARGUMENT'S
ADDRESS IN BI N0 2 AND THE NEXT~TO-TOP ARGUMENT.S VALUE IN
(A) ANO (8). EXIT IS TO (P.2) WITH THE RESULT IN CA)

0571*

0~77

.*

*.*

VERIfY LEGITIMACY OF OPERAND

SAVE
SUBROUTINE
CALL
SAVE ADDRESS OF
TOP OPERAND
fETCH NEXT OPERAND
EXECUTE SUBROUTINE

.**

**

.*

THE VALUE REFERENCED By THE TOP OF THE OPERAND STACK
IS CHECKED. EXIT TO ERROR IF VALUE IS 'UNDEFINED.'
ELSE REMOVE OPERAND ADDRESS FROM STACK AND REMOVE VALUE
FROM TOP OF TEMPORARY STACK, IF IT IS THERE. EXIT
WITH OPERAND ADDRESS IN (8),

0593*
0594 43657 165332
~595
43660 006020
0596 43661 027704
0597 4366~ 160001

NOPCK LOB OPOST,l
SSB

JMP OPCH3.,1
LOA 1,1

!l"RING
OPERAND?

y£s:
NO,· .;H"lGH;·PART OF

PAGE 0154 #t2

FORMULA EVALUATION ROUTINES

43663 001222
RAL,RAL
IS
INA
OPERAND
43664 002004
RAR,SLA
0600
4366!5 0013t0
NORMALIzED?
0601 43666 027676
JMP OPCHI
YES
0602 . 43667 051027
CPA 81T15
WAS FIRST WORD ZERO
0603 43670 "'06005
INB,RSS
YES
0604 43671 115126
JSB RERRS+23,I NO·~ERROR
LOA 1,1
SECOND
0606 43672 160001
0606 43673 002002
SlA
WORD ZERO?
JSB RERRS+23,I NO •• ERROR
0607 43674 115126
0608 43675 044356
ADS ,-1
YES-~RE8TORE OPERAND ADDRESS
0609 43676 055330 OPCHt cpa TMPST
TEMPORARY?
JMP OPCH3
YES
0610 43677 027705
OPCH2
LOA
OPOST
NO,
061332
0611
43700
0612 43701 040355
ADA .-2
UNSTACK
0613 43702 071332
STA OPDST
OPERAND
0614 43703 125376
JMP OPCHK,I
ADDRESS
eMB,INB
SET ADDRESS TRUE
0615 43704 007004
UNSTACK
0616 43705 061330 OPCH3 LOA iMPST
0617 43706 040355
ADA .-2
TEMPORARY
0618
43707 071330
STA TMPST
OPERAND
JMP OPCH2
0619 43710 027700
0620*.
.*'
0621*.* ALLOCATE AN lNTRy ON THE TEMPORARy STACK .**
0622*·
**
0623*
(8) IS UNCHANGED UPON ExIT. ON STACK OvERFLOW,
0624*
0625* THE OPERATOR AND OPERAND STACKS ARE MOVED TO HIGHER
0626* CORE TO MAKE ROOM FOR FIVE MORE TEMPORARY ENTRIES,
0627*
0628 43711 061330 #RSCK LOA TMPST
ADVANCE
0629 43712 040361
ADA .... 2
POINTER TO
0630 43713 071330
STA TMPST
NEXT ENTRY
INA
STACK
0631 43714 002004
CPA OPTRQ
0632 43115 051464
OvERFLOw?
RSS
YES
0633 43716 002001
JMP RSCHK,I
NO
0634 43717 125400
0635 43720 075436
STB RT0
SAVE (8)
LOB PBPTR
0636 43721 2164056
LOAD SOURCE AODRESS
0637 43722 0621371
LOA •• 10
ALLOCATE SPACE FOR
JSB CUSP
0638 43723 015326
FIVE MORE
063 9 43724 010056
STA PBPTR
TEMPORARIES
0640 43725 071440
STA RTt
SAVE DESTINATIoN ADDRESS
43 7 2 6 16 00 01 RSCHI LOA 1,1
TRANSFER
06 41
0642 43727 171440
STA RT1,I
A WORD
0643 43730 055330
CPB TMPST
DONE?
0644 4373t 027731
JMP RSCH2
YES
0645 43732 003400
NO, DECREMENT
ceA
0646 43733 041440
ADA RTI
DESTINATION
~647
43734 071440
STA RT1
AND SQURCE
0648 43735 044356
ADS .81
ADDRESSES
JHP RSCHt
0649 43136 027726 '
0650 43737 061332 RSCH2 LOA OPDST
CORRECT·
0651
43740 040371
ADA .+10
0652 43741 011332
STA OPDST
STACK
0653 43742 061464
LDA OPTRQ
0598
0599

pAGE 0155 *12
0654

0655
0656

43743
43744
43745
43746

FORMULA fVALUATION ROUTINES

040371

AOA .+10

011·464

STA OPTRQ
LDS RTe
JMP RSCHK,I

POINTERS

065436
RESTORE (8)
0657
12540"
0658.*
**
0659.** PUSH DOWN OP[RATOR STACK ***
0669.*
0661*
0662* ALLOCATE AN ENTRy ON THE OPERATOR STACK.
(Al 18
0663* NOT CHANGE.D.
0664*
0665
43747 064056 *PSHS LOB PBPTR
ADVANCE
0666 43750 044361
AD8 .+2
STACK POINTER
eMS
0667 43751 007000
USER
0668 43752 044716
ADS LWAUS
SPAtE
0669 43753 006020
SSB
OVERfLOW?
~670
43754 115111
JSB RERRS+10,1 YES
ISZ PBPTR
43755 034056
NO, ALLOCATE
0671
0672 43756 034056 .
ISZ PBPTR
STORAGE
JMP PSHST,I
43757 125366
0673

••

PAGE 0156 #13
0002 44000
0003 44000
0004 44001
0005 44002
0006 44003
0007 44004
0008 44005
0009 ••

0010...
0011.·
0012.
0013*
0014*
0015*
0016*
18017*
0018
0019
0020
0021
0022
0023
0024
0025
0026

EXECUTION UTILITY ROUTINES

077600
176745
177734

171715
177761
072221

~OUNO

SHSK

QRG 440008
OCT 77600

SE.RRA
RERRA
FERRA
WERRA
OSERR

ABS
ABS
ABS
ABS
OEF

.SERRS
SERRS.RlRRS
RERRS.FERf, (8) HOLDS THE INTEGER BIASED BY

.1.

44006
44007
44010
44011
44012
44013
44014
44015
44016

015414
125342
002002

125342
002041
044356
006021

035342
125342

J8B IFIX

JMP SBFIX,I
SZA

JMP SBFIX,I
SEl,RSS
ADB .-1
·SSB,RSS
lSI SBFIX
JMP SBFIX,I

TRUNCATE NUMBER
NUMBER TOO LARGE
INTEGER OVERFLOW?

YES

NO, ROUNDING BIT?
NO, BIAS INTEGER BY -I

yES, POSITIVE RESULT?
YES
NO

PAGE 0157 #13
0028.*

0029 •• *

EXECUTION UTILITY ROUTINES

INTEGERIZE A NUMBER

0030.*
0031.
0032.
0033.
0034.
9035*
0036.
0031*

0038,0039w
0040.
8841
8042
9043
0844

1045
0046
9041
0048
0049
0.,50

""51
0052

",,53
1854

44017 071280

44020
44021
44022
44023
44024

102191
01!S412
002020
026846
040337

44025 ·002020
44026 t 0 31 0 1

44027 040347

441£'30
44031
44032
44e33
44034

002021
125414
040347
071322
061260
026042

0055

4~035

44036 000071
44031 002200

0062
1863
1164
8065

0066
"061
0068
0069

ai70

.*

ENTER WITH A FLOATING POINT NUMBER IN CAl AND (B).
IF EXPONENT EXCEEDS 23, NUMBER HAS INTEGER SIGNIFICANCEI
EXIT TO (P+l1, ALL OTHER CASES EXIT TO (P+2) WITH 32-SIT
INTEGER RIGHT JUSTIFIED IN CA) AND (8). ON EXIT (0) • 0
IF NUMBER IS EXACTLY REpRESENTA'LE AS A 16-81T INTEGER.
IF EXPONENT IS NEGATIVE, TRUNCAtE TO e OR -I APPROPRIATELY
AND LET. (0) • 1. OTHERWISE RIGHT JUSTIFy INTEGER AND EXIT
WITH LAST BIT LOST IN (El.

1056
"057
1058
0059

0,,60
1161

.*

•••

'IFIX STA TEMP6
STO

JSB .FLUN
SSA

JHP IFIX3
ADA .-16
SSA

eLO

ADA ,-8
SSA,RSS

JMP IFIX,I

ADA ,-8
STA ExP
LDA TEMPe
JMP IFIX2
IF'I XI CLE,SLA,ARS
tME

44040 004 9 35

SLB,ERB

44041
44042
44043
44044
44045
44046
44047

STO

44058
44051
44052
44053
44054

102101
035322
02&2136
035414

125414
061260
002 12°
003401

002401
00'~"1

006400
026044

IfIX2 ISl Exp
JMP IFIXI

ISZ IF IX
JMp IFlx,I

IFIX3 LOA TEMP6
CLE,SSA
CCA,RSS
CLA,RSS
CCB,RS8
CL8

JMP IFIX3.2

SAVE CA)
SET 'NOT ONE. WORD INTEGER' MODf
UNPACK (I)
NEGATIVE EXPONENT'

YES

NO, £XPONENET

c.
c.

15?

YES
NO, EXPONENT
231
NO, ALL SIGNIFICANC! IS INTEGER
YES, MOVE BINARY POINT TO END Of
(8) AND SAVE SHIFT COUNT
RETRIEVE CA)

SHIFT CA) RIGHT
SHIFT

(B) RIGHT
LOST A 1
ALL 8HIFTS DONE7
NO
YES

RETRIEvE (A)
TRUNCATE
TO
.1
OR

PAGE 0158 #13

EXECUTION UTILITY ROUTINES

••

0072*·
0013*·. REQUEST A RECORD •••
0014*.
0075*
0076* UPON ENTRy (Al HOLDS A FILE NUMBER (POSITIVE FOR A READ
0077. REQUEST, NEGATIV~ fOR A WRITE REQUEST) AND (8) SPECIFIES
VALIDATION OF THE FILE'S EXISTENCE ( (8) • -2) OR THE FILE
0"'18.
0079* HECQRD TO BE PUT IN THE FILE BUFFER ( (8) • -1 REQUESTS
THE RECORD WHICH FOLLOWS THE ONE CURRENTLY IN THE BUFFER,
0080*
(B) >a " R[QUESTS RECORD (8)+1). EXIT TO ERROR IF THE
0081*
FILE
DOES NOT EXIST OR A WRITE REQUEST IS GIVEN FOR A
0082.
READ-ONLY
FILE. EXIT TO THE END~OF.FILE CODE IF THE
0°83*
0084* REQUESTED RECORD DOES NOT EXIST.
OTHERWI, THE DIRTY

••

~085.

0086.
0087*
0088*
0089*
0090*
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100

01"'1
0102
0103
0104
1d105
0106
0101
010d
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
ld126

BIT IS EXAMINlD TO DETERMINE IF THE FILE BUFFER SHOULD
BE WRITTEN RACK TO DISC.
A READ REQUEST REAOS THE REQUESTED RECORD INTO THE 8UfFER;
A WRITE REQUEST MERELY INITIALIZES THE BUFFER TO 'EMpTY'.
THE FILE TARLE IS UPDATED TO REFLECT THE CHANGES.

44055
44056
44051
44060
44061
44062
44063
44064
44065
44066

075647
007400
002~20

006401
003000
075644
041500
003021
115142
041500
44~61 1210200
44070 000316
44';'71 041502
44072 ~712J6
44073 161236
44074 002003
44075 115142
44076 065236
44077 2144363
44100 075236
44101 001500
44102 2102020
44103 055644
44104 001675
44105 115143
44106 065647
441~1 054355
4411~ 026320
44111 035647
44112 ~26137
44113 165236
44114 055~27
44115 026136
44116 035236
44111 165236
44120 035236
44121 035236

#RQST STB RQ2
eCB
5S A
CLB,RSS

eMA

STB RQl
AOA FCNTR

CMA,SSA,RSS

SAVE RECORD REFERENCE
GET l'S COMPLEMENT

OF fILE NUMBER AND
SET RQt • -1 FOR A
READ REQUEST OR 0

FOR A WRITE REQUEST
DOES REQUESTED
FILE EXIST?

JSB RERR5+35,I NO
ADA FCNTR
YES
MPY .+FTEL
SET POINTER

ADA FILTS
STA FBASE

TO FILE TABLE

ENTRY

LOA FBASE,I
LOAD NUMBER Of RECORDS
SZA,RSS
DOES FILE EXIST?
JSB RERRS+35,I
LOB FBASE

ADB .+4

ST8 FBASE
eCB,elE

REAOeONLY FILE?
RQl
YES, READ REQUEST?
ELA,CLE,SLA,ERA
YES, CLEAR BIT 15 AND SKIp
JSB RERRS+J6,I NO
LOB RQ2
FILE VALIDATION
CPB .-2
ONL.Y?
yEs
JMP RQST9
lSZ RQ2
NO, RECORD spECIFIE07
.JMP RQST2
YES
LDB FBASE,!
NO, GET HIGH OLD RECORD ADDRESS
cpa BIT15
NULL RECORD?
JMP RQST6
YES
ISZ FMASE
NO, COMPUTE
LOB FSASE,!
RECORD'S
DISTANCE
ISz FHASE
ISZ FBASE·
FROM
SSA

cpa

PAGE 0159 *13
0127
0128
0129
0130

0131
0132
0133

"134
1d135
0136
0137
0138

0139
0140
0141

0142
0143
0144

01.5
0146
0147
0148
0149
0150
~151

0152

0153
0154

0155
0156
"'157
0158
0159
0160
0161
~162

0163
0164
0165
0166
0167
1rl16t3
0169
~170

01 7 1

017 2
0173
0174
~175

1lJ176
0177
0178
~179

0180

°181

0182

F.XECUTION UTILITY ROUTINES

44122 007000
44123 145236
44124 007000
.44125 060350
44126 041236
44127 160000
44130 A01665
44131 ~04010
44132 044000
44133 004065
44134 006004
44135 026142
44136 006400
44137 035236
44140 03S236
44141 035236
44142 003004
44143 040001
44144 002020
44145 026151
44146 035236
44147 035236
44150 124656
44151 040001
44152 030360
44153 005000
44154 002020
44155 0621001
44156 007400
44157 045236
44160 1640~1
44161 000040
44162 141236
44163 071647
44164 002040
44165 006004
44166 075646
44167 064351
44170 ~45236
44171 164001
44172 ~05423
44173 007004
44174 075650
44175, 12135236
44176145236
44177 035236

4420ft' 175236
44201

~75645

44202
44203
44204
44205
44206
44207
44210
44211

065236
A44353
075236
044356
164001
0550~7

02 6 214
151236

eMB
ADS FBASE,I
eMS
LDA .-7
ADA FBASE
LOA A,I
ELA,CLE,ERA
SLB
ADB A
CLE,ERB
INB
JMP RQST7
RQSi6 Ci.a
RQST2 ISl FBASE
ISZ FBASE
lSI FBASE
RQST7 CMA,INA
ADA 1
SSA

JHP
ISZ
lSI
JMP
ADA
lOR
BlS
SSA
LDA

ecs

•• 4
F8ASE
Fl\lASE
FOT4A,!
1
.+1
1

AOB FBASE
LOB a,1
elf
AOA FBASE,l
STA RQ2

SEl
INS
STB RQ4

LOB .-6
ADS FBASE
LOB B,I
BlR,RaR
eMB,INB
STB RQ5

ISl FBASE.
ADB FBASE,I
ISZ FBASE
S18 FBASE,!
STB RQ3
LOB FBASE
ADB ,-4
STB FBASE
ADB .-1

LOB
cPS
JMP
CPA

8,1
BIT15
RQS15
FBASE,I

FIRST
RECORD
GET IRECORD

'. COUNT BACK
INTO A

CLEAR BIT 15

NUMBER
NO RECORD IN CORE

ADJUST POINTER

TO LOW WORD
OF BAS! ADDRESS

DOES

RECORD

EXIST?

YES
NO, CORRECT F8A8E

FOR Eof EXIT CHECK
COMPUTE RELATIVE

DISC

ADDRESS
OF NEW RECORD
GET HIGH
DISC
ADDRESS

COMPUTE LOw DISC ADDRESS
SAVE IT
INCREMENT IF
CARRy FROM
LOW ADD
GET
NEGATIVE
Of BUfFER
'SIZE

SAVE IT
SET POINTER
TO BfGINNING
OF RECORD BUFFER
SAVE ADDRESS Of BUFFER
MOVE TO
DISC
ADDRESSES
IS ANY
RECORD

"

IN CORE?
NO, SKIP COMPARE AND "RITE
OLD AND NEW RECORDS THE SAME?

PAGE
0183
0184
0185
0186
~187

0188
0189

0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206
0207
0208
0209
0210
0211
0212
0213

016~

44212
44213
44214
44214
44215
44216
44217
44220
44221
44222

#13

EXECUTION UTILITy ROUTINES

el26236
015514
035644
026241
~65650

10310~

44224 045027
44225 1142it11
44226 102030
44227 102031
44230 060203
44231 002020

44232 026230
002003
026244
115154
035644
002001

026311

064355
44242 175645

44243 2126311
44244 065236
44245 044370
44246 160001

44247

yES
NO,

~RITE

OLD RECORD TO DISC

RQS15 EQU •

060362
040650
074204
44223 065645

44233
44234
44235
44236
44237
44240
44241

JMP RQST3
JSS WRaUF

~02003

0214 4425A 026311
0215 44251 071767
0216 44252 044351
0217 44253 075236
0218 44254 065645
0219 44255 155236
0220 44256 026306
0221 44257 160001
0222 44260 050355
0223 44261 026306
0224 44262 050356
0225 44263 02630 6
0226 44264 010316
0227 44265 050506
0228 44266 026271
0229 44~67 044361
0230 44270 026255
0231
44271 160~01
0232 44272 A10500
0233 44273 040362
0234 44274 001100
0235 44275 0400A1
0236 . 44276 071632
0237 44277 006004
0238 44300 055632

lSl RQl
JMP RQST4
LDB RQ~

elF

READ REQUEST?
NO
GET NEGATIVE BUFFER SIZE

0

LOA ,+3
ADA ERSCA
STB MWORD

LOB RQ3

GET ADDRESS
OF DOUBLE WORD ADDRESS
STORE WORD COUNT

GET CORE ADDREss

ADe 81T15
AND READ 8IT
JSB DISCA,I
READ
HLT DEATH+308
IN
HLT.DEATH+31B
REQUESTED
LOA "8USY
RECORD
5SA

JMP *-2
SZA,RSS
SKIP ON ERROR
JHP RQST5
JSB RERRS+45,I GO INDICATE ERROR
RQST3 ISZ RQl
WRITE REQUEST?
RSS

JMP
RQS14 LOB
STB
JMP

yES

RQS14
fOR
RQ3,I
RQS14

RGST5 LOB FBASE
ADa .+9

NO, GO FINISH UP
SCRATCH RECORD
WITH ENOwOF-RECORO MARK
GO FINISH UP
GET

LOA B,l
5ZA,RSS
JMP RQS14
STA PHASK

PROTECT
MASK
IS IT ZERO?
VES, SKIP MASKING
NO, SAVE MASK

ADB .-6
STB FBASE

ADJUST FBASE TO
BUFFER LIMIT POINTER

LOB RQ3
RYSll CPS FBASE,I

JMP
LOA
CPA
JMP
CPA

RQS13
1,1
EOR
RQS13
EOF

CPA
JMP
ADB
JMP
LOA

B1000
.+3

.JMP RQS 1J
AND M256

,+2
RQSll
1,1

DONE 1

YES
NO
EOR ?

EOF 1
STRING 1

SKIP TWO WORDS
yES

AND 8377
ADA .+3
ARS

ADA 1

srA

RQS12 INB

ATP4P

cpa ATMP

MASK

PAGE 0161 #13

EXECUTION UTILITY ROUTINES

0239
0240

44301 026255
44302 160001

0241
0242
0243
0244

44303 021767

JHp RQS11
LOA 1 , I
)COR PMASK

44304 170001

STA 1, I

.0245

6246
~247

0248
0249
0250

121251
0252
02S3
0254

121255
0256
0251
0258

44305 026277
44306 061236
44307 040354
44310 071236
44311
44311 061647
44312 171236
44313 2161646
44314 007400
44315 045236
44316 075236
44317 170001
44320 065236
44321 044364
44322 075236

44323 125506

JMP RQS12
RQS13 LOA FBASE
ADA , .. 3
STA FBAsE

STRING

RESTORE
FBA5E

RQS14 EQU

*
LOA RQ2
STA FBASE,I
LOA RQ4

eeB
ADS

RQST9

STB
STA
LOB
ADS

NEW RECORD INTO FILE TABLE

FBASE
FBASE
8,1

FBASE
,+5

5TB FBASE
JMP RQSTR,I

MOVE POINTER
TO REFERENCE
RECORD POINTER

PAGE 0162 #13

E:XECUTION UTILITY ROUTINES

••

0260.*
0261.*. STORE ITEM IN fILl
••
0262.*
••
!a263.
0264. UPON ENTRy (8) INnICATES WHAT IS TO BE WRITTEN ON THE fILEI
02 65* (B) s ·1 WRITfS AN ENO~OF·FILE MARK, (8) • -2 HRITES A Twa0266* WORD FLOATING POINT NUMBER, (B) • ~J WRITEs A STRING. IF
121267* THE RECORD CANNOT ACCOMMODATE THE QUANTITY, A SERIAL WRITE
0268* WILL PLACE IT IN THE FOLLOWING RECORD WHILE A RECORb WRITE
0269* WILL EXIT TO THE END-Of-FILE CODE.
0270*
121271 44324 ~75653 #FlLS STB FILl
SAVE REQUEST TYPE
0272 44325 065236
GET
LOB FBASE
ADS .+5
PROTECT
0273. 44326 044364
LOB 1,1
MASK
0274 44327 164001
0275 44330 'lJ75767
STB PMASK
eeB
LOAD
0276 44331 007400
ADS FBASE
ACTIvE AND LIMIT
0277 44332 045236
0278 44333 104200
OLD 1 , I
RECORD POINTERS
44334 100001
CPA 1
RECORD FULL?
0279 44335 050001
12128121 44336 026430
.JMP FILS1
YES
0281
44337 075652
STB DADRR
NO, SAVE AcTIVE POINTER
0282 44340 035653
ISZ FILT
EOf REQUEST?
0283 44341 026352
JMP FILS2
NO
eCA
yES, OVERLAy PREVIOUS
0284 44342 003400
0285 44343 170001
srA 1,1
EOR OR EOF WITH EOf MARK
0286 44344 065236 FILS7 LOB FBASE
MAKE POINTER TO SECOND WORD OF
FIL[ TABLE ENTRY,
0287 44345 044347
ADS .-8
0288 44346 160001
LOA B,l
SET BUFFER
0289 44347 03i027
lOR BIT15
DIRTY
STA. t,I
0290 4435~ 170001
BIT,
~291
44351 125510
JMP FILST,I
0292 44352 035653 FILS2 IsZ FILl
STRING?
0293 44353 026413
YES
JMP FILS6
NO
ADS .+2
0294 44354 044361
CMA,INA
COMPARE PROSPECTIVE
0295 44355 0030 0 4
ADA 1
0296 44356 040001
ACTIvE POINTER wITH
0297 44357 ~03004
CMA,INA
ENO-OF-RECORO POINTER
0298 44360 002~20
OvERFLOW?
SSA
0299 44361 026423
YES
JMP FILS"
0300 44362 175236
5T8 FBASf,I
NO, SAVE NlW AcTIVE PUINTER
SZA,RSS
44363 002003
RECORD EXACTLY FUll?
0301
yES
44364 026367
0302
JMP FILS4
0303 44365 06~355
LOA EOR
NO, FOLLOW ENTRY SPACE
STA t,I
WITH EOR MARK
~304
44366 1700~1
STRING?
44367 035653 FILS4 ISZ FILl
~305
~306
4437~ ki26400
JMP FILS5
NO
yEs
0307 44371 061406
LOA TNULL
CMA
COMPUTE AND
44312 003000
~308
~309
44373 030506
JOR 81000
STORE STRING
0310 44374 17165~
STA DAORR,I
HEADER WORD
LOA FSCHA
TRANSFER
0311 44375 060664
0312 44376 015350
Js8 TRSTR,
STRING
0313 44377 026344
JMP FILS7
1d314 444010 1",4200 FILS5 OLD S8PTRfli
TRANSFER

•

PAGE 0163 #13

0315
0316
0317
0318
0319
0320

0321
0322

0323
~324

0325

0326
0321
~328

0329
0330
0331
0332
0333

0334

0335
0336
0331
0338
0339

44401
44402
44403
44404
44405
44406
44407
44410
44411
44412
44413
44414
44415
44416
44417
44420
444 2 1
44422
44423
44424
44425
44426
44427
44430
44431
44432
44433
44434
44435
44436
44437

EXECU1ION UTILITY ROUTINES

101572
002003
026410

SZA,RSS

021767

XOR PMASK
SWP

.jMP FIl5A

101100

021767
101100
104400
101652
026344
006004

005000
075272
007004
045406
007004
005100
026355
060355
111652

xOR PMASK

JMP FILS1
FILS6 INS
BlS
STB TEMP5
(MB,INa
ADS TNULL
CMB,INB
BRS

.]MP F ILS3
FILS0 LOA EOR

STA
LDA
ADA
STA

041653

071653
055520
002001
124656
061234
003000
015506
026325

MASK

DATA

SWP
fILSA OST OADRR,I

060355

007400

ZEROS ARE
NOT MASKED

FILSl

cee

DADRR,I
.... 2
FILT
FILT

CPB RCRD.
RSS
JMP FOT4A,I

NUMBER

COMPUTE
DESTINATION
ADDRESS

COMPUTE
RECORD
SPACE
REQUIRED
INSURE EOR MARK

ENDS PRESENT RECORD

RESTORE
REQUEST
TYPE

SERIAL WRITE?
YES
NO

0340
REQUEST
LOA FILE*
eMA
RECORD
0341
0342
JSB RQSTR
TO WRITE
0343
JMP #FILS+l
0344**
**
0345**. GET NEXT FIll ITEM TypE
0346.*
*.
0347*
THE ~EXl ITEM IN TH~ FILE, NUMBER, STRING, END.OF~FILE, OR
0348*
0349. END-OF.RECORD, IS IDENTIFIED AND UPON EXIT (A) -1,2,3, OR 4
EORFL. ~1 WILL IGNORE END.Of~REcORD'8 ANO
0350. RESPECTIVELY.
~351*

.* .

RETURN WITH THE FIRST OF THE OTHER ITEMS ENCOUNTERED.

0352.
0353
0354
0355
0356
0 3 57
0358

0359

0360
0361
0362
0363
0364
,,-

0365
~366

0367

44440
44441
44442
44443
44444

061234
015506

007400
045236
1 0 4 200
44445 100001
44446 0500li'1
44447 026463
4445~

160001
44451 006404
44452 050355
44453 026463
'44454

050356

44455 0265"'1
44456 010316
44457 ~50506

GTTY1 LOA FILEJSB RQSTR
#GTTY eCB
ADS FBASE

DLD 1,1
CPA 1
.IMP GTTVJ

LOA 1,1
CLB,INB
CPA EOR
JMP GTTYJ
CpA EoF
.IMP GTTY4

REGUlST
NEXT RECORD
LOAD ACTIVE
AND LIMIT
RECORD POINTERS
PHySICAL END OF RECORD?
YES
NO, lOAD WORD

OF RECORD

ENO""OF-RECORO?
YeS

NO, END PMASK WORD

.> WORDS/RECORD WORD

SET FILE

DIRTy BIT

CLEAR DIRTV BITS AND
GET NEG. REt. LENGTH
WRITE
RECORD
TO

DISC
SKIP ON ERROR

JHP WRBUF,I

JSB RERR8+46,I GO INDICATE ERROR

TRANSFER A STRING

.*

*.*

••

THE NUMBER OF CHARACTERS SPECIFIED BY THULL (IN 1'5
COMPLEMENT) IS TRANSFERRED FROM THE SOURCE STRING TO
A DESTINATION STRING BEGINNING WITH THE CHARACTER
ADDRESSED BY TEMPS,

9474·
0475.
0476 44612 071~e2
9477 44613 035.,,6
0478 44614 002001
0479

JMP WRBU6
AND M256

~26562

44615 125350

'TRST STA TRfCH
tSl TNULl.
RSS

JMP TRSTR,I

SAVE SUBROUTINE tALL
MORE TRANSFER .STRING?
YES
NO

PAGE V,166 #13
0480
0481
0482
048]
0484
0485
0486
0487
0488
0489
0490
rj491

0492
13493
049 4

44616
44617
44620
44621
44622
44623
44624
44625
44626
44627
44630
44631
44632
44633
44634

EXECUTION uTILIly ROUTINES

115402
06 0 417
071404

065272
004065
160001
002041
001727
010316
031404
002041

001727
i70001
035272
026613

JSB THFCH,I
LOA .+408
STA TRS0
LDB TEMP5
eLE,ERB
LOA 1,1

SEZ,RSS
AL.F,ALF
AND M256
JOR TRSe

SEZ,RSS
ALF,ALF
SiA 1,i

IsZ TEMP5

JMP #TRST+l

FETCH A SOURCE CHARACTER
NONE LEFT, LOAD A BLANK·
SAVE IT
LOAD
DESTINATION
WORD
SAVE
OTHER
CHARACTER
COM8INE WITH
NEW CHARACTER
AND STORE
l.iII .................

WU"LI

INCREMENT DESTINATION ADDRESS

PAGE 0167 #13

ARITHMETIC SUaROUTINE.S

0496**
ADD TWO FLOATING POINT NUMBERS
0497***
0498**
0499 44635 071616 #fAD STA A1
SET POINTER TO 2ND ARGUMENT.
LOA .FAD,I
1d5rrJ0 44636 161402
STA A2
0~01
44637 071617
LOA A1
111502 4464~ 061616
0503 44641 105~00
oCT 105000
CALL HARDWARE ROUTINE.
0504 44642 101617
Dff A2,1
0505
44643 035402
ISZ • FAD
SET RETURN ADDRESS •
SOC
~506
44644 102201
05~7
44645 A15346
JSB DUCHK
OVERfLOW OR UNDERFLOW'
0500 44646 i25402
JMP • FAD,!
RETURN •
0509**

0510***

SUBTRACT TWO fLOATING POINT NUMBERS

1d51l**
0512 44647
0513 4465~
0514 44651
0515 44652
1t)516 4465]
0017 44654
0518 44655
1t)519 44656
0520 44657
0521 44660

0522**
0523***
0524***

071616
1614Q14
071617
061616
1050210
101617
035404
102201
015346

125404

srA

A2

LOA Ai
OCT 105020
DEF A2,1

CALL HARDWARE ROUTINE,

lSI • FSS

SET RETURN ADDRESS •

SOC
JSB
JMP

OVERFLOW OR UNDERFLOWl

RETURN,

DlTERMINES It OVERFLOW OR UNDERfLOW
HAS TO BE GIVEN.
#UUCK STA A1

5T8 A2

~532

44663 002002
4466A 026672
44665 015474
44666 115207
44667

0bJ3

44667

~61616

LOA A1

0534
0535

44670
44671
44672
44672
44673

065617

l.OB A2

0·529
~5J0

0531

~536

0537
0538
0639

SET POINTER TO 2ND ARGUMENT.

M~SSAGl

13525**
0526 44661 071616
0527 44662 075617
~528

STA A1
LOA .FSB,l

125346

015474
115206

4467A ~26667

SZA

SAVE REGISTERS.
OVER. OR UNDERFLOW?

JMP OUCK2

JSB CHOUF
.JSB WE:RRS+6, I
DuCKt EQU •

JMP OUCHK,I
OUCK2 lQU •
.JSB CHOUf
.JSB

wERRS+5, I

UNDERFLOW! CHECK STATUS,
RE.INSTATE REGISTERS.
RETURN.

OVERFLOW! CHECK STA.TUS •

JMP OUCKI

0540**
0541**
**
0542*** MULTIPLY TWO FLOATING POINT NUMBERS * ••
\lto43**
**
SET POINTER TO 2ND ARGUMENT
0544 44675 0 7 161 6 #fMP srA A1
0545 44676 161406
LOA .fMP,I
0546 44677 071617
STA A2
0547 4470~ 061616
LOA A1
OCT 105040
0548 4471t31 105040
CALL HARDWARt ROUTINE.
0549 44102 101617
OEF .2,1
ISZ • fMP
SE.T R.ETURN ADDRESS •
0550
44703 Ql354~6
~551
SOC
44704 102201

PAGE
0552

~168

#13

ARITHMETIC SUBROUTINES

44700 015346

JSB OUCHK

OVERFLOW OR UNDERFLOW,

0553 44706 125406
JMP .FMP,I
RETURN,
1i)554 ••
0555...
DIVIDE TWO FLOATING POINT NUMBERS
~556**

0b57

44707 071616

0558

4471"
44711
44712
4471..5
44714
44715
44716
44717

0559

0560
0561
0562
0563
~564

0565
0566 4472~
0567*.

0568.*.

161410
071617
061616
105060
101617
&135410
102201
015346
125410

*FOY

STA A1
LOA ,fOY,1
STA A2
LOA A1
OCT 105060
OEF A2,1
ISZ ,FDV

SET POINTER TO 2ND ARGUMENT

CALL HARDWARE ROUTINE,
SET RETURN ADDRESS.

SOC
JSB QUCrtiK

OVERflOW OR UNDERFLOWl

JMP .FOv,1

TAKE ARITHME1IC INVERSE

••

RETURN,

***
**

0569*·
0570*
0571* ENTER WITH A FLOATING POINT NUMBER IN (A) ABO (B),
0f>72* EXIT WITH ITS ARITHMETIC INVERSE IN (A) AND (8).
~573*

V)574
1d575
0576
",,577
0578
0579

44721
44722
44723
44724
44725
44726
44727

~580**
~581.*.

104400
001620
002400
006400
105020
001620
125370

STORE NUMBER.

#ARIN OST C1
CLA
CLB
OCT 105020
OfF C1
JMP ARINV,I

UNPACK LOW wORD OF NUMBER

**
.**
**

A-0.
8.0.

CALL SUBTRACT HARDWARi ROUTINE

0582·*
0583*
0584. ENTER WITH LOW wORD OF FLOATING POINT NUMBER IN (8),
0585* EXIT WITH EXPONENT IN (A) AND MANTISSA IN (8).
0586*
0587 44730 00240~ tiFLUN CLA
EXTRACT
0588 44731 101050
lSR 8
EXPONENT
ALf,AlF
0589 44732 001727
IN CAl AND
MANTISSA IN (8)
ALF,BLF
10590
44733 005727
SLA,RAR
NEGATIVE EXPONENT?
0591
44734 000033
0592 44735 03200k1
lOR SMSK
yES, FILL IN LEADING BITS
059.3
44736 125412
JMP .FlUN,I
NO

PAGE 0169 #14
0002*
0003*
0004*
0005*
0006*

ERROR ROUTINES

WHIl.E Hf.ADING A PRO(;RAM IN 'TAPE' HODE, ERRONEOUS STATEMENTS
ARE ~fPLAC£D WITH ERROR PSUEDO·STATEMENTS. THESE ARE THREE
WORD 'STATEMENTS'I THE STATEMENT NUMBER, THE LENGTH (ALwAYS
3), AND THE ERROR NUMBER. SINCE BITS 15.9 ARE CLEAR IN WORD
THREE, ERRORS HAVE A STATEMENT TYPE Of 0. ERRCT HOLDS A
COUNT Of THE EMBEDDED ERRORS AND THE USER'S 81r OF TERR IS
SET IF ANY EMBEDDED ERRORS EXIST. ADDITIONALLY, THE 'OUT.OF.
STORAGE' ERROR SETS SYMTB c 1 To ASSIST SYNTAX. ALL STATEMENTS
WITH A SEQUENCl NUMBER OF ZERO WILL BE cOLlAPS~D INTO A SINGLE
ERROR AND UNDER/OVERFLOWS IN NUMERICAL CONSTANTS ARE NOT
REPORTED.

1a007*
0008*
0009*
0010*
0011*
0012*
0013*
0014*
0kJ15**
**
liJ016.** OUTPUT TAPE MODE ERRORS •••
0k.l17**
**
0018*
0019* UPON ENTRy ALL EMBEDDED ERRORS ARE STRIPPED FROM THE PROGRAM
0020* ANO STORED BELOW IT AS TWO-WORD QUANTITIES (THE LENGTH WORD
0021* IS DROPPED). FOLLO~ING THIS THE ERRORS ARE PRINTED ONE 8Y
0022* ONE WITH LINE NU""'eERS. AFTER PRINTING Al.l ERRORS (OR, IF THE
0023* USER ABORTS THE ERROR PRINTING, AFTER' THE USER TYPES THE NEXT
"-1024* LINE) EVERYTHING IS CLEANED UP AND A MESSAGE PRINTED TO SAY
0025* THE LAST RECEIVED INpUT HAS BEEN IGNORED.
0026*
0027
0028
0029
0030
0031
0032
0033

0034
0035

0036*
0~37*.

0038.
0039
~040

0041
0042

0043
~044
0~45

0046
0047
0048
0049
0050
0051
0052
~053

0054
0055
0056

0 05 7

PAGE 0170 #14

fRROR ROUTINES

0059

44773 006004
44774 Pl5471b

INB
CPS LWAUS

~H16"

44775 (i'27070

.}MP

O",61

~54116

IN8
CPS LWAUS

"066

44776
44777
45000
45001
45002
45003

0067

45~04

0068

4500~

0069

45006

0070

45007

0071

45010
45011
45012
45013
45014

027010
074056
164000
175476
035476
040361
164000
175476
065510
003400
041574
071574
002002

JMP
STa
LOB
SrB
lSZ
AOA
LOB
STa
LOB
CCA
ADA
STA
SZA

45~15

'~26150

~0~8

~062

1a063

0064
ftJ065

0072

0073
0074
007 5
0076

0077
0078
0079
0080

0081
0082*
~083**

0084*
0085
0086
0087
0088
0089

0~60~4

45~16 055230
45017 027023
45020 061510
45021 065230
45PJ22 015476

45023 063042

45024 071472
45025 062004
45026 042003

0094

003004
r;)71440·
007400
075442
165230
075566

0095

45035

~35230

0096
0097
00 9 8
0099
0100
0101
0102
0103
01(114
0105

45036
45037
45040
45041
45042
45(1)43
45044
45045
45046
45047

161230
071430
006400
027200
045043
el62003
003004
041440

0106
010 7

451{t50 061230

0091
0092

0093

0108
0109
0110
~111

0112
~113

e1,I

TRANSfER
LINE NUMBER

PBPTR
TAP0,I
TAP0
,+2

0,1

TAPa, I

SOURC

TAPEl

COUNTER

•
•
RETAD

NO

yES, PROGRAM REMAINING?
NO
YES, SLIDE UP
OVER LAST
£:.RRORCS)

**

STA SERR
LOA WERRA
ADA FERRA
CMA,INA
STA LT5

TAPE4 CCt3

LT6
LOB SPTR,I
STB

S'TB .LNu M

SPTR
SPTR,I
LTJ
SERR1+3
*+1

FERRA

CMA,INA
ADA LT5

0135230

ISZ SPTR
LOA SPTH
CPA PBPTR

1031~~
06036~

ERROR

ALL ERRORS DELETED?

ST. LT5

45051 050056

TRANSFER
ERROR
NUMBER
RETRIEVE POINTER TO STATEMENT
DECREMENT

ERRCT
ERRCT

LOA SOURC
LOB SPTR
JSB MOVER

ISZ
LOA
STA
CL8
JMP
RETAD DfF
LOA

ERROR?

NO
YES, APPENO TWO WORDS

JMP TAPE3

TAPE3 t DA

TO TRANSFtR

TAPE.7

071440

45052 002001
45,,53 0271'031
45~54 061512
4505b 070056
45~~56
45~57

TAPE7

CPB SPTR

OUTPUT ERROR MESSAGES

45027
45030
45031
45032
450133
45034

009~

JMP

SPACE

USER

RSS

JMP TAPE4
TAPES LOA DlST

STA PBPTR
elf 0
LOA TERR

SET

RETURN ADDRESS
FAKE
'WARNING ONLY'
ERROR MODE

FORCE
LINE NUMBER
MAKE LINE NUMBER OF
CURRENT ERROR ACCESSIBLE
LOAD

ERROR NUMBER
lXIT TO
ERROR PRINTER

RESTORE
,WARNING
ONLY'
MODE
MORE
ERRORS?
NO
YES
CORRECT POINTER TO
LAST WORD +1 OF PROGRAM
)'JRN

PAGE 0171 #14
0114
0115
0116
0117
0118
0119*
~120

0121

ERROR ROUTINES

45~62

17A255
45063 102101lt
45064 115140
4506b 075512
45066 060001

0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132

45067
45070
45071
45072
45073
45074
45075
45A76

0133
0134

45102 064056

0135
0136
01 37
0138
0139
0140

eMA
AND
STA
STF
JSB

45060 003o,,0
45061 110255

TAPE6 STB DEST
JMP TAPE2
STA TAPt
CMA,INA
AOA DEST
STA TAPB
AOA SPTR

026771
071472
003004
041512

071476
041230
071230

45103
45104
45105
45t PJ 6
45107

065512
074056
06151.0

040354

071512
45111 026772
4511~

0141*·
~142**.
~143**

MOVE BLOCK TO LOWER CORE

~147*

0150
0151
0152
0153

45112
4 5 11j
45114
45115
45116

075141
1 64 000

175512
035512
002004

~155

45117 051741
4512f1 125476

0156

45121 027113

0154

*.
*.

UPON ENTRy (H) POINTS TO THE LAST wORD +1 TO BE MOvED AND
CAl POINTS TO TH~ FIRST WORD TO BE MOVED, DEST POINTS TO THE
FIRST WORD Of THE DESTINATION SPACE.

0148*
k1149

IT

RESET POINTER TO
LAST WORD .1 OF PROGRAM
SET POINTER TO
NEXT STATEMENT
TO NEW VALUE
RETRIEVE SOURCE ADDRESS
RECLAIM
SPACE
sET NEw POINTER TO
PROTECTED AREA
COMPUTE POINTER TO
CURRENT ERROR STATEMENT
SET NEw DESTINATION POINTER

.**

~144.

0145*
01 46*

EMIT PARTING SHOT

AND SAVE

5TA SPTR

015476

OFF

SAVE SoURCE ADDRESS
COMPUTE SIZE OF AREA
TO SE RECLAIMED

LOB SOURC
A08 TAPe
5T8 SOURC
LOA TAP1
LOB PBPTR
JSB MovER
LDB DEST
STB PBPTR
LOA SOURC
AOA ,~3
srA OEST
JMP TAPE2+1

061472

FLAG

SET DESTINATION POINTER
TO fIRST ERROR ENCOUNTERED

LOA 2

06 5 510
45077 045476
45100 075510
45101

ERROR
MAIN,!
MAIN,l
"
RERR5+JJ,I

.MOVE

5T8

ETEMP

LDB
STB
ISl
INA
CPA
JMP
JMP

e,I

OEST,l
DEST

ETEMP

SAVE POINTER TO LAST WORD + 1
TRANSFER
WORD
BUMP
POINTERS
qONE?

MovER,I

yES

#MOVE+l

NO

PAGE

~172

0158.·
0159.*.
,~ 160.*
~161

#14

ERROR ROUTINES

OUTPUT AN ERROR MESSAGE

**

..

1ti162*

*

01 6 3
!a164.
0165*
0166.
016 7*
0168*

0169*
la170.
1tt17!.

0172*

THE fRROH IS IDENTIfIED VIA THl RELATIVE JUMP THROUGH THE ERROR
JUMP TABLE. IF THE ERROR 15 A SYNTAX TYPE AND THE USER IS IN
'TAPE' MODE, THE fRROR IS EMBEDDED IN THE PROGRAM AS A PSEUDO.
STATEMENT FOR LATER PRINTOUT AND THE ~RROR FLAGS ARE ApJUSTED
AS APPROPRIATE. OTHERWISE, THE DISC BLOCK CONTAINING THE ERRQR
MESSAGE IS READ INTO CORE (IF IT IS NOT ALREADY THERE) AND THE
MESSAGE IS PLAC[D IN A USER BUFFER FOR PRINTOUT. IF A SyNTAX
ERROR IS IDENTIFIED IN THE 'KEY' HOOE, 'ERROR' IS PRINTED AND INP
REQUESTED. THE ER~OH HESSAG~ IS PRINTED IF THE REPLY IS OTHER
THAN A SIMPLE CARRIAGE RETURN. IF THE LENGTH WORD OF THE ERROR
MESSAGE IS POSITIVl THE CURRENT LINE NUMBER IS APPENDED.

~173.

!a174
~175

0176
0177
0178

0179

45122 0034~0
45123 041472
45124 160000
4512.5 042001
45126 010504
45121 071430

eeA

~420~2

AOA
srA
ADA
AOA

0180

4513~

~181

45131 £'171440
45132 ~42003
45133 042004
45134 002021

0182
VJ183

0184
0165
0186
0187
1d190

45141 002t)01
45142 027154

~191

45143 063454

0192
0193

45144 ~71426
45145 ~06400
45146 075274
45147 074253
45150 060351
45151 ~15460
45152 060243
45153 114736
45154 061440
45155 002021
45156 027175
45157 "'60367
4516~ 110255
45161 ('I020~2
45'62 027414
45163 006400
45164 ri175274
45165 06344 2
451 6 6 ~71426
45167 ~60j54
45170 015460
45171 ~60225

0195
~196
~197

0198
1a199
(,l20~

0201
~202

VJ203
~204

0205
02VJ6
~207

0208
ii1209

0210
~211

0212
0213

ERROR NUMBER

Rt:RRA

LT5
FERRA
WERRA

SSA,RS8

JMP SERR0
LDA MAIN

INA
CPA
RSS
JMP
LOA
STA
CLB
srB
STB

~50~53

~189

AND SAVE

srA LT3

45135 027154
45t40

COMPUTE

ADA sERR
LOA ~,l
ADA SERRA
AND B777

45136 ~60255
45137 '-1020C?14

0188

0194

*.
***

PRIST
SERR0
SLPMS
LTI

LT2
PRIST

WARNING
ERROR?
YES
DOES THIS
USER HAVE
THElP1
NO
YES

OUTPUT

MESSAGE

LOA • "",6

JSB QUTST
LDA LPD
JSB 8148C,1
SERR0

LDA LT5
SSA,RSS
JMP SERRI
LDA TAPEF
AND MAIN,I
8ZA
J'MP Sf..RR6

CLB
STB
LOA
STA
LDA
JSB
LDA

LT2

AStER
LTt
.-3
OUTST
IWT

TO USER
TELL I/O PROCESSOR
TO REMOVE USER
SYNTAX
ERROR?
NO
YES
TAPE
MOOE:.?
YES
NO
OUTPUT
'ERROR'
·ANn

WAIT
FOR

PAGE 0173 #14

ERROR ROUTINES

45172 114742
0214
JSB SCHIN,I
0215 45173 015446
JSB GETeR
0216 45174 027305
JMP SE.RR4
0217.
VJ218.* PRINT THE MESSAGE

0219.
0220
0221

0222

45175 06143~
45176 C?J06400
45177 075442

0223

45200

0660~5

0224
0225
0226

45201
45202
4520J
452t14
45205
45206
45207
45210
45211
45212
45213
45214

~40450

0227
0228

0241

45222 100200

~233

0234
0235
0236
0237

0238
0239

0242

0243
0244

1d245
0246
0247

0248
0249
0250
0251

0252

45232
45233
45234

000377
040606
065512
075742
06465fl)
0 1 5512
064000
044377
015476
065742

45235

~755t2

45223
45224
45225
45226
45227

45230
45231

0254

45236 06144 0
45237 ~02021
45240 1c127360

~255

45241 002 4 0121

0256
0257

45242 015452

k1253

0258
~259

45243 ~60350
45244 071426

SER1A

SERiA
.+2
LT3
SERA

cPs LIB

JMP SE.RtB

STB LIB

LOA B

LOB M512
STB MWORD

LDB "LIB#
'ADS MNEG

JSB DISCZ,1
JSB SICKP,I
SERIB LOA LT3
MPy .+16

AOA _LIB#
LOB DEST
STB ETMPl

LDB ERSCA

STA
LOA
JSB
ISZ

LT1
.+408
OUTeR
LTt

STA LI1

eCB

0266

45254

16~000

~267

4525!; 002e20
45256 027261

LOA 0,1
SSA
JMP *+3

~263

0264
~265

0268

06065~

FIx DISC ADDRESS POINTER
STORE NUMBER
OF WORDS

FIX CORE ADDRESS POINTER
AND 'READ' INDICATOR
READ ERROR MESSAGf INTO CORE
BAD LUCK

LOAD

ERROR MESSAGE
SAvE
DEST

INTO
OUTPUT

BUFFER
RESTORE
DEST
ExECUTION ERROR?
yf:.s

NO, OUTPUT
A NUlL~

LOA ... 7

071426

0262

THE

NOT fOUND YET
IS MESSAGE IN CORE?
YES

ADS .+16

JSB MovER
LOB fTMPl
STB DEST
LOA LT5
SSA,RSS
JMP SERR5
CLA
JSB OUTCR

QH374~0

Vl260

CLEAR 'LINE
NUMBER' FLAG
CALCULATE
ON NEXT BLOCK

STe DEST
LOB A

45245
45246
45247
45250
45251
45252
45253

~261

060417
015452
035426
027245

ADA M32
5SA

JMP
ADS
STA
JMP

~44361

0240

0230
0231
0232

LT3

CLB
STB Lr6

LOB OSERR

SERA

ti102020
027207

071430
027201
054256
027221
074256
060001
064315
",74204
4521b 064606
45216 045027
45217 11421C16
45220 114207
45221 ~61430

0229

SERR1

•
••
•
LOA

INPUT.
CARRIAGE RETURN ONLY?
YES

.IMP .... j
SERR2 LOA ERSCA

OUTPUT
7
~LANKS.

STORE MESSAGE
ADDRESS

LINE NUMBER?
NO

PAGE 0174 #14

ERROR ROUTINES

0269

45257 075442

~27rl!
~271

4526 0 003004
45261 006400

0272
0273
L-]274
0275

45262 075274
45263 015460
45264 035442
45265 027275
45266 ~6J446

0276
0277
(6278

0279
0280
0281

0282
0283

0284
0285

0286
0287
(6288

SfB LT6
CHA,INA

CLB

STB
.J88
ISZ
JMP
LOA

OUTST
LT6
SERR3
LINEA
STA LTt
CLB
LOA .-5
JSB OUTST

45267 071426
45270 006400
45271 060352
45272 015460
45273 065566
45274 ~15454
45275 061440
45276 042003

LT2

LDB .l,..NUM

JSB aUlIN

002020

SERR3 LOA LT5
AOA FERRA
STA LT5
ADA WERRA
SZA,RSS
JMP sERRe
LDA .... 158
JSB OUTeR
SERR4 LOA .... 128
JSB OUTeR
LDA LT5
SSA

027347

.JMP SEH 13

45277 071440
453((10 042004
45301 002003

0295

45302
45303
45304
45305
453 0 6
45307
45310
45311

0296
0297

45312 04200 4

AOA WERRA

45313 002020

5SA
JMP SERR9

0289
0290

0291
0292
0293
~294

027316
060374

015452
060371
015452

061440

121300
031211
v.s302

45314 027320
002400
45316 071570
45317 125472
45320 0({)64012J

0303

45321 061757

121304

45322 101101

0305

45323 071426
45324 06176k.1

0298
0299

121306
0307
0308

(LA

4531~

45325 "'03004
4'5326 071760

0309

45327

006~02

SZB

0310

4533~

027340

"'311

45 33 1

JMP SERif
E.QU •

~312

45331 1 6 1 4 2 6
45332 001727
45333 01 0 500
453J4 015452
45335 035760
45336 002001

0313
031 4
~315

0316

1f)317

45337 027340

\1318
0319

45340

k1320
0321

161426
45341 01 '15~0

0322

45342 015452

0323

45343 035426
45344 035760

0324

4534~

LDA

oUTPUT
ERROR
MESSAGE

LINE NUMBER FLAG SET?
NO

YES

PRINT

" IN LINE "
OUTPUT
LINE NUMBER
'BAD
INPUT'
ERROR
yES

OUTPUT
CARRIAGE RETURN
OUTPUT

LINE FEED

RUN

ERROR?
yES
NO, WARNING
ONly?
NO, FORMAT ERROR
yES

sERR8 STA CHRCT
JMP SERR,l
SERR9 CLB
LOA IfSTR
RRR 1
STA LTt
LDA NCH
CMA,INA
STA NCH
SlRl~

yES, SET FLAG

LT1,1

ALF,ALF
AND BJ71
JSB OUTeR
lsz NCH
RSS
.JMP SER 12

SER11 EQU ...
LOA LT1,I
AND [3377

JSB OUTeR
ISZ LT1
ISz NCH

CONVERT
CHARACTER
SAVE POINTER
SAVE

NUM8ER OF
CHARACTERS
START wITH HIGHT BYTE?
YES
FETCH

LEfT
CHAR

OUTPUT IT
FINIsHED ALL CHARS?
NO
yES
FETCH RIGHT
CHARACTER
OUTPUT IT
BUMP PO-IN:TER
FINISHED ALL CHARS?

PAGE
0325
0326
0327
0328
0329
033 0
0331
0332
Ir1J33

0334
"'335
0336
0337

~175

#14

ERROR ROUTINES

45345 027331
45346
45346 ~15534
45347
45347 103100
4535~ 160255
45351 VJ3Q1377
45352 170255
45353 1~2100
45354 06150{d
45355 071550
45356 ~15556

45357 i2474kl

.IMP SER10
SE:.R12 EQU ..

JSB OUTCl
5t:Rl~i

NO
OUTPUl CR.LF

EQU ..

elF
LOA
lOR
SiA
STF
LOA
STA
JSB

~

MAIN,l
UNABT
MAIN,l
0
FCNTR
FRMAT
LCDlP
jMP SCHEN,i

DISALLOW
ABOt LP FREE MESSAGE

..

..

PAGE 0177 #14
l!!)400·
0401
0402

MATRIX EXECUTION

46000
46000 040512
46001 040450
46p!02 040375
4600~~ 177713

ORG 460006

E:NOIN
MINP2
MINPI
065

OfF EIN12
OfF EfNP0+3

OEF EINPl
0403
OCT -65
1tJ404
0405.
0406.**
0407 •• EXE:CUTE 

••

**

••

~408.**

0409.
0410 46"'1t14
46005
~411
0412 46006
0413 46007
0414 46"1~
0415 46011
0416 46012
1()417 46013
46014
~41a

0419

"'46323
046325
047212
~47215

~47227

047220

el47232
041433

0400~0

4602~

~4?6

46026

FI.0 A DfF F1.0
Fl.0 DEC 1,O
EMAT

~02002
~26206

LOA TEMPi,I
ANO OPDMK
SZA
JMP EMATt

IDfNTIFY MATRIX I/O

0429.
~430

0431
0432
0433
0434
0435
~436

0437
0438
0439

0440
0441

0442
~443

0444
0445
0446

0447*
0448**
0449*
04f)0

0451
~452

ceA

SrA ELCNT
.lsB EpRUS
LOA TEMPt,!

OPERAND
NULL?

NO

CHECK
FOR
'MAT PRINT usING'·
COMPUTE AND SAVE

INPUT •• 2
READ ·-1
PRINT. 0

AND 877
ADA 065

STA MTl
SSA,INA,5ZA
STA MT0

Mlot

JSB VLFIL
NOP
l.OA TEMPt,I
AND OPDMK
SZA,RSS
.IMP )efC1A,!

PREPARE A MATRIX FOR I/O
46050 ~01000
46051 041573
46052 ~40356

FIRST

1/0 TY·PEI

RRR 9

0000~0

161611
46045 01li'566
4604n A02003
46~47 124762

.*•

lSZ *TEMPi

46027 035611
46~3(,l1 003400
46031 071470
46032 r115552
46033 161611
46034 101111
46035 010460
46036 042003
46037 071314
4 6 040 002026
46041 071312
461iJ42 01550 4
46~43
46~44

MAOO

MSUB
SMUll
IDN
MCPY
+lE.6

F0.0A DEF F0.0
F0.0 DEC 0.0

0427*
~42t3.*

MLOP2
MlOP3

Vt00002

0422.
0423 46023 161611
1iJ424 46024 010566
~425

OEF
DEF
OfF
OEF
DEF
OfF
OfF
DEC

157133

46015 046016
46016 000000
46017 "'0121000
46020 046021
46~21
46~22

MLP2A
HLP3A
MADDA
MSUBA
SMUlA
IDNA
MCPYA
TOLC

*.••

ALS
ADA SYM'S
ADA .-1

SAVE flAG

IF 'INPUT'

PROCESS ANY
FILE. REQUEST
LOAD NEXT
IDENTIFIER
ZERO?
YES

LOAD

BASE:. ADDRESS
OF ARRAY

PAGE 0178 #14
0453
0454
V)455
0456
0457
~4~8

0459
0460

1d461
~462

0463
0464
0465
0466
0467
~46a

0469
V)470
~471

0472
0473

46015j
46054
46055
46,,56
46"'57
46060

MATRIX EXECUTION

164000
0144 3 55
~75572

061611
0020~4

051334
46061 002400
46~62 160000
460163 010570
46064 ~65314
46~65 006003

46066
46067
46070
46"'71
46072
46073
46074
46075
46076

~26121
~50554

015466
161572
035572
100200
101572
035572
003004

46(i}77 071476

LOB
ADB
STB
LOA
INA

gj,I
.-2
saPTR
TEMP1

wORD Of

CLA
LOA 0,1
AND OPMSK
LOS MTl
SZB,RSS
JMP MI02
CPA LBOP

JSB
LDA
ISZ
MPY

REDIM
SBPTR,!
SBPTR
SBPTR,I

~·480

v.1481 46105 126002
0482 46i06 041312
0483 46107 126001
0484.

k:1485**

NO, LOAD CAl WITH
FO~LOWING OPERATOR
MAT
PRINT?
yES

NO, ; (, NEXi OPERATOR?
YES, REDIMENSION ARRAY
SET POINTER
TO FIRST ELEMENT
Of ARRAY
WHILE COMPUTING

ISZ

*

MT0

RSS

JMP MINP1,I
ADA MT0
JMP MINP2,I

OF .

•

MAT
READ?

YES

fIRST MATRIX TO BE INPUT'
NO
YES
RETRIEvE
SAVED CHARACTER

**

Cl...B,INB *
.lS8 FOAT A

DST saPTR,I
ISZ SBPTR
lSZ SBPTR
ISZ MCNT
JMP Mlo9

JMP MI07
CPA BJA00

cea

NUMBER

ELEMENTS

STA MeNT
CCA

READ VALUES fOR MATRIX

0486*
0487 4611~ 006404 MI09
0488 46111 015362
0489 46112 104400
46113 101572 .
0490 4 6 114 ~35572
0491 46115 ~J5572
0492 46116 035476
0493 46117 026110
1(J494 4612~ 026174
Vl495*
0496 46121 05~5t6 MI02
0497 46122 ~07400
049t3
46123 075476
",499 46124 065572
0500 46125 015470
46126 161572
it1501
0502 46127 035572
4613Cil 003004
0503
0504 46131 A713t2
46132 161572
~50f>
0506 46133 035572

yES

ISZ SBPlR
CHA,INA

.

46103 P!35312
46104 002001

STATEMENT?

CPA· .PRGCT

46100 0103400
CPA MTl
0474 46101 051314
JMP MI09
0475 46102 02611~
0476·
0477*. INPUT VALUES FOR MATRIx **
0478*

0479

SAVE POINTER TO
DYNAMIC DIMENSIONS
LAST

STB MeNT
LDB sBpTR
JSB VCHK
LOA SBPTR,I
ISZ SBPTR
(MA,INA
STA Ml~
LOA SBPTR~I
ISZ SBPTR

FETCH
CONSTANT
STORE
IT
DONE?
NO
YES

,"

FOLLOWING ARRAV,

yES

NO, TREAT AS COMMA
VALIDATE
ARHAy ELf-HENTS
SAVE

COUNT

OF

ROWS

pAGf "1791114

0507

HATRIX EXECUTION

461j4 ~65234
46135 00602vJ
4613'; 026151

0508
0509
0510*
0511*· WRITE MATRIX ON
0512*
0513 46137 10020id
4614~

~514
~515

1IJ516
0517
0518
~519
~~20

Vjf)21

LOB FILE*

WRITE ON

JMP MI03

NO

SSB

FILE
MPy

A

•

fILE?

*.

•

MT~

SET

~01312

46141 ~71476
46142 064355
4 6 143 015510
46144 2135572
46145 035572
46146 V'35476
46147 026142
46150 (126174

MI04

STA MCNT
.-2

ELE.MENT COUNTER
WRITE ELEMENT

SBPTR
SBPTR
MCNT
.JMP MI04
.IMP MI07

HOVE TO

LOB
JSB
ISZ
ISZ
ISZ

FILST

TO FILE

NEXT ELE.MfNT

MATRIX DONE?
NO
YES

PAGE
~523.
~524.*

~180.

#t4

~RIlf

MATRIX

EXECUTIO~

*
**

MATRIX ON TllETypE

0525.

*

(MA,INA

SAVE
COLUMN COUNT
SET COLUMN COUNT

MIa)

0527

4 6 152

~~3V'Vl4
~7162J

\(J528
0529

46153 071622
d6154 026160

MI08

~b3(1

4615!; "'0240'"

MI05

(LA

0531
0532
0533

40156 ",51476
46157 ~15426

MIOo

CPA MeNT
.JSA EDELM
DLD SbPTR,I

1d526

46151

~b34

0~35

0536
L15J7
~538

VJo39

vH>40
~541
~542
~543

0544.

~545..

4616(11

1042~ld

STA

STA MT2
.JMP MI06

46161 101572
46162 ~'15416

IsZ
lSZ
ISZ
.)MP
.ISS
JSB

4 6 16'; i~35622
46166 Vl2b155

SBPTR
sBPTR
MT2

MOvE 10

NEXT E.LEMENT
ROW DONE?
NO
YES, DOUBLE

MIO~

OUTLN
OUlLN
l.OA MTJ

46 167 "'15424
46170 ~~15424
4 6 171 061623
4 6 172 035312
46173 ~26153

SPACE
MATRrx DONE?
NO

ISZ MTV'
MIo8

~JMP

CHfCK FOw MORE

"MATwlC~s

*

**

VJ552.
05bJ

t16~~2

~554

46?03 ~"553 1 4

V)555

i\62~4

1260~0

lSZ TEMPt*
l DB TEMPt
CPS PRGCT
JMP *+3
srA MT0
JMP MIGt
LOB .-2
CPS MT1
.}MP ENDIN,J

~556

46205 124762

.JMP XEC1A,I

~549

\1)550
\155j

46176 r,55334

46,77 Vl26202
4620V1 071312
46201 026"44
~643~5

MIn7

•

wJ~57.

~55t3**
~559.

VJ566

46206 064762
46207 ~75364
46210 001000
46211 041573
46212 040356
46213 164000
46214 ~44355

~567

46215 075572

0560
~561

0562
~o63
~564

1t1565

",56d

4~21n

~569

46217 161611

9135611
00202~

Lijb10

4622'"

0571

0572

40221 02645b
46222 ~66004

~573

4022~"i

t~75j40

~574

46224
46225
46226

~35~tl
~105b6

0575
1£1576
1f)571

fMATl LDB
STB
ALS
ADA
AvA

PHINT
ELtMENi

JSB E.NOUT

46163 035572
46164 035572

0546.
111547 46174 035611
~548
46175 0b5611

MT~i

X£C1A
MlXIT

*.

*

SYMTA

.-1
LDB 0,1
ADS .-2

STB sst
ISZ TE:.MPI
LDA TEMPt,!

58A

JMp fMAT6
LDB MLP2A
fMAT2 5TH fvtDP

~k:l20\13

ISl TEMPt
AND OPDMK
SlA,RSS

462;>7 v12644b

.IMP FMA T5

STATtMENT
FINISHED1
YES
NO, SAVE (A)

MATHIX
INPUT?
YES
NO

SET MAIN LOOP TO
STATEMENT EXIT MODE
COMPUTE
POINTER
10

OESTINATION
MATRIx

"MATRIX
fUNCTION?
yES
NO, SET OPERATION
JUMP TO 'REPLACE' MODE
SCALAR
MULT!PLICATION?
yES

PAGE 1t11 8 1 # 1 4

MATRIX l )( f-. CUT I () N

Vl57~

46~3l"

057Q

46231

00 UHH1
914157.5

~~80

46232

~4~356

t

46233 t 04'-100

~582

46234 044355
46235 Vl75350

0~)8

V1583

0584

ALS
ADA
AOA
LOB
AD8
STa
JSB
LOA
CPA

SYMTB
.-1
~,l

.-2
AS2
vCHK
TEMP1
PRGCr

~585

46236 Ql1547v'
4 6 ~ J 7 k1 b 1 0 1 1

"'5R6

A624~

0587
0588

[MAT]
LDA TEMPt,!
AND OPOMK

~590
~591

46241 ~26277
46242 t61n11
46?4.i 01~56b
46244 0~lVJ00
4624~

~592
~593

46246 04"'356
46247 t 04001c.1

ADA SYMTti
ADA .-1

0594

4625(.1

~595
~591

46251 ~7~352
46252 ~lo470
46253 \61611

k1598

46~54

01 ~)570

AND OFJMSK

~599

4625':)

~15V"56~1

CPA MULOP
.jMP EMAT4
RRL 6

vl589

0596

(~51.

334

..JMP

POINTE~

TO fIRST
SOURCE
MATRIX
VALIDATE ITS ELEMENTS
END OF
STATEMf:.NT1
yES
NO
COMPUTE

AL.S

(-141573

POINTE.R TO
SECOND

lOB til,!
ADB .-2

044355

SOUf(CE. MATRIX

srB BS3
.Jst; VCHK

LOA

0600 46256 ~'26~i34
46251 1 if}"" 1 C)b
.-1601
0602*
~6~3.*

NO
COMPUlE

SET Up 1v1A TR I X ADD,

TEMPt,I

VALIDATE ITS lLEMENTS

MATRIX
MlJlrtPLICATION1
YE.S
NO

SUHTRAC T, OR REPLACE

0bVJ4.
~605

46260

v,b6~Hi\6

~6~6
~6f717

46261

vH12c;,~0

06~H~

vjtlt19
VJO 1 1.1

46262 0660.£:'17
46263 r:75340
46264 "65572
462fifl

1. 6~)001

k1611
0612

46,66 151352

v)bt3
vJb14

4627111 115112
46271 035352
46272 1640~1

0615

46267 V'06~h~5

LDB MADDA
SSA
I DB MSUSA
srB MOP

***
*

RECORD
'MATRIX ADD'
OR 'MATRIX SUBTRACT'
OPERATION JUMP

LDB AS1

t.OA 1,1
CPA H5J,1

ROW
COMPATldILITV?
IN~,RSS
YES
JS8 RERRS.tl,I NO
ISz RS3
LOB 1,1
COLUMN
CPS RSJ,I
COMPATIBILITY?
RSS
YES
JSB RlRRS.l1,1 NO
ISz BSj
£MAT3 LOA 852,1
ROW
CPA ASt,I
COMPATIBILITy?

~616
~617

4o:?7 ~i 1~~j52

V,l618

46275 115112

~619

t1 6? 7 6

iib2e!

46277 161350

",621

4630V' 151572

0622
\1623

4 6 3 VI 1 00 t.' "H~ 1
46.3021.15112

RSS
YES
.J SB R £ R~ S+ 1 t , I
NO

0624

4 6 3 ~1.~ (~ 3 5 35'1

V16~5

46304

~626

463{-1'i 100200
403C,,t; ! 0135@

ISz RS2
18Z RS1
MPY RS:?,}

COMPUTE NUMBER
of MATRIX ELEMENTS

1.1627

463~7 16b35VJ
403111' 155572

LDB RS2,I
CPH RSt,r
CMA,INA,RSS

COLUMN
COMPATIBILITY?
YES

~b28

4627 4:1

~fI2~H~

1

(135352

{~35572

062q

4 f) 3 1 1 ;" ~) 3 ~ it) :,

L-)oj(;'

~1o~~1

463\2
46 ] l'

06.52

4 63 1 4 f1 35 :3 b ~'

tl~112
~~ 11 is 7 6

.JSB Ri:RRS+l1,1

STA

~CNT

IS7 HS2

~~o

SAVE 2'5 COMpLEMENT OF sIZE

PAGE 01R2
~633

#t4

MATRIX EXECUTION

46315 ~j5572

TSZ AS1

PAGE 0183 #15
ilI~H~

MATRIX EXECUTION

1*

VJ0~2**

AS~IGN

MATHJX VALUE

~1r1~j.

*.•
...

r)~H14*
~~0b.

0006*
frH!'l07.

MOP HOLDS A POINTfR TO (ODE wHICH COMPUTES ONE ELEMENl Of THE
DESTINATION MATRIX ANO' WETURNS IT IN (Al ANO (B). HEXIT
HOLDS TH[ tXIT ADORfSS SET BY TH[ CALLER,

liH~08.

~~1d9

0010
0011
~012
~013

0014
~015
0~16
~017

0018

0019
0020

46316 104200

MLQOP DLD BS2,1

LOAD lLEMENT OF SOURCE MATRIX

463\7
46320
46321
46322
46323
46324
46325
46326

JMP
MLOPt ISZ
lSZ
MLOP2 ISZ
ISZ
MLOP3 OST

MOP,1
BS3
BSJ
BS2
BS2
8S1,I

JUMP TO OPERATION
MOVE TO NEXT ELEMENT
OF SECOND SOURCE MATRiX
MOVE TO NEXT ELEMENT
OF FIRST SOURCE MATRIX
RECORD EL.EMENT

TSZ
ISZ
lSZ
JMP

BSl
BSt
MCNT
MLOOP

OF DESTINATION MATRlX
AND MOVE TO NEXT ELEMENT
DONE?
NO
yES

101350
125340
~J5352

035352
03535~

035350
104400

101572
46327 035572

46330 ~35572
46331 035476
46332 0263t6
46333 125364

.JMP HEXIT,!

0~21.

0022*.
!d1023*
0024
~025

~1t1~6

0027
W~28

0029
00,~0

Y,031
~032

0033
0034
vH135
t1036
0037

0038
I()VJ3g
0k'J40

0041
~042

0043
~044

0045
0046
0047
0048
0049
005 0
0051
0052
1!10b3

COMPUTE MATRIX PROOUCT
46334 161~72
46335 151350
46336
46337
46340
46341
46342
46343
46344
46345

003005
115112
~716J2

035572
035350
161350
t513n2
003005
46346 1151t2
46347 071633
4635~ 071634
463b1 ~01000
46352 '~71630
46353 10~20e
46354 101572
46355 ~40361
46356 071631
46357 0.35352
46 3 6 ~) 1 61 5 7 2
46361 151.352
46362 k1030105
46363 115112
46364 071635
46]65 ~71636
46366 0v.l3004
46367 001000
46370 071637
46371 '135572
46372 035350

...
••

•

EMAT4 LDA 8S1,1
DESTINATION MATRIX
CPA 882,1
ROw COMPATIBILITY7
YES
CMA,INA,RSS
JSB RERRS+l1,I NO
STA MMT0
SAVE ROW COUNTER
ISz 851

lSZ BS2
LDA 8S2,1
CPA 853,1

INNER PRODUCT
COMPATIBILITy?

CMA,INA,RSS
YES
JSB RERRS+l1,I NO
ST. MMTl
SAVE INNER PRODUCl
STA MMT2
COUNTERS
ALS
SAVE ROW
STA MMT6
BACK UP AMOUNT
MPY BS1,1
SAVE COLUMN
ADA .+2
BACK UP
STA MMT7
AMOUNT
lSz BS3
LOA BS1,1
DESTINATION MATRIX
CPA 853,I
COLUMN COMPATIBILITy?
CMA,INA,RSS
yES
JSB REHR~+11,I NO
STA MMT3
SAVE COLUMN
STA MMT4
COUNTERS
(MA,INA
SAVE CQLUMN
ALS
AOVANCE
5TA ~MT5
AMOUNl
ISZ AS1
MOVE TO
ISZ RS2
. ·~IRST ELEMENT

PAGE
0L154

0055
0056
0057

~1R4

~1b

MAT~IX

46j73 0.Jt)J52
46374 065352
46375 ~75376
46376 104200

0058

46377 046016
46401£1 104400
46401101572

~059

464~2

~060

0061
0062

0063
1d064
01tJ65

0066
~067

0068
~069

0070
ft1071
01072
0073

0074
0075
0076
0077
0078

0079.
008v;

0081
~rlI82

0083
~084

0085
0086

0087
0~88

0089
0090
~091

46403
46404
46405
46406
46407
4641(11
46411
46412
4641J
46414
46415

10420~
1~1350

tx~rUTION

MPRI

OLD FId.0

DST 851,1
MPR2

DLD B52,I

035350

tsz BS2

~35350

15Z
JSB
DfF
JSB

1A15400

101352
~154"'2

Df:F 8S1,I

1044~~

OST 851,1

1~1572
~165J52

t DB AS3

ADS MMrb
STB AS3
TSZ MMT2

JMp MpR2

ISl Bst
lSZ Bst
LOB MMTl
STB MMT2
ISZ MMT4
.JMp MPR3
LOB MMT3
S'TB MMT 4
ISZ ~MT0

~26442

.JMP MPR4
.J MP XE C 1 A , 1

124762
06535~

ri45630
075350
065352
4644Ci' 045631
46441 002001
46442 065376
46443 075352
46444 026376

MPR3

LOB BS2
ADB MMT6
5TB BS2
LOB SS3

MPR4

ADB MMTI
RSS
LDB MMT8
SrB BS3
.JMP MPRl

01092*
~093.*

0094*
0095

S~T

uP SCALAR MULTIPLICATION
~15J56

EMAT5 JSB FETCH

1t1096

46446 t044~0
46447 0V11622

DST SCALR

0097

4645~

ISZ TEMPi
ISZ TEMP1
LOA TEMP!,1
LDB SMULA

0098
0099
0100
~101
6{)

4644~

035611
46451 ~35611
46452 161611
4645:i ~66010
46454 "126223

.JMp

ELEMENT TO ZERO

COMPUTE

TERM
OF

RS2
.FMP
HS3,I
.FAD

101572

O}45637
46416 Ci)75J52
46417 ~J5634
46420 Ci12641tJ2
46421 035572
46422 035572
46423 065633
46424 075634
46425 "35636
46426 026434
46427 065635
46430 07~636
46431 (/135632
A643?
46433
46434
464j5
46436
46437

OF MATRICES
SAVE FIRST.ELEMENT ADDRESS
OF SECOND SOURCE MATRIX
INITIALIZ~ DESTINATION

ISZ AS3
LOB RS3
STB MMT8

INNER

PRODUCT
ADD IN PREVIOUS
RUNNING SUM
SAVE RUNNING SUM
ADVANCE 10
NEXT ROW OF
SECOND SOURCE MATRIX
INNER PRODUCT COMPLETE?
NO
yES, MOVE TO NEXT
DESTINATION ELEMENT
RESET INNER PRODUCT
TERM COUNTER
ROW COMPLETE?
NO
yES, RESET
COLUMN COuNTER
DONE?
NO
YES
BACK UP
TO BEGINNING OF RO~ OF
fIRST SOURCE MATRIX
BACK UP TO BEGINNING
OF NEXT COLUMN
Of SECOND SOURCE MATRIX
BACK UP TO FIRST ELEMENT

...

••
•COMPUTE"
SAVE

AND
SCALAR

LOAD OPERATION JUMP
PROCESS
FOLLOWING
MATRIX

f~~AT2

102*

~103

1t1104

46455 101104
46456 010416

EMAT6 RRR 4
AND .+37B

COMPUTE

MATRIX

PAGE 0185 #15

MATRIX EXECUTION

~105

46451 040330

0106

46460 071514

~107

4646t 002021
46462 026521

0108
0109*

~110*·

ADA ,-218
STA 100
SSA,RSS
JMP EMAT8

SET UP MATRIX INITIALIZATION

0111*
0112

0113
0114
0115
0116
0117
0118
0119
0120

0121
0122
0123
°124
0125

01 2 6
0127
0126
0129

0130
0131
0132
0133
0134
0135
0136

0137
0138
0139

46463 065611
46464 006004
46465 ~55334

LDB TEMPt
INS
CpB PRGCT

46466 002001

RSS

46467 015466

46470 161572
46471
46472
46473
46474
46475
46476

011362

035572

100200
101572
003004
071416
46477 035514
465"0 026512

46501 161512
465 02 05 13 6 2

46503 003001
46504
46505
46506
46507
46510
46511
46512

115127

071514
003400

071362

062011
026515
062006
46513 066020

46514 035514
46515 066015
46516 075350

46517

~7134"

0140 4652~ 026315
0141*
0142 46521 035611
0143

46522 161611

0144
0145

46523
46524
46525
46526

0146

0147

010566
001000

041573
040356

T .....

~NVL

JSB
LOA
STA
ISl
MPY

REDIM
0

...........

Oijl,J.

ID1
881

BS1,I

EMATa lSZ
LOA
AND
ALS
AOA

TEMPt
TEMP1,I
OPDMK

REDIMENsIONING?
NO
yES
COMPUTE
NUMBER
OF ELEMENTS

IN 2'5

COMPUTE
POINTER

SYMTB

0151
0152
0153
0154

,46532 015410
46533 165572
46534 005000

46535 075635

JSB VCHK
LOB 881,1
BlB
STB MMTJ

0155

46536 005100

BRS

0156

46537 035572

0157

46540 161572

0158
0159

46541 151350
4654? ~03005

lSl BSt
LOA BS1,I
CPA 882,1
CMA,INA,RSS

0150

***
*

TO

ADA .-1

LOB 0,1
ADB .-2

0149

TypE

MATRIX INITIALIZATION?
NO

CMA,INA
COMPLEMENT
STA MeNT
SAVE IT
ISZ 100
'IDN' ?
JMP EMAT7
NO
LOA BS1,1
YES
CPA 101
SQUARE MATRIX?
CHA,RSS
yES
JSB RERRS+24,I NO
STA rD0
SET
ceA
DIAGONAL
srA IDI
COUNTER
LOA IDNA
LOAD OPERATION JUMP
JMP •• 4
EMAT7 LOA MLP3A
RECORD
LOB Fl.0A
CORRECT CONSTANT.
ISZ 100
0.0 FOR 'ZER'
1,0 FOR 'CONt
LOB F0.0A
STB BS2
0,0 FOR 'ION'
srA MOP
REtORD OPERATION JUMP
JMP MLOOP-l

46527 164000
46530 044355
46531 075350

0148

FUNCTION

STB BS2

SOURCE
MATRIX

VALIDATE IT
LOAD DESTINATION ROW DIMENSION
SAVE COLUMN
ADVANCE AMOUNT

ARE COLUMNS OF DESTINATION
lNO ROWS OF SOURCE EQUAL?
YE~,

PAGE 01a6 #15

MATRIX EXECUTION

0160
0161
0162

46543 115112
46544 071633

0163

46546 035350
46547 155350

46545 071634

0164

4655A 0070PJ5
46551 115112

~16S

0166

0167
01 6 8
0169

0170
rAt".

.,.,

A

0172
0173
0174
0175
0176

0177
121178
0179
0180
0181

46552 075632
46553 1121020121
46554 001635
46555 035350
46556 065514
46557 006003
46560 026610
46561 040361
46562 071636
46563 035572
46564 2126572
·46565 065633
46566 075634
46567 065350
46570 045636
46571 075350

0182*

0183*.
0185
0186

0187
0186
0189
0190
0191
0192
0193
0194
0195
0196

0197*
0198*.

46572 104200
101350

46573
46574
46575
46576
46577
46600
46601
46602
46603
46604
46605
46606

~203

0204
0205

0206

0207
020t4

0209
0210
0211
0212

SZS,RSS
JMP INV

ADA .+2
STA MMT4

ISZ 8S1
JMP TRN
LOB MMTl

TRN1

TRANSFER

10.4400

OST BS1,I

IaZ Bst
ISZ Bst

LOB BS2
ADS MMTJ
8r8 BS2
ISZ MMT2
JMP TRN
ISZ MMT0
JMP TRNl
JMp XECIA,1

INVERT A MATRIX
46610 064000
46611 001100
46612 071476
46613 061572
46614 071352
46615 061330
46616 040361
46617 071572
46620 0030",4
46621 040716
46622 040001
46623 003021
46624 115111

INV

RESET

**
OLD '* 8S2,1

...

065350
045635
075350
035634
026572
035632
026565
46607 124762

YES, SAVE COLUMN
BACK UP AMOUNT
FOR SOURCE MATRIX

STB BS2

ADB MMT4

TRN

, TRN' "
NO

COUNTER
BACK UP TO
FIRST ELEMENT
OF NEXT COLUMN

STe MMT2
LOB BS2

101572
035572
035572

0199*
0201
02\12

ISZ BS2

LOB 100

TRANSPOSE A MATRIX

0184*

0200

JS8 HERRS.11,I NO
STA MMTl
SAVE DESTINATION MATRIX
STA·MMT2
COLUMN COUNTERS
ISZ BS2
ARE ROWS Of DESTINATION AND
CPR 882,1
COLUMNS OF SOURCE EQUAL'
CMB,INB,RSS
YES
JSB RERRS+l1,I NO
S18 MMT0
SAVE ROW COUNTER
MPY MMT3
SAVE COLUMN BACK UP

.*•

ELEMENT

ADVANCE TO
NEXT ELEMENT
Of COLUMN
COLUMN TRANSFERRED'
NO
YES, DONE?
NO
yES

*

LOB 0
AHS

STA MeNT
LOA B"SI

STA BS3
LOA TMPST
ADA .+2
STA BSl

CMA,INA
ADA LWAUS
ADA 1
CMA,SSA,RS8
.J88 RERRS+10, I

SAVE 2'$ COMPLEMENT
OF NUMBER OF
ELEMENTS IN ~ATRIX
SAVE ADDRESS OF
DESTINATION MATRIX
SET ADDRESS
OF FREE CORE
AS BASE ADDRESS
SUFFICIENTFREE CORE
. : TO COpy

SOURCE MATRIX'I
NO

PAGE 0187 #15 . MATRIX EXlCUTION
0213
111214

0215
0216
0211
0218
0219

0220
0221
0222
0223
0224
0225
0226
0227

0228
0229
0230
0231
0232
0233
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243
0244
0245
02 46
0247
0248
0249
0250

0251
0252
0253
0254
0255
0256
0257
0258
0259
0260
0261
0262
0263
0264
0265

46625
46626
4662 7
46630
46631
46632
46633
46634
46635
46636
46637
46640
46641
46642
46643
46644
46645
46646
46647
46650
46651
46652
46653
46654
46655
46656
46657
46660
46661
46662
46663
46664
46665
46666
46667
46670
46671
46672
46673
46674
46675
46676
46677
46700
46701
46702
46703
46704
46705
46706
46707
46110
46711
46112
46713
46714

AOA L.,.AUS
PBPTR

040716
070056
006400
075624
075625

STA

(LB

062012
071340
062637
071364
026316
046640
104200
001624
0154",6
046013
104400
001626

INV1

STe
5T8
LOA
STA
LOA
STA
JMP
OEF
OLD

MAXE
MAXE+l
MCPYA
MOP
INV1

HEXIT
MLOOP
*+1
MAxE

JSB .FMP
OfF TOLC
DST TUL

003400

ceA

071514
041352
071572
003004
041330
003004
071352
062661
071364
026470
046662
065330
044361
060001
075350
045352
075572
006400
075514
026703
061514
040355
071514
061632
071634
061344
041635
040361
071344
071636
006400
075624
075625
065633
075637
071630

STA 100'

10420l'
101630

INV2

INV3

INV4

INV5

AOA 8SJ
STA BS1
CMA,INA
ADA TMPST
CMA,INA
srA BS3
LOA INV2
STA MEXIT
JMP INVL
OEF .+1
LOB TMPST
ADS ,+2
LDA 1
STB BS2
AOB aS3
STa eS 1
CLB
STB 100
JMP INV4
LOA ID0
ADA .-2
STA 100
LOA MMT0
STA MMT2
LOA PIVEL
ADA MMTJ
ADA ,+2
STA PIVEL
STA MMT4
CLB
STa MAXE
STB MAXE+1
LOB MMTI
ST8 MHT5
STA MMT6
OLD MMT6,I

YES, INCL.UDE IT
IN SWAP AREA
SET 'MAXIMUM ELEMENT'
VAL.UE TO
ZERO
SET UP TO
COpy MATRIX,
FIND MAXIMUM (ABSOLUTE
VALUE) ELEMENT,
AND RETURN

COMPUTE
RELATIVE
TOLERANCE

RESTORE
DESTINATION
BASE ADDRESS
COMPUTE DIFfERENCE
BETWEEN BASE ADDRESSES
OF SOURCE (COPIED)
AND DESTINATION
MATRICES
SET DESTINATION MATRIX
TO IDENTITY AND RETURN
SAVE
BASE ADDRESS
OF SOURCE
MATRIX
SAVE BASE ADDRESS OF
DESTINATION MATRIX
SET PIVOT ELEMENT
BIAS TO ZERO
SET BIAS
FOR NEXT
PIVOT EL.EMENT
INITIALIZE COUNTER TO
2'S COMPLEMENT OF COLUMNS
UPDATE PIVOT
ADDRESS
TO NEXT
DIAGONAL ELEMENT
INITIALIZE
PIVOT EL.EMENT
AS MAXIMUM
IN COLUMN
SET COUNTE~ TO SEARCH
REMAINDER OF COLUMN
LOAD
ELEMENT

PAGE 0188 #15
0266
0267
0268

46715
46716
46711
46720
02 6 9 46721
0270 46122
0271 46723
0272 46724
0273 46725
0274 46726
46727
0275 46730
46131
0276 46732
0277 46733
0278 46734
0279 46735
0280 46736
0281 46737
0282 46740
0283 46741
0284 . 46742
0285 46743
0286 46744
0287 46745
0288 46746
0289 46747
0290 46750
0291 46751
0292 46752
0293 46753
ftJ294 46754
0295
46755
46756
0296 46751
46760
0297 46761
46762
0298 46763
46764
0299 46165
46166
0300 46767
46770
46771
0301
46772
03 0 2 46773
46774
46775
0303
46776
0304
46771
0305

0306

MATHIX EXEcUTION

002020

SSA
JSB ARINV
DST SCALR

GET
ABSOLUTE

JSB .FSB

SUBTRACT
PREVIOUS MAXIMUM

015370
104400
001622
015404
001624

OEF MAXE

002002

SZA

RESULT

JMP INV6
DLD SCALR

POSITIVE?
NO
YES, RECORD

SSA

002020
026734
104200
001622
104400

VALUE

DST MAXE

NEw MAXIMUM

0211624

061630
071636
061630
041635
035637
026712
065344
045514
075631
045352
075637
075362
061636
051344
027017
041514
071376
041352
071630
104200

101637
10440()
001622
104200
101630
104400

tNV6

LOA MMT6
STA MMT4
LDA MMT6
AOA MMT3
ISl MMT5
JMP INV5
LDB PIVEL
ADS 100

STe MMT7
ADS BS3
STB MMT5
STB ID1
LOA MMT4
CPA PIVEL
JMP INV8

ADA 100
5.l A MHT8
ADA aSJ

STA MMT6

INV7

OL.D MMT5,1

AND ITS
LOCATION
MOVE TO NEXT
ELEMENT OF COLUMN
COLUMN DONE?
NO
YES
SET POINTERS
TO OLD
PIVOT ROWS OF
80TH MATRICES

NEEO TO

SWAP ROWS?

NO

YES, StT POINTERS
TO NEW
PIVOT ROWS OF

BOTH MATRICES

SWAP

DST SCALR

OLD MMT6,I

ROW

OST MMT5,I

101637
104200
001622

DLD SCALR

11214400

D8T MHT6,I

101630
104200

OLD MMT7,I

ELEMENT

OF

101631
104400
001622

OST SCAL.R

10420\l1
101376

OLD M.MT8,1

104400
470VJc" 101631
47001 104200
47002 001622

OST MMT7,1

47003 104400
4701214 101376

DST MMT8,1

OLD SCALR

EACH

MATRIX

.....

,

,

PAGE. 0189 #15

('
~ ,

MATRIX EXECUTION

0307

47005 035637

0308
8309
0310

~i'006

035637

47001
47010
47011
47012
47013

035630
A35630

ISZ MMT5
ISZ MMT5
ISZ MMT6
tSz MMT6

035631

ISz MMT1

0311
0312
0313

03'14
0315
0316

0317
0318

47022 001626

0321

115131

0322
0323
0324
0 32 5

0326
0321
0328

0329
0330
0331
0332
0333
0334
0335
0336
~337

0338"
0339
0340
0341
0342
0343
0344
03 4 5
0346
0347
0348
~349

0350
0351
0352
0353
0354

0355

47023
47024
41025
47026
47027
47030
47031
47032
41033
47034

ISZ MMT8
ISZ MMT2

INV8

104200

046021
101344

47055
47056
47057
47 0 6 0
47061
47062
47063
47064
47065
47066
47067
41070
47071
47072
47,,73
47e174

035630
104200

101630
015406
001624
104400
101630

035637
027041
061362
071630
061632
071634
071637
104200
101630

002003
027070
015406

001624
104400
101630
035630
035630
035637
027060
065572

POINTERS

,FSB

NO
YES
PIVOT EL.EMENT
8M"ALLER THAN

RERRS+26,I

TOLERANCE?
YES

Fl.e

NO

OST MAXE

COMPU1E
INVERSE OF
PIVOT ELEMENT

LOA MMTl
INA,SZA,RSS

LAST
PIVOT?

JMP INV1"

INV9

ROW SWAPPED?

TOl

JSB ,FOV
OfF PIVEl,I

015410

104400
001624
061633
002007
47035 021053
47036 071631
41937 061344
47040 07163~

47042
47043
47044
47045
47046
47047
47050
47051
47052
47053
47054

JMp INV7
OLD MAXE
JSB
OfF
55A
JSB
OLD

002020

41041 035630

FOUR

ISZ MMT8

035376

0319
0320

ALL

ISZ MMT7

035631

47014 035376
47015 035634
47016 026155
41011 104200
47020 001624
47021 015404

BUMP

STA
LOA
STA
ISZ
ISZ

MMT5
PIVEL
MMT6
MMT6
MMT6

OLD MMT6,I

JSB .FMP
OfF MAXE
DST MMT6,I

ISZ MMT5

JMP INV9

INV10 LOA IDI
STA MMT6
LDA MMT0
STA MMT2
STA MMT5
INVII OLD MMT6,I

yES

NO, PREPARE
TO SCALE
PIVOT ROW
MOVE TO NEXT
ELEMENT OF ROW
MULTIPLY
BY l/PIVOT
AND STORE
NEw VALUE

ROW DONE?
NO
yES

SET
COUNTERS
SCALE ELEMENTS OF

SlA,RSS
JMP INV12
JSB .FHP
OfF MAxE

DST MMT6,I
TNV12 rsz
lSZ
lSZ
JMP
LDB

MMT6

PIVOT ROW
OF DESTINATION

MATRIX

MMT6
MMT5
INV11
eSt

ROW DONE?
NO
yES, SET POINTER TO

PAGE 0190 #15
0356
0357
0358
0359

0360
0361
0362
0363
0364
0365

47075
47076
41077
47t0e
47101

47102
47103
471£14
47105
47106
47107

MATRIX EXECUTION

075400
061350
003004
041514
003004
071376
051344
021206
011631
104200
101631

1ti3~6

47110 002003

0367

47111
47112
47113
47114
47115
47116
47117
47120
47121
47122
47123
47124
47125
47126
47127

027206
104400
001622
061633
2102007
027144
071637
061344

0380 47130
0381 . 47131
0382 4713 2
47133'
0383 47134
47135
0384 47136
0385
47137
0386 47140
47141
0387 47142
0388 47143
0389 47144
0390
47145
47146
0391
0392 47147
0393 47150
47151
0394
41152
0395
47153
03~6
47154
0397 41155
0398 47156
47151
0399 47160

015406

0368
0369
0370
0371
0312

0373
0314
0315
0376
0371
0378
0379

47161

0400

0401
0402

47162
47163
47164

071630

035630
035630
035631
035631
104200
001622
101630
104400
001624
104200
101631
015404
01211624
104400
101631
035637
021122
061362
0716 30
061632
071636

104200
101630
092003
027166
015406

001622
104400
001624
104200
101400
015404
001624
104400

STB VTe
LOA 852
CHA,INA
ADA 1D0
CHA,INA
INV13 STA MMT8
CPA PIVEL
JMP INV19
STA MMT7
OLD MHT1,1
SZA,RSS
JMP INV!9
OST SCALR

DESTINATION ARRAY
SET POINTER'

TO PIVOT COL.UMN
IN FIRST ROW
OF SOURCE
MATRIX

PIVOT ROW?
yES

NO
LOAD MULTIPLIER FOR PIVOT ROW
ZERO?
yES'

NO, SAVE MULTIPLIER

LOA MMTI
INA,SZA,RSS
JMP INV15

LAST

STA MMT5

NO, Sl·T POINTER TO

PIVEL
MMT6
MHT6
MMT6
MMT1
ISZ MMT7
OLD sCALR

LOA
STA
INV14 ISZ
ISl
ISZ

ROW1
YES

PIVOT ELEMENT IN
SOURCE MATRIX
MOVE
TO

NEXT
COLUMN
COMpUTE

JSB .FMP
DEF HMT6,1
'OST MAXE

TRANSfORMED

OLD MMT7,1

JSB .Fsa
OEF MAXE
DST MMT7,1
lSZ MMT5
.JMP INV14

INV1!5 LOA 101
STA MHT6
LOA MHT0
STA MMT4
INV16 OLD MMT6,1

EL.EMENT

ROW DONE!
NO
YES, SET POINTER TO PIVOT
'ROW OF DESTINATION MATRIX
SET

COUNTfR

COMPUTE

5ZA,RSS
JHp INV11
JSB .FMP
OEF SCAL.R

oST MAXE

TRANSFORMED

OLD vr0,I
JSB .FSB

DEF MAXE
oST vT0,I

ELEMENT

PAGE 0191 *15

0403
0404
0405
0406
0407
0408
0409
0410
0411
0412
0413
0414

0415
0416
0411
0418
0419
042(,3
~421

MATRIX EXECUTION

47165 101400
47166 035400
41161 035400
47170 035630
47171 03!5630
47172 035636
47173 021150
47114 061376
47175 041635
47176 035634
47117 027102
47200 035633
47201 026673
47202 061330
47203 040406
47204 070056
47205 124762
47206 061400
47207 041635
47210 P.l71400
47211 027114

ISZ
ISZ
ISZ
lSZ
ISZ
JMP
INV1R LDA
ADA
ISZ

INV17

MOVE
TO

\lT0

VT0

MMT6
MMT6

NEXT
COLUMN
ROW DONE!

MMT4

NO
YES, MOVE TO NEXT
ROW IN SOURCE MATRIX
ALL ROWS TRAN8FORMED?

INV16
MMT8
MMT3
MMT2
,JMP INVt3
ISZ MMTI
JMp INV3
LOA TMPST
ADA ,+23
ST. PBPTR
JMP XECI A,I
INV19 LOA VT0
ADA MMT3
srA VT0
JMP INV18

0422
0423.
0424 •• CODE TO COMpUTE AN ELEMENT
0425.
0426 47212 015402 MAOD JSB ,fAD
DEF 883,1
0427 47213 101352
0428 47214 026321
JMP MLOP1
0429*
MSUB JSB FSa
0430 47215 015404
OfF ~S3,I
47216 101352
0431
JMP MLOPl
0432 47217 026321
iit433.
0434 47220 035362
ISZ 101
IDN
JMP MLOP3
0435 47221 026325
LDA ID0
0436 47222 061514
S'TA lOt
0437 47223 rtJ71362
104200
OLD Fl.0
0438 47224
47225 046021
JMP MLOP3
0439 47226 026325
0440.,
47227 ~15406 SMULT JSB FMP
0441
•
0442 47230 001622
OEF SCALR
JMP MLOP2
0 4 43 47231 026323
0444*
0445 47232 002020 MCPY 55A
0446 47233 015370
JSB ARINV
DST SCALR
0447 47234 10440121
47235 001622
JSB .FSa
0448 47236 015404
DEF MAXE
0449 47237 001624
0450 47240 002002
SZA
0451
47241 002020
SSA
.IMP MCPYl
0452 47242 027247
0453 47243 104200
OLD SCALR
47244 001622
0454 47245 104400
DST MAxE

NO

YES, MATRIX INVERTED?
NO
yES

RELEASE EXTRA
CORE
ADVANCE TO
NEXT ROW OF
DESTINATION
MATRIX

*
**
*

ADD

SOURCE
EL.EMENTS
SUBTRACT

SOURCE
ELEMENTS

DIAGONAL ELEMENT?
NO
yES, RESET
DIAGONAL. COUNTER
LOAD
1.0

MULTIPLY
SOURCE ELEMENT
BY SCALAR

GET
ABSOLUTE
VALUE
SUBTRACT
PREVIOUS
MAXIMUM
POSIT1VE RESULT,?
NO
YES, RECORD
NEw MAXIMUM

PAGE

~192

#lb

MATRIX EXECUTION

47246 001624
~455

47247

0456

47250 101350
47251 126004

10420~

MCPYI OLD 882,1
JMP MLP2A,I

0457.·

0458...
0459.*
0460*
0461.
°462.

0463*

RELOAD VALUE

CHECK VALIDITY Of MATRIX

.*
••

•• *

ENTER WITH (B) POINTING TO THe DyNAMIC .RRAy DIMENSIONS,
COMPUTE THE NUMBER OF ELEMENTS AND CHECK EACH ONE. EXIT
To ERROR IF ANy ELEMENT HAS VALuE 'UNDEFINED'.

ttJ464*
0465 47252 160001
0466 47253 006004
1t)467 47254 075400
21468 47255 100200
47256 101400
0469 47257 065400
0470 47260 003000
0471
47261 071400
0472 47262 035400
21413
47263 006005
0474 47264 125470
0475 47265 160001
0476 47266 001222
0477 47267 002004
0418 47270 001310
0479 47271 027301
0480 47212 051027
0481
47273 006005
0482 47274 115126
21483
47275 160001
0484 47276 002002
0485 47277 1 t"5126
0486 47300 027262
0487 47301 006004
0488 47302 027262

#VCHK LOA 1,1
INS

arB VT0

LOAD ROW DIMENSION

MPY VT0,I

MULTIPLY BY

LOB VT0

COLUMN DIMENSION
SAVE l~S COMPLEMENT
OF' MATRIX SIzE

eMA
STA VT0
VCHKl ISZ VT0
INB,RSS
JMp VCHK,I
LDA 1,1
RAL,RAL

DONEl

NO, MOVE TO NExT ELEMENT

yES

IS

INA
OPERAND
RAR,SlA
NORMALIZEO,
JMP VCHK2
YES
CpA BIT15
MAyBE, WAS FIRST WORD ZERO?
INB,RSS
YES
JSB RERRS+2J,I NO~~ERROR
LOA 1,1
SECOND
SZA
wO~Q ZERO?
JSB RERRS+23,I NO.~ERROR
JMP VCHKl
VCHK2 INB
JMP VCHKl

PAGE 0193 *15
0490 ••
0491.·.
0492.·

0493*
0494.
0 4 95*

0496.
0497fr

0498*
04 99*
0500.
0501 ..

MATRIX EXECUTION

REDIMENSION A MATRIX

47303 035611
47304 015356

0506
0507

41307 006004

47305 015342
47306 115120

0508

47310 175512
41311 015470

0509

47312 035512

0510

47313 165611
47314 006003
47315 027321

0512
0513

0514

47316 015356
47317 015342

0515

47320 115120

0516

47321
47322
47323
47324
47325
47326
47327
47330

0517
0518
0519
0520

0521
0522
0523
0524
0525
0526

0527
0528
0 5 29

.*

UPON'ENTRy CT[MP1)+1 POINTS TO THE REDIMENSION SUBSCRIPT IN
THE PROGRAM AND SBPTR POINTS TO THE CURRENT DYNAMIC DIMENSIONS
OF THE ARRAY, T~E SUBSCRIPT BOUNDS ARE EVALUATED, ROUNDED,
AND RECORDED, IF THE NUMBER OF ELEMENTS IS WITHIN THE
PHYSICAL ARRAY ALLOWANCf,.EXIT WITH TEMP1 POINTING TO THE
WORD FOLLOWING THE SUBSCRIPT AND SsPTR AS UPON ENTRV, ELSE
ExIT TO ERROR.

0502
0503
0504
0505

0511

••

•••

006004
175512
061410
100200

101572
006003

003025
115130
47331 071470

47332
47333
47334
47335

065572

044354
160001
006004

47336 075512

47337 100200
47340 101572

05 30
05 31
0532
0533
0534

41345 035611

0535

47346 t25466

47341. PJ35572
47342 041 4 7 0
47343 002020
47344 115130

#HDIM t5l TEMPt
JSB FETCH
JSB SBFIX

COMPUTE NEW
ROW DIMENSION
15

81T INTEGER • 01

JSB RERRS+17,I NO
INS
YES, SAVE
STB SBPTR,!
TRUE VALUE
srB R00
IN ARRAy
ISZ SBpTR
ENTRY
LOB TEMP1,I
EXPLICIT NEW
SZB,RSS
COLUMN DIMENSION?
JMP RDIH1
NO
JSB FETCH
YES,
JSB SBFIX
COMPUTE
JSB RERRS+17,I
IT
ROIHl INS
SAVE TRUE VALUE
srB SBPTR,I
IN ARRAy ENTRy
LOA ROe
COMPuTE
MPY SePTR,I
NUMBER OF

SZB,RSS
ELEMENTS
CMA,SSA,INA,RSS
SPECIFIED
JSB RERRS+25,1 TOO MANY
STA RDe
LOB 8BPTR
RESET
ADB .-3
ARRAY POINTER
LOA 1,1
AND COMPUTE
INB
NUMBER OF

STB SBPTR
MPY SBPTR,I
ISZ
ADA
SSA
JSB
ISl
JMP

SBPTR
RD0

ELEMENTS
AVAILABLE

FOR ARRAY
SUFFICIENT
PHySICAL SPACE?
RERRS+25,I NO
TEMPt
yES
REDIM,I

PAGE 0194 #16

OUTPUT ROUTINES
ORG 5000AB

0002

50~0~

~003

!)000t.1

174~~0

Pl5247~'

0004

500~1

1tJ1tJ05

50002 001614

0006
00217

!;0003 000112
50004 ~00113

HMASK OCT 1740A~
LCALL OfF LIS10-1
NMt3FA OfF NUMBF

DEC
DEC
DEC
0008 50005 177670
DEC
0009 50006 177666
0010 50007 \76030 M1000 DEC
0011**
**
0012***" PRINT A NUMBER ***
.74

.75
MM72
MM74

74
75

.. 72

.74
.1000

0013 ••
**
0014.
0015. ENTER WITH A FLOATING POINT NUMBER IN (A) AND (8). PRINT THE
0016* NUMA~R AND APPEND BLANKS TO REACH THE PRINT POSITION 8PECIFIED

0017* By -EOPF ON RETURN FROM NUMOl.
0018*
0019 !:50010 002300 #ENOT ceE
JSB NUMOT
0020
00011 015420
0021

JMP •• 3

50012 "'26015

LDA ,+406
OUTCR

060417

~022

fj0~IJ

0023
0024
0025
0026
0027
0028
0029.
1ti030

b0014 015452
b0015 065456
50016 045570
50017 006002
50020 026013
50021 125 4 16

·J8B

50022 114631
50023 116373
50024 102756
50025 002050

MINFX Ole

~031

0032.*
0033***

0034**
0°37·
0~38*

003 9*
0040.
0041.
004 2
0043
0044
0045
0046
0047

SZB

JMP

.-5

JMP ENOUT,I

**

ENTER wITH A FLOATING POINT NUMBER IN (A) AND (8) AND (E) • 1
IF • SIGN IS WANTED. DETERMINE THE FORM OF THt NUMBER AND
SET EOPF ACCORDINGLY. NON.INTEGERS ARE ROUNDED AFTER CONVERSION

TO DECIMAL.

TRAILING ZEROS ARE SUPPRESSED ON NUMBERS WITHOUT

ExPONENTS (AND ON NUMBERS wITH ExPONENTS IF CALLED FROM 'LIST'>,

0049
~051a

50036 002001

RSS

0051

b0037 060417
50040 ~71266
50041 (!161614
50042 075615
5~043 015414

STA
LOA
NUMOI STB
JSB

0053

0054
0055

NO
YES

***
**

#NMOl STA NUMBF
SEZ,RSS
JMP NUMOl
SSA,RSS
JMP •• 5
JSB ARINV
STA NUMBF
LOA ,+55e

0~52

FULL?

~0.09999g959

5 0 0 2 6 071614
00027 002041
5003~ 026042
5~031 002021
f:i0032 026037
50033 015370
50034 07161 4
50035 060434

0~48

OUTPUT
A BLANK
FIELD

MAXFX DEC "999999.5

OUTPUT A NUMBER

0035.
0036*

LOB EopF
ADB CHRcT

ENABLE SIGN
OUTPUT NUMBER

LOA

.... 408

SIGN
NUMBF
NUMBF+l

IFlx

SAVE HIGH MANTISSA
SIGN?
NO
YES, NEGATIVE NUMBER,
NO

YES, NEGATE NUMBER
SAVE HIGH MANTISSA
LOAD '-'

LOAO '+'
SAVE SIGN
RETRIEVE HIGH MANTISSA
SAVE LOw MANTISSA
INTEGER?

PAGE 0195 #16

OUTPUT ROUTINES

0056 50044 026070
00 5 7 50045 102201
0958 50046 026070
0059.
0060.* OUTPUT AN INTEGER
0061*
0062 50047 ~75614
0063 50050 046007
0~64
50051 060365
0065 50052 006021
0066 50053 040362
0067 50054 041570
0068 50055 e03004
0069 50056 071456
0070 50057 042003
0071 50060 002020
0072 50061 016424
0073 50062 061266
0074 50063 002002
0075 b0064 015452
0076 50065 065614
0077 50066 015454
007$ 50067 125420
0019.
0080 •• OUTPUT A FLOATING
0081·
0082 fS0070 060355 NUM02
0083 50071 071336
0084 ~0072 104200
50073 001614
0085 50074 015402
0086 50075 050024
0081 50076 002021
0088 50077 026106
0089 50100 104200
50101 001614
0090 50102 015402
"-1091 50103 050022
0092 0 0 104 002021
0093 50105 035336
0094 50106 104200 NUMOJ
50107 001614
0095 5°110 071316
0096 50111 015412
0097 50112 075320
0098 50113 071322
0099 50114 002400
0100 50115 071324
0101 50116 051322
0102 50117 026141
0103 50120 015300
ffJ104 50121 061322
0105 50122 003026
0106 fS012 ~i 026126
0107 S0124 035324
0108 ~0125 026120

JMP NUM02
SOC
JMP NUM02

•

NO
YES, 16-81T INTEGER!
NO

••

STB'" NUMBF
ADS M1000
LOA ,+6
SSB,RSS
ADA ,+3
ADA CHRCT

CMA,INA
STA EOPF
ADA ,74
SSA
J8B

OUTLN
LDA SIGN
SZA

JSB
LOB
JS8
JMP

OUTeR
NUMBF
aUTIN
NUMOT,I

POINT NUMBER

LOA , .. 2
STA FFLAG
OLD NUMBF
JSB .FAD
OEF MAXFX
SSA,RSS
JMP NUM03
OLD NUMBF
JS8 .FAD
DfF MINFx
SSA,RSS

IsZ FFL,AG
OLD NUMBf
STA
JSB
STB
STA
CLA
STA
CPA
JMP
JS8

MANT1
.FLUN
MANr2
EXP

SAVE INTEGER

3 DIGIT INTEGER?
NO
COMPUTE END.OF.FIELD
SAVE

IT

ENOUGH
ROOM?
NO
YES
SIGN?
yES, OUTPUT IT
NO
OUTPUT THE INTEGER

*

**
*
SET

'FIXED'
FLAG FALSE
LOAD NUMBER
IS NUMBER
LESS THAN
999999.5 "I

NO
YES, IS

NUMBER
LESS THAN
0,09999995 'I

NO, SET AFlxEDI FLAG TRUE

LOAD NUMBER
UNPACK

NUMBER

INITIALIZE
DECIMAL. EXPONENT
ZERO ExPONENT1
NUM05
YES
MBY10
NO
LOA EXP
MULTIPLY
CMA,SSA,INA,SZA
NUMBER BY 10
JMP *.3
UNTIL IT IS
ISZ EXPON
GREATER
JMP NUMOB
THAN 1

EXPQN
ExP

PAGE 0196 #16

OUTPUT ROUTINES

0109
0110
0111
0112
0113

50126 015302

011.
0115

50133 026141

0116
0117

50135 015302
50136 003400

BI1S
0119

50137 041324

0120

0121
0122
0123
~124

012!5

0126.
0127.*
012S*

ti0127 061324
50130 065322
50131 007004

50132 006021
00134 071324

!)014~

026130
50141 003008
50142 071324

50143 064351
50144 075356
50145 066002
50146 2175362

50147 0154122
50150 040431

0131

00151 171362
50152 ~35362
50153 035356
f)0154 026147
50155 015422
50156 040352
50157 00202~
5016~ 026201

0132

0133
0134
0135
0136
0137
0138
0139.
0140*.
0142

0143
0144
g145
0146
0147
~148

0149
1t1150

0151
0152
0153
015 4
1d155

0156
0157
0158
0159
0160
0161

0162
0163
0164

50161
00162
b0163
b0164
50165
ti0t66

065362
044356
160001
002004
050452
002001
~0167 026200
50170 056002

50171 026175
50172 06~437
50173
50174
50170
50176
50t77
50200
502~1

170001
~26162

03 5 3 24
000000
060440
170~01

061324

002021
0.02v.13 026221
~0204 071360
50205 060437
50206 065362
~0202

50207 035360

By 10

UNTIL
IT IS
LESS
THAN

ADA EXPON

JMP
NUM05 eMA
SrA
L08
ST8
LOB
STB

NUM06 JSB
AOA
STA
ISZ
ISZ
JMP
JSB
ADA

1

NU~04

SET ExPONENT
TO TRUE vALuE.l
SET DIGIT

ExPON
,.6
OIGCT

NMBFA
NMPTR

.*•
•

Gf:.TDG
,+608
NMPTR,l
NMPTR

DIGCT

NUM06
GETOG
.... 5

COUNTER
SET BUFFER
POINTER

STORE A
DECIMAL.

DIGIT

sIXTH DIGIT1
NO
YES,

NEXT DIGIT
,.. 5 'I

SSA

JMP NUM09+1

ROUND ASCII MANTISSA

l?J141*

OIVIDE
NUM8ER

ceA

CONVERT MANTISSA TO ASCII

0129
0130

DIVIDE By 10

JSB DBYle
LOA ExPON
NUM04 LOB EXP
CMB,INB
SSB,RSS
JMP NUM05
STA EXPON
JSB DBYl0

•
••

NO

*

LOB NMPTR
NUM07 ADS .-1
LOA 1,1

INA

CPA ,58
RSS

JMP NUM09
cpa NMBFA
JMP NUMoa
LOA .+608
STA 1,1
.JMP NUM07
NUMOa ISZ EXPON
NOP
LOA .+618
NUM09 STA 1,1
LOA ExPON
SSA,RSS
JHP NMOll
STA NMTMP

LOAD LAST
DIGIT
INCREMENT IT
WAS IT A 91
YES
NO

LEADING DIGIT?
YES
NO, OVERLAY

A"
BUMP DECIMAL
EXPONENT AND
OVERLAY A 1

Is NUMBER
LESS THAN 1 ?
NO
YES

LOA .+608

LOB NMPTR
NMoltl ISZ NM1MP

cOUNT ZEROS

PAGE 0197 #\6
0165
0166
0167
0168
0169
0170
0171
0172
0173
0174
0175
0176
0177
0178

0179
0180
0181
0182
0183
0184
0185
0186
01 8 7
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198

0199
0200
0201*

0202.*

OUTPUT ROUTINES

50210
50211
50212
50213
521214
50215
50216
50217
50220
50221
50222

000000
044356
150001
026207
061360
002020
026221
003400
071336
064373
035336

~022J

044352

50224
50225
50226
50227
50230
50231
50232
50233
50234
50235
50236
50237
50240
50241
50242
50243
50244
50245
50246
50247

045570
007004
075456
046004
006020
015424
061266
002002
015452
064350
075356
065362
003400
051336
026247
061324
003000
071360
026261
071360
5~250 062001
50251 051420
!:S0252 026261
S025J 026303

NOP
ADB .",1
CPA 1,1
JMP NM010
LOA NHTHP
5SA

JMP NM011

ceA

STA FFlAG
NMOll LOB ,+12

IsZ FtLAG
ADS ;+3
AD8 CHRCT

CMB,INB
STB fOPF
ADS ,75
SSB

JSB OUTLN
LOA SIGN
SZA

JsB
LOB
STe
LOB

ceA

JMP •• 5
LOA EXPON

eMA

STA NMTMP

·JMP NMO 16

STA NMTMP

LOA LCAL.L
CPA NU~OT
JMP NM016
.JMP NM014

.*•

*
NM012 LOA OIGeT
INA
CPA NMTMP
.IMP .+6

STA
NM016 ADB
LOA
CPA

DIGCT
,.1
1,1
.+608

~JMP

NMO 12

ceA

CPA FFlAG
JMP NM014
LOA EXPON
SSA,RSS
.IMP NMO i 4
STA NMTMP

.

DIGIT 81
YES
NO, ALL SIGNIFICANCE
IN'SIX DIGITS'
NO
YES, SET

'FIXED' FLAG TRU£

COMPUTE
FIELD
WIDTH
SAVE

END""OF.FIElO
MARKER
ENOUGH
ROOM?
NO
YES
SIGN?

yEs, OUTPUT IT
SET OUTPUT
DIGIT COUNTER

FIxED

CPA FFLAG

DELETE TRAILING ZEROS

0203*
0204 ~0254 061356
0205 se255 002004
0206 50256 051360
0207 50257 026265
°2°8 50260 07 1 356
0209 50261 044356
0210 50262 160001
0211 ~0263 050437
0212 50264 026254
0213 50265 003400
0214 50266 051336
0215 50267 026303
0216 50270 061324
~217
50271 002021
'0218 50212 026303
0219 50273 ~71360
0220*

OUTeR
.-1
DIGCT
NMPTR

PLUS 1

LAST

FORMAT?
NO
yES, sET
INDICATOR TO

DECIMAL POINT

sET INDICATOR FOR DECIMAL. poINT
CALLED
FROM 'LIST' .,
YES
NO

AT RIGHT Of
DECIMAL
POINT?
NO
YES, DELETE ZERO
LAST
DIGIT
07

YES
NO, FIXED
FORMAT?
NO
yES, LEADING
DECIMAL POINT?
NO
YES, SET LEADING ZEROS COUNTER

PAGE 0198 #16

OUTPUT ROUTINES

0221·* OUTPUT MANTISSA
0222.
0223 50274 060435

022A

50275 002001

0225
0226
0227
0228
0229
0230
0231
0232
0233

50276 060437
50277 015452

0234
0235
0236

0231
0238
0239
0240

0241

br2J300 035360
50301 026276
50302 035356
~0303 0662102

50304 075362
~03i05 026312
50306 035360
50307 026312
50310 060435
~0311 026314

5 0 312 161362
50313 035362
50314 015452
~0315 035356
50316 026306
50317 03 5 33 6
~0320 125420

.*

•LDA

,+568

RSS
NM013 LOA ,+60B
JSB OUTCR

NMTMP
NM013
OIGeT
NMBFA
5T8 NMPTR
JMP .... 5
NM015 ISZ NMTMp
JMP ·+3
LOA .+568
JMP .+3
LOA NMPTR,I
ISl NMPTR
JaB OUTeR
ISZ DIGCT
JHP NM015
ISl FFLAG
JMP NUMOT,I

ISZ
JMP
ISZ
NM014 LDB

0242
0243
0244.
0245 •• OUTPUT THE EXPONENT
0246.
LOA E
0247 00321 060464
0248 00322 015452
JSB OUTeR
LOA +558
0249 50323 060434
LOB EXPON
0250 50324 065324
0251 50325 006020
SSB
CMB,INB,RSS
0252 00326 001005
0253 50327 060432
LOA .+538
0254 50330 075324
STB ExPON

..

OUTPUT A
DECIMAL POINT
OUTPUT
A ZERO

MORE LEADING ZEROS?
yES

NO, COUNT DECIMAL POINT

SET

DIGIT POINTER

DECIMAL poINT NEXT?
NO
YES, LOAD IT

LOAD NEXT
DIGIT
OUTPUT CHARACTER
MORE DIGITS?
YES
NO, EXPONENT?
NO

••.

0255

0256
0251
0258
0259
0260
0261

0262
0263
0264
0265
0266..

50331 015452
50332 061324

CL.8

OIV ,+10

50335 000371
~0336 040437
~0337 044437
50340 075324
50341 015452
b0342 061324
50343 015452
00344 125420

~271.

~273

EXPONENT
SIGN

JSB OUTeR
LOA EXPON
JSB OUTeR

.*.

EXPONENT'S
10'S DIGIT
OUTPUT IT
OUTPUT
l'S DIGIT

JMP NUMOT,1
••

.*

COMPUTl NExT DECIMAL DIGIT AND RETURN WITH IT IN (Al,
suBTHACT IT OUT of THE NUMBER.

0272*

0274
0275

ADA .+608
ADe ,+608
STB EXPON

GET DIGIT TO OUTPUT

~269.

0270.

AN

COf'4 P UTE

50333 006400

50334 1004('10

0267.**
0268 ••

JSB OUTeR
LOA EXPON

OUTPUT AN 'E'
OUTPUT

50345 015300
50346 065322
00347 007004

#GTDG JSB MBY10
LOB EXP
CMB,INB

MUl.TIPLY BY 10
GET EXPONENT IN (8)
AS NEGATIVE

PAGE 0199 #16
0276
0277
0278

0279
0280
0281
0282
0283
0284
0285
0286

!S0350
S0351
50352
50353
50354
50355

OUTPUT ROUTINES

012000
001200
c;,06024

026351
010500

JMP *'"2

~71402

STA FD0

ti0356 065322

LDB EXP
eMB,INS
RAR
SSB,INB

S0357 007004
~0360 001300
50361 006024
50362 026360

0287

50363 Vl213iO

0288
0289

50364
50365
50366
50367

0290
0291

AND HMASK
RAL
SSe,INB

065320
015304
061402
125422

AND 8377

JMP •• 2
XOR MANTI

LDB ~ANT2
JSB NORML
LOA .FD0
JMP GErOG,I

RETAIN HIGH 5 BITS
NORMALIZE TO 8IT 15
ROTATE INTEGER
INTO (A)
EXTRACT
DIGIT
ROTATE
SACK
REMOVE-.

DIGIT
NORMALIZE REMAINDER
LOAD (A) WITH DIGIT

PAGE 0200 #16
9293.·
0294 •••

OUTPUT ROUTINES

..*••
••

OUTPUT AN INTEGER

0295.*
0296.

0297*

ENTER WITH. POSITIVE INTEGER IN (8).

0298. LEADING ZEROS,
0299.
0300 50370 060353 #OTIN
0301 50371 011374
0302 50372 061015
0303 50373 071444
0304 50374 002400
0305 50375 011452
0306 50376 101040 OUTII
030·7 00371 100400
50400 101444
0308 50401 07545rd
0309 50402 051452
0310 b0403 026406
0311 50404 040437
0312 50405 015452
0313 50406 065450 OUT12
0314 50.07 035444
0315 50410 035374
0316 50411 026376
0317 50412 060001
0318 00413 040437
0319 50414 015452
0320 50415 125454
0321*·

0322*.*

SPACE FOR A COMMA

0323 ••
0324.
0325* MOVE
0326· NEXT
0327*
03 2 8 5 0 4 1 6
0329 50417
0330 50420
0331
50421
0332 ~0422
0333 5~423
0334 50424
0335 50425
0336 50426
0337 f)0427
0338 50430
0339 !:)0'-31
0340 50432
0341 50433
0342 ~0434
0343 50435

OUTPUT IT WITHOUT

LOA ,-4

SET DIGIT
COUNTER
SET DIVISOR

"" ......

SUPPRESS

STA DGCNT
LOA LOYSR
STA OTt

"I

j,

ADDRESS

ZEROS

STA oUTeR
LSR 16
DIy OTt,l

DIVIDE INTEGER BY
CURRENT DIVISOR

STB 013
OUTeR

SAVE THE REMAINDER
LEADING ZER01

CPA
JMP
AOA
JSB
LOB

OUT12
,+608

OUTeR
OT3

ISZ OTl
IsZ DGCNT
JMP OUTIl
LOA 1
ADA ,+608

JSB OUTeR
JMP CUTIN,I

yES

NO, T'URN OFF ZERO SU,PRESS
OUTPUT DIGIT
RETRIEVE REMAINDER
SET fOR NEXT DIVISOR
ALL DIVISOR$ USED?
NO

yES

OUTPUt
LAST DIGIT

••
•••
.*

TO THE NEXT FIELD OF 15 ON THE PRINT LINE OR TO THE
LINE IF THE CURRENT ONE IS EXHAUSTED.
06557 0
00600l
125426
044340
006021
026417

015410
060417
0154S2
035470
026425
065570
046006
006921
015424

125426

#EDlH LOB CHRCT
SZB,RSS
JMP EDEL.M,I
AOB .-15
SSB,RSS
JMP #EDLM+l
STB EOl
LDA ,+408
J8B OUTeR
ISZ EOl
JMP .... 3

LOB CHRCT
ADS MM74

SSB,RSS
JS8 OUTLN
JMP EDEL.M.I I

LOAD CURRENT CHARACTER COUNT
ZERO'l

yES, AT START OF ZONE
NO, SUBTRACT ZONE WIDTH
NON.NEGATIVE RtSULTt
yES
NO, SAvE COUNT
OUTPUT
A BLANK
ZONE FULL?
NO
yES,
PAST THE
END OF LINE?

yEs

NO

PAGE 0201 #16
0345..
0346...

OUTPUT ROUTINES
••

OUTPUT AN ENO.OF-LINE

ta3.'.*
0348 !504J6 06e4!56
0349 ~0437 045570
03~0
b044~ 015456
0351 !S0441 ",60402
0352 00442 915452
0353 50443 060314
0354 !S0444 015452
0355 0 9 445 06 0 371

0361.*

1tJ372
0313
037~

0375
0376
03 71

1tJ378
0379
0380
0381
0382*.

••

LOB EOPF
A08 CHRCT
5T8 fOPf'
LOA ,+238
J8B OUTeR
LOA .+158
JS8 OUTeR
LOA ,+128
JSB OUTeR
.IMP QUTLN,I

0356 50446 015452
0351 50447 125424
0358*.
0359*.. OUTPUT A CHARACTER
0361*
0362*
03 63*
0364.
0365*
0366*
0 3 61
0368
0369
031e
0311

•••
RESET

END.Of.FIELD
MARKER
OUTPUT
AN X.OFF

OUTPUT A
CARRIAGE RETURN
AND A

LINE FEED

••

*••

••

OUTPUT THE CHARACTER IN (A). NON.PRINTING CHARACTERS DO NOT
COUNT AGAINST THE 72 CHARACT~RS PER LINE. A CARRIAG[ RETURN
('CONTROL A. IN A STRING OR AN END-OF-LINE, FOR EXAMPLE)
RESETS THE PRINT POSITION TO 0.
!oj 04 5 0 071310
50451 050474
60452 026456

!)0453 010470
5045 4 002002
!S0455 035570

*OTCR STA OCTMP
CPA 8117
JMP OTtRA
AND .140
SZA
ISZ CHRCT

50456

EQU •

521456 006400
!S0451 061310
5 0 46 0 05 0 374

Ct.!

LOA OCTMP
CPA ,+158
ST8 CHRCT
LDB ML.INK+l
AOB ,,,,?L.INK
JSB OUTCH,I
JMP OUTCR,I

5 04 6 1 07557 0
50462 064212
~0463 044341
!S0464 114124
50465 125452

0383...

BACKSPACE IN BUFFER

0384t*·
0385*

SAVE CHARACTER
CHECK FOR
RUBOUT
NON.PRINTING
CHARACTER1

NO, COUNT IT

RETRIEVE CHARACTER
CARRIAGE RETURN?
YES, ZERO CHARACTER COUNT

••
***
••

0386. BACKSPACE IN BUFFER
0387.
0388
0389
VJ390
0391

0392
0393

50466 060255
~0467 002004
50470 t60000
50471 030245
50472 114736
50413 125450

#BI(SP

LOA MAIN
tNA
LOA ",1
lOR BKS
JSB 51;al.p,I
JMP BCKsp,I

TELL 2114

TO BACKSPACE
IN BUFFER

PAGE 0202 *16

OUTPUT ROUTINES

.*.

0395**
**
0J96 ••• FETCH NEXT BUFFER CHARACTER
*.
0391**
0398*
0399. THE NEXT CHARACTER fROM TH~ INPUT BUFFER IS FETCHED. NORMAL
0400* EXIT IS TO (P+2) WITH THE CHARACTER IN (Al. 8LANKS ARE SKIPPED

0401. IF 'BLANK' • 40 OCrAl, A 'CARRIAGE RETURN' EXITS TO (P+l)
0402 50474 060215 'STeR LOA GTe
LOAD OPCODE
0403 50475 064255
LOB MAIN
FOR GET CHARACTER
0404 50476 006004
INB
.> TTy
0405 50417 130001
lOR 1,1
TTY
IN 8ITS 12-8
CLB
BLOCK
0406 ~0500 006400

*

0407
0408
0409
0410

50501 174632
50502 114736
50503 102311
~0504

026503

STB Delel,I
JSB S14SC,I

SFS CH2
JHP .-1

50505 102511
50506 164634
50507 174632
S0510 051571
50511 026474
50512 050374
50513 125446

LIA CH2

0418
0419

50514 064000

LOB 0

0420
0422

50516
50517
50520

0423
0424

50522

0411
0412
0413
0414
04 1 5

0416
0417

0421

~0515

50521

040317
002021
040450
040470
035446
125446

LOB DCLC2,I
STB Dele1,I

CPA BLANK
JMP _GTCR
CPA ,+158
JMP GETeR,I
AOA M96
SSA,RSS
ADA MJ2
ADA ,140
ISZ GETeR
JMP GETeR,I

*

CLOCK

CALL 2114 DRIVER
WAIT FOR
RESPONSE
LOAD CHARACTER
UNBLOCK
CLOCK

BLANK?
YES •• IGNORE IT
NO, CARRIAGE RETURN'
yES
COpy

CHAR TO B

LOWER CASE
MAKE INTO uPPER CASE
NO~·EXIT

TO (P+2)

PAGE 0203 #16

LIBRARy FUNCTIONS

0426. •

0427**

•

EXECUTE TAB (X)

9428* •

0429

~0523
~0524

015440

0430
0431

060273
50525 006400

0432

50526 075470

0433

50527 065754

043A

50530 006002
50531 026536

0435
0436
0437
0438
0439
0440

ETAB

50532 066005

50533
50534
5 0 535
50536

044000
006021

026550
003004

0441

50537 041570

0442
0443

50540 002021
50541 026551

0444
0445

50542 011434
50543 060417

0446

50544 015452

0447

50545 035434

0448
0449
0450
0 4 51
0452

50546 026543
~0547 002001
50550 015424
50551 061027
50552 124662

0453.

•
•

JSB
LOA
CLB
SlB
LOB
SZB
JHP
LOB

,lENT
INF
EOL
FFLG
ETAB2

INTEGERIZE ARGUMENT
ARG :. 32767

SET FLAG TO
'TAB OCCURREO'
GET FORMAT FLAG
IN FORMATTER 1
YES

MM72

AOS A

SSB,RSS
JMP £TAB4-1
ETAB2 CMA,INA
ADA CHRCT
SSA,RSS
JMP ETA84
STALBTHP
ETA8t LOA ,+408
JSB OUTeR
lSI LBTHP
JMP ETAS1
RSI
JSB OUTLN
ETA84 LDA 81T15
JMP FRET,l

YES, GO TO NEXT LINE
NO
ANY BLANKS
REQUIRED?
NO

yES

OUTPUT
A BLANK
DONE7
NO
yES

SO OPCHK DOESN'T BARF

*

0454.. EXECUTE SPA(X)
•
0455 50553 015440 ESpA
04b6 5 0 55 4 060213
0457 50555 006400
0458 50556 075470
0459 50557 002003
0 4 60 50560 026606
0461 50561 002020
0462 50562 026606
0463 5B563 003004
0464 ~0564 071774
0465 50565 065754
0 4 66 50566 006002
0467 ~0567 026576
0468 50570 040466
0469 50571 065570
0470 50572 007004
0471 50573 040001
0472 50574 002020
0473 5 0 575 026605
0474 50576 061571 ESPAI
0475 50577 015452
0476 50600 035774
0477 50601 A26576
0418 b0602 003400
0479 50603 071774
0480 50604 002001
0481 50605 015424

JSB ,lENT
LOA INF
CLB
Sle EOL
SZA,RSS
JMP ESPA4
'SSA

JMP ESPA4
CMA,INA
STA REPeT
LOB FFLG
SZB
JMP ESPA!
AOA ,72
LOB CHRCT
eMB,INB
ADA 1

INTEGERIZE ARGuMENT
ARG

32761
FUNCTION FLAG
TO ExECUTED
IS IT ZERO .,
YES
NO, NEGATIvE!
YES
NO
OUTPUT
)I

SET

NO

SPACING PAST
END OF LINE 1

SSA

JMP
LDA
JSB
ISl
JMP
ctA
STA

ESPA4"'1
BLANK
OUTeR
REPel
ESPA1

REPeT

RSS

JSB OUTLN

RESET
REPel

PAGE 0204 *16
0482
0483

LIBRARY FUNCTIONS

50606 061021
50607 124662

ESPA4

0484*

0488

0489
0490
0491
04 92
0493
0494
0495
0496
0497
0498
0499
0500

0501
0502
0503

0504
0505

0506
0507
0508

0509
0510
0511
0512
0513
0514
0515
0516
0517
0518

0519
0520
rtJ521
0522
0523
0524
0525
0526
0527

~:X~:ClJTf

50610
50611
50612
50613
50614
5 0 615
50616
50617"

lIN(X)

015440
060502
006400
075470
002021

026632
0405912
002020
002400
040316
011774
060371

50620
50621
50622
50623
50624 015452
~0625 035774
50626 026623
50627 0'13400
50630 071774
50631 026656
50632 040316
0 0 633 002 0 2 1
50634 002400
50635 040502
50636 002002
50637 026647
50640 060374
50641 015452
50642 002400
50643 015452
50644 002400
50645 071570
50646 026656
50647 003004
50650 071774
50651 015534
50652 035774
50653 026651
50654 003400
50655 071774
50656 061027
50657 124662

BIT15

SO OPCHK DOESN'T BARF

JMP FRET,l

0485.
0486*.
0481.

LOA

•*
•

ELIN*

.JS8 .IENT

INTEGERIZE ARGUMENT

LOA 8400
CL8

SET FUNCTION FLAG

STB EOl

SSA,RSS
JMP fLINt
ADA 8400
S5A
CLA
ADA M256

srA

to EXECUTED
NO, NEGATIVE 'I
NO

REpeT

LOA ,+12 8

JSB OUTeR
ISZ REPeT
JMP *-3
ceA
srA REPel
JMP ELIN2
ElINt ADA M256
SSA,RSS
CLA

REPeT "LINEFEfDS

REINITtALIZE REPeT
YES

ARGUMENT > 2 56 ?

ADA 8400

SZA
JMP
LDA
JSB
CL.A
JSB

OUTeR

Ct.A
STA

CHRCT

ELIN3
.+158

OUTeR

JMP ElIN2
ELIN3 CMA,INA
sTA REPeT
Js"8 OUTCL.

ISl REPeT

yES

OUTPUT
eR-LF's

JMP ... 2

ceA
STA REPeT
ELIN2 LOA BIT15
JMP FRET,I

RESET
REPeT
SO OPCHK DOESN'T BARF

PAGE 0205 #17

LIBRARY FUNCTIONS

0002* •
0003.* COMPUTE ABS(X)
0004. •

002020

0A05

~~66~

0006
0007

b066t 015310
~0662 124662

01tl08*

*

0009.*

001S.
0011*
0012*
00130014
0015
0016
0017
0018
0019
0020
0821
0022
0023
0024
0025

50663
50664
50665
50666
b0667
50670
50671
50672
50673
50674
50615
50676

50677
50100
507QJl
50102
50703
50704

0036

bra706

0837
0038
0039
0040
0041
0042
0043 .

50107
50710
50711
50712
50713
50714
50715
50716
50717
50120
50721
50722
50723
50724
50125
5 0 126
50727
50730
50731
50732
007 33

0048
0049
0050
0051
0052
0053
0054

075434
015414
026674
015434
064416
075322
065434
015306

124662
061260

065434
124662

fINT

JSB ARINV
JMP FRET,1

*

~0705

0154t4

115152
002002
115152
060001
°1°362
050001
002001
115152
042736
124000
060172
040526
006400
100400
000510

026734

060171
006400
100400
000407
060001
026134
060171
006400
100400
0004,,7
002001

06°17 0

ST8 LSTMP
JSB IFIX

JMP
STe
LOB
STB
LOB
JSB
JMP

EINT1
LBTMP
.+31

EXP

LBTMP
.PACK
FRET,I
EINTt LDA TEMP6
LOB L8THP
JMP FRET,I

EXECUTE TIMeX)

0028*
0029
0030
0031
0032
0033
0034
0035

0046
0047

•
•

SSA

ARGUMENT NEGATIVE1
yES, NEGATE IT
NO

ENTER WITH NUMBER IN (Al AND (Bl. EXIT WITH FLOATING
POINT fORM OF ENTlER IN CA) AND (B).

0021**

~045

**

EABS

COMPUTE INT(X)

0026. *

0044

•

ETIM

SAVE (8)
TAKE ENTlER
ALL SIGNIFICANCE IN MANTISSA
SAVE (8)
CORRECT FOR
BINARY POINT BIA8

RETRlEVE (Bl

NORMALIZE AND PACK

RETRIEVE
NUMBER

••
•

JSB IFIX
INTEGERIZE ARGUMENT
JSB RERRS.43,I ILLEGAL ARGUMENT
SZA

JSB RERRS+43,I ILLEGAL ARGUMENT
LDA 1
18 ARGUMENT
AND • +3

;C1I3

CPA 1

AND

>-01

YES

RSS

JSB RERRS+43,I NO •• ILLEGAl ARGUMENT
ADA DTMT8
BRANCH TO
JMP ~,l
APPROPRIATE ROUTINE
LDA DATIH.1
OF 100 MS
ADA 036K
UNITS
CL8
CONyERT
DIV 0600
TO MINUTES

*

JMP ETIM3+1
ElIM1 LOA DATIM
CL.B

DIv .+24
LOA
JMP
ETIM2 LDA
CLB
DIV

1
ElIM3+1
OATIH
.+24

HOURS OF YEAR
CONVERT
TO DAYS

REMAINDER IS HOUR 0' DAy
HOURS OF YEAR
CONVERT
TO DAYS

RSS

ETIM3 LDA YEAR

GET YEAR

PAGE 0206 #17
0055
0056

LIBRARY FUNCTIONS

50734 105120
S0735 124662

0051

OCT 105120

JHP
OTMT8 OEF
OfF
OfF
OEF
OEF

FRET,l
*.1,1

CONVERT TO FLOATING POINT
EXIT WITH RESULT IN (A, AND (8)

50736 150137
ETIM0
0058 50737 050712
0
ElIM!
0059 ~0140 A5072
0060 t;0741 050726
ETIM2
0061
50742 050733
ETIM3
0062* •
0063.. COMPUTE RND(X) *•
0064. ..
0065.
ee66* THE RANDOM NUMBlR FUNCTION COMPUTES A RANDOM NUMBER FROM THE

•

0067.
0068.
0069.
0070.
0071.
0072
0°7 3
0°7 4
0075

0076

0077
0078
0079
0080

0A81
0082
0083
0084

0085
0086

FORMULAS:

X(N)CA.Xc N.l)+C(MOD 2t30)
RND .X/2t30 MIN (1-2t-23)
50743

50 , 43 002021
!S01 44 026751

50745 005265
50746 001600
5 0 747 07 1564
5075~ 075565

5 0 751
50751 061564
50752 100200
!S0753 051013
5 0 754 071564
b0755 061565
50]56 100200
50757 051012
50760 041564
50761 043014

5 0 762 071564
50763 002500
50164 071322
50165 061565
50766 ' 100200
,50767 051013
009 2 5 0 170 043 01 5
0093 50171 002040
0"94 50772 006004

0087

0088
9089
009"
0091

0095
0096
0097
0098
0099
0100
0101
0102
1d103
0104

0105
0106

0107

50773 001265

50774 071565
b0775 0135600

ERND

EQU •
SSA,RSS
JMP ERNO!
R8L,CL.E,ERB
fLA
STA RNOXl
STB RNDX2
ERNDt EQU •
LDA RNDX1
MPy RNDA2

COMp:UTE FIRS'T
CROSS PRODUCT.

ADA RNOXt
ADA RNoel
STA RNDXt
CLA,CL.E

ADD IN FIRST,
ADD IN HIGH PART OF C.
SAVE TOTAL. (THIS 1$ HIGH PART).

S'TA

exp

sET EXP,".

LOA RNDX2
MPY,RNDA2

cOMPUTE LOW ORDER .ROOUCT.

ADA RNDC2
SEZ

ADD IN LOW PART OF C.
ADO ANY CARRY INTO

INS
RAL,CLE,ERA
STA RNOX2

E•• (15),A(15).0.

00177 005665

51000 076564
510~t 001200

STB RNDX1
RAL

054361
002001
124662
060273

A NEW SEED

SAVE (ONLY NEED lOW ORDER PART)
COMPUTE 2ND
CROSS PROOUCT.

50776 045564

51004
51005
51006
51001

YES, USE PREVIOUS VALUE

NO, MAKE A

STA RNDXl
LOA RNDX2
MPY RNDAt

ELB
ADe RNOXt
ELB,CLE,ERa

!:S1002 101100
51003 015306

POSITIVE ARGUMENT,

swp

JSB .PACK

cpa .+2
RSS

JMP FRE'T, 1

LOA INF

B.

SAVE LoW QRDER RESULT.

SHIFT HIGH ORDER PART & ADD IN
PREVIOUS TOTAL.
CLEAR BIT 15 AND STORE.
SHIFT A ADJACENT TO B.
EXCHANGE REGISTERS ANP
PACK,
TEST fOR RESULT_t.a

EXIT IF NOT,
SET RESULT TO 1-2'.23

PAGE 0207 #17

LIBRARY FUNCTIONS

0108

5101~

0109
0110*
0111*
0112
0113
0114

51011 124662
51012
b1013
51014
51015

064316

002722
007335
016441
007701

LOB M256

JHP FRET,I

RNDAt DEC 1490
RNOA2 DEC 3805
RNOCl OCT 16441
RNDC2 OCT 7101

A
A
C
C

DIV
MOD
OIV
MOD

2t15
2'15
2t15
2t15

0115
0116. *
•
0117.. COMPUTE SGN(X) •
011S. •
•
0119.
0120. ENTER WITH ARGUMENT IN CA) AND CB). IF ARGUMENT IS
0121* NEGATIVE RETURN .1.0, IF ZERO RETURN 0, IF POSITIVE
0122. RETURN 1,121 •
0123*
0124 ~1016 006400 ESGN CLB
CLEAR LOW pART OF NUMBER
ZERO.,
SZA,RSS
0125 51017 002003
0126 51020 124662
JMP FRET,I
VES, RETURN "
0121 51021 002021
SSA,RSS
POSITIVE?
YES, LOAD EXPONENT 'OR .,
LOB .+2
0128 ~1022 064361
LDA Ft..G8T
NO, LOAD HIGH PART OF .1
0129 51023 061027
0130 51024 0060212
SZB
WAS ARGUMENT POSITIVE1
RAR
yES, SET RESULT TO .1
0131 51025 001300
0132 51026 124662
NO
JMP FRET,1
0133* *

0134..

COMPUTE TYP(X)

0135* •
0136.

0137.
01 38*
0139.
0140*
0141.
0142.
0143.
0144.

UPON ENTRy CAl AND (8) HOLD A FILE NUMBER IN FLOATING POINT

FORM,

FILE 0 REFERS TO THE S.

OF~RECORD

RESPECTIVELY,

0148

51032
51033
51034
51035

0153
0154

0155
0156

0157
0158
015 9
0160

0161
0162
0163

IF THE FILE NUMBER IS POSITIVE; RETURN

WITH THE VALUE CORRESPONDING TO THE FIRST ITEM FOUND OF, ONE
OF THE FIRST THREE TYpES.
51027 075434
51030 065234
51031 075643

0150
0151
015 2

IF THE FILE

NU M8E R IS NEGATIVE RETURN 1.0, 2.0, 3.O, OR 4.0 IF THE NEKT
ITEM. IN THE FILE IS A NUMBER, STRING, EMD-Of.'ILEj OR ENO.·

0145
0146
0141
0149

•
•*

002003
027063
001400
002020
~11:S6 006400
51037 075651
51040 065434
51041 002020
51042 015370
51043 015342

51044 115142
51045
51046
51047
51050
51051

075234
061234
064355
015506

015512

ETYP

STB LBTMP
LOB FILE*
STB pINTG
SZA,RSS
JMP ETYPl
eeB
59A
CLB
5T8 EORFL

LDB lBTHp
S8A
JaB ARINV
J98 8aFIX

JSB RERRS+35,1

STB
LOA
LDB
JSB
JSB

FILE#
FILE'
,.2

RQSiR
GTTYP

SAVE

(e)

SAvE VALuE
of fILl.

'DATA' FILE1
YES
NO, IGNORE
END.Of.RECORDS
UNLESS ARGUMENT
IS NEGATIVE
RETRIEvE (8)
TAKE ABSOLUTE VALUE
Of ARGUMENT
15-81T INTEG£R?
NO

YES
VALIDAtE
f'ILE

GET TypE

PAGE 0208 #17

LIBRARY FUNCTIONS

0164
0165

51052

~65643

51~53

075234

0166
0167

~1054
5105·~

105120

0168
0169

51056

0170

5106~

0171
0172

51061
51062

~17J

51063

0174
0175
0176
0177
0118
0179
0180

51064
51065
51066
51067
51070 006021
51071 060361
51972 027052

51051

124662
060362
065244
055513
027052
015:560
003400
051262
021056
165244
002404

ETYPt LOB
STe
OCT
JMP
ETYP2 LOA
LOB
CPS
JMP
JSe
ETYPJ ceA
CPA

PINTG

FIlE*

1 0 5120

FRET,I

,.3

NXTDT
SYMTB
ETYPI
SETOP
DCCNT

JMP !ryP2

LOB NxTDT,I
CLA,INA
SS8,RSS
LOA .+2

.JMP ETYPl

RESTORE

FILE,

RETURN TYPE IN
FLOATING POINT FORM
OUT-OF-OATA
CONDITION?
yES, CA) • 3

NO, SEEK NEXT 
HORE DATA IN
CURRENT STATEMENT!
NO
yES, LOAD TyPE WORD
SET NUMBER
NUMBER?
NO, SET FOR STRING

PAGE 0209 #17

LIBRARy FUNCTIONS

0182.·
*.
0183**. COMPUTE CHEBYSHEV(X) *.*
0184.·
*.
0185 51073 015406 tlCHE8 JSB ,FMP
0186 51074 051366
OEF K2
0187 51075 104400
OST X2TMP
51076 001630
LOB .CHEB,I
0188 51071 165436
8T8 CTMP
0189 51100 015316
OLD 1,1
0190 51101 104200
51102 100001
0191 51103 104400
OST DTMP
!)1104 001636
CLA
0192 51105 002400
0193 51106 011634
STA BTMP
0194 51107 071635
STA 8TMP"'1
0195 51110 035376 CHEBt tSZ CTMP
0196 Sl111 035376
ISZ CTMP
LDA CTMP,l
0197 51112 161376
SZA,RSS
0198 !i1113 002003
JHP CHEB2
0199 51114 027136
OLD BTMp
0200 51115 104200
51116 001634
05T ATMP
0201 51117 104400
51120 001632
OLD DTMP
0202 51121 104200
51122,001636
OST BTMP
0203 51123 104400
51124 001634
JS8 ,FMP
0204 51125 015406
0205 51126 001630
OfF X2THP
0206 51127 015404
JSB ,FSa
DEF ATMP
0207 51130 001632'
0208 51131 015402
JSB ,FAD
OfF CTMP,1
0209 51132 101376
0210 51133 104400
OST DTMP
51134 001636
JMP CHEBl
0211 51135 02711 0
0212 51136 104200 CHEB2 OLD OTMp
51137 001636
JSB ,FS8
0213 51140 015404
0214 51141 001632
OfF ATMP
0215 51142 015406
JSB .FMP
OfF HALF
0216 h1143 001031
0217 51144 035436
ISZ .CHEB
0218 51145 125436
.JMP .CHES,I
0221**
.*
0222*** LIBRARy ENTIER *.*
0223**
**
0224*
0225. ENTER WITH NUMBER IN (A) AND (8)_
0226* THEN EXIT TO (P+l), EL.SE EXIT TO
0227* ENTlER Or THE ARGUMENT IN (A10
~22a.

X2TMP • )(*2

POINTER TO COEfFICIENt TABLE

DTMP .. COEFF(N)

8 • "

CeN) • 01

YES
NO
A .. B

B • 0

o • tOEFF(N)-A+B*X2

IF ExPONENT> 14
THE

(P~2)"'ITH

PAGE 0210 #17
0229
0230
0231
0232

0233
0234
0235
0236
0237
0238
0239
0240

0241
0242

LIBRARY fUNCTIONS

51146 071434
51147 060001
5115~

010500

51151
51152
51t53
51154
51155

000033
027156
040340
002021
125440
51156 035440
51157 061434
51160 015414

#IENT STA LBTMP
LoA 1
AND 8377
SlA,RAR

JHP IENT1
ADA .... 15

SSA,RSS
JMP .lENT,I

IENTl I8Z ,lENT
LOA
JS8
NOP
LOA
JMP

51161 000000

51162 060001
51163 125440

LBTMP
IF Ix
1

,lENT,1

SAVE (A)

EXTRACT
EXPONENT
NEGATIVE?
YES
NO, LESS THAN
OR EQUAL TO 1.7
NO
YES
RESTORE CA)
TAKE ENTlER
LOAD INTEGER
INTO CA)

0244 ••
**
~245 •• *
MULTIpLY BY A POwER OF 2 ***
0246**
••
0247*
0248* ENTER WITH NUMBER IN CA) AND (8), AUGMENT EXPONENT
02 4 9* BY THE VALUE POINTED TO BY (P+l) AND EXIT TO (P.2).
0250* NO CHECK ON EXPONENT UNDERFLOw OR OvERFLOW,
02f)1.
SZA,RSS
ARGUMENT ZERO?
0252 51164 002003
JMP
PwR2A
0253 51165 A27200
yEs, RETURN 0
STA X2TMP
NO, SAyE HIGH PART OF MANTISSA
0254 51166 071630
025·5 51167 015412
.JS8 ,FlUN
UNPACK LOW pART of NUM8£R
0256 5117~ 075631
STB X2THP+.1
SAVE LOW MANTISSA
0257 51171 165442
LDB .PWR2,1
COMPUTE NEW
0258 51172 140001
ADA 1,1
ExPONENT
0259 51173 00t200
RAL
POSITION
AND el17
AND MASK IT
~260
51174 010500
0261 51175 070001
COMPUTE NEw lOw
STA 1
ADS X2TMP+l
0262 51176 045631
PART of NUMBER
0263 51177 061630
LOA X2THP
RETRIEVE HIGH MANTISSA
0264 51200 035442 PWR2A ISZ .PWR2
JMP .PWR2,I
0265 51201 125442

0266* *
0267*. COMPUTE COS(X) * *
0268. *
•
0269 51202 015402 EtaS J5B FAD
0270 51203 051470
OEF PIBY2
0271* *
0272** COMPUTE SIN (X) •
0273.
*
0274 51204
01540 6
0275 51205 051254
~276
51206 104400
51207 001622
0277 51210015402
0278 51211 051364
0279 51212 01.5442
0280 51213 000355
0281 51214 015440
0282 51215 115136

ESIN*

COMPUTE
SIN()(+PI/2)

JSB .FMP
DEF TOPI
08T XTEMP

JSB ,FAD
OEF Kl
J8B .PWR2

OfF ,-2 .

JSB ,lENT

JSB RERRS+31,I

EXPONENT EXCEEDS 14

PAGE 0211 #17
0283
0284
0285

0286
0287
0288

0289
0290

0291
0292
QI~n:1

"""7-

0294
0295
0296
0297
k!29S

0299
0300
0301
0302

0303

51216
51217
51220
51221

LIBRARY FUNCTIONS

051256
015402
51222 210 1622
51223 104400
51224 001622
51225 015404
51226 0'1364
51227 002020
51230 027237

0316

JSB .rSS
OEF XTEMP
DST XTEMP

51234 001622
51235 104400
51236 001622

51237 104200
t;1240 001622
51241 015406

-.

X<11
YES
NO

X • 2-)(

OEF XTEMP
JSB .PWR2

015442

DEF .... 1
JSB .FSB
DEF t<1
JSB .CHEa
DEF COEF2
JS8 ,FMP
OfF XTEMP
JMp FRET,l

000360

015404
051364

TOPI

DEC .636619772

MM4

DEC .4.

ANS .. X.CHEBV (·2*Xt2 -1 )

2/PI

COEF2 DEC 1.1 8 496E.,.6

DEC wl.365875E.4

DEC 9.11 8 01 6 E... J

157365

OfC .,2 8 52 6 15692

51266 133371
51267 014777
51270 050656

DEC 2,5525579248

51271 107004
51272 000000

OCr 0

*

0321
0322

01273 015406
51214 051362

0323

51275 104400
t)1276 001622

0324 51277 015402
0325 . 51300 051364
0326 51301 015442

X.4*ENTIER«(X.1)/~)

.JSS .FMP

0317
031d. *
0319 •• COMPUTE TAN(X)
0320*

X•

ESINl OLD XTEMP

51242 001622

51243
51244
51245
01246
51247
51250

~1265

0315

JSB .FSB
OEF Kl
5SA
JMP ESINl
OLD K2

51231 104200
51232 051366
51233 01541214

015436
0305
051260
0306 51251 015406
0307 51252 001622
030a ~1253 124662
0309.
0310 51254 050574
51255 141000
0311 51256 10000~
01257 000004
0312 51260 047605
51261 072733
0313 51262 134143
b1263 104751
0314 !j1264 045261
0304

OCT 105120
JS8 .FMP
DEF MM4
JSB ,FAD
OfF XTEMP
DST XTEHp

1215120
015406

•
*
•
ETAN

JSB .FMP
OEF FOPI
QST XTEMP
JSB ,FAD
DEF Kl
.JSB .PWR2

4/PI

PAGE 02\2 #17

LIBRARY FUNCTIONS

0327
0328
0329

51302 000355
!)1303 015440

0330
0331
0332
0333
0334
0335
0336

51305 105120
51306 015310
51307 015442
51310 000361
51311 015402

,,"l~'7
..,.."

0338
0339

034ld
0341

51304 115136

0343
0344
0345

51324
51325
51326
51327
51330
51331
51332

~349

0351
0352
0353
0354

0355
0356

0357
0358
0359
0360

0362

015404
001622
104400

SSA

JMP ETAN2

DLD K2
JS8 .fSB
OEF XTEMP
ETANt OST YTEMP

J8B
DfF
JSB
DEF
JSB
OfF
JSB
DEF
JSB

XCI?
YES'
NO

Y • 2-X

•FMP
YTEMP
.FMP
K2

,FSB

Kl
.CHEa
COEf0
,FMP
DEF yrEMP
DST YTEMP

Y .. V.CHEBV(2*Vt2 -1)

LDA LBTMP
SSA
.JMP ETAN3

DLD Kl

X1311 07eliS

0373

~1372 06&03~

DEC 2.013766E-7

0374

61373 176125
b1314 051035

DEC 2. 8 04 8 16E-6

0375
0376
0377
0378

~t375

030335

51376
51317
51400
51401
51402
51403

05015~
11~745

51~04

DEC 3.906637E_5
DEC 5.441 7 038E .. 4

043523
052355
076112

DEC 7.5 86 101578E.3

065163
0 6 6520

DEC .10 67 53 9 2 8 57

51405 163773

5140 6 0 7 0512
51407 014002
0380 51410 000000
0381* *
0382** COMPUTE ATN(X)
0383* *
0384 51411 104400 EATN
51412 001622
0385 51413 060001
0386 5 1 4 1 4 010500
0387 b1415 071434
0388 51416 002002
0389 51417 000010
0390 51420 027455
0391 51421 104200
51422 051364
0392 51423 015410
0393 51424 001622
9394 51425 104400 EAT'Nt
514126 001626
0395 51427 015406
0396 51430 001626
0397 51431 015406
0398 51432 051366
0399 51433 015404
0400 51434 051364
0401 51435 015436
0402 51436 051474
0403 51431 015406
0404 t;1440 001626
040 5 5 1441 104400
f)1442 001624
0406 51443 061434
0407 51444 002002
0408 51445 000010
0409 51446 021460
0410 51447 061622
0411 b1450 002020
0412 51451 027463
0413 51452 104200
51453 051470
0414 51454 027465
0379

•

•
•

0415

51455 104200

DEC 1. 77 0147422 7

OCT 0

DST xTEMP
LDA 1
AND 8377
STA LBTMP
SZA

SLA
JMP EATN2
DLD Kl
JSB ,FDV
OEF xrE.Hp
08T UTEMP

ABS(X) > 1?

NO

yES

u •

l/X

JSB ,FMP
DEF UTEMP
JaB .FMP

OEF K2
JSB ,FSB
OfF Kl

JSB .CHEB
OEF tOEFt
.J98 .fMP

OEF UTEMP
DST YTEHP

Y • U·CHEBY(2*ut2 -t)

LOA LBTMP
SZA

sLA
JMp EATN3

ABS(X)
NO

LDA XTEMP

yES

SSA

X<01
YES
NO

JHP EATN4
OLD PIBY2

JMP EATN4+2
EATN2 OL.D xTEMP

>

11

PAGE 0214 #17

0416
0411
0418
0419

LIBRARY FUNCTIONS

t;1456 001622
51457 021425
S1460 104200
~1461 001624
51462 124662
b1463 104200

51464 051472
0420 51465 015404
9421 51466 001624
0422 51467 12 4 662
0423.
0424
0425

514 7 0 06220 7
51471 166402
51472 115570
51473 011402

JMP EATNl
EATN3 DLD yTEHP

U ,

JMP FRET,l

AN8 • Y

JSB .FSB
OfF YTEMP
JMP FRET,!

ANS

EATN4 OLD MP2

DEC .1.51079632 68

MP2

0428

51476 056335
51477 156323
51500 131601

0 4 29

51502 040033

DEC 3.821037E .. 6

0430

51503 035737
51504 111013
51505 123343

DEC -2.6215196E-S

0431

51506

DEC 8.64888E .. e

DEC ",56.99t 86E .. a

t)1501 131731

DEC 1. 8 5142 9 1E.4

0605~2

51507 000351
0151° 122573
51511 062757
0433 S1512 055471
b151J 107365
0434 51514 111620
51515 147373
0435 51516 e70320
51511 155002
0436 51520 000000
0437 • •
0438 ••. COMputE EXpCX)

DEC "1_3 8 11 9 5 021 4£-3

0432

0445

0446
0447
044~

015~32

51522 124662
51523 015406
51524 051643
01525 104400
51526 001622
51527 015440
51530 027622
51531 071434
515 3 2 105120

0449

~1533 11214400
51534 001624

0450

51535 061434

0451
0452

51536 043631

0453
lt1454

51537 002021
51540 027622
ti1541 043632

.PI/2

COEFl DEC -1,33034E-a

0427

0441
0442
0443
0444

.PI/2.Y
PI/2

51474 106671
51475 102315

•

I

PIBY2 DEC 1.5707963268

0426

0439.
1£'440 51521

X

DEC ,011135 8 4206
DEC _.1058929245
DEC 1.762747174
OCT 0

*

*

•
EEXp
#EXP

JSB
JMP
JS8
OEF
D8T

.EXp
FRET,I
.FMP
L2E

XTEMP

JSB ,lENT
JMp ,E)(p2
STA LBTMP
OCT 105120
DST yr EMP

X

III

ARG*LOG2(E)

y • ENTIERCX)

LDA LBTHP
ADA M124
SSA.,RSS
.IMP • EXP2

X >. 1241
yES

ADA .244

NO

PAGE 0215 #17
0455
045&
0457

04fSS
0459
0460
0461
0462
0463

0464
0465
0466
0467
0468
0469
0470
0411
0472
0473
0474
0475
0476
0477
0478
0479
0480
0481

i.

0482
0483
0484
0485
0486
0487
0488
0489
0490
0491
0492
0493
0494
0 4 95
0496
0497
0498
0499
~500

1d50i.

LIBRARy FUNCTIONS

51542 002020
51543 021617

S1544

t0420~

~t545

001622

51546
51547
51550
51551
51552
51553
51554

015404

001624
10440L1

001622
015406
001622
104400
~1555 001626
51556 015402
51557 051633
~1560 104400
51561 001624
51562 10420~
51563 051635
51564 015410
51565 001624
51566 104400
51567 001624
51570 104200
b151t 051637
S1572 2115406
51573 001626
51574 015402
51575 051641
51576 015404
51577 001622
!:)1600 015404
51601 001624
51602 104400
51603 001624
01604 104200
51605 001622
51606 015410
01607 001624
51610 015402
51611 001fti31
51612 035434
51613 0000021
51614 015442
51615 001434
51616 125432
51617 002400
!;1620 006400
51621 125432
51622 061434
51623 002020
51624 027 6 1 7
51625 115205
51626 060273

51627 064355
51630 125432

SSA

JMp ."Expt
OLD XTEMP

X < -120"1
yES

NO

JSB ,FSB

OEF YTEMP

DST XTEMP

X • XwENTIEReX)

JSB .FMP
OEF XTEMP
OST UTEMP

U • Xf2

JSB ,FAD

OEF AAAA

DST YTEMP

OLD

BBBS

JSB .FOV
.OfF YTEMp
OST YTEMP
OLD

Y " Xt2+AAAA

Y • BBBB/Y

eccc

JSB
DEF
JSB
OfF
JSB
OfF

.FMP
UTEMP
.FAD
DODD
.FS8
XTEMP
.158 .FSB
OEF yrEHP
OST YTEHP

Y • • X.DDDO+Cccc.xta.v

DLD XTEHP

JSB .FOY

OEF YTEHp
JS8 .FAD
OfF HALF
ISZ L.Br MP
NOP
JSB PWR2
DEF LBTMP
JMP .EXP,I

ANS •

to.S4X/Y)*2tENTIER(ARG.LE)

ANS •

"

.EXP1 CL.A

CLB

JHP
.EXP2 LOA
SSA
JMP
JSB
LOA
LOB

.EXP,I

LBTMP

.E XP l

LARGE ARGUMENT
NEGATIVE?
YES

•• 2

ANS

WERRS+4,I
INF

JMp • Exp, I .

NO

• POSITIVE INFINITY

PAGE 0216 #17

LIBRARY FUNCTIONS

51631 177604
~1632 000364
51633 053552
516J~ 160416

M124

AAAA

DEC -124
DEC 244
DEC 81.417 4 91202

~505

B1635 046477
51636 016424

BBBS

DEC 61 7 • 97 22695

ki506

!S1637 043372
51640 070371

ecce

DEC .03465735 9 03

0507

51641
51642
51643
51644

DDDD

DEC 9.9545957821

L2E

DEC 1.442 695 040 9

0502
0503

0504

0508

047643
001410
056125
017002

.244

PAGE 0217 #18

LIBRARy FUNCTIONS

•
•

0002* •
0003*· COMPUTE LOG(X) *
0004.
*
0005 51645 015434 ELOG
0006 51646 124662
0007 51647 002003 .LOG
B00t) 51650 021724
0009 fS1651 00202 0
0010 ~1652 115132
0011 51653 071622
0012 51654 015412
0013 51655 075623
0014 51656 1 0 512 0
0015 51657 104400
51660 001624
0016 51661 104200
ei1662 001622
0017 51663 015402
0018 51664 051731
0019 5 1 665 104400
51666 001626
0020 51667 10420121
51670 001622
0021 51671 015404
0022 51672 051731
0023 51673 015410
0024 51614 001626
002 5 5 1 615 1 0 44 00
51676 001626
0026 51671 ~15406
0027 51700 001626
0028 51701 016404
0029 51702 051741
0030 51703 104400
51704 001622
.0031 01705 104200
01706 051737
0032 51707 015410
0~33
51710 001622
0034 51711 015402
0035 51712 ·051735
0036 51713 015406
0037 51714 001626
0038 51715 015404
0039 51716 001031
0040 51717 015402
0041 5172~ 001624
0042 51721 015406
0043 51722 051733
10044
51723 125434
0045 51724 115202 .LOGt
0046 51725 061027
0047 b1726 067730
0048 51727 125434
0049*
0050 ~173e1 ~VJVl776 8776

JSB ,LOG
JMP FRET,I
SZA,RSS
JMP .lOG1
SSA

JSa

ST.
JSB

srB

OCT

DST

NON.ZtRO ARGUMENT?
NO
YES, POSITIVE ARGUMENT?
RERRS+27,I NO
YES,
XTEMP
,FLUN
SAVE MANTISSA
xrEMP+1
AND FLOATED
EXPONENT
1 0 5120
YTEMp
SEpARATELY

OLD XTEMP

JSB ,FAD
DEF R22
OST UTEMP

U • X+SQRCrt).5)

OLD XTEHP
JSB
DEF
JSB
DEF
OST

,FSS
R22

.FDV
UTEMP
UTEMP

U • (X-SQR(0.S)/U

JSB FMP
•
DfF urEMP
.JS8 .FSB
DEF eec
OST XTEMp
OLD M8
~JS8

.FOV

DEF XTEHP
,JSB .FAD
DEF AAA
JSB
OEF
JSB
OfF
JSB
DfF
JSB
DEF
JMP

.FMP
UTEMP

,FsB

HALf
.FAD
YTEMP
,FMP
LE2

AN! • LOG(2).

,l.OG,l
(MANTISSA.e.5.U.(AAA+MB/X»
.J5B WERRS+l,I
LOA MNEG
LOB 8776
ANS • NEGATIVE INFINITY
JMP .~OG,I

OCT 776

PAGE 0218 #18
0051
0052

0053
0054
0055

LIBRARY

055202
075000
054271
006000
051260
037402
125606
51140. 044404
~1741 06e010
51142 063002
01731
5.1732
51133
51734
51135
51736
51737

~·UNCTIONS

R22

DEC ,707106781

SQR(0.5)

LE2

DEC .69314 7 1806

LOG BASE E

AAA

DEC 1.292007QJ987

MH

DEC .2.6398571035

eec

DEC 1,6567626301

(2)

PAGE

f?l219 #18

UTILITY ROUTINE

g0e7.
0058.
0059.
006".
0061.
0062.
0063.
0064*
0065.
0066.

0061.
9068*
0069.

ENTER WITHI
(A).t IF PBfLG HAS TO BE SET,
(A)a2 IF PBFLG HAS TO
(A)1!'4

IF PBfLG

t;1143

51743 103100
51744 002011
51745 Pl27751

0~14

0077
0078
0019
0080
0081
0082
"083
0084
0085
0086*
0087*

tBFlG HAVE TO Bf CLEARED,

C"vtT WITH ORIGINAL CONTENTS
IN 8,
,-""I

0071

0075
0076

CLEARED,

(8). pOINTER TO ?FLAG

0070
0012
0073

AND

BE

51146 060600
51741 130001

51750 027756
5 1151 001310
S1752 060600
51153 060524
51154 003000

S1755 110001
51756
51756 170001
51157 102100
51760 125562

#tOAS EQU •
elF 0
SL.A,RSS

JMP *+4
LDA PBFLG
lOR B,l
JMP *fDBl
RAR,SlA
LOA PBfLG
LOA 830 M
eMA
AND B,l
#fDBI EQU •
STA 8,1
STF 0
JMp EDABR,I

BIT;;0 SET1
YES. SET P8FLG.
NO. 81T#1 SET?
YES. CLEAR PBFLg.
NO. CLEAR PBFLG AND CBFLG.

STORE ?FLAG
ExIT.

~ORD

8ACt<.

PAGE 0220 #18

LIBRARY FUNCTIONS
QRG 520008

52000
52000 063146
52001 000063
52002 000120

8120

0095

52003 177716
52004 177107

D62
M71B

0096

~2005

0090
0091
0092

0093
0094

000776

0097

52006 00~106
0098 52007 000116
0099. •
0100 ••

......... .
Ut'''''
0102

*
002003
52010

0103
0104
0105

52011 124662
52012 002020
52013 115133

0106

52014 071622
52015 015412
52016 000031

0101
0110
0111
0112
0113
0114
0115
0116

0117
0118
0119

0120
0121
0122
0123

0124
0125
0126

52017 026055
52020 040356
52021 071434
52022 075623
52023 061622
52024 015406
52025 052070
52026 016402
52021 052074
52030 104400
52031 001624
52032 104200

52045
52046
52047
52050

0131
0132
0133

0134
0135

0136
0137
0138
0139
01-40
0141

•

•
•
ESQR

DLD XTEMP
JSB .FOV
OEF YTEMp
JSB' .FAD
OEF YTEMP

JSB ,PWR2

OEF .-1

DST YTEHP

Y • (Y+X/Y)/2

OLD XTEMP

001622
015410

001624
015402
~2051 001624
52052 015442
52053 001434
52054 124662
52055 071434
52056 04450~
52057 075623
52060 061622
52061 015406
52062 052066
52063 015402

SlA,RSS
JMP FRET,I

XW 01
YES, ANS 11 0
58A
NO, X < 01
JSB RERRS+28,I YES
NO
STA XTEMP
JSB .FLUN
SI.A,ARS
EXPONENT 0001
JMP ESQR2
YES
ADA .-1
NO
STA lBTMP
ExPONENT/2 -1
srB XTEHP.,t MANTISSA SAVED
LOA XTEMP
JSB .FMP
OEF SA2
JSB ,FAD
OEF SB2
Y • SB2+8A2*X
ESQRt oST YTEMP

001624
02036 015402
52037 001624
52040 015442
52041 000356
52042 104400
52043 001624

0128
0129

"Pit

OCT 106
OCT 116

N

~2035

b2044 10420~

oCT 63
OCT 120
OCT -62
OCT .71

88716 OCT 776
F

52033 001622
52034 015410

0127

0130

863

COMPUTE SQR(X)

..,

. 0108
0109

TENTH OCT 63146

JSB
OEF
JSe
OfF
JSB

.FDV

YTEMp
.FAO
YTEMP
.PWR2

DEF LBTMP
ESQR2

JMP
STA
ADB
ST8
LOA
JSB
OfF

FRET,I
LBTHP

ANS • CP+F/P)*2tESQ0
EXPONENT/2

8317

XTEMp+l
XTEMP
,FMP
SAl
.J58 ,FAD

MANTlSSA/2 SAVED

PAGE 0221 #18

LIBRARY FUNCTIONS

52064 052072
0143 52065 026030
0144*
0142

0145

01.6

52066 070000
52067 000000
52010 045000

Ql00000
~2012 043524
52073 046317
52e14 066000
52015 g!00377

OfF SSI
JMP ESQRt

SAl

DEC .875

SA2

DEC .578125

SBI

DEC ,27863

SB2

DEC .421875

y •

SBt.SAt*X

~2011

0141
0148
0149*

*

*

0150 •• COMPUTE BRK(X) •
0151* •
•
0152*
0153.
0154.
01 55*

0156.
0157.

ENTER wITH ARGUMENT IN A AND B.
IF X=0, DISABLE ABORT CAPABILITY,
IF X>0, ENABLE ABORT CAPABILITY,
IF X<0, DO NOT DISABLE OR ENABLE BUT JUST
RETURN A VALUE,

0158*

0159*
0160*

0161*

RETURN WITHI

1-

0 IF ABORT CAPABILITY WAS DISABLED PREVIOUS
TO EVALUATION.

2.

+1 IF ABORT CAPABILITY WAS ENABLED PREVIOUS
TO EVALUATION.

0162.
01.63.

0164.
0165.
0166*

0161

0168
0169
0170
0171
0172
0173

0174
0175
0176
0177

5 20 76 07 1622
52077 160255
52100 010600
52101 006400
52102 002003
52103 064361
52104 061027
52105 006003

EBHK

ST, XTEMP
LDA MAIN,!

STORE HIGH PART OF ARGUMENT,
Aw tFLAG

AND PBFL,.G

eLB
SZA,RSS
LOB ,+2
LOA FlG6T
SZ8,RSS

PBFLG BIT SET?
NO. SET CB).EXPONENT OF .1,
yES. SET (A).1900108.
WAS PBFLG SET?

52106 002400
52107 001300
52110 104400
52111 001624

eLA

RAR
DST YTEMP

NO. SET RETURN VALUE TO .1.
SAVE,
.

52112 064255
52113 061622

LDB MAIN
LDA XTEMP

yES,

SET

RETURN VALUE TO I.

0178.

0179
0180

0181
0182
0183
0184
0185

0186
0187
0188
0189

0190
0191
0192

52114 002002

SZA

(8).> ? FLAG
RETRIEVE HIGH pART Of ARGUMENT.
ARGUMENT-a?

52115 026130
5 21 16 002404
52117 015562

JMP EBRKt
CLA,INA
JSB EDABR

YES, SET PBFlG TO I(.DISABLE
ABORT).

52120 103100

eL.F 0

52121 044374
52122 164001

AOB ,.?STAT
LOB B,I

52123 003400
52124 050001

ceA

52125 126137
52126 102100
52127 026134

.JMP SUSPN, I
STF 0

s ••

'lSTAT

B- 1STAT

CpA B
JMP EBRK2

QUIT IF ABORT REQUEST,

PAGE 0222 #18
0193
0194
0195
0196
0191
0198
0199
0200
0201·
0202.
0203

0204*
0205.

LIBRARY FUNCTIONS

b2130

52130 002020
52131 026134

52132 060361
52133 015562

52134
5 2 134 1 0 4 2 00

EBRKl EQU •
5SA.

JMP
LOA
JSB
EBRK2 EQU
OLD

52135 001624
52136 124662

52137 071662

EBRK2

,+2

EDABR

•YTEMP

JMP FRET,!
SUSPN

OEF

SUSP

NO. ARGUMENT >0 OR 401
2002
1tJ256 52176 026226
0257 52177 015450
0258 52200 015464
0259 522~1 050374
0260 52202 026234
0261
52203 050433
0262 52204 002001

SZA

LOB gyMTS
STB LT6

LOB
STa
JSB
JMP
CLB
CPA
JMP
CpA

81T15

LT7

GETeR
LISCQ

SAvE
TO
LAST WORD +1
OF PROGRAM

GET LARGE SEQUENCE NUMBER
SET ENDING SEQUENCE NUMBER
STARTING LINE NUMBER? .
NO

.+548

CHECK FOR COMMA
FIRST STATEMENT NUMBER OMITTED.

8120

PAGINATION?
YES
BACK UP FOR FIRST STATEMENT NUMB
FETCH INTEGER
CHECK FOR CARRIAGE RETURN
yES, fNO OF COMMAND
COMMA FOLLOWS?

LIsCM

LISCP
JSB BCKSP
JSB BlDIN
CPA .... 15B
JMP LISCR
CPA ,+54B
RSS
.JMP

**

yES

PAGE 0224 #18

LIST ROUTINES

0263

52205 115113

0264
0265

52206

0266
0267
0268
0269
0270
0271
0272
0273

0214
0215
0276
0277

0218
0279
0280
0281
"282
0283

52206
52207
52210
52211
52212
52213
52214
!S2215

075430
015446
116113

052002
026226
015450
015464
0072100
~2216 075432
52211 0 503 7 4
52220 ~26233
b2221 015446
52222 115113
52223 052002
62224 002001
6222S 115113
52226
ti2226 062004
62227 071550

JSB RERRS+12,I
LISCM EQU •
SAVE STARTING SEQUENCE NUMBER
STB LT3
JSB GETeR
GET THE NEXT CHARACTER
JSB RERRS+12,I
CPA 8120
CHECK FOR P
JMP LISCP
PAGINATION
JSB BCKSP
BACK UP FOR SECOND STATEMENT'
JSB BLOIN
GET INTEGER
eMS
SAVE ENDING SEQUENCE NUMBER
ST8 LT7
END OF RECORD?
CPA ,+158
JMP lISCQ
YES
JSB GETCR
NO, GET NEXT CHARACTER
JSB RERHS+12,I
CPA 8120
PAGINATION1

YES

RSS

JSB RERRS+12,1 NO
LISCP EQU
SET L.INE COUNTER
LOA M71B
ST. lT8

•

52230 015446

JS8 GETeR

0285
0286

52231 002001
52232 115113

RSS

0281

52233
52233 065430

0284

0288
0289
0290

0291

52234
52234 061442

52235 015314
52236 026575

JSB RERRS+12,I
LISCQ EQU
GET BACK STARTING SEQUENCE NUMBER
LOB LTJ
llSCR EQU

LDA

0299*
0301
0302
0303

0304
0305
0306

0307
0308
0309

0310
0311

0312
0313
0314
0315
0316
0317
0318.

52243 061567
52244 071426
~2245

040360

52246 160000
52241 010273
52250 002003
5 22 5 1 026260
52252 006400
52253 075274
52254 060354

S2255 015460
52256 060374
52257 015452
52260

522613 060371
52261 ~l15452
52262 060371
b2263 015452

•
•lT6

SEEK
STATEMENT
ALL LINE NUMBERS < GIVEN INTEGER
SAVE DESIRED
STARTING POINT
OUTPUT A
L.INE FEED

JSB FNDPS
JMP LIS16
NOP
5T8 LT3
LDA .+128
JSB OUTeR

0292
0293 52237 000000
0294 52240 015430
0295 52241 060371
0296 6224\2 015452
0297.
0298.* OUTPUT PROGRAM NAME
0300

TEST FOR END OF LINE

•
•
LNAME

••

LOA
STA LT1
ADA .+1NAME.?ID
LDA A,I
REMOVE RUN-ONLY
AND INF
BIT AND CHECK FOR
SZA,RSS
NULL PROGRAM NAME
JMP LISCU
YES
CLB
NO
ST8 LT2
OUTPUT
LOA .-3
PROGRAM
JSB DUTST
NAME
LDA .+158
OUTPUT
JSB OUTeR
CARRIAGE RETURN
LISCU EQU •
LOA .+128

JSB OUTeR
LDA .+128
JSB OUTeR

AND

•

DOUBLE
LINE
FEED

PAGE 0225 #18

LIST

~OUTINES

0319** OUTPUT LEAOER IF 'PUNCH'
**
0320*
*
CLA
0321 52264 002400
CPA lT0
0322 52265 051400

0323
0324
0325
0326

0327
0328
0329

0330
033i
0332.
0333*·

03344,.

52266
52267
52270
52271
52272
52273
52274

071356

03 4 8

0349
0350
0351

0352
0353

035A

.}S8 OUTeR

IS! OIGeT
JMP •• 3

035356

026271

065430
522;0 015426

LOB LT3

sr! ... , ..
I .,.. •

•
••
•
LlST2 LDB

yES

NO,
OUTPUT

FEEO

FRAMES
FOR
L.EADER
SET pOIN1ERTO
STARTING POINT

MAIN LIST LOOP
055442

LTl
CPS LT6

026563 .

.IMP LIS1S

065426

165426
52303 045432

523i2
5 2312
52313
52314
52315
52316
5 2 317
52320

060311
015452·
035550
026312
060322

07155 0

523410

LOB LTl,1
ADB Lr1
SSB, RSS'

JMP LIS1S

lSI
JMP
LOA
STA
LISpF EgU
LOA

lT8
LISPM

.we

LT8
•
.+12B
.JSB OUTeR

PROGRAM

EXHAUSTED?
YES
GET LINE NUMBER
CHECK FOR END OF LIsTING

sKIp IF NOT DONE vET
STOP ~ISTING HERE
CHECK FOR NEWPAGE
NOT YET

OUTPUT A
BUNCH OF .

ISZ LT8

JMP LISPF
LDA M726

L.INE FEEDS

RESET LINE COUNTER

STA LT8

LISPM EQU •

03S5.
0356 5 2 3 20 165426
0351 52321 015454
0358 52322 060417
0359 52323 015452
03621 52324 035426
0361 52325 161426
0362 52326 015554
0363 52327 161426
0364 5233((1 0030~4
0 3 6 5 52331 002004
0366 5 233 2 071274
0361 52333 026336
0368 !S2334 165426
0369 52335 015454
0370 52336 035.426
0371 52337 035274

0372
0373
0374

eLA

002400
015452

0340 52304 006021
0341 !52305 026563·
0342-.
0343 523°6 03555 0
0344 52307 026320
0345 t)2310 060341
0346 5.2311 071550

0347

JMP LIST2.2
LDA M728
STA DIGCT

~2275

. 0335 52277
0336 52300
0337 . 52.301
0338 62302

0339

026275
060322

'LIST'
MODE?

026354

5 234 1 002404
52342 051 4 00

LDB LT1,I

JSB QUTIN

LDA .+408

JSB OUTeR
lSI LT1
LOA LT1,I
JsB SlLCK

LOA LTI,I

CHA,INA
INA
STA LT2

JMP LIST3

LOB LTI,1
JSB QUlIN
LISTJ lSI LTl

IsZ LT2

JMP LlST4
CLA,INA
CPA LT0

NO, OUTPUT
LINE NUMBER
OUTPUT
BLANK

CHECK
STATEMENT

LENGTH
LENGTH

COUNTER
FOR

STATEMENT.

OUTPUT
BOUND
MORE OF
STATEMENT?
yES

XPUNtH?

PAGE 0226 #18
1d315
0376
iJ377

~2343

!)2J44
!S2345
62346
52347

LIST ROUTINES

0020t.iJl
026347
06Qt4Q12
015452
060374
015452
060371
015452
026217

0318
0379
0380 ~2350
0381 52351
0382 52352
0383 52353
0384*
0385*. IDENTIFY OPERATOR
i13861i

0387
0388
0389
0390
0391
0392
0393
~394

039 5

0396
0397
0398
0399

0400
0401
~402

0403
0404

1t)405
0406
0401.
0408*·.

·0409.
0410
0411
0412
0413
0414
0415

0416
0417
0418

0419
0420
0421
0422

52354
52355
52356
52357
52360
S2361
52362
52363
52364
52365

161 4 26
010570
002003
026400
050552
026376
001727
042003
002021
026532
52366 042001
52367 040660
5237A 160000
52371 001727
52312 01047 4
52373 050421
52314 026600
52375 002001
52316 060417
52377 015452

LOA
.J88
LOA
JSB
LOA
JSB
JMP

.+2J8
OUTeR
,+158
OUTCR
.+128
OUTeR
LIST2

*.*

•

JMP LISTS .. 2

ALF,ALF
ADA 0<>2
SSA,RSS
JMP LIS12
ADA 863

ADA FOPBS
LOA 0,1
Al.F,ALF
AND B177
CPA .... 428
JMP LIS14
RSS

LOA .+408
JSB OUTCR

LISTS

•
•
LOA

LTt,I
AND OPDMK
STA LTJ

52403 002020

5SA

.JMP LIST9

52406 055430

52407
5 2 41171
52411
52412
52413
52414

026336
05544°
026417

040356
001000
041513

CLB
CpB
JMP
CPS
JMP
ADA
ALS
AOA
LOA
STA

LIST SYMBOLIC OPERAND

0427.
0428 52417 010572
0429 52420 050376
0430 !)2421 026445

EXTRACT
OPERATOR
NULLOPERATOR1
YES
NO, 'IMPLIED' LET!
yE8, OUTPUT A BLANK
NO,
SINGLE.CHARACTER
OPERATOR?
NO
YES,
EXTRACT
ASCII
CODE
" ?

YES
NO
LOAD

It

BLANK

••

52404 026452
52405 006400

0423 52415 160000
0424 52416 ~71430
0425*

0426 ••

yES

NO
OUTPUT
X.OFF
NO,
OUTPUT A
CARRIAGE RETURN
AND LINE FEED

LISTA LDA tTl,1
AND OPMSK
SZA,RSS
JMP LIST5
CPA LETOP

IDENTIfy OPERAND
524"~ 161426
52401 010566
52402 011430

RSS
.JMP •• 3

LT3
LISTJ
LT5

LIST0
,-1
SYMTB
0,1
lT3

EXTRACT.
OPERAND

FLAG f;lIT SET?
YES
NO, NULL
OPERAND?
YES

NO, 'COMPILED' ?
NO
yES

LOAD
ACTUAL
SYMBOL
SAVE SyMBOL

.*

•

LISTA AND PDFFL
CPA .... 178
.JMP LIST8

ISOLATE TYPE PART
FUNCTION?
yES

PAGE 0227 #18

LIST ROUTINES

0431
0432
0433
0434
0435
0438
0437
04 3 8

52422 061430

0439

!S2432 0263"36

0440
0441

52433 002003
52434 026443

fJtAA"

0443
0444
0445
1tj446
",,447

02435 040352
52436 002020
02437 026336
5244(11 ~40437
02441 015452
~2442 026336

044ij

5244~~

52423 101104

LlST6 LOA LT3
RRR 4
AND .+378
ADA 8100

b2424 010416
b2425 £'140462
~2426

JSB OUTCR

015452

COMPUTE
ASCII FOR
LETTER
OUTPUT LETTER

LDA LT3

ti2427 061430
52430 010376
t) 2 4 3 t 050376

r:1 """" ,

NO, .

AND .+178

CPA .+17B
.IMP LIST3
SZA,RSS

FUNCTION?
YES
NO, STRING VARIA8LE1

.JHP LIST7
AOA ; .. 5
5SA
.IMP "LISTJ

yES

ADA .+608

~449

~2444

0450
0451
0452
0453

5244b

OUTCH
JMP LIST3
~60423
LIST? LOA • .,.,44B
JMP ·"3
~26441
062006 ,LISTS LIJA F

~2446

~15452

04 5 4

~2451

.JSB

.JsB

NO
DIGIT?
NO
YES,
OUTPUT IT
LOAD ASCII , S ,
OUTPUl

oUteR

52447 062007

LOA

5245'" 015452

.JSS OUTeR

'FN'

N

JMP LIST6

026422

•
*.

~455.

LIST CONSTANT OPE"RAND OR PARAMETER

0456*.
0457.
1tJ45d
"-1459

52452

0460

52454
52455
52456
52457

0461

0462
0463
0464
0465
0466
0467
0468
0469
0470
0471
0412
0473
0474
0475
0476
0477
0478
0479
0480
0481
~482

~'"

0483
0484
0485

001665 "
52 4 53 0102002

026471
011570
071266
035426

00
~
~

52462 101426
52463 035426
52464 035274
52465 002120
!S2466 A023~0
52467 ~15420
52470 026336·
52471 010376
52472 050362
52473 026504
52474 ~50376
52475 0020l'Jl
52476 026422
02477 061431£'
525~0 001722
52501 064624
!)2502 015456
52503 026336
52504 Pl35426
52505 035274
525 0 6 06143:6

LISTg FLA,CLE,ERA
SZA
JMP LIS1"
STA CHRCT
STA SIGN
IsZ LTl
ISl LT2
OLD LT1,I

•

CLEAR FLAG BIT
CONSTANT?
NO
VES,"SET
FOR NO SIGN
LOAD"
CONSTANT

lSI LT1
ISZ LT2
CL~,SSA

LlS1~

ceE
JSB
JMP
AND
CPA

NUMOT
LlST3
.+178
.... 3

.JMP LIS11
CPA .+178

NEGATIVE NUM8ER?
yES, ENABLE SIGN
oUTPUT THE CONSTANT
ISOLATE TYPE PART
PROGRAM INTEGER?
yES

NO, PRE-DEFINED ,UNCTION1

RSS

yES

JMP LlST6
LDA LT3
ALF,RAL
LOB AlAB
.ISB f\4COUT

NO, MUST BE A PARAMETER SyMBOL
OUTPUT

JMf;' LIST3

LIS1! lSI LT1
ISZ LT2
LOA LT4

FUNCTION
SyMBOL
RESTORE OPERA70R

pAGE
0486
ra487
048a
0489
0490
0491
~492

0493

0494

0495

0228 #18

LIST RoUTINES
CPA
JMP
CPA
JMP
lOA
LOB

52507 050540
52510 026334
52511 050534
52512 026334
62513 061440
S2514 165426
52515 002002
52516 164001
S2517 015454
52520 035426
62521 035214
52522 002001

aZA

DIMOP
LIST3-2
COMOP

 ?
YES
NO, 'COM'?

LISTJ-2

yES

LT5

NO
LOAD PROSPECTIVE INTEGER
PROGRAM 'COMPILED' -,

LT1,I

LOB 1, I
JSB QUTIN

yES

OUTPUT INTEGER
MORE

ISZ LTl

0496
ISZ LT2
0497
RSS
0498 52523 026341
JMP LIST3+3
0499 52524 061436
LOA LT.
0500 52525 050694
CPA U8EOP
0501 52526 026384
JMP LIST4
LDA ,+548
05212 52527 060433
JSB OUTeR
0503 52530 015452
JMP LIStl.7
0504 52531 026513
0505*
0506*. LIST MULTICHARACTER OPERATOR
0507.
la50d

52532 060417

0509

52533
52534
52 535
52536
S2537
5254 0
52541
52542
52543

0510
0511

0512
0513
0514
0515

0516
0517

0518
0519
0520

0521
0522
0523
0524

0525
0526

0527
052d

05 2 9
It:)

530

015452

161426
064120
0154!56

060411
065436

52547
52550
52551
52552
52553
5 2 554
52555
52556
5 2 557
525 6 0
52561
52562

LOA
LOB
CPS
JMP

054576

026S57
054544

52544 026556
52545
52546

LIS12 lOA .+408
JSB OUTeR
LOA LT1,I
LOB MCBOP
JSB MCOUT

054546
026551
015452
026400
006400

cpa
JMP
cpa

01 546 0
026336

015452
007400

0 6 1274

~n
."'v

LISTING
'USING' 7
yES

EMIT
A COMMA

*
**

• OUTPUT
A BI.ANK
OUTPUT
MULTtCHARACTER
OPERATOR

.+408

LT4
REMQP

WAS IT

1.1913

YES
NO, 'FILES' 7

A ' REM' 1

FIlOP
LIS13-1
IMGOP
JHP LISl8
JSB OUTeR
JMp LIST5
LISle CLB

yES

NO, 'IMAGE'?
YES
NO, OUTPUT A BLANK

LOA LT2

061274
0020216

STATEMENT'?

YES

INA,8ZA

JSB
JMP
JSB
LIS13 etB
LOA
JSB
JMP

0531
015460
0532
026336
0533.
0534** OUTPUT TRAILER IF
0535.
0536 52563
LIS15
0537 52563 ""2400
0538 52564 051400
~539
52565 124740
0540 52566 060322
0541
52567 071356

OUTPUT IMAGE STRING

OUTST
LISTJ
OUTeR

OUTPUT A BLANK
OUTPUT
THE
REMARK

LT2

QUTST
lISTJ

'PUNCH'
EQU •

*

**
*

CLA
CPA LT0
JMP SCHEN,I
LDA M72B
STA DIGCT

'LIST'

MODE?
YES
NO,
OUTPUT

PAGE 0229 #18
0542
0543
0544
0545

~2570

52571
52572
52573
52574

LIST ROUTINES

002400
015452
035356

CLA
JSB OUTeR
ISZ DIGCT

026570

JHP .·3

0546
124740
0547.
0048 b2575 060371
0549 52576 015452
~550
52577 124740

LIS16 LOA .+128
JsB OUTeR
JMP seHEN,I

0561
0562

0563
0564
0565

ECHO
LINE
FEED

•

LIST A STRING CONSTANT

0553*
0554 5260~ 015452
0555 52601 161426
0556 ~2602 010500

0559
0560

TRAILER

JMP seHEN,I

0551.

0552..

~557
~558

FEED
FRAMES
FOR

52603 002003
52604 026611
52605 003004
~2606 001100
52607 006400
52610 015460
52611 060421
52612 015452
52613 026336

0566.·
0567...

••

*

LlS14 JSB OUTeR

LOA LT1,I
AND B377
SZA,RSS
JMP LIS1]
CHA,INA
ARS
(LB
JSB OUTST

LIS17 LOA .+428
JsB OUTeR
JMP LIST3

LIST A MULTICHARACTER SyMBOL

OUTPUT n
COMPUTE
WORDS
OF

STRING
OUTPUT
STRING
yES, OUTPUT IT
••
•••

**

0568**
0569.

0570. UPON ENTRY CA) HOLDS A WORD CONTAINING A SYMBOL CODE AND (8)
0571* HOLDS A POINTER TO THE PRINT NAME TA8LE. THE SYMBOL IS FOUND
0512* IN THE TABLE AND ITS ASCII FORM OUTPUT.
0573.
0574 52614 010570 ~MCOl AND OPMSK
SAVE
0575 52615 071436
STA LT4
SyMBOL
0576 5261616~001 MeoTt LOA 1,1
DESIRED
0577 52617 01057~
ANO OPMSKTASLE
0578

52620 051436

0579
0580
0581
0582

52621 026630
52622 160001
~2e23 010366
52624 040362
52 625 001100
52626 044000
52627 026616
52630 160001
52631 010366
52632 003004
52633 001100
52634 071430
52635 075460
52636 035460
52637 161460
52640 ~01727
52641 015452
52642 161460
52643 0105~0

0583

l

0584
0585
0586
0587
0588
0589
0590
0591
0592
0593
0594
0595
~596

0591

CPA LT4

JMP MCOT2
LOA 1,1
AND .+7
AOA .+3
ARB
ADS ~
JMP MeOTl
MCOT2 LDA 1,1
AND .+7
CMA,INA
ARS
STA LT3
5T8 OUlST
MCOT3 lSI OUTsr
LDA OUTST,I
AlF,ALF
J S8 OUTe R
LOA OUTsr,l
AND B377

ENTRY?

YES
NO,
COMPUTE
AODRESS
OF NEXT

ENTRY
COMPUTE
COUNT

OF

ASCII

WORDs
sAVE ASCII SYMBOL ADDREsS
MOVE TO NEXT WORD OF SYMBOL
OUTPUT
HIGH
oUTPUT
~ow

CHARACTER

PAGE
0598
0599
0600
~601

0602

~2J0

02644
52645
52646
h2647
52650

#18

LIST ROUTINES

~02002

SZA

015452
035430
026636
125456

JSB
ISZ
JMP
JMP

0603 ••

0604*..
0605",.
0606.

0607.
06°8*
06i09"

°610*
0611*
0612
0613
0614
0615
0616

0617
0618
0619
0620
0621
0622
0623
0624
0625
0626

LIST A STRING.

.*.
••
••

OUTeR
LT3
MCOTJ
MCOUT,I

IF NOT
NULL
MORE SyMBOL?
yES

NO

UPON ENTRy CA) HOLDS A NEGATIvE wORD COUNT OF THE STRING. IF
(8) # 0 THE STRING BEGINS WITH THE LOW HALf OF CLTl),1 , IF
(Bj • 0 IT BEGINS WITH THE HIGH HAlF OF THE WORD FOLLOWING
(L T 1) , 1 . A TRA IL ING NUll CHARAC TER WILL-- NOT 8E PRINTED.
5 2 65 1 071436

02652

006~02

52653
52654
52655
52656
52657
52660

026661
035426

SZB
.JMP Or5T2

SAVE STRING WORD COUNT
• REM' ?
yES

orS11 ISZ LTl

NO, MovE TO
NExT PROGRAM WORD
OUTPUT
HIGH

OT8T2

OUTPUT
LOW CHARACTER

035274
161426

001127

015452
161426
52662 010500
52663 002002
52664 015452
52665 035436
52666 026654
52667 125460
~2661

*OTST STA LT4

ISZ LT2
LOA. lTl,I
ALF,ALF'
JSB OUTeR
LOA LT1,I
AND 8377

IF NOT

5Z·

JSB OUTeR
ISZ lT4
.JMP OTST 1
JMP QUTST,I

NULL.

MORE STRING?
yES

NO

PAGE

~231

#t9

AsCII TO BINARY NUMBER CONVERSION

0002 ••

0003.*.

HANDLE OVERFLOW

0004*.
0005.

**

CA) CONTAINS THE HIGH MANTISSA UPON ENTRY. (Al AND
(e) CONTAIN THE LARGEST REPRESENTABLE NUMBER OF
APPROPRIATE SIGN, PACKED, UPON EXIT.

9006*
0001*

0008.
0009.
0010 ~2670 064355
0011 52611 002020
0012 52672 066005
0013 52673 030213
0014 52674 002020
0015 52615 061027

0016

52676

0011.*
0018.**

*OVFL LDB
SSA

LDB 88776

lOR !NF
5SA
LDA MNEG
JMP OVFLW,I

12~310

CHECK OVER/UNDERFLOWS

••

•••

.*

0019 ••
0020.

EXIT TO CP+l) IF STATUS IS NOT SYNTAX,
SETTING SYMTa • 4 IF IN KEYBOARD MODE.
REPORTED IF IN TApE MODE,

0021.

0022.

0023.
0024.
002S

52611 061561

0026
0027
0028
0029

52700 040367
52701 164000
52,02 054363
~2703 002001
52104 026113

0030
0031
0032

••

•••

#CHOU LDA lNAME

RSS

yES

JMP. CHOU1
LOA TAPEF
AND MAIN,!

52705 060367
52706 110255

0033

52107 002003
52110 075573.

SZA,RSS
ST8 SYMTB

0035

52711 035474

0036

52712 125474

liZ CHOUF
JMP CHOUF,I

0031

52113 035601

CHOUI ISZ ENOU F

0038

52714 002001
52715 035474
52116 125474

RSS

0039

lSZ CHOUF

NO
TAPE
NO

MODE?

ARE wE ExECUTING ENTER STATE1
NO
yES •• SUPPRESS ERROR

JMP CHOUF,I

~041.*

0042...

COMPUTE

ADA .+1STAT.110
STATUS
LOB 0,1
CPS .+4
SYNTAX'

0034

0040

ELSE EXIT TO cp.a),
T~E.E ERRORS ARE NOT

LOOK FOR A NUMBER

••
•••

0043..

••

0~44.

0045.
0046.
0047.
004 8*
~049.

0050.
~051.

~052·

0053.
0054*
0055.
0056.
~057

NUMCK LOOKS FOR AN UNSIGNED NUMBER, sIGN MUST BE sET
BY THE CALLER (SIGN. -1 FOR NEGATIVE, ELSE POSITIVE).
CA) CONTAINS A CHARACTER UPON ENTRY, IF IT IS NEITHER
A DIGIT NOR A DECIMAL POINT, EXIT IS TO (P+l) WITH
(A) UNCHANGED AND (8) • 0. ExIT Is TO ERROR ON FINDING
AN EXPONENT PART OF INCORRECT FORMAT,
ZERO REPLACES AN
UNDERFLOw, THE LARGEST REPRESENTABLE NUMBER OF THE
APPROPRIATE SIGN REPLACES AN OVERFLOW, AFTER STORING A
FLoATING poINT NUMBER IN M AND M+l (WHERE sePTR,! • M)
EXIT IS TO (p.2) WITH THE NEXT INPUT STRING CHARACTER
IN CA) AND TEMP+l.
02717 006400

#NMCK

C~B

·ZERO

PAGE 0232 #19
0058
0059
0060

0061
0062

0063
0064
0065
0066
0067
0068
~"UII.&:.n

IOIaV'"

0070
0071
0072

52120 075322
52721 015316
52722 075320
!)2723 075324
!;2724 075612
52725 007400
5 2 726 07575 0
52727 050435
52730 035750
52731 026735
52732 002400
52733 071324
52734 026712
52735 015264
52136 021006

0076
0077
0078
0079

52731 035324
52740 100033
52741 071613
52742 015300
52743 065322
52144 006003
52745 027001

~080

~2746

044353

0081
0082
0083
0084
0085

52747
52750
52751
52752
!)2753
52154
52155
52756
52 7 5 7

007000

0073

0074
0075

0086
0087
0088
0089
0090
0091

0092
0093
0094
0095

0096

0097
0098
0099
0100

0101

0102
0103
0104
0105
0106

061613
075613
006400

035613
e26776
000040

045320
1031el
!)2760 002040
52761 002004
52762 041316
52 763 102301
52164 026771
52765 000065
52766 005500
5 2 767 "35322
5277", 000000
52771 015304
52772 035612
52773 015446
52174 027055
52775 026727
52776 000065
52777 005500
530rt:10 026753

STB EXP

ST8 MANTi
STB MANT2
STB EXPON
5rB TEMp+l
eCB

STB OPFLG
NUMCt CPA .+568
ISZ DPFLG
JMP NUMC2
CL.A

srA

EXPON

JMP NUMC4+1
NUMC2 JSB OIGel<
JMP NUMei'
ISZ ExPON
ASL 11
STA TEMP+2
JSB MBYl0

LOB ExP

SZB,RSS
JMP NUMC6
ADS ,-4
CHS
LOA rEMP+2
STB TE,.,p+2
CL.B
NUMC3 ISZ TEMP+"2
JMP NUMC5
eL,f

ADB MANT2
CLO
SEZ
INA
ADA MANTt

sos

.JMP NUMC4

CL.E,ERA
ERa
lSl EXP
NOP
NUMC4 .J8B NORML
tSZ TEMP+1
JsB GETeR
JHp NUM12-t
ERB

JMP NUMC3
NUMC6 LOA .... 4
STA EXP
LDA TEMP+2

530tdl 060363

0108

53002
fS3003
53004
!)3005
5 3 006

liI61613
006400
026771
006400

JMP NUMC4
NUMC7 CLB

!)3~H:l7

075613

STB

0110
0111
0112
0113

~71322

ALL
COMPONENTS
OF THE
NUMBER

'NUMBER FLAG' FALSE
SET 'DECIMAL POINT'
FL.AG FALSE
DECIMAL POINT?
SET

yES
NO

ZERO POST~DECIMAL
DIGIT
COUNTER

DIGIT?
NO

yES, COUNT DIGIT
LEFT-JUSTIFY DIGIT
AND SAVE IT
MULTIPLY PREVIOUS NUMBER BY 10
ZERO
EXPONENT'
YES
NO,
SAVE

SHIFT
COUNT
CLEAR LOWER MANTISSA
ALL. SHIFTS DONE?
NO
YES, ADD IN

LOW PART
OF NUMBER
OvERFLOw FROM (8)7
YES
ADD IN HIGH PART OF MANTISSA
OVERFL.OW?
NO
YES, CORRECT
MANTISSA
AND BUMP
ExPONENT
NORMALIZE THE NUMBER
SET 'NUMBER FLAG' TRUE
FETCH CHARACTER
NONE FOUND

.IMp NUMC 1

NUMC5 ClE,ERA

0107
~11219
It

ASCII TO BINARY NUMtJER CONVERSION

(L.B

TEMP+2

SHIFT
DIGIT
RIGHT
SET
EXPONENT
LOAD
NUMBER
SET EXPONENT

SIGN TO , ... '

PAGE 0233 #19
0114
0115
0116
0111

03010 055612
53011 125216

bJA12 0S0464
53013 002001
63014 027056

DIGIT OR DECIMAL PoINT FOUNDt
NO

RSS

YES
NO
FETCH CHARACTER
NONE FOUND

0136
0137

0138

53040 100200

0139
0140

53041 000371
53042 041612
53043 071612
53044 015446
53Q145 021051

0120

0121
0122
0123
"124
0125
0126
0127

0128
0129

0130
0131
0132

0133
0134

0135

0141
0142
0143
0144

0145
0146
0147

63015 015446
!SJ016 027115
53011 050432

~3046

015264

53047 002001
53050 027115
53051 065612
53052 035613

0148

53053 007004

0149

53054 002001
53055 006400
5 3 056 071612
53057 035750
53060 045324
53061 006003

0150
0151
0152
0153
0154
0155

0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166

0167
0168

53062 027077
53063 006020
53064 027"73
53065 007004

53066 015324
53067 015302

5307VJ 035324
53071 027067

53012 027077
53073 07 5 324
5312114 0153A0
53075 035324
53076 027074
53077 061316

CONVE~SION

CPB TEMP"'1
JMP NUMCK,I
CPA E

JMP NUM12
JSB GETeR
JMP NUM16
CPA .... 538
53020 027025
JMP NUMC8
CPA .+558
!:S3021 050434
CCA,RSS
53022 003401
JMP NUMC9
53023 02;027
53024 071613.
STA TEMP+2
53025 015446 NUMCe JSB GETeR
~3026 021115
JMP NUM16
53027 015264 NUMC9 JSB OIGCK
JMP NUM16
53030 027115
03031 071612
sr A TEMP+1
53032 015446
JSB GETeR
~3033 027051
LJMP NUMll
JSB DIGCK
53034 015264
.JMP NUM11
53035 0127051
l.OA TEMP.1
53036 061612
STB TEMP+1
53037 (lI75612

0118
0119

l

ASCII TO BINARy NUMBER

• E' 'I

... , 'I

YES
NO, 'II1II' 1
YES
NO
SET EXPONENT SIGN TO
FETCH CHARACTER
NONE FOUND
DIGIT?
NO

yEs, sAVE IT

DIGIT?
NO
YES, MULTIPLY
PREVIOUS DIGIT
8Y 11

MPY ,+10

AOD IN NEW DIGIT
EXPONENT

ADA TEMP"'1
STA TEMP+l

SAVE

JSB GETeR
JMP NUM11
JSB DIGCK

THIRD DIGIT1

RSS

JMP NUM16
NUM11 LOB TEMP ... 1
ISZ TEMP+2
CMB,tNB

NUM13 STB
JSB
ISZ
JMP
NUH14 LOA

NO
YES
LOAD EXPONENT
POSITIVE?
yES, COMPLEMENT IT
NO

RSS

CLB
NUM12 STA TEMP+1
lSZ OpFLG
ADa EXPON
SlB,RSS
JMP NUM14
SSB
JMP NUM13
CMB,INB
STB
JSB
ISl
JMP
JMP

~.,

ExPON
OBY10
EXPON
•• 2
NUM14
EXPON
MBY10
ExPON
*-2
MANTi

SAVE CHARACTER
DECIMAL POINT FOUND'
yES, CORRECT EXPON£NT
NO, ZERO EXPONENT1
YES
NO, POSITIVE EXPONENT,
YES
NO, SET
COUNTER
DIvIDE NUMBER By 11
DONE?
NO
YES
SET COUNTER
MULTIPLY NUMBER BY 10
DONE?
NO
LOAD

PAGE 0234 #19
0169

8170
0171
1It172
0173
0174
1tJ17e
0176
0177
0178
0179
0180
0181
0182

ASCII TO BINARY NUMBER

53100 065320
53101 035266
53102 027106
531"3 00301210
ti3104

0070~7

~31A5

002004
53106 01531216

5 3 107
53110
Sl111
53112

17t572
01527121
175512
015270
53113 e61612
53114 035276
53115 035276

ta183. 53116 125276
0184**

0185**.

LOB MANT2

ISZ SIGN

0189*

JSB
srB
JSB
LOA

SBPUD
sBPTR,1
SBPUD

TEMP.l

ISl NUMCK
NUM16 tsz NUHCK
JMP NUMCK,I

MULTIpLY UNPACKED NUMBER BY 10

0213

0214

MANTlSSA

POSITIVE?

NUMBER IN
DESTINATION
ADDRESS
RETRIEVE CHARACtER

••
•••
••

THE FLOATING POINT NUMBER IN HANTt, MANT2, ANDExP
IS MULTIPLIED BY 10.

0190*
01 91
53117 061316
0192 53120 002003
0193 !S3121 125300
0194 53122 065322
0195 53123 044362
0196 03124 075322
°1 9 7 ~3125 06532°
0198 53126 000065
0199 53127 005500
02"" 53130 000065
53131 005540
020t
0202 53132 045320
0203 5 3 133 0020.,0
0204 53134 002004
0205 53135 041316
0206 53136 002°21
0201 5 3 137 027144
0208 53140 0~0065
0209 53141 005500
0210 53142 035322
0211 53143 000000

0212

.

JMP NU M15
yES
CMA
NO, COMPLEMENT
CMB,INa,SZB,RSS THE
INA
NUMBER
NUM15 JSB .PACK
NORMALIZE AND PACK
STA SBPTR,l
STORE

0186 ••

0187.
0188*

CONVE~SION

!S3144 07131 6
53145 075320
53146 125300

LOA MANTt
SZA,RSS
JMP MBY10,!

LOB Ex P
A08 ,+3

STB EXP
LOB MANT2
CL.E,ERA

ERe
CLE,ERA
ERB,CLE

ADB MANT2

SEZ
INA
ADA MANTt
SSA,RSS
JMP MBY01

CLE,ERA
ERB
ISZ ExP

NOP
MBY01 STA MANT1
STB MANT2
JMP MBYle,I

LOAD HIGH MANTISSA
ZERO NUMBER?
YES
NO,
MUL.TIPLY
fiV 8

LOAD LOW MANTISSA

DIvIDE
BY

4

·ADD INTO
80TH REGISTERS
PRODUCING
·1.25

CORRECT

*

ON
OVERFLOW

STORE

MANTISSA

MANTISSA

pAGE 0235 #19

ASCII TO BINARY NUMBER CONVERSION

0216 ••

0217...
0218 ••
0219.

0228.
0221.
0222_

NORMALIZE

UNPACKE~

0226

0227
0228
0229
0230

0231
0232

.*.••
••

ENTER WITH NUMBER IN (A), (8), AND EXP. EXIT WITH
NORMALIZED NU~8ER IN MANT1, MANT2, ANO EXP (MANTISSA
IS LEFT IN (A) AND (8) AS WELL).

0223.

0224
0225

NUMBER

53147 071300
53150 002400
53151 071613
53152 061300

53153 002003
53154 006002
53155 027163
53156 071322
53157 071316
531 6 0 075320
53161 125304
~3t62 03!561J
53163 004066
b3164 001600
53165 002061
53166 021162
53167 002060
53170 027162
53171 001500
53112 005540
53173 071316
53174 061613
53175 003004
53176 041322
53177 071322
53200 061316
53201 021160

#NRMI.

srA NTe

SET
LEFT-SHIFT
COUNTER

CLA
STA TEMP+2
LOA NT"
SZA,RSS

TO ZERO

SZB

JMP
STA
STA
NORM! STB
JMP
NORM2 ISZ

NORM2+1
EXP
MANTt
MANT2
NORML.,I
TEMP.er2

IF NUMBER
IS ZERO,
CLEAR
EVERYTHING
STORE
MANTISSA

0233
0234
0235
COUNT A LEFT SHIFT
CLE,ELB
ROTATE CA)
0236
0237
fLA
AND (8) LEFT
SEZ,SSA,RSS
0238
TWO HIGHEST BITS
JMP NORM2
YES, POSITIVE UNNORMALIZED
0239
SEZ,SSA
0240
NO,· TWO HIGHEST BITS 17
JMP NORM2
yES, NEGATIVE UNNORMALIZ!D
0241
0242
NO, NORMALIZE
ERA
MANTISSA
fRB,CLE
0243
0244
COMPUTE
sr A MANTt
0245
LDA TEMP+2
CMA,INA
CORRECTED
0246
AOA Exp
0247
0248
STA EXP
EXPONENT
0249
LDA MANTt
0250
JMP NORM1
0251 ••
0252... NORMALIzE AND PACK NUMBER
0253.·
.*
0254.
0255* NUMBER IN (A), (8), ANO EXP ON ENTRy. ON EXIT (Al
0256* AND (6) CONTAIN THE NORMALIZED, ROUNDED, AND PACKED
0257* NUMBER. UNDERFLOw BECOMES A ZERO, OvERFL.Ow BECOMES
0258* THE LARGEST REPRESNTABlE NUMBER OF APPROPRIATE SIGN.
0259.
NORMALIZE NUMBER
0260 b3202 015304 #PACK JSB NORML
0261 53203 002103
Cl.E,SZA,RSS
ZERO?
0262 53204 125306
JMP .PACK,I
YES
ADS B177
NO, ROUND
~26J
53205 044474
0264 53206 002021
SSA,RSS
POSITIVE?
INB
YES, FINISH ROUND
0265 53207 006004
CLO
0266 53210 103101
SEZ
ON OVERFLOW FROM (8)
0267 53211 002040
0268 53212 002104
Cl.E,INA
CORRECT CA)
80S
0269 53213 102301
OVERFLOW?C (A)-118BI8, (8).& )
1d270 5321~ 001200
RAL
TWO HIGH BITS
0271

5 3 215 002031

I'

.",.••

SSA,SLA,RSS

80'K 11 ( IF CA' WAS 141'80 )

PAGE 0236 #19
0272
0273

~J216

ASCII TO BINARY NUMBER CONVERSION

027221
53217 002300

0274

53220 001130

0275
0276
0211

b3221 001300
~3222 071613
b322J 1 0 1 0 50

~278

b3224 0~5727

0279

b3225 061322

0280

b3226 002040

0281
0282
0283

53227 040356
b3230 102201
53231 002004

0284
0285
0286

53232
53233
53234
53235
S3236
53231

040476
002020
027253

~3241

001200
010500
044000
061613
051027
002001
125306
055030
027260
125306

0287
0288
0289

0290

ADA M256

021260
53240 040476

53253 015474

0302
0303
0304
0305
0306

53254 115207
53255002400
~3256 096400
53251 125306
53260 015474
53261 115206
53262 061613
5 3 263 015310
53264 125306

0310
0311.·

JMP PACK3
SSA,RSS
JMP PACK4

0301

0309

INA
ADA 8200
SSA

002021

53242
53243
53244
53245
53246
53247
53250
53251
53252

0307

soc

040316

0291
0292
0293
0294
0295
0296
0297
0298
0299
0300

0308

JMP PACK1
teE
ARS,SLA,ALS
PACK1 RAR
ST. TEMP+2
LSR 8
SLF,BLF
LOA EXP
SEl
ADA ... 1

0312.**

ADA 8200

RAL

AND 8377
AD8 "

sAvE

(A)

DELETE 8 LOW 8ITS
OF MANTIsSA
DECREM!NT
EXPONENT
ON (l)

*0

INCREMENT
EXPONENT ON OVERflOW
EXPONENT
UNDERFLOW1
YES
NO, EXPONENT
QVERP;LOW?
YES
NO, RESTORE EXPONENT
POSITION
EXPONENT AND
ADD l.OW M·ANT I 88A

RETRIEVE HIGH MANTISSA

RSS

NEGATIVE

JMP
cPS
JMP
JMP
PACK3 JSB
JSB

,PACK,I
MNEG+l
PACK~

.PACK,!
CHOUF
wERRS+6,I

Cl.A

tLB
JHP
PACK4 JSB
JSB
LoA

,PACK,I

OVERFLOW,
YES
NO
CHECK STATUS

ZERO RESUL.T
ON UNDERFL.OW

CHOUF
CHECK STATUS
wERRS+5,I
TEMP+2
RETRIEVE HIGH MANTISSA
JS8 OVFL.W
JHP ,PACKiI

DIVIDE UNpACKED NUMBER BY 10

**

***

**

0315. INVERSE OF MBYl0
0316.0317 0 32 65 061316
0318
0319
0320
0321
0322
0323

53266 002003

0324

53274 000065
53275 1002 00
53276 052000
53277 000066

0326

SET (Al • 100000 AND SKIP
UNDOES RAL AB'OvE

LOA TEMP+2
CPA MNEG

0313.*
0314.

0325

NO
yES

53267 125302
~3210 0 6 4355
53211 045322
t53272 07 5 322
53273 061320

STB EXP
LOA MANT2
(LE,ERA
MPY TENTH

RETURN
ON
ZERO
ADD EXPONENT
Of" 1/10 TO
THAT OF NUMBER
JUSTIFY
LOWER MANTISSA
MULTIPLY BY l/1e

CLE,ELA

SHIFT

LOA MANT1
SZA,RSS
JMPOBY10,I
LOB "2

Aoe

~xp

PAGE 0237 #19
0327
0328
0329
0330
0331
9332
0333

ASCII TO BINARY NUMBER CONVERSION

53300 005640
53301 040001

AOA 1
SEl

0336

53302
53303
53304
53305
53306
533£17
53310
53311
53312

a~~7

"'",",t"
¥''V'W''.~

SEZ
INS

53315 015304
53316 125302

SWP
JSB NORML
.JMp DBYl0,I

0334
0335
u ......... -

033a
0339

0340

002040
006104
075320
12161316
100200
052000

ELB,CLE

040001

CLE,INB

STB MANT2
LOA MANT1
MPY TENTH
AOA 1

041320

ADA MANT2

002040

006004
53314 101100

BACK
ADD IN EQUIVALENT OF
LOWER MANTISSA.
TENTH*2'(_16)
AND ROUND TO 16 BITS
DO

SAME TO
HIGM MANTISSA

PERFORM EFFECTIVE
SUM OF DOUBLE-LENGTH

PRODUCTS
SWAP tA) AND
NORMALIZE

RESULT

(e)

pAGE 0238 *t9

PRINT NAME TABLE

0342 ••
*.
0343*** PRINT NAME TABLE FOR MULTICHARACTER SYMBOLS
0344.*
0345.
0346. BITS 15.9 OF THE 'OCT' WORD ARE THE BASIC OPERATOR
0341* CODES OF THE SYMBOLS. BITS 2." ARE THE LENGT~ IN
THE ASCII VERSION (PRINT
0348. CHARACTERS OF THE SYMBOLS.
0349* NAME) FOLLOWS.
ta350.
0351*
*
0352.*
8353*
0354 53317 032003 MeBOS OCT 32003
AND
ASC
0355 53320 040516
I,AN
OCT 420021
0356 53321 042000
0357 53322 033002
OR
OCT 33002
ASC 1,OR
0358 533 2 3 047522
MIN
0359 53324 034003
OCT 34003
Ase 1,MI
0360 53325 046511
OCT 47000
0361 b3326 041000
OCT 35003
MAX
0362 53327 035003
ASC 1, MA
0363 53330 046501
OCT 54000
0364 53331 054000
0365 53332 036002
UNEGJUAL
OCT 36002
ASC t,c.
0366 53333 036076
0367 53334 A37002
GREATER THAN OR EQUAL
oCT 37002
ASC 1, ••
0368 53335 037075
0369 53336 040002
LESS THAN OR EQUAL
OCT 40002
ASC I, <.
0310 53337 A36015

•••

.*

*.*

0371*

0372.·

MULTICHARACTER UNARY OPERATOR

1tl373.
0374
0375·
0376·

53340 041003
53341 04 7 11 7
53342 052000

NOT

OCT 41003
ASC t,NO

oCT 52000

•••
•

0377.
031S •• STATEMENT TYPES
0379.
0380 53343 042006 STyPS OCT 42006
0381 53344 04 0 523
Ase 3,ASSIGN
53345 051511
0382
0383

53346 043516
53347 043005
53350 052523

•
•

**

USTMT OCT 43005

ASSIGN
..,

USING

ASC 2,USIN

53351 044516

0384

0385
0386
0387
0388
0389
0390
0391
0392
0393

53352
5 3 353
53354
53355

043400
044005
044515

OCT 43400
OCT 44005

ASC 2,IMAG

IMAGE

040507

53356 042400
5 3 357 045003
53360 041517
5336\ 046400
53362 ~46003
53363 046105
53364 052000

OCT 42400
OCT 45003
Ast 1, CO
OCT 46400
OCT 46003
ASC

1,LE

OCT 52000

COM

LET

PAGE 0239 #19
0394
0395
0396
0391
·0398

0399
0400
0401
0402
~403

0404
0405
0406
0407
0408
0409
0410
0411
0412

0413
0414
0415
0416
0411
0418
0419
0420
0421

53365
53366
53367
53370
53311
53372
53373
!S3374
53375
53376
53377
53400
53401
53402
53403
53404
53405
53406
53401
53410
53411
53412
53413
53414
5 34 15
53416
53417
53420
53421
53422
53423
53424
53425

53426
0422
0423
0424
0425
0426
0427
0428
0429
0430
0431
0432
0433
0434
04 3 5
k1436
0431

53427
53430
53431
53432
53433
53434
53435
53436
53437
53440
53441
53442
53443
53444
5 344 5
53446
53447
53450
53451
5 3 452
53453

PRINT NAME TABLE

047003
042111
046400
050003

0421215
043000

OCT 47003
ASC 1,01
OCT 46400

OCT !50003
Ase 1, DE
OCT 43""0

051003
051105

OCT

046400
052004
043517
052117
053002
044506
054003
043117
0510210
055004
047105
A54124
056005
04351 7
051525
041000
051006
051105
052125
051116
060003
042 5 1 6
042000
061004
051524
047520
062004
0421 0 1
052101
063005
044 5 1 6
12159125
052000
064004
051105
040504
065005
05 0 122

OCT 46400
OCT 52004
Ase 2,GOTO

Ase

51003

D1M

DEF
REM

1; RE

OCT 53002
ASC 1,IF
OCT 54003

GOTO

IF
FOR

ASC 1,FO

OCT 51000
OCT 55004
ASC 2,NEXT

NEXT

OCT 56005
Ase 2,GOSU

GOSu B

OCT 41000
OCT 57006
ASC 3,RETURN

RETURN

EOFOP OCT 60003
Ase t, EN

OCT

42000

END

OCT 61004
Ase 2,STOP

STOP

OCT 62004
ASC 2,DATA

DATA

IOSTS OCT 63005
ASC 2,INPU
OCT 52000

oCT

64004

ASC 2,REAO

INPUT

REAO

OCT 65005
Ase 2,PRIN

PRINT

OCT 52000
OCT 66007

RESTORE

~44516

052000
066007
051105

ASC 3,RESTOR

051524

041522
04240'"
0670,,3
046501
534·54 ",52000

OCT 4241d0
OCT 67003
ASC 1, MA
OCT 52000

MAT

PAGE
0438
0439
0440
0441

0442

0443

024~

#19 ·PRINT NAME TABLE

53455
53456·
53457
53460
5 3 461
53462
53463
53464
5 3 465

070005

043111
046105
051400
071005
041510
040511

0446
0447

53467
53470
5 3 411

041000
072005
042516
052105
051000
073001

0448

534~2

000000-

0444
0445

0449.
0450**
0451*

53466

~3473

0140e2

0453
0454
0455

63474
53475
53476
53477
53500
535°1
53502
53503
5350-4

0475~6

0457
0458
0459

FILlS

OCT 51400
OCT 71005
ASC 2,CHAl

CHAIN

OCT

417000

OCT 72005
ASC

2,ENTE

ENTER

OCT 51000

OCT 13001
OCT

'IMPLIED' LET

"

•
••
•
74002

MISCELLANEOUS OPERATORS

0452

0456

OCT 70005
Ase 2,FII.E

075004

OCT
THEN

ASC 1,OF
OCT 15004
ASC 2,THEN

STEp

OCT 16002
ASC t,TO
oCT 77004
Ase 2,STEP

0521121

042516
076002
05211 7
077004
051524

OF

TO

042520
0460",
0461.· PREDEFINED FUNCTIONS. BITS 13.9 ARE USED
FOR INTERNAL IDENTIfICATION
0462**
0463_
0464 53505 001003 TAB
OCT 1003
TAB
ASC 1,TA
0465 !S3506 0521'-"1
0466 53507 041000
OCT A1000
OCT 2003
0467 !S3510 002003
LIN
0468 53511 046111
ASC 1, L1
OCT 47000
0469 53512 047000
0470 53513 003003
OCT 3003
SPA
0471 53514 051520
ASC I,SP
OCT .0400
0472 53515 040400
3
12104003
PROFS
OCT 4 003
TAN
0473 5 516
0474 53517 052101
ASC 1,TA
OCT 47000
0475 53520 047000
3
21
OCT 5003
005003
ATN
0476 5 5
0477 53522 040524
ASC 1,AT
OCT 47000
0478 53523 047000
3
OCT 6003
EXP
0479 5 5 2 4 006003
0480 53525 042530
Ast 1,Ex
OCT 50000
0481 53526 050000
0482 53527 007003
OCT 7003
LOG
ASC l,lO
0483 S3530 046117
OCT 43400
0484 53531 043400
0485 53532 010003
OCT 10003
ASS
0486 53533 0412'502
ASC 1,AB
0487 53534 051400
OCT 51400
~48a
53535 011003
OCT 11003
SQR

...

••
••
•

PAGE '-'1241 *19

,

PRINT NAME TABLE

0489

53536 051521
53537 05100~
0491 5 3 54 0 012003
0492 53541 044516
0493 53~42 052000
0494 53543 013003
0495 53544 051116
0496 53545 042000
0497 53546 014003
0498· 53547 051507
0499 53550 047000
~49"

0590

53551 015003

05 0 1
0502
0503
0504

53552 0461 0 5
53553 0410((10
53554 016003
53555 052131
53556 050000
5 3 557 011003
53560 052111
53561 046400
53562 0.20003
53563 051511
53564 047000
53565 021003
53566 041517
53567 051400
53570 022003
53571 041122
53572 045400

0505

0506
0507
0508
0509
0510
0511
0512
0513

0514
0515
0516
0517
0518.
0519*· MATRIX FUNCTIONS
kJ52e*
0521 ~J573 02400J MATF!
0522 53574 0551 0 5
0523 53575 051000
",524 53576 025003
0525 53577 04151 7
0526 53600 041000
0521 53601 026003
0528 53602 044504
0529 536 0 3 047000
0530 53604 027003
0531 53605 044516
0532 53606 053000
0533 53607 030003
0534 53610 052122
0535 53611 047000

ASC I,S(.I
OCT 51000
OCT 12003
ASC 1,IN
OCT 52000

INT

OCT 13003

RND

ASC

t, RN

OCT 42000
OCT 14003

Ase

OCT 470.00
OCT 15003
ASC t,LE
oCT 47000
OCT 16003
ASC i,TY
OCT 50000
OCT 17003
ASC

SGN

1,SG

1,Tl

OCT 40400
OCT 20003

LEN
TYP
TIM
SIN

ASC 1,51

OCT 47000
OCT 21003

COS

OCT 51400
OCT 22003
ASC 1,8R

BRK

. ASC 1,eo

OCT 40400

•••

* 24003
OCT
ASC l,lE
OCT 51000
OCT 25003
ABC 1,CO
OCT 47000
OCT 26903

ZER

CON
ION

ASC 1,10
OCT 47000

OCT 27003
ASC 1,IN
OCT 53000
OCT 30003
ASC 1,TR

otT 47000

INV
TRN

PAGE 0242 #20
0002
0003
0004
0005
0006
0007
0008
0009*

0010*
0°11·
0012*
00130014*

0015*
115016*
0017*

001S.
0019*
0020*

0021
0022
0023

1tJ024
0025
0026
0027
0028
0029
0030
0031
0032
se33

0034
0035
0036
0037
0038
0039
0040
0041
004 2
0043
0044
0045
0046
0047
0048

0049
0050
0051
0052
0053
0054
~..

0055
0056
0057

FORMATTED OUTPUT ROUTINE

04000
54000 000130
54001 000123
54002 000104
54003 000101
54004 177722
54095 000111

.x

S
0

.A
M46
•• 73

ORG 540008

OCT
oCT
OCT
OCT

130
123
104
101

DEC .. 46

DEC 73

THE ADDRESS OF THE FIRST WORD OF THE FORMAT
STRING IS IN (8) UPON ENTRY.
THE FORMATTER
EXTRACTS THE NUMBER Of CHARACTERS IN THE STRING
AND THEN EXTRACTS THE fORMAT SPECIFICATIONS
ONE BY ONE. AS EACH SPECIfICATION 18 EXTRACTED,
IT IS LOADED INTO A STACK, ONE CHARACTER PER
WORD ANO CHECKED FOR SYNTAX ERRORS. THE
TypE OF SpECIFICATION IS DETERMINED AT THIS
TIME AND THE SPECIFICATION IS THEN EXECUTED
FROM THE STACK,
54006 Pl75643
54007 006004
~4010 004066

*FRHT ST8 EC
INS
CLE,ElB

54011 044000

ADB A

54012 003004
54013 071743

CMA,INA
STA CC

54014 075757

54016 2165760

5T8 IFSTR
STB Op
LOB NCH

54017 006002

SZB

54020 026027
54021 161643
54022 010500

AND B377

54015 075747

JMP FHa
LOA Ee,l

050432
026055

CPA .... 538

YES
NO, COMPUTE 1$
OF CHARACTERS
IN .FORMAT
STRING
NULL STRING?
YES, IGNORE IT
INITIALIZE
CHARACTER COUNTER
CONTROL CHARACTER
EXPRESSION COUNTER
START OF PARENTHESIS LEVEL 1
START OF PAR!NTHESIS .L!V.~L a
REPETITION COUNT fOR LEVEL 1
REPETITION COuNt 'OR L£vE~ a
STRING FLAG
DELIMITER sEARCH
IGNORE BLANKS
GET THE
FIRST CHARACTER
DELIMITER FOUND 7
YES
IS CHARACTER A PLUS 7

JMP FMTl

yES

050434

CPA ,+558

54023 041743
54024 071760

54025 002003
~4026 027674
54021 002400

FM0

54030 071743
54031 071746
54034 071745

54035 071763
54036 071764
071646
015536
102101

061644
015540
051747

"27673

026 e 55
050422

ADA CC
STA NCH
SZA,RSS
JMP FMENO+l
eLl
STA

54032 071643
54033 071744

54031
54040
54041
54042
54043
54044
54045
54046
54047
54050
54051
54052

SAVE POINTER TO STRING
MAKE INTO
CHARACTER POINTER
ADD IN STARTING CHARACTER
SAVE STARTING
CHARACTER
SAVE IN FORMAT STRING ADDREss
AND DELIMITER POINTER
.
MAyBE

FMT2

STA
STA
STA
STA
STA
STA
STA
JsB
STO
LOA
JSB
CpA

cc

CONTR
EC

eel

CC2
PCt
PC2

SFLG
OSRCH

FST
MCHAR
Dp
.JMP FMENO

JMP fMTl
CPA .+438

IS IT A MINUS ?
YES
NO, IS IT A NUMBER SIGN

PAGE 0243 #20
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068.

0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
1tJ083
0084
0085
0086
0087

FORMATTED OUTPUT ROUTINE

54055 065743
055760
~4057 115162
54060 071746
54061 035644
~4062 061644

54063 102101
54064 01554~
54065 051747
54"166 002001

54067 026073
54070
54071
54072
54073
54074

103101
061747
015540
050433
002001

!:i4075 115163
54076 035747

54077 035743
54100 065743
54101 055760
54102 115162
!S4103 061747

01 55 3 6
003400

0090

t;4113

~7t766

0091
0092
0093
00 9 4
0095
0096
0097
0098
0099
0100
0101
0102

54114 071765
54115 ~71740
54116 071730
54117 071731

0089

0103
0104
0105
0106
0107
01°8
0109

0110
0111
0112
0113

FMTl

~4056

541 0 4
54105
54106
54107
54110

B0S8

RSS

54053 002001
04054 026105

071750

071752
002004
54111 071761
54112 071762

54120
54121
54122
54123

002004
071774
061756

071755

54124 061644

54125 102101
54126 015540
54127 051747
54130 115162
54131 050421
5 4 132 0020Al
b4t33 £126177
54134

~65747

~4135
~4136

001004

A45644
54137 045743
~4140 075743
54141 035644
54142 061743

JMP FMTJ
LDB CC
cpa NCH
JSB FERRS,I
STA CONTR
ISZ FST
LOA FST
STO
JSB MCHAR
CPA DP
RSS

JMP FMT01
CLO
LOA DP
JSB MCHAR
FMT0t CPA .+548
RSS
JSBFERRS+l,I
ISZ oP
ISl CC
LOB CC

cpa

.NCH

.JS8 FERRS, I

FMT3

LOA
JSB
eCA
ST.
STA
INA
STA
STA
STA

DP
DSRCH

DpFlG
EFlAG
NUMt
NuM2
SBD

STA SAO

STA SNFLG
STA NAD
STA NBD
INA
STA REpeT
LDA IFSS
sr. FSP
LOA FST
STO
JSB MCHAR
CpA Dp
JSB FERRS,I
CPA .+42B
RSS

JMP FMT0
LOB DP
eMB,INB
A08 FST
ADS CC
STB CC
FMT16 lSZ FST
LOA CC

YES
NO

END

of

STRING 1
YES, ERROR
SAVE CARR. CONTROL CHARACTER
INCREMENT STRING POINTER
IGNORE BLANKS
GET NEXT CHARACTER
DELIMITER FOUND ?
YES
NO, CHARACTER FOUND 7
GET
THE
DELIMITER
IS IT A COMMA?
yES

NO, ERROR
INCREMENT DELIMITER POINTER
AND CHARACTER COUNTER

ALL CHARACTERS USED 7
YES, ERROR
NO
FINO NEXT DELIMITING CHARACTER
INITIALIZE
FIxED FlAG
FLOATING FLAG
PRE.DECIMAL POINT 0 COUNTER
POST_DECIMAl POINT DCQUNTER
S BEFORE D COUNTER
S AFTER 0 COUNTER
SIGN FL.AG
POST.DECIMAL ZERO COUNTER
PRE-DECIMAL POINT DIGIT COUNTE
. REpETITION COUNT
FORMAT STACK
POINTER
GET NON-DELIMITING
CHARACTER

IGNORING Bl.ANKS
IS IT A DELIMITER 1
YES
IS IT A QUOTE?
YES
NO
RESET

CHARACTER
COUNTER
INCREMENT STRING POINTER
ALL

PAGE

r

~244

#20

FORMATTED OUTPUT ROUTINE

0127

54143 051760
b4144 115164
54145 035743
54146 0,61644
54147 103101
54150 015540
54151 171755
54152 035755
54153 050421
54154002001
54155 ~26141
b4156 035644
54157 035743
54160 061743

0128

54161

0129
0130

54162 026435
54163 061644
54164 071747
54165 015536
54166 ~61644
54167 051747
54170 02643f)
5 4 171 102101

0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126

0131
0132
0133
0134
0135
0136

05176~

0137
0138
0139

54172 015540
54173 061644

01140
0141
0142

54175 026435
54176 115163
54177 0522101

0·143

54200
54201
54202
54203
54204

0144
0145
0146

0147
014~

0149
0150

0151
0152
0153
0154
0155

0156
1rl157
01 5 8
0159
0160
0161
0162
0163

0164
0165
0166
0167
0168

54174 055747

026330

050435
026316

050464
026325
54205 015264
b4206 026255
54207 071774
!)4210 035644
54211 061644
54212 051747

54213 115165
54214 102101

54215 015540
54216 ~51747
54217 115165
5422(.1 015264
~4221 026243
54222 061774
t;4223 075774
54224 100200
54225 000371
54226 041774
54227 071774
54230 035644
54231 061644
5423~ 051747

CPA NCH
CHARACTERS USED ?
JSB FERRS+2,! yES, ERROR
ISZ CC
INCREMENT CHARACTER COUNTER
LOA FST

OON'T IGNORE BLANKS

eLO

JSB MCHAR
srA FSP,I
1St FSP
CPA .+42B

GET NEXT CHARACTER
LOAD CHARACTER ONTO STACK

RSS
.JMP

YES
NO
INCREMENT STRING POINTER
AND CHARACTER COUNTER

ISZ

IsZ
LOA
CPA

FMT16
FST
CC
CC
NCH

,JMp FMT46

LOA
STA
JSB
LOA
CPA
JMP
STO

FST
Dp
DSRCH

FST
DP
fMT46

JSB MCHAR

LOA FSl
CPS DP
JMP FMT46
JSB FERRS+1,I
CpA S
.JMP FMT14
CPA .+568
JMP FMT9
CPA E
JMP FMTt3
JaB DIGCK
JHP FMT6
STA R[pCr

INCREMENT STACK POINTER
IS IT A " ?

AL.L
CHARACTERS USED ?
yES
RESET

DELIMITER
POINTER
NEXT CHARACTER
A DELIMITER 7
yES

IGNORE. BLANKS
FETCH A FORMAT STRING CHARACTER
WOULD IT BE

A DELIMITER ?

YES
NO, ERROR
IS IT AN S ?
yES

IS IT A • ?
YES
IS IT AN E?
YES
IS IT A DIGIT?
NO

yEs, STORE IN REpeT
INCREMENT STRING POINTER
LOA FST
NEXT CHARACTER
CPA DP
A DELIMITER ?
JaB FERRS+3,1 yES, ERROR
ISz FST

STO

JsB MCHAR

IGNORE BLANKS

GET NEXT CHARACTER
IS 11 A DELIMITER 1

CpA Op
JSB FERRS+3,I
JSB DIGCK
IS IT A' DIGIT ?
JMP FMT5
NO
LDA REPer
yES,
STB REPeT
MULTIPLY PREVIOUS
MPY .+126
DIGIT BY 10
ADA

REPeT

ADD IN ONES OIGIT

STA
ISZ
LOA
CPA

REPeT
FST
FST
DP

INCREMENT STRING POINTER
NEXT CHARACTER

A DELIMITER 7

PAGE 0245 #20
0169
~170

0171
0172
0173
1i'174

0175
0176
0177
0178
~179

~180

0181
0182
0183
0184
~185

0186
0187
0188
0189
0190
~191

0192
0193
0194
0195
0196

0197
0198
0199

FORMATTED nUTPUT ROUTINE

~4234

54236 (;)51747
54237 115165
5424~ 015264
~4241 002001
54242 115166
b4243 065774
54244 0'06003
54245 115167
54246 044321
!:S4247 006021
54250 115166
~4251 046005

54252 '-"07004
54253 175750
54254 035755

04255

~52PJ00

54256 12126276
~4257 a52003

54260
54261
54262
54263

0126321
052002

002001

026340
54264 065750
~4265 006002
54266 026273
5 4 267 065762
54270 045774
54271 075762

""200

54272 026276

0201
0202
0203
02 0 4
0205
0206
0207
0208
0209
0210
0211
0212
0213
0214
0215
0216
0217
0218
0219

~4273
~4274

065761
045774

54275
54276
54277
54300
54301
54302
54303

~75761

022~

0221
0222
0223
V)224

JSB
STO
JSB
CPA
JSB
JSB

11516 5
1'12101
54235 015540
~4233

~4J04

54305
54306
54307
~4310

54311

006404
075774
171755
035644
035755
061644
051747
026313
102101
015540
051747
002001

b4312 026177
54313
54314
54315
04316
54317
54320
b4321
04322

065755
075753
026343
035750
115170
026300
~65646

006003

FERRS+3,I YES, ERROR
IGNORE BLANKS
MCHAR
GET NEXT CHARACTER
DP
IS IT A DELIMITER?
FERRS+3,I
DIGCK
THIRD DIGIT?

RSS

JSB FERRS+4,1
REPCT
SZe,RSS
JSB FERRS+5,I
ADB M73
SSB,RSS
JSB FERRS.4,I
ADS •• 73
CMa,INS
STB FsP,I
ISZ Fsp
FMT6 CPA.X
JMP FMT8
CPA .A
JMP FMT10
CPA 0
RSS
JMP FMT15
LOB DPFlG
SiB
JMP FMT7
LDB NUM2
ADB REPeT
5TB NUM2
JMP FMT8
FMr7 LOB NUM1
ADS REPeT
srB Nu Ml
fMT8 cLa,INS
STB REPeT
STA FSP,I
lSZ FST
ISZ FSP
LOA FST
CPA DP
JMP fMT08
5TO
Jse MCHAR
CPA DP
RSS
JMP FMT0
FMT08 LOB FSp
sra EST
JMP FMT18
FMT9 ISZ oPFLG
JSB FERRS+6,I
JMP FMTB.2
FMT10 LOB SFLG
SlB,RSS
FMT5

YES, ERROR

l.DB

REPeT ZERO 1
YES
NO. GREATER
THAN 721
YES
RESTORE REPeT
SET NUMBER FLAG
LOAD ONTO fORMAT STACK
INCREMENT STACK POINTER
IS NEXT CHARACTER AN X ?
yES
IS IT AN A ?
yES
IS IT A 0 ?
YES
NO
DPFLG • • 11
YES
ADD REPel TO
POST.OECIMAL
DIGIT COUNTER
ADD REPel TO
PRE~DECIMAL

DIGIT COUNTER
REINITIALIZE
REPeT
LOAD CHARACTER ONTO STACK
INCREMENT STRING POINTER
AND STACK POINTER
NEXT CHARACTER
A DELIMITER ?
y~S

IGNORE BLANKS
GET NEXT CHARACTER
Is IT A DELIMITER?
YES
SET ENO OF STACK MARK
oPFLG •
NO
YES
IS SfLG

~1

1

PAGE

r

0225
0226
0227
0228
0229
0230
0231
0232
0233
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243
0244
0245
0246
0247
0248
0249
025a
0251
0252
0253
0254
0255
0256
0257
0258
0259
0260
0261
0262
0263
0264
0265
0266
0267
0268
0269
0270
0271
0272
0273
0274
0275
0276
0277
0278
0279
0280

~246

~4323
~4324

54325
54326
!)4327
b4330
!)4331
!54332
~4333

b4J34
54335
54336
54337
54340
54341
54342
54343
!)4344
54345
54346
54347
54350
b4351
54352
54353
54354
54355
54356
54357
54360
54361
54362
54363
54364
54365
54366
54367
~4370

5 4 371

#20

FORMATTED OUTPUT ROUTINE

035646
026276
035752
115171
026300
065761
045762
006003
035766
065766
006003
035765
026300
050427
027433

FMT13
FMt14

FMT15

115172
061756
071755
003400
071774
041646
002003
026500
040355
002021
026502
061761

041762
002003
026457
015542
027673
115173
eJ71316
071736
015412
071322

061316
002021

54372 026414
5437~~ 060434
54374 071266
54375 007104
54376 061316
54377 003000
~4400 002041
!)4401 026411
54402 002004
54403 102301
54404 026411
54405 000065
~4406 005500
54407 ~35322
b4410 000000
5 44 11 071316
04412 071736

FMT18

15Z SFLG
JMP FMT8
ISl EFLAG
JSB FERRS+7,I
JMP FMT8+2
LOB NUMI
ADB NUM2
SZ8,RSS
tSl SBD
LOB SBo
SlB,RSS
!5Z SAD
.JMP FMT8+2
CPA ,+50B
JMP FMT95
JSB FERRS+8,I
LDA IfSS
srA FSP
CCA

STA REPeT
ADA SFLG
SZA,RSS
JMP FMT24
ADA • .,2

SSA,RSS
JMP FMT25
LDA NUMI
ADA NUM2
SlA,RSS
JMP FMT20
JSB fVEXp

yES, INCREMENT IT
NO
EFLAGa ... 11
NO
YES
ANY D'S FOUND?
NO, INCREMENT BEFORE COUNTER
ANY S'S BEFORE AD?

NO, INcREMENT AFTER tOUNTER
I~ CHARACTER A ( ?
YES
NO, ILLEGAL CHARAClER

REINITIALIZE

STACK POINTER
AND

REPCT
SFLG • 1 ?
YES
SFLG • 3 ?
YES
NO, ANY

D'S
FOUND 1

NO
EVALUATE EXPRESSION
.JMP FMEND
NONE FOUND
JsB FERRS+9,I STING... ERROR
STA MANTI
IF NUMBER
srA NUMwl
SAVE HIGN MANTISSA
JSB .FLUN
UNPACK NUMBER
STA Exp
AND SAVE THE EXPONENT
LOA MANTI
IS THE NUMBER NEGATIVE ?
SSA,RSS
JMP FMTJl
NO
YES, SET SIGN TO MINUS
LDA 1+55B
STA ~IGN .
AND
CMB,CLE,INB
COMPLEMENT
LOA MANTt
eMA
OVERFL.OW FROM
SEZ,RSS
LOW MANTISSA ?
JMP FMT31-J
NO
INA
yES, OVERFLOW FROM
SOS
HIGH MANTISSA ?
JMP FMT31 .. 3
NO
CLE,ERA
YES, SHIFT RIGHT
ERB
AND
BUMp EXPONENT
IsZ EXP
NOP
STA MANTi
STA NUMWl
SAVE HIGH MANTISSA

PAGE 0247 #20

FORMATTED OUTPUT ROUTINE

0289
0290
0291

~4413 026416
54414 06~432
54415 071266
~4416 075320
54417 075737
54420 061322
54421 ~71647
54422 0064~4
54423 "75643
54424 060670
54425 071726

0292

:>44 2 6 0~·""""
0"'0'"

0281
0282
0283
0284
0285
0286
0287
0288

.JMP .... 3

fMT31 LOA .+53B
STA SIGN
STB MANT2
STB NU~W2
LOA E"XP
STA EXPW

CLB,INa
STB
LOA
STA
LOA

EC
IHB
HBP
EFLAG

SZA,RSS
k'J293 54427 002003
JMP FMT62
0294 54430 027210
LOA OPflG
0295 54431 061750
SZA,RSS
0296 544 32 002003
0297 54433 027047
JMP FMT45
0298 54434 026551
JMP FHT30
0299.*
**
0300*.* OUTPUT A LITE:RAL STRING *.*
0301*·
**
0302 ~4435 061756 FHT46 LOA IFSS
0303 . 54436 071755
STA FSp
0304 54437 161755
LDA FSp,I
CPA
031215 54440 050421
,+428
0306 54441 027332
JMP FMT90
0307 54442 050375
CPA .+166
LOA ,+128
0308 54443 060371
54444
050376
0309
CPA ,+17B
RSS
54445 002001
0310
JMP FMT47
0311 54446 026454
0312 54447 060402
LOA ,+238
JSB OUTeR
0313 54450 015452
0314 54451 060374
LOA .+15B
121315 ~4452 015452
JSB OUTeR
CLA
0316 54453 002400
FMT47 EQU
0317 54454
121318 54454 015452
JSB OUTeR
~319
!:>4455 035755
ISZ FSP
JMp FMT46+2
0320 54456 026437
0321 ••
0322.** OUTPUT A 8LANK SPECIFICATION
0323**
0324 54457 161755 FMT20 LOA FSP,I
0325 54460 01212021
SSA,RSS
0326 54461 12126465
JMP FMT21
0327 ~4462 07177 4
STA REPCl
0328 ~4463 035755
lSZ FSP
0329 5 44 6 4 t61755
LOA fSP,I

•

0330

~4465

0331
0333
"'334
0335

h4466
54467
54470
54471
54472

~336

~441j

0332
"".

052~00
002~01

115172
015532
003400
071774
061755

SET SIGN
TO Pl.US
SAVE LOW MANTISSA

AND EXPONENT
SET EXPRESSION
FOUND FLAG
HOLDING BUFFER
POINTER
EfL.AG
SET

"I

YES
DPFL.G
SET

YES
NO

RESET
STACK pOINTER
TOP OF STACK
A .. ?
YES, DONE WITH THIS SPEC

IS IT A PSEUDO-LINE'fEO 1

YES, MAKE IT A LINEFEfD

IS IT A PSEUDO CARRIAGE RETURN ?

YES

NO

OUTPUT AN X-OFF

OUTPUT A
CARRIAGE RETURN
AND A NuLL,
NO, OUTPUT THE CHARACTER
INCREMENT STACK POINTER
NO
**
***
**

LOAD TOP OF STACK
IS IT A NUMBER 1
NO
YES, STORE NUMBER IN REPeT
INCREMENT STACK POINTER
LOAD NEW TOP OF STACK
IS IT AN )( 1

FMT21 CPA .x
yES
RSS
JSB FERRs ... 8,I NO, ERROR
JSB QUTBl
CCA
REINITIALIzE
REPeT
SIA REPeT
LDA FSp

END

PAGE 0248 #20

FORMATTED oUTPUT ROUTINE

~337

54474 051753

033S

54475 027332

54416 161755
0340 54477 026457
0341.*
0342... OUTPUT A STRING
0343.*
0339

0344
0345
0346
0347
0348
0349

0350
0351
0352
0353
0354
0355
0356
0357
0358
0359
0360

0361
0362
0363
0364
0365

0366
0367
0368

0369
0370
0371

54500
54500 ~15542
54501 027673
54502
545~2 2e6405
54503 115200
54504 075643

54505 161755
54506 002021
54507
54510
54511
54512

026513
071774

035755

54521 002001
54522 115173

54523 035755
54524
54524 015364
54525 061571
54526 050375
54527 06 0 371
54530 050376

0372

54531 002001

0373

54532 026540
54533 060402
54534 015452
54535 060374
54536 015452

0374
0375
0376
0377
0378
0379
0380
0381

~4537

0385

0386

b4546 051753

0387

~4547

0382

0383
0384

LOA FsP,I
RSS
~JMP

027332

FMT27

JSB aUTBl
JMP FMT28
FMT27 CPA .A
RSS

JS8 FERRS.9,I
ISl FSP
FMT05 EQU
JSB FSCH
LOA BLANK

•

CPA ,+168
LOA .+128
CPA .+178
RSS

JMP
LOA
JSB
LOA

FMT29
.+238

oUTeR

,+158

.JSB OUTeR
FHT29

54540 015452
54541 035774
f:i4542 026524
54543 01213400
54544 071774
54545 061755

yES

LOAD

NE~

TOP OF STACK

**
***
**

CPA • X

002400

54540

FMTge
FSP,I
FMT20

JSB EVEXP
EVALUATE NEXT EXPRESSION
JMP FMEND
NONE fOUND
FMl25 EQU *
CLB,INB;RSS
SET THE EXPRESSION
JSB FERRS+14,I
STB EC
FOUND FLAG
LOA FSP,I
LOAD TOP OF STACK
SSA,RSS
IS IT A NUMBER ?
JMP FMT26
NO
STA REPeT
YES
ISl FSP
INCREMENT STACK POINTER

161755

54520 052003

OF STACK

EST

FMT24 EQU •

54513 052000
b4514 002001
54515 926520
54516 015532
54517 026543

CPA
JMP
LOA
JMP

FMT28

CLA
EQU *
JsB OUTeR
ISl REpCT
JMp FMT05

ceA

STA REPeT
LOA FSP
CPA EST
.JMP FMT90
JMP FMT25

0388 04550 0265~2
0389.*
0390.*. PRtPARE AN INTEG~R FOR OUTPUT
0391.*
0392 ~4551 0~2400 FMT30 CLA

LOAD NEW TOP OF STACK
IS IT AN X ?
YES
NO

IS IT AN A ?
YES
NO, EHHOR
INCREMENT STACK PoINTER

FETCH STRING CHARACTER
NO, FETCH A BLANK

IS IT A PSEUDO-LINEFEED ,
YES, MAKE IT A LINffEEb
IS IT A PSEUDO CARRIAGE RETURN ?
YES

NO
OUTPUT AN X.OFF

OUTPUT A
CARRIAGE RETURN
AND A NuL.l.
OUTPUT CHARACTER
REpel usEO up· "

NO
REINITIALIZE
REPel
END of
STACK ?

NO
**
*.*
**

INITIALIZE

PRE~OECIMAL

POINT

PAGE 0249 #20
0393
0]94

0395
0396
0.397
0398
0399
0400
0401
0402
0403

0404
0405
0406
0407
0408
0409

0410
0411
0412
0413
0414
0415
0416
0417
0418
0419
0420
0421
0422
0423
0424·

0425
0426
0427
0428
0429
0430

FORMATTED OUTPUT ROUTINE

b4552 071324
54553 "'03400
54554 041322
54555 002021
54556 026565
54551 060437
b4560 171726
54561 035726
54562 003400
54563 071733
54564 026576
54565 015526
54566 071324
54567 071733
54570 015422
b4571 040437
54572 171726
54573 035726
54574 035324
54575
54576
54577
54600
54601
54602
54603
54604
54605
54606

026570

061761
041733
flI65766
045765
006092
026612
065266

054432
026612

54607 040356
b4610 006404
54611 075740
54612 210 2 0 2"

54613 027570
b4614
54615
54616
54617

071732
01553 0
0020'01

027570

0431 54620 064670
0432 54621 075726
0433**

0434***

DIGIT COUNTER

STA EXPON
CCA

ADA EXP
SSA,RSS
JMP FMTJ2
LOA .+60B
STA HBP,I
lSZ HBP
CCA

EXPONENT ZERO OR NEGATIVE?
NO
YES, LOAD A
ZERO
INCREMENT BUFFER POINTER

NUMBER OF BUFFER WORDS

STA NHBW

IS ONE

.JMP FHT33

fMT32 JSB DTLI
STA

srA

EXPON

NHBW
JSB GETOG
ADA .+608

STA

HBP,I

lSZ HBP

ISZ EXPON

JMP FMT32+3
LOA NUMl
ADA NHBW

LOB SBD
ADS SAD

SlB
JMP FMT43
LOB SIGN
CPS .+538
JMP FMT43
ADA ... 1

CL.B,INB
STB SNFLG
FMT43 SSA

JMP FMT80
5TA NBLK
JS'B ROUND
RSS

JMP FMT80

LOB tHB
5TB HBp

SAVE NUMBER
OF DIGITS
GET DIGIT
CONVERT TO ASCII
STORE IN HOLD BUFFER
ALL DIGITS
FOUND '1
NO
COMPUTE NUMBER OF
LEADING BLANKS
ANy S'S
FOUND ?
yES

NO, NUMBER POSITIVE 1
YES
NO, SAVE ROOM
FOR
PRINTING SIGN
NUMBER OF BLANKS NEGATIVE 1
YES
NO
ROUND NUMBER IN BUFFER
NO ROOM FOR CARRY FROM ROUND
REINITIALIZE
HOLO BUFFER POINTER
**
***

...

OUTPUT NUMBER FROM HOLDING BUFfER

0435**
0436 04622 161755
0437 54623 052001
0438 546 2 4 002001
0439 54625 026645
0440 54626 035755
0441 54627 061740
0 4 42 54630 002002
0443 b4631 Vl26777
0444 b4632 065766
((}445 54633 ~06002
0446 54634 026642
0447 54635 061266
0448 54636 015452

FMT34 LOA FSP,I
CPA'S
RSS

JMp FMT36
ISZ FSp
LDA
SZA

LOAD TOP OF FORMAT STACK
IS IT AN S ?
YES
NO
INCREMENT STACK POINTER

SNfLG
SNFl..G

=0

?

JMP FMT59
LOB SBO

NO, IGNORE THE S
yES, ANy S'S BEFORE AD?

SZB
JMP FMT.35

y~s

LOA SIGN
JSB OUTeR

NO, OUTPUT S'IGN

IMMEDIATELY

PAGE 0250 #20
9449
0450

121451
121452
121453
04f>4
121455

FORMATTED OUTPUT ROU1INE

f)4637 060361

LDA ,+2

54640
54e41
54642
54643
54644

STA SNFLG

121717421
026717
0B741210

075740
026622
54645 002021

JMP FMT59

FMTl5

eee

ST8 SNFLG
JMP FHTJ4
FHT36 SSA,RSS
JMP FMT06
STA REPel

121460

54646 026652
54647 011774
54650 035755
54651 161755
54652 052000

0461

54653 002001

RSS

0462

54654 026661
54655 015532

JMP FMT37
JSB OUTBL

9456

0457
0458
0459

·0463
121464

121465
0466
0467
0468
0469

0470

0471
121472
0473

0474
0475
0476
0477

9478
121479
9480
0481
9482
0483
121484
0485
0486
0487
0488
0489
0490
0491
0492

0493
0494
0495
0496
0497
0498
121499
0500
0501
0502
9503

0504

54656 003400
54657 071774
54660 026777
54661 052002

54662 0212001
54663 026753
5 4 66 4 03 5755
54665 00341210

SET 8NfLG TO 2

ISZ Fsp

LDA Fsp,l
FMT06 CPA .X

etA
STA REPeT
JMP FMT59
FMT37 CPA 0
RSS
.JMP FMT57

151 fSP

SET SNFLG TO -1
TOP OF STACK A NUMBER 1
NO

yES, STORE IN REPeT
INCREMENT STACK PoINTER
LOAD NEW TOP of STACK
Is TOP AN X .,
YES
NO
REINITIALIZE
REPeT
TOP Of STACK AD?
YES
NO
INCREMENT STACK POINTER

007400
12145732
075732
026746
54677 061732

eCA
ADA
SSA
JMP
LOA
JSB
eCB
AOB
STB
JMP
fMT07 LOA

54700 12102020

5SA

54701 026713
5471212 003400
04703 071732

JMP FMT56

yES

CCA

NO, DECREMENT
BLANK COUNT

~4666

54667
54670
54671
54672
54673
54674
54675
54676

041732
00212120
026677
061571

"'15452

NBLK

NUMBER of BLlNKS > 0 1

FMT07

NO
YES, OUTPUT A
BLANK
DECREMENT
BLANK
COUNT

BLANK
OUTCR
NBLK
NBLK
FMT40
NBLK

STA NBLK

NUMBER OF BLANKS
LEss THAN ZERO 1

54704 007400
54705 055740

eea

cPS SNFLG

SNFLG • • t ?

54706
54707
54710
54711

JMP FMT02

yES

ADB SNFLG

SNFLG • 1 ?

026717
045740
006003

. SlB,RSS

026746
54712 026723

JMP FHT40
JMP FMT58

54713 007400
54714 045740
!)4715 006002
54716 026723
54717 061266
5472~ 015452
54721 060361
!:>4722 071740
54723 0b0670

FHT56 ceB
ADS SNFLG

f>4724 04Q1435
54725 051726
04726 026777

SZB

JMP FMTbB
fMT02 LOA SIGN
JSB OUTeR
LOA .+2

STA SNFLG
fMT58 LOA IHH
ADA .. +46
CPA HSP
JMP FMT59

yES

NO

SNFLG • 1 ?
NO

yEs, OUTPUT
SIGN AND
SET SNFLG
TO 2
E.ND

OF
BuFFER ?

PAGE
0505
0506

0507
ra508

0509
0510
0511

121512
0513
0514
0515
0516
0517
0518

~251

54727
54730
54731
54732
!;4733
b4734
!s4735
54736
!)4737
5474Q1
54741

#20

FORMATrlD OUTPUT ROUTINE

002002

026746
002404
"'51750
026746
003400
041324

0010
0011
0012
0013

0014

~4763

0P.:6020

0015
0016

54764
fj4765
54766
54767
54770
54771
54772
54773
54774
54775
54776
04777
55000
55001

026770
044356
0060",2
026774

0003
0004

012105
"006
0007

0008

. 0009

0017
0018
0019

0020
0021

0022
0023
0024
0025
0026

0027
0028
0029
0030
0031
0~32

0033
0034
0035
0036
0037
0038
0039
0040
0041

CPA DP"'-LG

JMP FMT40

ceA

AOA ExPON
LOB IHB,!
CPB ,.608

54742 164670

54743 054437
54744 002400
!l4745 071324
54746 035774
54747 026665
54750 003400
54751 071774
54152 026777
54753 065750
54754 006002
54755 027003
54756 050435
54757 002001
54760 027003
54761 035755
54762 065740

0519
0001
0002

LOA HBP,I
JSB OUTeR
ISZ HBP
LOA EFLAG
SZA
JMP FMT40
CLA,INA

161726
015452
035726
061752

061266

015452
060361
071740
060435
015452

035750
061755
"'51753
027332
55002 026622
55003 035755

55004 015452
55005 061755
55006 051753
55007 027025
55010 161755
55011 002021
55012 027016
55 01 3 035755
55014 071774
55015 161755
55016 052000

CLA

STA
fMT40 lSI
JMP
CCA
STA
JMP

ExPON
REpCT
FMT37.4

REPeT
FMT59

FMT57 LDB DPFlG

SZB
JMP
CPA
RSS
JMP
ISZ
LOB
SSB

FMT42
.+56B

FMT42
Fsp
SNFLG

JMP FM00
ADB .. -1
SZB

JMP FH01 .
LDA SIGN
JSB OUTeR
LOA .+2
STA SNFLG
fM01 LDA ,+568
JSB OUTeR
IsZ OpFLG
FMT59 LDA FSp
CPA EST
JMP FMT90
JMP FMTJ4
FMT42 ISl Fsp
JSB OUTeR
FMT76 LOA FSP
CpA EST
JMP FMT78
L.OA FSP,I
SSA,RSS
JMP fM02
ISZ FSP
STA REPel
LOA FsP,I
FM02 CPA.x
FM00

OUTPUT A
DIGIT
INCREMENT HOLD BUFFER POINTER
IS THIS A
FLoATING poINT SPECIFICATIoN 1
NO
YES, HAS THE DECIMAL POINT
BEEN FOUND YET ?
YES
NO, DECREMENT
DECIMAL
IS THE
NUMBER ZERO?
yES, ZERO ExPONENT
EXPONENT
REpel • 0 .,
NO
YES,REINITIALIZE
REPel

FIXED POINT
SPECIFICATION 1
NO

TOP OF STACK A DECIMAL POINT ?
YES
NO
INCREMENT STACK pOINTER

SNFI..G • • 1 1
YES
NO, • 1 ?

NO
yES, OUTPUT
SIGN
SET SNFLG
TO 2
OUTPUT
DECIMAL POINT
INCREMENT FLAG TO sHow D.p. FaUN
END OF
STACK

yES
NO
INCREMENT STACK pOINTER
OUTPUT AN E
END OF
STACK ?
yES

NO, TOP of
STACK A NUMBER 1
NO
YES, INCREMENT STACK POINTER
STORE NUMBER
GET NEw TOP OF STACK
IS IT AN x ?

PAGE 0252 #21
0042
0043
0044
0045
0046
0047
0048

1lI049
0050
0051
0052
0053

0054
0055

0056
0057
0058
0059
0060
0061
0062
0063
0064

55017
b5020
55A21
55022
55023
55024
55025
55026
b5027
55030
55031
55032
55033
55034
55035
55"'36
55037
55040
55041
55042
55043
55044
55045
55(.'146

0065**
0066.**

0088
0089
0090
0091
0092
0093
0094
0095
0096

002001
115171
015532
003400
071774
027005
060434
065324
006020
001005
~60432

075324
015452

061324
006400
100400
000371

rtl40431
044437
075324
~15452

061324
015452
027332

RSS

yES

JSB FERRS+7,1 NO, ERROR
JSB DUTBl
ceA
RESET
STA REPeT
REPel
JMP FMT76

FMT78 LOA .+55B

LOB EXPON
SSB

CMB,INB,RSS
LDA , .. 538
5TB EXPON
JSB OUleR
LOA ExPON

CLB

002400
071324
071730
051322
027161
065322
00602 0
027156
015526

071324
071731
015422
040437

171726

035726
035324
027062
065762
006003
~5072 027126
55073 060670
55074 040435
55075 051726
55076 027116
55077 e6f)730
5510~ 0024((10
55101 006003
551~2 027106
!'55103 044356

OUTPUT
AN
EXPONENT
SIGN

COMPUTE

DIY .+12B
ADA .+608
ADS .+608

STB EXPON

JSB
LOA
JSB
JMP

OUTeR
ExPON

OUTeR

FMT90

PREpARE FIXED POINT NUMBER

0067**
0068 55047
0069 55050
0070 55051
0071 55052
0072 55053
0073 55054
0074 55055
0075 55056
0076 55057
0077 55060
0078 55061
0079 55062
0080 55063
0081 55064
0082 55065
0083 55066
0084 55067
0085 55070
0,,86 55071

0087

FORMAT TEO OUTPUT ROUTINE

FMT45 CLA
STA EXPON
STA NAO
CPA ExP
JMP FMT61+3
LOB ExP

SSB

JMP FMT6t
JSB DTL!
STA EXPON
STA NBO
JSB GETDG
FM03
ADA .+608
STA HBP,I
ISZ HBP
ISZ EXPON
JMP FM03
FMT50 LoB NUM2
SZB,RSS
JMP FMT51
LOA IHB
ADA .+46

CPA HBP
.IMP FM04
L.DB NAD

CLA
SZ8,RSS
JMP *+4
ADS .-1

EXPONENT'S
l~)lS

DIGIT

OUTPUT IT

OUTPUT l'S OI&IT

**
***
** SET

PRE~DECIMAL POINT
DIGIT COUNTER
ZERO COUNTER
zERO ExPONENT ?
YES
NO
EXPONENT. NEGATIVE
YES

LOAD
PRE~OECIHAL

POINT

DIGITS

INTO
HOLD

BUFFER

ANY D'S AFTER
DECIMAL POINT 'I
NO
END
OF
BUFFER 'I
YES
LEADING
ZEROES
AFTER
DECIMAL
POINT

PAGE 0253 #21
0097
0098
0099
0100

0101
0102
0103

9104
0105
0106

0107
0108
0109

0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120

0121
21122

0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138

0139
0140
0141
0142
0143

0144
0145
0146
0147
0148
0149
0150
0151
0152

55104
55105
55106
55107
55110
55111
5511'55113
55114
55115
55116
55117
h5120
55121
55122
551 2 3
55124
55125
55126
55127
55130
55131
55132
55133
55134
55135
55136
55137
55140
55141
55142
55143
55144
55145
55146
55147
55150
55151
55152

55153
55154
55155
55156
55157
55160
55161
55162

FORMATTED OUTPUT ROU1INl

075730
002001
015422
040437
171726
007400
045762
075762
035726
027071
061762
003004
071774
015532
003400
071774
041755
071755
061731
041761
065766
045765
006002
027142
065266
054432
027142
040356
006404
075740
002020
027570
071732
007400
045730
006020
015530
002001
027570
060670
071726
026622
015524
061324
071730
065761
006~H~3

55163 027070
55164 061762

55165
55166
55167
55170
55171
55172
55173

002003
027201
054360
002001

027201
061765
041766

STB NAO
RSS
JSB GETDG
ADA ,+608

srA HBP,I

eee

FM04

ADS NUM2
srB NUM2
ISZ HBP
JMP FMT5""1
LOA NUM2
CMA,INA
STA REPel
JsB DUTal

ceA

STA REPel
ADA FSP
STA Fsp
FMT51 LOA NBO

ADA NUMI
LOB SBD
ADS SAD
SZB

JHP
LOB
CPB
JMP

FMT54
SIGN
,+538
FMT54

ADA .-1

CLB,INS
STB SNFlG
fMT54 S8A
JMP FMT80
srA NBLK
eee
ADB NAD
SSB
JSB ROUND

YES

LOAD
POST-DECIMAL POINT
DIGITS
INTO
HOLD
BUFF'ER

OUTPUT BLANKS
TO
FILL FIELD
REINITIALIZE
REPeT
CORRECT
STACK pOINTER
caMPUl NUMBER
OF LEADING BLANKS
ANY S'S
FOUND 'I

YES
NO, NUMBER
POSITIVE ?
YES
NO, LEAVE ROOM FOR
SIGN TO BE PRINTED ANO
SET SNFI..G TO 1
NUMBER OF BLANKS NEGATIVE ?

YES
NO,
NEXT DIGIT A
LEADING ZERO 1
NO, ROUND NUMBER

, RSS

JMP
LoA
STA
JMP
6
FMT 1 JSB

fMT80
IHB
HBp
FMT34
MTGl

NO ROOM FOR CARRy FROM ROUND
RESET HOLD
BuFFER POINTER
GO OUTPUT THE NUMBER

l.OA EXPON

srA NAD
LOB NUM1
SZB,RSS
JMP FMT50
LOA NUM2
SZA,RSS
JMP FMT55
CPB ,+1

ANY D'S FOUND
BEFORE THE DECIMAL POINT 1
NO
YES, ANY D'S FOUND
AFTER THE DECIMAL POINT 1
NO
YES, ONLY ONE OF THEM 7

RSS

JMP FMl55
LOA SAD
ADA SSD

NO
YES, ANY SIS 'OUNO 7

PAGE 0254 #21

FORMATTED OUTPUT ROUTINE

0161
0162
0163

55174
55175
55176
55177
55200
55201
55202
55203
55204
55205
55206

0104

b5207 027070

0153
0154
0155
0156
0157
0158
0159

0160

002002

021201
061266
05 0 434
027070
060437
171726
035726
003400
041761

071761

SZA

JMp FMT55
SIGN
CPA ,+558
JMP FMTS0
FMT55 LOA ,+60 S
STA HBP,I
ISZ Hap
ceA
ADA
STA
JHP FMi50
L.OA

~165.·

0166 •• *

PREPARE fLOATING POINT NUMBER

0167.*
0168 55210
0169 55211
0170 55212
0171 55213
0172 55214
!d17l 55215
0174 55216

0175
0176
0177
0178

0179

l'I~2400

071324
051322

027216
015524
015526
003004
55217 071324

55220 061761
55221 ~41762
55222 071741
55223 061766
041765
002002
027246
061266
050432
027246

0189

55224
55225
55226
55227
55230
55231
55232
55233
55234
55235

0190

55236 075761

0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206
0207
0208

55237
55240
55241
55242
55243

0180
0181
0182

0183
1d184

0185
0186
0187

01813

007400

~5252

JMP
LOA
CPA
JMP

ceB

FMT61
SIGN
,+538
FMT67

ADB NUMI

~"6020

SSB

027570

003400

041741
071741

002kH~3

027570
075740
061762
003004
064365

0440A0

006020
55253 027273
55254 061741
b5255 040347
55256 002020
55257 027265
b5260 064350

NEGATIVE 1

YES
NO, LOAD PRE~DECIHAL POINT
ZERO INTO BUFFER

DECREASE NUMBER OF
D'S AVAILABLE FOR sIGN
AND BLANKS BEFORE DECIMAL PT

*.
***

*.

INITIALIZE DECIMAL
EXPONENT

ZERO EXPONENT 'I

yES

SAVE DECIMAL EXPONENT

GET

TOTAL NUMBER
OF DIGIT8

ANY S'S FOUND?

SZA

045761

55244 006404
55245
55246
55247
55250
55251

FMT62 CLA
STA EXPON
CPA EXP
JMP .... 3
JSB MTGI
JSB OTl1
CMA,INA
STA ExPON
LOA NuMl
ADA NUM2
STA rOTDG
LDA sBD
ADA SAD

yES

NO, NUMBER

JMP

FMT80

STe NUMl
ctA

ADA TOTOG
sr A TOTDG
SZA,RSS
JMP FMT80
ClS,INB
8T8 SNFLG
FMT67 LOA NUM2
CMA,INA
LDB .+6
ADB 0

YES
NO, NUM8ER
POSITIVE 'I

YES
NO, LEAVE ROOM
FOR SIGN
NONE '1
YES
NO, DECREMENT
TOTAL NUMBER OF 0'$
AVAILABLE FOR SIGN

AND BLANKS BEFORE DEC, PT.

SET SNFLG
TO 1
NUM2
> 7

?

SSB

JMP FMT70
LOA TOTDG

YES

YES, TOTAL NUMBER OF D'S
> 7 ?

ADA
SSA

JMP FMT68
LOB

NO

PREPARE TO GET

PAGE 0255 #21

FORMATTED OUTPUT ROUTINE

0209
0210

t)5261 075742
~5262 01£12004
0211 ~5263 071732
0212 55264 2127314
0213 ~5265 061741
0214 ~5266 003004
0215 55267 071142
0216 55270 0216400
1£1217 55271 2175132
0218 55272 021314
0219 !l5273 "'65761
0220 55274 006002
0221 55275 040356
0222 55276 071742
0223 ~5277 006002
0224 55300 044356
0225 55301 075732
0226 55302 061142
0221 55303 040435
0228 55304 002021
0229 55305 027314
0230 55306 071774
0231 55307 015532
0232 5531'" 041755
0233 55311 071755
023455312 062004
0235 55313 071142
0236 55314
0237 55314 003400
0238 ~5315 071774
0239 55316 015422
0240 55317 040437
0241 55320 17 1 7 2 6
0242 55321 ~35726
0243 55322 035742
0244 55323 021314
0245 55324 015530
0246 55325 002001
0247 55326 021570
0248 55327 060670
0249 55330 071726
0250!l5331 026622
0251**
0252**. HANDLE END

STB DCTR
INA
STA NBLK
JMP FMT72
FHT68 LOA TOTDG
CMA,INA
STA DCTR

55332
55333
55334
55335
55336
55337
55340
t>5341
55342
55343
55344

002400
071646
061743
051760
002001
"'27357
061744
002002

115174
065643
006003

DIGITS

PREPARE TO GET

CLB

TOTOG DIGITS
SET NUMBER OF BLANKS

SZB

ANy D'S BEFORE
DECIMAL. POINT 1

STB NBLK
JMP FMT72
FMT70 LOB NUMl

TO ZERO

ADA •• 1
srA DCTR

yES, INCREMENT NUMBER OF DIGITS

SZB
A08 ... 1

SET

ST8 NBLK
LOA DCTR
ADA • +46

SSA,RSS
JMP FMT72
STA REPer
JSB DurBl
ADA FSP
STA FsP
LOA M46
STA OCTR
fMT12 EQU *

eeA

STA REPeT
JS8 GETOG
AOA .+60 8
STA HBP,I
ISZ HaP
ISZ DCTR
JMp FMT72
JSB ROUND

~REPARE

TO GET NUM2 DIGITS

BLANK
COUNT
MORE THAN
FOURTY-SIX
DIGITS NEEDED 1
NO
yEs, OUTPUT NECESSARy BLANKS
CORRECT
STACK POINTER
SET DCTR
TO 46

REINITIALIZE
REPeT
CONVERT TO ASCII
STORE IN HOLD BUFFER

INCREMENT SUFFER POINTER

ALL DIGITS GOT 'I
NO
yEs, ROUND THE NUMBER IN BUFFER

RSS

JMP FMT80
LOA IHB
STA HBp
.JMP FMT34
OF SPECIFICATION

0253 ••
0254
0255
0256
0257
0258
0259
0260
0261
0262
0263
0264

SEVEN

NUMBER OF BLANKS
BECOMES TOTDG • 1

NO ROOM FOR CARRY FROM ROUND
RESET
BuFFER POINTER
**

*.*

*.

CLA
STA SFLG
STRING FLAG
tOA CC
ENF OF
CPA NCH
FORMAT STRING 1
RSS
YES
JMP FMT92
NO
LOA eCl
yES, pARENTHESIS
SlA
BALANCED 1
JSB FERRS+!0,I NO, ERROR
FMT9t LOB EC
ANy EXPRESSIONS
5lB,RSS
USED?

FMT90

PAGE

~256

0265
0266
0267
0268
0269
0270
0271
0272
0273
0274

55345
55346
55347
55350
55351
55352
f)5353
55354
05355
55356

!lI275
121276

55357
5536'-'1

0277
0278
0279

55361
55362
55363

0280
0281
0282
0283
0284

55364
55365
55366
55367
55370
55371
55372
55 3 7 3
55374

0285
0286

121 2 81
0288
0289
0290
0291
0292
0293

0294
0295
0296
0297
0298
0299

0300
0301
0302

0303
0304
0305
0306
0307
0308

0309
0310
0311
0312
0313
0314
0315
0316
ta3l7
0318
0319 .. •

#21

FORMATTED OUTPUT ROUTINE

027673
065751

006"'03
027673
002400
071643
071743

061757
071747
026040
061747
IA31"1
015540
050430
027470
071727
050433
027373
050436
002001
115163
015534

PJ35743
061743
051760
55375
55376 027424
S5377 0 3 57 4 7
55400 015536
55401 102101
55402 061644
55403 01554 0
55404 051747
55405 0020U11
55406 027415
55407 061743
55410 051760
55411 027424
55412 061747
55413 103101

55414 015540
55415 050445
55416 115162
55417 050436
55420 027424
05421 050430
55422 027470
55423 026105
55424 061727
55425 050433
55426 115162
55427 061743
55430 051760
55431 027340
55432 027372

~320*.*

JMP FMEND
LOB EDSTA
SIB,RSS
JMP FMEND
CLA
STA EC
STA CC
LDA IfSTR
STA DP
JMP FMT2
LOA Dp

CLO
JSB MCHAR
CPA .+518
JMP FMT91

STA LCH
CPA ,+548

JMP FMT93+1
CPA .+578
RSS

NO
END OF
STATEMENT?
YES

yES, CLEAR EC
RESET
DELIMITER POINTER
GET THE
DELIMITING CHARACTER
NOT IGNORING BLANKS
IS IT A RIGHT PARENTHESIS
yES

NO, SAVE THE CHARACTER
IS IT A COMMA 'I
yES

IS IT A SLASH 1
yES

JSB FERRS+l,I NO, ERROR EXIT
FMT93 JSB OUTCL
tSl CC
INCREMENT CHARACTER COUNTER
All CHARACTERS
LOA CC
CPA NCH
USED 1
JMP FMT94
YES
ISZ DP
INCREMENT DELIMITER POINTER
JSB DSRCH
FIND NEXT DELIMITER
STO
IGNORE BLANKS
LOA FST
JSB MCHAR
NEXT CHARACTER
CPA DP
IS IT A DELIMITER
yES

RSS

JMP
LOA
CPA
JMP
LOA
CLO
JSB
FM11 CPA
JSB
CPA
JMP
CPA
JMP
JMP
FMT94 LOA
CPA
JSB
LOA
C,PA
JMP
JMP

FMl1
CC
NCH

NO
AI.L CHARACTERS

FMT94

yES

Dp

MCHAR
,+54

FERRS,I

USED 'I

NO, GET DELIMITING
CHARACTER
IGNORING BL.ANKS
IS IT A COMMA

.+ 57 8

YES, ERROR
NO, A SLASH

,+518

NO, A RIGHT PARENTHESIS ?

FMr94

FMT91
FMT3
LCH
,+548

FERRS,I
CC

yES
yES

LAST CHARACTER
A COMMA ?
NO, ALL CHARACTERS

NCH
FMT09

USED 'I
yES

FMT93

NO

HANDLE GROUPS OF SPECIFICATIONS

.. *

***

PAGE 0257 #21
0321*·
0322 55433
0323 55434
0324 55435
0325 55436
0326 55437
0327 55440
0328 55441
0329 55442
0330 55443
0331 55444

0332
0333

FORMATTED OUTPUT ROUTINE

003400
041755
051156
002001
115175
061744
002002
021454

0337

55452 075763

0338
"339
0340

55453 02611215
55454 061745
55455 01212002

0341

55456 115176
55457 035644

55460 0121 3 400
55461 041757

0354
0355
0356

0357
0358
0359
0360
0361

0362
0363
0364

0365
0366
0367
0368

0369
0370
0371
0372
0373
0374
0375

0376

55462
55463
55464
55465
55466
55467
55470
55471

003000
041644

071745
065774

075764
02611215
061764

002003
55472 021530
55473 040356
55474 12171764
55475 002003

55476 021505
55477 065745
55500
55501
55502
55503
55504
55505
55506
55507
55510
55511

075143
045757
015747
015536
026105
002400
0 7 1745
011646

035743
06174.3

55512 051760
11516 3
12135747

55513
55514
55515
55516
55517
55520
55521

015536

102101
~61644

015540
12151747

LOA eCI

yES, FIRST LEVEL

5ZA

OF PARENTHESIS 'I
NO
INCREMENT STRING POINTER
FIND CHARACTER COUNT
uP TO AND INCLuDING

JMP
ISl
CCA
ADA
eMA
ADA

FMT96
FST

IfSTR

FST
STA CC'1

LEFT
PARENTHEsis

LOB REPeT
STB pct

065774

0343

0353

JSB FERRS+l1,I NO, ERROR

071744

0342

.*

SECOND
CHARACTER
IN STACK ?

RSS

003000
041644

0335
0336

0344
0345
0346
0347
0348
03 49
0350
0351
0352

CpA IF'SS

035644
003400
55445 041751
55446
55447
55450
55451

0334

FMT96 CCA
ADA FSp

FMT9f)

JMP
LOA
SZA

STORE REPETITION
COUNT
FMTJ
PROCESS STRING
SECOND L.EVEL
CC2
OF PARENTHESIS
FERRS+12,I NO, ERROR

JSB
ISZ FST
ceA
ADA IFSTR
eMA
AOA PST

STA
LDB
STS
JMP

CC2
REPeT
PC2
FMT3

FMT97 LOA PC2
SZA,RSS
JMP FMT98
ADA _",I

STA PC2
SIA,RSS
JMP FMT99
LDB CC2
STB CC
ADS IFSTR
STB oP
JSB DSRCH
JMP FMT3

FINO CHARACTER COUNT
UP TO AND
INCL.UDING

LEFT
PARENTHESIS

STORE REPETITION
COUNT
SECOND LEVEL OF
PARENTHESIS 1
NO
YES, REPEAT IT

RESET
CHARACTER COUNTER

AND STRING POINTE.R

REPROCESS PARENTHESIZED STRING,
CLEAR SECOND
STA CC2
LEVEL POINTER
STA SFLG
AND STRING FLAG
ISZ CC
INCREMENT CHARACTER COUNTER
LOA CC
ALL CHARACTERS
CPA NCH
USED 1
JSB FERRS+l,I YES, ERROR
ISZ DP
NO, POINT TO DELIMITER
JSB DSRCH
FINO NEXT DELIMITER
5TO
GET NExT
LOA FST
NON.BLANK
JaB MCHAR
CHARACTER
CPA Dp
IS IT A DELIMITER ?

FHT99 CL.A

PAGE 0258 #21
0377
0378
0379
0380
0381
0382
0383
0384
0385

0386
0387
0388
0389
0390
0391
0392
0393
0394
0395
0396
0397
0398
0399
0400
0401
0402
0403
13404

0405
0406
0407
0408
0409
0410
((J411
0412
0413
0414
0415.*

FORMATTED OUTPUT ROUTINE

55522 (1102001
55523 021362
55524 065743
55525
55526
55527
55530
55531
55532
55533
55534
55535
55536
55537
55540
55541
55542
55543
55544

055160
115174

027357

061763
002003
115177
040356
071763
002003
027545
065744
075743
045757
075747
015536
026105
~5545 002400
55546 071744
55547 071646
55550 035743
55551 035747
55552 061743
55553 051760
55554 027343
55555 015536
55556 t021~1
55557 061644
55560 015540
55561 051747
55562 002001
55563 027362
55564 065743
55565 055760
55566 027343
55567 027357

0416...

RSS
yES
JMP FMT92+3
MAyBE
LOR CC
ALL
CPB NCH
CHARACTERS USED ?
JSB FERRS+10,I YES, ERROR
JMP FMT92
NO, INVESTIGATE THE CHARACTER
FMTge LOA PCt
FIRST LEVEL
SZA,RSS
OF PARENTHESIS 1
JSB FERRS+13,I NO, ERROR
ADA .-1
YES, REPEAT IT
STA pel
5ZA,RSS
.JMP FMT00
LOB eCI
RESET
STB CC
CHARACTER COUNTER
ADB IFSTR
STB DP
JS8 OSRCH
JMP FMTJ
REPROCESS PARENTHESIZED STRING
FMT00 CLA
CLEAR FIRST

STA eel

STA SFLG

IsZ CC
ISZ
LOA
CPA
JMP
JsB
5TO
LOA
JSB
CPA

DP
CC
NCH
FMT91
DSRCH
FST
MCHAR
OP

RSS

JMP
LOB
CPB
JMP
JMP

FMT92+J

ec

NCH
FMT91
FMT92

OUTPUT NUMBER IN DEFAULT FORMAT

0417.·
0418 5557(}J
0419 55571
0420 55572
0421 55573
0422 55574
04 2 3 55575
0424 55576
0425 55577
0426 55600
0427 55601
0428 55602
0429 55603
0430 55604
0431 55605
0432 55606

061736
071316
066737
07 53 20
061647
~71322

00240£1
CJt71324
071752
051322

027605
015524
015526
003000
071324

FMT80

LOA NUMWl
STA MANTt
LOB NUMW2
STS MANT2
LOA EXPW
STA EXP
CL.A

EXPON
EFLAG
CpA EXP
JMP .+3
JsB MTGl
JSB DTLl
STA
STA

CMA
STA

EXPON

LEVEL POINTER

AND STRING FLAG
INCREMENT CHARACTER COUNTER
poINT TO DELIMITER
ALL
CHARACTERS USED ,
yES
NO, FIND NEXT DELIMITER
GET NEXT
NON.BLANK
CHARACTER
IS IT A DELIMITER 1
YES
NO
ALL
CHARACTERS usED ?
yES
NO, INVESTIGATE THE FOUND CHARAC

••

.*

**.
LOAD

SAVED

NUMBER
CLEAR
DECIMAL EXPONENT
sET FLOATING poINT
ZERO EXPONENT .,
YES

PAGE 0259 #21

FORMATTED OUTPUT ROUTINE

0433

~5607

0434
0435

55610 060610
!:S5611 071726
55612 160351
seet3 071141
55614 818422
55e15 840437
55616 171726
55&17 135126
55620 035141
55621 027614

0436

0437
0438
0439
0448
04.1
0442

0443

015534

0444
0445
0446
0441
0448
0449

55622 060361
55623 171732
55624 815530

0458
0451
04152
0453
0454
0455

55630 060670

0456
0457
0458
0459
0460
0461
0462
0463
0464
0465

0466
0461
0468
0469
0410
0471
0472
0473
0474
0475
0476
0477
0478
0479
0480
0481
0482
0483
0484
0485
0486
0487

55525 880000
55626 061266
55627 015452
55631
55632
55633
55634
55135
55636
55637
55640
55641

811726
161728
015452

035726
060435
015452

060352
071741
161726

55642 015452
55643 035726

55644
55645
55646
55647

035741
"27641
060464

55651
55652
55653
55654
55655

865324
116020
081005

015452
55650 060434

068432

075324

55656 015452

55657 061324
55660
55661
55662
55663
55664
55665

LDA IHB
STA HBP

LDA .-6
aTA TOTDeI
Jae GETDG
ADA ,+808
STA H8P,I
tSZ HBP
ISZ TOTDG
JMP ·•• 5
LDA .+2
STA NBLK
JaB ROUND

NOP
LOA SIGN

JaB OUTeR
LDA IHB
STA HBp

LDA
JIB
liZ
LDA
JIB
LDA
STA
LDA

H8p,I

OUTCR

HBP

,+568

OUTeR
,-5
TOTDG
HBP,I
OUTtR

JIB
lIZ HBP
ISZ TOTDG

JHP *.4
LOA E

JSB OUTeR
LDA .+558

LOB EXPON

sse

CMB,IN8,RSS
LDA ,+f538
ST8 EXPON
JIB OUTtR
LDA EXPON

0064210

CLB

100400

DIV .+128

000371

040431

ADA .+608

044437
075324

ADa .... 608

55666 015452
55667 061324
55670
55671
55672
55673
55674
55675
55676

JIB OUTCL

015452
015534

021332
061746
002002
027700
015534

ST8
JSB
LOA
JSB
JSB
JMP
fMEND LOA

EXPON
OUTeR
EXPON
OUTeR
OUTCl
FMT90
CONTR

SZA
.JMP .+3

JSB OUTCL

RElET HOLD
SUfFER poINTER
PREPARE TO GET
SIX DIGITS
GET

SIX
DIGITS
8ET NBLK TO
WHERE IT wONT CAUSE TROUBLE
ROUND NUMBER IN HoLD BUFFER

'OutPUT
IIGN
INITIALIZE
HOLD BuFFER PQINTER
OUTPUT
DIGIT
tNCR!MENT HOLD BUFfER POINTER
OUTPUT
DECIMAL POINT
PREPARE TO OUTPUT
'IVE DIGITS
OUTPUT
FIVE
DIGITS
OUTPUT
AN E
OUTPUT

EXPONENT
SIGN

GET BOTH ExPONENT DIGITS

CONVERT BOTH
TO ASCII
OUTPUT 10'S DIGIT

OUTPUT l'S DIGIT
yES, CONTROl.
CHARACTER FOUND ,
YES
NO

pAGE
0488
0489
049"
0491
04g2

0493
0494
0495
0496

0407
0498
0499

05""
0501
0502
0583

0514
0505
0506

026~

#21

FORMATTED OUTpUT ROUTINE

JMP XECIA,I
CPA ,+53 8

55677 124762
55100 (JJ50432

RIa

55701 002001

55702
S!703
5!5704
55705
55706
55701
55710

JMP FH1111

021714

LDA .+238

16141212
015452
860314

JIB OUTCR
LDA .... 158
JIB OUTeR

915452
882400
015452
~ei'11 882401
55112 01157S

&:ll., • '2
"""".l~

55714
55715
55116
55117
55720
55121

124762
050434
082001

124762

96e371
015452
124762

eLl

J8B

OUTCR

JMP
CPA
Ria
JMP
LDA
JSB
JHP

Xft,A,l
.+558

eLA
ST. CHRCT

FHII

xEC1A,I
+128

OUTeR
)eEC1A,I

18 CARRIAGE
CONTROL A +
NO

YES
OUTPUT AN X-OFF
AND A
CARRIAGE RfrURN
AND A

NULL.
IS IT A MINUS 7
YES
OUTPUT A
. LINEFEEO

pAGE 0261 #22

FORMATTER uTILITV ROUTINES
ORG

0002 56ri10~
0003**

0004...
0005.*

0006*
0001*

0~e8*

0009*

••

MAKE A NUMBER LESS THAN 1

0012
0013

0014

0015
0016

0017
0018

0019*
0020*

0°21*
0022.

56000 0153Ql0
56001 061322
560212 003026

56003 026006
56004 035324
!S6005 025525
56006 015J~2
56007 125524

.*

#MTGl JS8 MBY10
LOA EXP

MULTIPL.Y

CMA,SSA,INA,SIA
NUMBER BY 10
JMP .... 3
UNTIl. IT IS
GREATER
ISZ EXPON
THAN 1
JMP MTG1+1
DIVIDE By 10
JSB DBY10

JMP MTG1,1

DIVIDE AN UNPACKED FLOATING POINT NUMBER
IN MANTI, MANT2 AND EXP BY 10 UNTIL IT IS
LESS THAN 1

0023*
0024 5 6 010 0 6 1324
0025 56011 065322
0026 56012 001004
0027
0028
0029
0030

***

MULTIPLY AN UNPACKED FLOATING POINT
NUMBER IN MANTt, MANT2 AND EXP BY 10 UNTIL
IT IS GREATER THAN 1. THEN DIVIDE BY 10

0011.

0011

~60"'0a

5 6 013 006021
56014 125526
~6015

071324

0031

!)6016 015302
56017 003400

0032

56020 041324

0033

56"21 026011

#lDlll LOA EXPON
DTL10 LOB EXP
(MB,INS
SSB,RSS

JHP DTI..1,1
STA EXPON
JSB DBYl0

ceA

ADA ExPQN
JHP DTL10

DIVIDE
NUMBER
BY 10
UNTIL

IT IS
lESS
THAN
1

PAGE 0262 #22

FORMATTER UTILITY ROUTINES

.*
••

0035*.
0036*.* ROUND AsCII NUMBER *.*
0037**
0038*
0039* NUM~E::R STORED ONE ASCII DIGIT PER WORD IN
004"* HOLDING BUFFER. ROUTINE GETS NEXT DIGIT
0041* AND ROUNDS IF IT IS >- 5.
IF THERE IS A CARRY TO .N EXTRA DIGIT AND NO
0042*
OTHERWISE RETURN
0043* ROOM EXISTS, EXIT IS TO (P+l),
0044* TO (P+21.
0045.
GET NEXT DIGIT
0046 56022 A15422 MRUNO JSB GETDG
ADA ... 5
IS IT >- 5 1
0047 ~6023 040352
SSA
0048 56024 002020
JMP ROUND,I
0049 56025 125530
DECREMENT HOLD
eCA
v.l 0 50
56026 003 400
0051 56027 041726
BUFfER POINTER
ADA HBP
LOAD NEXT DIGIT
0052 ti6030 164000 ROND! LOB 0,1
56031 006004
0053
INS
INCREMENT IT
CPS
WAS
IT A 9 ?
56032
054452
.58
"'054
0055 56033 026036
JMP .+J
YES
STa 0,1
NO, SAVE IT
0056 56034 1740"'0
JMp ROUND,I
0057 !)6035 125530
AND RETURN
OVERL.AY
00 5 8 56036 064437
LOB .+608
518 0, I
A 0
0059 56037 174000
CpA tHB
LEADING DIGIT ,
0060 56040 050670
JMP *+3
YES
0061 S6~41 026P144
ADA .-1
NO, DECREMENT POINTER
0062 56042 040356
JMP ROND!
0063 b6()143 "'26030
0064 56044 064440
OVERLAY A
LDB .... 618
STB 0,1
ONE
0065 56045 174000
0066 56046 064437
LOAD
LOB ,+606
0067 56047 175726
STa Hap, I
EXTRA ZERO
0068 56"'50 065752
FLOATING POINT
LOB fFLAG
SPECIFICATION?
0069 ~605t 006002
SZB
NO
.IMP ROND2
0070 56052 026056
INCREME~T EXPONENT
ti605~i 035324
0071
lSZ ExPON
0072 56054 000000
NOP
JHP ROUND,I
0073 5 6 05b 125530
0074 56056 007400 RON02 eeB
IS NBLK
ADS NBLK
0075 56057 045732
L.Ess
SSB
THAN 1 1
0076 56060 006020
0077 . 56061 035530
15Z ROUND
NO, RETURN TO (P+2)
STe NBLK
YES, KEEP DECREMENTED
0078 56062 075732
JMP ROUND,I
1.1079 56063 125530

VALUE

PAGE e263 #22
0081*·
0082*·0083*.
0084*
~085*

02186.
0087*
0088*
0089.
0090
0091
0092
0093
0094

((1095
0096*
0097.
0098*
0099
0100

01211
0102
0103
0104
0105
0106

0107
0108

FORMATTER UTILITY ROUTINES

OUTPUT BLANKS

••

•••
••

OUTPUTS THE NUMBER OF BLANKS SPECIFIED
BY THE NEGATIVE OF REPe T• THE STACK POINTER
IS INCREMENTED AND REPeT HAS THE VALUE ZERO
UPON EXIT.
56 0 6 4 '03 5755
56065 061571
56066 015452
56067 035774
56070 ~26065
~6071 125532

#OTBl ISZ
LOA
JSB
ISZ
.JMP
.JMP

FSP
BLANK
OUTCR
REpeT

··3
OUTBl,1

INCREMENT STACK POINTER
OUTPUT A
BLANK
REpel UsED UP 1·

OUTPUT X.OFF, CARRIAGE RETURN, LINE FEED
56072
56072
56073
56074
56075
56076

#OTCL

060402

015452
060374
015452

060371
56077 015452
5610~

002400
071570
56102 125534
~6101

EQU •
LOA .+23B
JSB OUTeR
LOA .+158
JSB OUTeR
LOA .+128
JSB OUTeR
ClA
STA CHRCT
JMP OUTCt.,I

PAGE

~264

0110..

0111...

0112 ••
1t1113.

#22

FORMATTER UTILITY ROUTINES

SEARCH FOR A DELIMITING CHARACTER

0115*
0116.

0117*
0118.
~119.

0125
~126

0127
0128

0129

~6t((J3

061747

~71644

56104
56105 103101
56106 015540
56101 050433
5 6 11 0
56111
56112
56113
56114

125536

050436

125536
050430
125536

0130
0131
0132

t)6115 QJ35747
56116 035743

0133

56120 065743
56121 0557613
56122 125536

0134
0135
0136

••

BEGINS SEA~CH AT CHARACTER Dp. WHEN A COMMA
OR SLASH IS FOUND, OP IS SET TO POINT TO THAT
CHARACT~R.
CHARACTERS ARE COUNTED ANO IF THE
END OF THE STRING IS ENCOUNTERED BEFORE A
DELI~ITER IS FOUND, A FLAG IS SET

0114.

0120
0121
0122
0123
0124

.*

•••

06117 061747

56123 026106

0137 ••
0138.**

#OSCH LOA OP
STA FST
SER1

CL.O
.ISB MCHAR

CPA .... 548

JMP OSRCH,I
CPA .... 578
JMp OSRCH,I
CPA .... 518

JMP DSRCH,I
lSI DP
ISZ CC
LOA OP
LOB CC
CPS NCH
JMP DSRCH,I
JMP SERl

MASK OUT A CHARACTER

0139 ••
0140*

••

SET STRING POINTER TO
FIRST CHARACTER
DON'T IGNORE BLANKS

GET STRING CHARACTER
IS IT A COMMA ?

YES
NO, IS IT A SLASH ?
yES
NO, IS IT A RIGHT PARENTHESIS 7

YES
NO, INCREMENT DELIMITER POINTER
AND CHARACTER COUNTER

ALL CHARACTERS USED 1

YES
NO

*.*

*.

0141* . GET NEXT CHARACTER FROM FORMAT STRING
0142* ADDRESS OF CHARACTER IS IN (A). CHARACTER IS
0143. RETURNED IN CA)
0144.
SHIFT ADDRESS RIGHT
CL.E,ERA
0145 ~6124 000065
0146 56125 164000
LOB 0,1
LOAD WORD FROM STRING
SEZ,RSS
HIGH CHARACTER 7
0141 56126 002041
0148 t)61'27 005727·
YES, SWITCH POSITIONS
BL.F,BLF
NO
LOA 1
l1149 56130 060e01
0150 S6131 010.500
AND 9377
MASK OUT ~OW CHARACTER
SOs
SHOULD BLANKS BE IGNORED ?
0151 56132 102301
JMp MCHAR,I
0152 ~6133 125540
CPA BLANK
YES, IS CHARACTER A BL.ANK 1
0153 56134 051571
JMP MCHRl
YES
0154 56135 026143
0155

0156
0157
0158
0159
0160

0161
0162
0163
0164
0165

56136 040317
56137 002~21
S6140 040450

56141 040470
56142 125540
56143·
56143 035644
06144 061644
56145 051747
06146 125540
56147 025541

ADA M96

SSA,RSS
ADA MJ2
ADA .140
JMP MCHAR,I
MCHRl EQU *
ISZ FST
LOA fST
CPA DP
JMp MCHAR,I
.JMP MCHAR ... 1

NO

LOWER CASE?
YES
NO
INCREMENT STRING POINTER
NEXT CHARACTER
A DELIMITER ?
yES, RETURN
IGNORE THE.BLANK

PAGE 0265 #22

FORMATTER UTILITY ROUTINES

0166.·

0167**.

EVALUATE fXPHtSSION

••
••

•••

01613 ••
0169*
0170* EXTRACT THE NEXT VARIABLE TO BE OUTPUT BY THE fORMATTER. IF
~171.

la172*

017 3 *
~174.

NnNf FOUND, EXIT TO (P.l). IF A
(P+2) AFTER PREPARING THE STRING
QUANTITY IS FOUND, EXIT TO (P+3)
EOSTA IS SET TO 0 IF THIS IS THE

0175*
~176
_,.."7"7
VJl"

56150

0178

56151 (:'102020
!)6152 026212
56153 065611
56154 055334
b6155 125542
56156 0034(1\0
56157 071470
56160 "15336
56161 165332
b6162 006020

0179
0180
0181
0182
"183
0184
0185
0186

0187

5615~~

061754

0188
0189

56163 026177

t)J190

56165 035470

56164 015376

0191

~6166

0192
0193
0194

56167
56170
56171
56172
56173
56174
b6l75
56176

0195

0196
01 9 7
0198
0199
0200
0201
0202
0203

0204
02 0 5
0206

0207
0208
0209
0210
"'211
0212
0213
0214
0215
0216
0217
0218
0219
0220

~6177

026153
061611

05-1334
0024~0

071751
104200
100001
~35542

026210
060355

5620A
56201
56202
56203

015344
011256

~6204

055334
006400
075751

!)62 0 5
56206
56207
56210
56210
56211

075410
065611

065410
035542

125542

56212 035470
56213 026244
55214
56215
56216
56217
56220
56221

065611

055334
125542
161611

010566
002003
!)6222 125542
!)6223 002020

.EVEp EQU •
LOA FFLG
SSA

JMP
LOB
CPS
JMP

EVEX5

TEMPt
PRGCT
EVExp,I

CCA

STA EOL
JSB FORMX
LOB OPDST,I
SSB

JMP
JSB
ISZ
JMP
LOA
CPA
CLA
STA

fVEX3
OPCHK
EOL
EVEX0
TEMPt

MAT
PRINT?
YES

END OF STATEMENT1
yES
TURN OFF
FUNCTION FLAG
EVALUATE FORMULA
IS IT A
STRING VARIABLE ?
yES
NO, UNSTACK VALUE ADDRESS
A FUNCTION '1

LAST VARIABLE?

PRGCT

EDSTA

Dl.D 1 , 1

ISZ EVEXP
.JMP EVEX4

EVEX3 l.OA .-2
JSB PSTR

STA TEMP4

STa
LOB
CPS
CLB
STB
LOB
EVEX4 EQU
ISZ
JMP
EVEX5 ISZ
JMP
EVEX6 LOB
CPS
JHP
LOA

STRING IS FOUND, EXIT TO
FOR OUTPUT. I' A NUMERIC
WITH THE NUMBER IF CAl AND (8).
LAST VARIABLE IN THE STATEMENT,

TPRME
TEMPt
PRGCT
fOSlA
TPRME
•
EVEXP
EVEXP,I

ELCNT
EVEX7
TEMPt
PRGCT
EVExp,I
TEMpt,I

YES
NO
NO, LOAD NUMBER

RETURN TO (P+J)
PREPARE
PRINT
STRING
ENO OF
STATEMENTl
yES
NO
RETURN TO
(P.2)
FINISHED CURRENT MATRIX?
NO
YES
END OF STATEMENT?
yES

GET NEXT OPERAND

AND OPDMI<

SZA,RSS
JMP EVEXP,I
5SA

NULL
YES
NO, FUNCTION?

PAGE 0266 #22

0224

56224
56225
!:)6226
!S6227

0225

5623 0

0226
0227
0228

!)62Jl

0221
0222
0223

0229

0230
0231

56232

56233
56234
56235
56236
"'£,,\"1.7
OJ"',.."
5624 0

FORMATTER UTILITY ROUTINES
JMP
ALS
ADA
ADA
LOB
ADS
STB
JSB
LOA

026262
0131000
041573

040356
16 4000
044355
075572
015470
161572
035572

SYMTB
.-1

A,I
.-2

SBPTR
VCHK
SBPTR,l

ISZ SBPTR
MPY SBPTR,I

1002021

101512
03557 2
56241 003004

EVEX8

56245 051470

ISZ SBPTR
CMA,INA
STA ELCNT
1SZ TEMPt
EVEX7 CCA
CPA ELCNT

0238

56246 002001

RSS

0239
0240

56247 026253

023 2
0233
0234
0235
0236

0237

~241

56242 071470
56243 035611
56244 003400

56250 061611
56251 051334
56252 002400
56253

0242
0243
0244

56253 071751

0245

56254 104200

0246

56255 10.1572
5 6 256 035572
56257 035572

0247
024tt

0249
0250

0251

56260 035542
56261 026210
56262 003400
56263 071470

0252
0253

~6264

015336

56265

~15376

0254

56266 026214

0255.
0256.
MESSAGE BUFFER
0251*
0258 56267 000000 MSQHD
0259 5664t
0260.
0261 56641 020134 RYRSL
0262 ~6642 160000 TBITS
0263 56643 1202100 B120K
0264 56644 130000 Bil0K
0265 00222
B160K
0266 56645 000137 BKSPC
0267 !:)6646 000000 TTA
",268 56647 000000
T18
0269 t)6650 0000e0 TTE
0270 56651 000000 TOG
0271 ~6652 000000 TADR

SAVE POINTER TO
DYNAMIC DIMENSIONS
VALIDATE ARRAy ELEMENTS
SET POINTER

TO FIRST ELEMENT
OF ARRAY

WHIL.E COMPUTING
NUMBER OF
EL.EMENTS
BUMP TO NEXT OPERAND
LAST
ELEMENT?
yES

JHP EVEX9
LOA TEMPI
CPA PRGCT
CLA
EVEX9 EQU *
STA EDSTA
OLD SBPTR,I

EYEX8

YES
NO, LOAD
BASE ADDRESS
OF ARRAy

NO
END OF

STATEMENT1

YES
NO
GET NUMBER

ISZ SBPTR

ISZ SBPTR

BUMP TO
NEXT ELEMENT

ISZ EVEXP
JMP EVEX4

EXIT

ST. EOl
JSB FORMX
JsB OpCHK
.JMP EVEX6

TURN OFF
FUNCTION FLAG
EVALUATE FUNCTION
REMOVE ARGUMENT FROM TEMp STACK
GET NEXT OPERAND

ceA

BSS

MESBN

BSS 0
ASC 1 ,

\

OCT 160000
OCT 120000
OCT 130000

EQU INI
OCT 137
BSS t
BSS !
ass 1
ass 1
BSS 1

PAGt

~267

#22

POWER FAIL/RESTART ROUTINE

~273* THE POWER FAIL/RESTART ROUTINE INSURES A LOGICAL SHUTDOWN AND
0274* RESTART OF THE SYSTEM IN CASE OF POWER FAIL.

0276
~277

~27~

56653 000000
56654 1022P4
56655 026726

POW

8FC 4
JMP POWl

INTERRUPT ENTRY POINT,
TEST FOR FAILOR RESTART.
TRANSFER TO RESTART SECTION.

SAVE REGISTERS TEMPORARILY.

NOP

0279*
0280* POWER FAIL SECTION.

1t1283

",284
~285

0286
0287

ir1288
1&289
0290

!:)6656

104400

OST POWl

56657
56660
56661
56662
56663
56664
56665
56666
56667

057055
005520

ERB,BLS

102201

SOC

56670
56671
56672
56673
06614
56675
56676

062653
043107

INS

006004
002400
053054
026670

(LA
CPA
JMP
STA
JMP

073054
026724

POWfF
*+3
POWFF
POW2

IF POWFF WAS NONZERO,
INTERRUPT WAS FROM POWER FAIL.

~291.

VJ292
0293

0294
0295
0296
0297

0298

LDA POW

ADA powDt

TEST FOR INTERRUPT OUT OF
RESTART SECTION.

SSA

002020
026677
043110
002020
026724

JHP *+4
ADA POW02
S8A
JMP POW2

56677 077061
56700 104200
56701 051055
56702 104400
56703 057057
S6704 062653
~6705 0731362
56706 102501
56707 073065

STB PQWEO
OL.D POwl

NORMAL FAIL.
FAILED FROM RESTART SECTION,

~299.

0300
~301

0303

0304
0305
~306

itt307.
0308 56710
V1309.
~.j10
56711
';;6712
~311
0312 56113
0313 56714
0314 ~6715

STA POWP
LIA 01
STA POWSW

102211
030361
102212
030363
102214

SFC CH2
lOR +2
sFC 1SC
lOR .... 4
SFC CLOCK
tOR ,+208
STA POWFL
CLB
SFC ~

030377

~b717

073063

V)317

56720

0064~0

((1318

~6721

~319

t'6722

1022l~0
~67~1Qt

1r1320
0321*

~6723

077052

~322

~6724

1067~4

1,1323

~6725

102036

REGISTERS,

LOA POw

CLA

~6716

FAILURE.~SAVE

DST POWAB

00240H1

111315
0316

NORMAL

l.OB STF0

srB POWND
puw2

CLC 4
HLl OEATH+J6R.

L.OAD AND SAVE

THE SWITCH REGISTER

GET FLAGS FOR ALL DEVICES THAT
CAN INTERRUPT.
CHECK SEND CHANNEL
BIT 1 FOR CHANNEL 11
CHECK FLAG ON CONSOLE TTY.
BIT 2 FOR TTY
CHECK TIME BASE GENERATOR
SIT 4 FOR TIME BASE GENERATOR
IF INTERRUPT IS SET, STORE
STf 0 INTO POWNOJ ELSE NOP,

PAGE 0268 #22
0325*

REST~RT

~327

~6726

POwER

0329
~J30

0331
0332

POWI

ei673J 002004
56734 073055
56135 060362
~6136 102614
56137 063063

~333

0334
0335
~336

0331
0338
{~339

~340

ROUTINE

SECTION

102704
b6727 063065
~673~ 102601
56731 060366
56732 013056

~328

FAIL/REST~RT

8TC
LOA
OTA
LOA
SrA
INA
SrA
LOA
OTA
LOA
STA

4
POWSw
OJ1

,+1
POWJ

POWI
.+3
CLOCK
POWFL
POWF

RESET FOR

PO~ER

FAIL.

FETCH AND RESTORE
THE SWITCH REGISTER
INITIALIZE J AS A POWER FAIL POI
T!R AND 1 AS OMA POINTER,
RESET CLOCK FREQUENCy.
COpy FLAGS,

t)C140
56141
56142
56143
56744

073064
066642
010363
002003
106612

56746
56147
56750
56751

001300
073064
002020
026763

RAR
STA POWF
JMP POW5

FLAG SET.

56752
t)6753
56754
56155
06756
56757
56160
56161
56762

063055

LOA POWI
ADA CLF0
STA *+1

PRODUCE eLF INSTRucTION.

043012
072755
000000
063055
050373
027021
031055
026145

LOB T8ITS

AND ,+4
SZA,RSS
OTB 1SC

IF ASR.35 FLAG WAS CLEAR, SET UP
THE CORRECT STATE OF THE A8RJ5
. OTHERWISE LEAVE IT SET IN THE

INPUT STATE ...
0341
0342*
0343* NOW TEST THE INDIVIDUAL 10 FLAGS. IF A FLAG WAS CLEAR, WE PERFORM
0344. A eLF OPERATION, IF IT WAS SET, WE TAKE STRONGER ACTION,
0345.
0346 56145 063064 POW4 LOA POWF
GET "ORO CONTAINING FLAGS, THE
0347
0348
~349

0350
l~J51

0352

*

~353

0354
~355

0356
0357
0358
0359
0360

ONE TO BE TESTED IS IN BIT 0 AND
I. ITS SELECT CODE.

5SA

NOP

Pow6

LOA POWI
CPA
JMP
ISZ
JMp

.+148
POW14
POWI
POW4

EXECUTE elF,
TEST fOR DONE.
CHECK FOR CLOCK LOCATION

DONE.
OTHERWISE, SUMP I AND LOOP.

~361*

0362* FLAG WAS SET. TEST IF ROUTINE HAD ACTUALLY BEEN
0363* ENTERED. IF so, PERFORM A DUMMY INTERRUPT TO PRE0364· VENT IT FROM BEING REENTERED.
~365.

0366
~367

V:l368

56163 067066
06764 047~56
56765 164 001

0369

~6766

~370

56767 067066
5677~ 04 7 0 55
56771 003000
06772 140001
56773 002021
56774 026756
56775 044364
56776 140001
56777 002020
57000 026756

0371
",372
~313

"'374
0375
~376

0377
~378

1.1379
If}j8~.

POW5

LOB poWrB
ADS POwJ
LOB 1,1
lOA 1, I

160001

LDB POWTS
ADS POWI
CMA

ADA 1,1

COMPUTE LOCATION OF RETURN AD.
DRESS OF HIGHEST PRIORITV ROU~
TINE NOT YET TESTED.
GET ITS RETURN ADDRESS
POINT TO RET.ADR. OF TEST ROUTIN
TEST FOR INTERRUPT OUT OF THAT
ROUTINE.

SSA,RSS
JMP POW6

ADB5

ADB .+5

NO--INTERHUPT WAS PENDING.
BUMP INDEX REGISTER

ADA 1,1
5SA

JMP POW6

NOT INTERRUPTED,

PAGE 0269 #22
~381*

POWER FAIL/RESTART ROUTINE

PERFORM DUMMY INTERRUPT TO PREVENT AN UNWANTED ONE LATER,

0382*
~383

~7001

062775

~384

57002

173~55

0385

57003 063055
57004 043111
510"5 013007
57006 020520
57007 102700
5101121 102100
S1011 013013
57012 103100

0386
0387
0388
03 8 9
0390
0391
0392
0393

57013 106700
57014 160001
57015 173055

~394

0395

0396
0397

S7016 063055
57017 073056
51020 026756

0398

0399*
~~00.*.
~401.*.

040~

~7021

0405
0406
0407

57021
51022
57023
57024
57025
57026
S7027

0412

0413
~414
~415
~416

~7032
~70Jj

0417
~418
~419

042'0
0421
0422
0423

STA

1°3710
06~073

102714

S7A34
5703b
57036
57037
57040

102712
062642
102612
037054
063112
067062

~1041

1142~5

57042 002400

~7~45

0427

SET UP STC AND CLC.

STefa

POWST

CREATE CLC.
SET DEVICE CONTROL
ENABLE INTERRUPT CAUSING AD85 TO
COMPUTE ADR, OF CORRECT INT, VAL
DISABLE INTERRUPT.
DISABLE DEVICE.
GET CORRECT INTERRUPT CONTENTS
STORE IN INTERRUPT CELL.
uPDATE INTERRUPT CHAIN
POINTER,
GO TEST NEXT DEVICE.

84000

o

"powCL

pOW14 EQU *
8TC CHt,e
LDA SvCH2
OTA CH2
STF CH2
LDA POwFL
AND .+2
SZA,RSS
STC CH2,c
CLC CH2
8TC CLOCK
STC 1sC
LOA T8ITS
OTA 1SC
ISZ pOwFF
LOA POFFP
LOB POWP
JSB OREDP,1
CLA

57043 073054

~428

paWl

ClF0 eL.F o
POWCL CLC o
LOA 1 , I
STA POWI,I
LOA POwl
STA POWJ
JMP POW6

ST. POWFF

~424***
RESTORE REGISTERS.
0425 ~7044 063061
LOA

0426

PLACE ADB5 IN INTERRUPT CELL

POwI,I

AND RESTART INTERCONNECT.

202611
102111
063063
010361
002003
57030 103711
57031 106711

0411

STA
LOA
ADA
STA
XOR
paWST 8TC
STF0 STF

HAVE DONE ALL DUMMY INTERRUPTS,
SET CONTROL ON CLOCK AND TTY.

0402.*.
0403.

~408
04~9
~410

LOA ADB5

1031~1

CLO

57046 000036
102101

STO

PowEO

RESTART FIRST CHANNEL
PUT wORD BACK OUT ON CH2
LOAD FLAG wORD
LEAVE BIT 1
SKIP IF FLAG SET
OTHERWISE, TELL OTHER MACHINE
wANT NO INTERRUPT
RE.ESTABLISH PREVIOUS
STATE OF ASR35
sET IN CAsE OF ANOTHER pF
GET POINTER TO POWFF
GET POWER FAIL LOCATION
GO DO DISC STUFF
SAY NOT RESTARTING
'E'

AND

OVfRFLOW

SLA,FLA

~7047

~7~50 104200
DLD POWAB
~7~5 t r-157~57
~43~.**
RESET INTERRUPT SYSTf M TO SAMF AS BlFORE
~431
5705? 000000 POwNO NOP
OR STf 0.
0432 ~7~5j 127062
JMP PQWP,I
RETURN.
~433
~7~54
POw4~ EQU

0429

~434

'1435

FAll.

*

..
~71"'~4

0~HHH~0

PUwFF

NOP

SET

TO

1 DURING DISC RECALL,

PAG~

~27~

#22

POWER FAIL/RESTARl HOUTINt

",436

57055 ~0fcHtHHJ

~437

57056
57057
571(161
57062
57063
57064
57'2165

v.J438
~439

04140

0441

000"'~0

000000
00~000

000000
000000
0210Q100
000000

0442
0443
0444*
0445 57066 057060
0446*

POWI

BSS 1

POWJ
POWAB
POWED
PUwP
POWFL

8SS 1
ass 2

powF

POWSw

BSS 1
BSS t

BSB 1
BSS t
BSS 1

PQWTS Off *w6

POINTER TO DEVICE 8EING TESTED.
POINTER TO INTERRUPT CHAIN.
TEMPS TO HOLD vALUES Of A&S,
TEMP TO HOLD VALUE OF E&O.
TEMP TO HOLD vALuE OF P
TEMP TO HOLD STATE OF 1/0 FLAGS.
COpy of powFL.
TEMP TO HOLD SWITCH REGISTER
poINTER TO FOllOWING TA8LE

THIS TABLE POINTS TO THE ENTRY POINTS FOR
THE INTERRUPT ROUTINES.

0447*"

0448*
0449.

0450

~7067

0451
0452
0453

57"7~

057062
06'2025
5712171 062025

57072 057133
0454 57073 00121009
L1455 ~7074 07121024
1r1456*

OfF POWP
DEF R14CM
OfF R14CM

POWER FAIL·RTN.AOR.
INTERCONNECT RETURN ADDRESS

DEF ?TT2

TTY RTN,ADR.
NO INTERRUPT OCCURS ON THIS CHN.
CLK RTN,ADR.

8SS t

OfF CLKIN

~457.

THIS SECTION GIvES THE LENGTH OF EACH ROUTINE
SO THAT POWER FAIL CAN DETERMINE WHETHER
THAT ROUTINEs INTERRUPT HAD ACTUALLY OCCURRED
OR WAS STILL PENDING AT THE TIME OF THE POWER fAILURE,

0458*
~459*
~460t1r

~461.

0462t1r
~463

57075 000220
000000

':}7077 000166
t)71~~ 1210121000
57101 0121012130

ABS
ABS
ASs
BSS
ASS

R14EO-R14CM
0
NO SUCH ROUTINE
TTYEO.?TT2+1
WITHIN INTERRUPT
1
NO INTERRUPT OCCURS ON THIS CHN.
CLKED.ClKIN+l
ROUTINES.

57102
b7103
t>7104
t>7105
57106

JSB
HLT
JSB
CLC
JSB

R14DR,I
DEATH+I1B
T35DR,I
138,C
ClKDR,I

0464

~711J76

0465
0466

0467
~468*

0469
0470
0471
0412
0473
0474*
L1475
0476

114734
112120tl

114756
107713
11463121

57107 121052

fi1477

!)711 Ci1 177652
~7111 102700

k1478

57112 057054

PUWDI
POW02
STC0
POFFp

ASS .. PQW1
ASS PQW1.PQW40
STC ~

OfF powfF

PAGE 0271 #23

SYSTEM CONSOLE DRIVER

W002. THE SYSTEM CONSOLE DRIVER CONTROLS ALL TRANSMISSION OF DATA 8i.
0003 • TWEEN THE SYSTEM CONSOLE (ASR-35) AND TH~ SYSTEM, IT HANDLES ALL
~"!t04. • 10 FOR THE DEVICE AND PROVIDfS fOR COMMUNICATl~N 0' MESSAGES TO
0005. THF SYST~M, THE fOLLOWING VARIABLES ARE SIGNIFICANT,
0006.
0007. Tj5Fl1 .0 DURING INPUT, -1 OUHING OUTPUT.
0008. T35F2: NORMALLY 0, IT IS SET TO .1 WHEN A COMPLETE MESSAGE HAS
0009*
BEEN RECEIVED. UNTIL IT IS CLEARED BY THE SYSTtM, ALL FURTHER INPUT 15 INHIBITED.
0010*
0011. T35F3: NORMALLY 0, IT IS SET TO ~1 WHEN A COMPLETE MESSAGE HAS

BEEN RECEIVED.

UNTIL IT IS CLEARED By THE OUTPUT
INITIALIZATION SECTION OF THIS DRIVER, LOG AND MESSAGE
ENTRIES ARE HELD Offi
TOGI
NOT USED DURING INPUT. DURING OUTPUT, BIT 0 • 0 If NEXT
CHARACTER IS ON LEFT, 1 IF ON RIGHT.
TAORI NOT USED DURING INPUT. DURING OUTPUT, TADR(1418) POINTS TO
THE WORO FROM WHICH THE NEXT CHARACTER WILL BE TAKEN,
BIT 15-1 FOR PUNCH & PRINT, 0 FOR PRINT ONLY.
TCNT: DURING INPUT, TtNT-' OF CHARS IN SO FAR, DURING OUTPUT,
TCNT(1410).# OF CHARS REMAINING TO BE OUTPut, BIT 15-0
IF A CRlF IS TO BE APPENDED, 1 IF NOT.
T6ITS: CONTAINS CURRENT CONTROL BITS,
120000 -> PRINT
130000· •• PUNCH ANO PRINT
160000 -> INPUT
002 7* TTA,TTS,TTEa USED TO SAVE THE VALUES Of A,8,E REGISTERS DU~lNG
INTERRUPTS,
0028*
~012*

0013*
0014.
0015*
0016*
001,,.
001a.
0019.
0020.
0021.
0022.
0023.
0024.
0025.
0026.

0029.
0030* CALLING SEQUENC~I
0031JSS TTYJ5,I A~* OF CHARS (aIT 15.0 FOR CRLF, 1 FOR NONE)
B.BUFFER ADDRESS (BIT 15-1 FOR PUNCHING)
0032*
0033.
0034. INPUT MESSAGES ARE STORED IN THE 72 CHARACTER BUfFER T35BF.
0035.

0037

57113 000000

0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048.
0049.
0050.
0051*

57114 103100

0052

57115 070074
57116 076652

5·7117 003400
57120 070311
57121 063113
57122 073133
57123 002400
57124 072651
57125 070313

1 TT35 NOP

elF 0
STA TeNT
STe TADR
ceA
STA T35F1
LOA 1TT35
STA ?TT2
CL.A
STA TOG
STA T35F3

ENTRY POINT FOR OUTPUT.
INHIBIT INTERRUPT.

SET UP INITIAL PARAMETERS,
SET FLAG TO SAY

OUTPUT.

COpy RETURN ADDRESS INTO THAT OF
INTERRUPT SECTION.
SET TOG TO SAY LEFT HA.ND CHAR.

TEST FOR PENDING INPUT. IF THERE IS ANy, EXIT IMMEDIATELy AND LET
THE INTERRUPT TRIGGER THE FIRST OUTPUT CHARACTER.

0053

57126 102512
57127 002021

00~4

5713~

027157

0055

57131 102100

0056

57132 127113

LI. 1sC
SSA,RSS
JMP TT18
STF 0
JMP 1TT35,1

NONE PENDING •• GO OUTPuT 1ST CHAR

PAGE 0212 #23

SYSTEM CONSOLE DRIVER

0057.
0058* INTERRUpT SECTION
0059*
0060 57133 ~00000 ?TT2
0061 ~71J4 072646

0062

~7135

006J

57136 001500
57137 07266~

0064
0065
0066
0067
006 8
0069
0ra70
0071

0072
0073
0074

0075·

076647

5714(;1 060311
57141 211212003
57\42 021235
b7143 102512
57144 064276
t>7145 054362

57146 064300
57147 001004
~7150 044440
57151 006021
57152 050500
57153 021157
. 57154 12102400

012176
0077
0078 57155 070312
012179 57156 070?76
0088.
0081 . 57157 060 0 74
~082

0083

0084
0085
012186
012187
0088
0089

0090
0091
0092

121093

57160
57161
57162
57163
57164

NOP
STA TTA
STS TTB
ERA
STA TTE
LOA T35F1
SZA,RSS
JMP TT17
LIA ?St
LDB T358T
CPS ~OUTW
LOB T35PR
CMB,INS

SAVE REGISTERS.

TEST FLAG TO DETERMINf If
INPUT OR OUTPUT,
INPUT
LOAD BACK LINE STATUS DURING OUT
GET CONSOLE STATUS
IF OUTPUT WAIT
USE PRIORITY

ADS .+XSYNT~.+1+ROS-COM2

SSB,RSS
CPA 8377
JMP TTt8
CLA
STA T35f2
STA T358T

TT18

001265
012121211212
027212

002040
~27t76

LOA TeNT
RAL,CLE,ERA
SZA
JMP TT5
SEZ
JMP TT6
STA TOG

57165 072651
~7166 A60362

LOA .+3
lOR 81T15

57167 031027
57170 070074
57171 062652
57172 "'11027
ti7173 033321

STA TeNT
LOA TADR
AND BIT15

SKIP IF ABORT NOT ALLOWED
CHECK FOR A KEY STRUCK
NO INPUT, CONTINUE ON

CLEAR CONTINUEING OUTPUT FLAG
SET CONSOLE STATUS TO IDLE

GET

#

OF CHARS LEFT.

COPy CRLF BIT INTO E.

ANY CHARS LEFT?

YES •• GO OUTPUT NEXT ONE,
NO •• WANT CRLF1
NO •• GO RESET FOR INPUT.
SET UP OUTPUT OF CRLf.
3 CHARS WITH
NO CRLF FOLLOWING.
KEEP PRINT/PUNCH BIT.

IOR TTXCP

STA TADR
0094 57174 072652
JMP TT18
0095 57175 2127157
0096.
0097* END OF OUTPUT~-RESET FOR INPUT,
01219a.
0099

01121121
121101

57176 070074
57177 070311

011214

011215

57204 001600

0106
0101
011218
0109

57205

0103

011121
0111.

~62646

57206 066647

51207 103712
51210 102100
57211 127133

ST. TeNT
STA T35F1
LOA Bf60K

57200 060222

57201 072642
57202 102612
!57203 062650

0102

TT6

TT8
TT10

STA T8ITS
?SC
LOA TTE
OTA

SET COUNTER TO SAY NO CHARS IN.
SET FLAG TO SAy INPUT.
GET CONTROL BITS FOR INPUT.
SAVE.
OUTPUT TO CONSOLE.
RESTORE REGISTERS,

F-LA
LDA TTA

LOB TT8
STe ?se,c
STF '"
JMP ?TT2,1

0112* OUTPUT NEXT CHARACTER

ENABLE DEVICE,
ENABLE INTERRUPT.
EXIT.

pAGE 0273 #23

0113*
0114
0115

0116
0117
0118
1ii119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133.
0134.
0135.
0136
01 37

0138
0139
0140
0141

0142
0143
0144
0145
0146
0147
0148
0149
1r1150*

0151.·

57212
57213
57214
57215
57216
57217
67220
57221
57222
57223
57224
57225

SYSTEM CONSOLE DRIVER

003400

Tlb

040074
07121074
066652

062643
005275
062644

072642

102612
160001

066651
0040112'

57226 036652
57227 006011

57230 001727
57231 036651

51232 010474
57233 030476
57234 027202

1T15

CCA
DECREMENT
ADA TeNT
COUNTER.
ST. TCNT
LOB TADR
GET POINTER TO OUTPUT BUFFER.
LOA B120K
GET BITS FOR PRINT ONLY,
RBL,CLE,SLB,ERB
TEST & CLEAR BIT 15 OF B.
LOA B130K
GET PRINT/PUNCH BITS,
STA TBITS
SAVE CONTROL BITS.
OTA 1SC
OUTPUT TO DEVICE.
LOA 1,1
GET WORD CONTAINING CHARACTER.
LOB TOG
GET LE'T/RIGHT TOGGLE,
SLB
IF RIGHT CHARACTER,
lSZ TAOR
BUMP POINTER.
SLB,RSS
IF LEFT CHARACTER,
ALF,ALF
posITION ON RIGHT,
ISZ TOG
REVERSE TOGGLE SENSE.
ANO 8177
KEEP BITS e.0 ANO
lOR 8208
SET BIT 7.
JMP TT8
GO OUTPUT CHARACTER,

CHARACTER HAS BEEN INPUT.
57235 060312

57236
57237
57240
57241
57242
57243
57244

102-101
00£1010
027203
102512

010474
001400
050371

57245 027203
57246 050474
57247
57250
57251
57252

027203

TT17

LOA TJ5F2
MIA 1

IGNORE CHARACTER IF T31fl IS. -SET
OR SWITCH a 18 SET.

SLA

JHP TT10
LIA 1SC
AND B171

ete

CpA .... 128
JMP TT10

GET CHARACTER IN A.
PREPARE .1 IN 8,
IGNORE Lf, RUBOUT, NULL,

xo".

CPA 8177

JMP TT10

002002

SZA

050402
0212P)3

CPA .+238
JMp TT1"

TEST FOR 'CONTROL X'

0152.
rd153

57253 050407

0154 57254 021310
0155.
0156 57255 052645
0157 57256 027276
0158 57257 05'-"374
t1159 5726P1 074312
0160 57261 050374
0161 57262 074313

0162.

~163~

CPA .... 308
JMP TT11
CPA BKSPC
.JMP TT12

CPA .+158
135f2
CPA .+15B

srB

TEST FOR CRt
sET COMMuNICATION FLAG.

BTB T35F3

NOW INSERT CHARACTER IN BUFFER.

0164~

'l__

0165
0166
0167
01 6 8

57263 064074
57264 054466
51265 027203
57266 004065

cpa .72

LOB TeNT

GET COUNT IN B.
DON'T IF BUFFER 18 fULL

JMP TT10
CLE,ERB

MOVE LEFT/RIGHT BIT TO E, AND

pAGE 0274 #23

SYSTEM CONSOLE DRIVER

0169
0170

57267

~44303

~7270

002041

£1171
0172
0173
0174
0175
0176*
0177.
21178*
0179
l?J!80
0181
£1182
0183
0184

57271
57272
57273
57274

001737
130001
03407 4

170001
57275 027203

TT16

ADS T35Bl
SEZ,RSS
ALF,SLA,ALF
lOR 1,1
lSZ TeNT
STA 1,1
JMP TT10

COMPUTE ADORESS OF DESTINATION,
LEFT/RIGHT TEST,
LEFT.
RIGHT,
BUMP COUNTER,
STORE IN BUFFER.
GO EXIT,

LOB TeNT

GET CHARACTER COUNT
IGNORE IF NO CHARS YET.

HANDLE BACKSPACE.
.
57276 064074

1J7277
6730Qt
57301
57302
!:S730J
573£14

TT12

fd06003

sze,RSS

021203

JMP TT10

044356
014074

ADB ,-I
STB TeNT
CLE,ERB
ADS T3581
LOA 1,1
AND HIMSK

0B4065

044303
0185
0186 b7305 160001
0187 51306 010316
0188 57307 027274
.IMP
0189.
0190.. HANDLE 'CONTROL X'
0191*
TT11 5T8
0192 57310 074311
0193 ~7311 002400
CL.A
STA
0194 57312 070074
STA
0195 57313 072652
LOA
0196 57314 062643
STA
0197 57315 072642
OTA
0198 !S7316 1£12612
0199 57317 062641
LOA
0200 5732'" 027232 TTyED JMP
02211 57321 057322 TTXCP DEF
OCT
0202 ~7322 011415
OCT
0203 57323 005000

GET NEW TeNT,
CLEAR RIGHT HALF OF NEW DESTIN.
ATION,

TT16

T35Fl
TeNT
TAOR

B120 K
TBITS
1SC
RVRSL
TT15
.+1
011415
005000

SET OUTPUT FLAG,
SET TeNT FOR CRLF AFTER ",",
SET FOR NO PUNCHING.
SET fOR PRINT ONLY~
GO OUTPUT

il'"

pAGE 0275 #23
0205

TELETYpE TABLES
SUP

0206.
0207*
0208.
0209.
0210*

THE T~LETYPE TABLES CONTAIN IN CORE INFORMATION FOR SYSTEM USERS.
EACH OF THE 32 USERS HAS 1 TABLE, CONTAINING THE FOLLOWING
ENTRIE.SI
(?FLAG MUST BE FIRST, AND ?CLOC THROUGH ?PLEV MUST
BE CONTIGUOUS.)

0212

00000

121214.
0215.
0216.
.0217.
0218*
121219.

0220.
0221*
0222.
0223*
0224."

9225.
0226.
0227.
0228.
0230

?FLAG £QU "
CONTAINS ALL BIT FLAGS FOR USER

TERR
CFLAG
HFLAG
TApEF
UNABT
oUTWT

., 001211

012102
• 0004

II

• 12112110

• 012120
0040

II

COll414 • 0100

ABTRY • 0200
OfCHK • 121400
CHNFG • 1000
PUAlT • 2 000
MBUST • 4000

0113901

TAPE ERROR
COMPILE MODE
HELLO IS RUNNING
USER IN TAPE MODE
UNABLE TO ABORT
OUTPUT BUFFER FULL
2114 COMMUNICATION
ABORT ATTEMPT
DIRTY FILES CHECK
CHAIN RUNNING
PROGRAM UNALTERED
MBUSy POSITIVE

?TNUM EQU ?FLAG.l

TELETypE
0234

002102

DISC ADDRESS OF THIS USER.S SWAP AREA
00004

?PROG EgU ?OISC+2
POINTS TO LAST USED WORD OF CORE PROGRAM.

0240*

0242

00005

00006

00011

00013

0260*

?TIME EQU ?NAME+3

?CLOC EQU ?TIHE+2
USER'S TIMEOUT CLOCK.

0256*

0258

?NAME EQU ?10+1

STARTING lIME

0252.
0254

EQU ?PROG+l

8 CHAR PROGRAM NAME

0248.
0250

?IO

USER 1D.

0244*

0246

IN BITS 12-8,

?DISC EQU ?TNUM+l

0236.
0238

#

0o,,14

?RSTR EgU ?CLOC+l
RESTART ADDRESS FOR SUSPENDED PROGRAMS.

PAGE 0276 #23
0262

00015

00(fJJt6

A0017

~QU

?STAT+1

?PLEV EQU ?LINK+l
FOR PROGRAMS ON Q, CONTAINS PRIORITY LEVEL, FOR
SUSpENDED PRoGRAMS CONTAINS PROGRAM TYpE.

0273.
0274*
0276

?LINK

POINTS TO LINK POSITION OF NEXT ENTRY ON QUEUE,

0269*
0271

?8rAT EQU ?RSTR+l
tJSER STATUS--WHEN ON Q INDICATED PROGRAM TYPE'
WHEN NOT ON Q INDICATED REASON WHy.

0264*
0265.

0261

TELETyPE TABLES

00020

0278.
0219.
0280 00021
0281 ..
0282*

?RTIM EQU ?PLEV+l
RESPONSE TIME FOR ENTER STATEMENT
?TEMP EQU ?RTIH+l
TEMPORARIES FOR LIBRARy ROUTINES

PAGE 0277 #23

TtLETypE TABLES
OCT 0
OCT 0
OCT 0,~,~,0,~,0,0,~,~,0,0,0,0,0
OCT 0,0,0,0

0284
0285
0286
0287
0288.

57324 0~0000
57325 000000
57326 000000
b7344 000000

TTY~0

0289
029ta

~7350

57351 000400

0291
0292

57352 000000
57370 000000

T1Y01 OCT 0
OCT 4~0
OCT 0,0,O,O,0,0,0,O,O,O,0,0,0,0
OCT 0,0,0,0

000000

0293.
0294
tJI?QIl\
u .. ..,. .......

57374
57375
57376
57414

0000(110

TTv02

0010P10

0296
000000
0297
000000
0298.
0299 57420 000000
0300 57421 001400
0301 57422 000000
0302 57440 000000
0303.
0304 57444 0k:10flJ00
0305 57445 002000
0306 57446 0100000
0307 57464 000000
0308*
0309 5747~ 000000
0310 ~7471 002400
0311
07472 000000
0312 !)7510 000000
0313."
0314 57514 000000
0315 57515 003000
0316 S7516 000000
0317 ~7534 000000
0318.
'0319 57540 000000
0320 57541 ~03400
0321 57542 000000
0322 5756~ 000000
0323.
0324 57564 0ld0000
0325 57565 0040P10
03 2 6 57566 000CJ100
0327 57604 000000
0328.
0329 57610 000000
0330 B7611 004400
0331 57612 000000
0332 57630 000000
121333*
0334 57634 000000
0335 57635 005"'00
0336 57636 000000
Ja337 57654 000000
0338.
~339
~766~ 000000

OCT 0
OCT 1000
OCT 0,O,0,0,0,0,0,0,0,O,O,0,0,0
OCT 0,0,0,0

TTY03 OCT 0
OCT 1400

OCT 0,0,0,0,O,0,0,0,0,0,O,O,O,0

OCT 0,0,0,0
TTY04 OCT 0
OCT 2000
OCT 0,0,0,0,~,0,A,0,0,0,0,0,0,0
OCT 0,0,0,0

TTY05 OCT ~
OCT 2400
OCT 0,0,O,O,0,0,0,0,0,0,0,0,0,0
OCT 0,0,0,0
TTY06 OCT PI
OCT 3000
OCT

0,0,0,0,~,0,0,0,0,0,0,0,0,0

OCT 0,0,O,0
TTY07 OCT 0
OCT 3400
OCT ~,0,0,0,0,0,0,0,0,0,0,0,0,0
OCT 0,0,0,0
TTY08 OCT 0
OCT 4~00
OCT 0,0,0,0,0,0,0,0,0,0,0,0,0,0

OCT 0,0,0,0
TTY09 OCT

0

OCT 4400
OCT 0,0,0,0,0,0,0,0,0,0,0,0,0,0
OCT 0,0,0,0
TTV1~

OCT
OCT 5000
OCT 0,0,0,0,0,0,0,0,0,0,0,0,0,1

'"

OCT
TTytl OCT

~,0,0,0

0

PAGE 0278 #23
0340
0341
0342
03.43.
0344
0345
0346

L

OCT 5400
OCT 0,0,0,0,0,0,0,0,0,0,0,0,0,0
OCT 0,0,0,0

57661 005400
51662 000000
5770V1 000000
57704 000000
006000
57706 0"'0000
57724 000000

TTy12 otT

000000
006400

TTY1J OCT PI
OCT 6400

OCT 0,0,0,0,0,0,0,0,0,0,0,0,0,0
OCT 0,0,0,0

000000
A00000

000000
007000

"

OCT 6~00
OCT 0,0,0,0,A,0,0,0,0,0,0,0,0,0
OCT 0,0,0,0

~770S

0347
0348.
0349 5773V1
0350 57731
57732
0351
0352 57750
0353.
0354 57754
0355 57755
0356 51756
0351 57774
0358.
0359 60000
0360 60001
0361 60002
0362 60020
0363*
0364 60024
0365 60025
0366 60026
0367 60044
0368.
0369 60050
0370 60051
0371 60052
0372 60070
0373*
0374 60074
0375 60075
0376 60076
0377 60114
0378 ..
0379 6012~
0380 60121
0381 60122
0382 60140
0383.
0384 60144
0385 60145
0386 60146
0381 60164
0388*
0389 60170
0390 60171
0391
0392

TELETYPE TABLES

TTY14 OCT 0

0000A0

OCT 7000
OCT ~,0,0,0,~,0,0,0,0,B,0,0,0,0
OCT 0,0,0,0

000000
007400
000000
000000

TTY15 OCT 0
OCT 1400
OCT 0,0,0,0,0,0,0,0,0,0,0,9,0,0
OCT O,O,0,0

000000

TTY16 OCT

~00000

OCT 10000
OCT 0,0,0,0,0,0,0,0,0,O,O,O,0,0
OCT ",0,0,0

0121000
000000
000000

000000

TTy1? OCT 0

OCT 10400
OCT 0,0,0,0,0,0,0,0,0,0,0,0,0,21
OCT 0,0,0,0

010400
000000
000000

000000
011000
2100000

TTy18 OCT
OCT 11000
OCT 0,0,0,0,0,0,9,0,0,0,0,0,0,0

"

OCT 0,0,0,0

000000
000000

011400

((J

TTY19 OCT 0
OCT 11400

OCT ~,0,0,0,0,0,0,0,0,0,0,0,0,0
OCT 0.,0,0,O

000000
0000A0

OCT

000000
012000
00000121
000000

TTy'20

000000

TTy21 OCT 0

012400
60172 2100000
60210 000000

0393*
0394 60214 000000
0395 60215 0130021

0

OCT 12000
OCT 0,0,0,0,0,0,0,0,1,.0,O,O,1,0

OCT 0,0,0,0
OCT 12400
OCT ~,0,0,0,A,0,0,0,0,0,0,0,0,0
OCT 0,0,0,0
TTy22 OCT 0
OCT 13000

PAGE

0279 #23

TELETypE TABLES

60216 0000('10
60234 000000

OCT 0,0,0,0,0,0,0,0,0,0,0,0,0,0
OCT 0,0,0,0

0398.
0399 60240 000000
0400 60241 PJ1340"
60242 000000
0401
0402 60260 000000

TTy23 OCT 0
OCT 13400
OCT ~,0,0,0,A,0,0,0,0,0,0,0,0,0
OCT 0,0,0,0

0396

9391

0403.
"404
0405

0406
0407
0408.

60264
60265
60266
60304

000000

014000
000000
0000€!'0

lTY24 OCT
OCT 14000
OCT 0,0,0,0,0,0,121,0,0,0,0,0,0,0

"

OCT 0,0,0,0

60310 000000
6 0 311 014400
60312 000000
60330 0000~0

TTy25 OCT "-'
(lCT 14400
OCr 0,0,0,0,0,121,0,0,0,0,0,0,0,0
OCT 0,0,0,0

0413.
0414 60334 000000
0415 60335 015000
0416 6"336 000000
,,417 60354 000000

TTY26 OCT
OCT 15000
OCT 0,0,0,0,0,0,0,0,0,0,0,0,0,0
OCT 0,0,0,0

041219
0410
0411

0412

041S"
0419

0420
0421
0422
0423*
0424
0425
0426

60360 000000
60361 015400
60362 000000

60400 000000
60404 000000

60405

01600~

60406 000000

0421 60424 000000
0428*
0429
0430

60430 00e000
6043 1 016400
60432 0000~0

-0431
0432 6045e1 000"00
0433*
0434 60454 000000
0435

0436
0437

"

TT-,,27 OCT
OCT 15400
OCT 0,0,0,0,0,0,0,0,0,0,0,0,0,0
OCT 0,0,0,0

"

T1V28 OCT
OCT
OCT
OCT

0
16000
0,0,0,0,0,0,0,0,0,0,0,0,0,1
0,0,0,0

T1'y29 OCT ~
OCT 16400
OCT 0,0,0,0,~,0,0,0,0,9,0,0,0,0

oCT 0,0,0,0

60455 017000
60456 000'-"00
60474 000000

TTy30 OCT 0
OCT 17000
OCT ~,0,0,0,0,0,0,0,0,0,0,0,0,0
OCT 0,0,0,0

60500 A000A0
60501 017400
60502 000000
60520 000000
60524

TTy31 OCT
OCT
OCT
OCT
TTY32 E.QU

~438.

0439
0440
0441

0442
0443

~

17400
0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0
•

ENTRY. IT
0446* IS POINTED TO BY THE LAST AcTUAL ELEMENT, AND POINTS TO THE FIRST.
0447. wHEN THE. QuEuE IS OTHERwISE EMPTy, THE DuMMy LINK POINTS TO
0448* ITSELf.
0445. THE QUEUE ALWAYS CONTAINS AT LEAST ONE ENTRY, A DUMMY

PAGE 0280 #23

SWAP TRACK ERROR USER ZAPPER

0450 •
. 0451.·

JETTISON PORT

~452**.

0453 ••
0454.
0455.
0456.
0457.
04Sd*

0460
0461
0462
0463
0464
0465
0466
0467
0468
0469
0410
0471
0472
0473
0414
0475
0476
0477
0418
0479
0480
0481
0 4 82

0483
0484
0 4 85

0486
0 4 87
0488
0489

0490
0491
0492
0493
0494
0 4 95
0496
0497
0498
0499
0500*
0501*
0502*
0503
0504

THIS ROUTINl IS CALLED WH~N A DISC TRANSFER TO OR fROM A
USER'S SWAP TRACK HAS FAILED. THE ROUTINE SETS THE USER'S
PORT TO AN UNAVAILABLE STATUS AND CLEARS HIS FUSS TA8LE.
ENTER WI·TH TTY TABLE ADDRESS IN 8.
60524 0000riJ0
6 0 525
60526
60527
60530
60531
60532
60533
60534
60535
60536
6"'537
60540
60541
60542

064272
076624
116623
066624
044356
9.160353
110001
044347
002400
070255
170001

Pl44352
170001
060612

6'1543 070204
60544 060666

60545 064700
60~46

60547
60550
60551
1;0552
60553
60554
60555
60556
60557
60560
60561
60562
60563
60564
60565

60566
60567
60570
60.571
60572

114206
017234
066624
044342
160001

001727
072624
001720
040676
072625
002400
064450
172625
036625
006006
026562
060666
064676
114206
017 2 34
062624

60573 017477

JlTPT NOP
LOB
STS
JSB
LOB
Aoe
LOA
STA
AOB
ClA
STA
STA
ADS
STA
LOA
STA
LOA

MLINK+l
TAKE THIS
JETTI
USER OFF
JDEQU,I
THE QUEUE
JETli
.+?STAT-?LINK -> STATUS WORD
XPUN
SET PORT TO
B,1
UNAVAILABLE
.+110 .. 18TAT
MAIN

B,I

SAY NOBODY IN CORE

CLEAR 10

.+?FLAG .. ?ID
B,I
CLEAR FLAGS ~ORD
M2000
READ IN
MWORD
THE FUSS TABLE
FUSS

LOB LIBol
JSB DISCZ,I
JSB SICK
IT'S STUCK ON THE DISC, GIVE UP
LOB JETl1
GET TABLE POINTER AGAIN
ADB .+?TNUM.?LINK
LOA BII
GET THE PORT NUMBER
ALF,ALF
STA JETTt
SAVE IT
ALF,ALS
TIMES 32
ADA LIBD
STA JETT2
CLA
ZERO OUT
LOB MJ2
·THIS CLOD'S PART
STA JETT2,I
OF THE FUSS
lSZ JETT2
TABLE
INB,SZB
JHP •• 3

LDA
LDB
JSB
JSB
LOA
JSB

FUSS
LIBO
DISCZ,l
SICK
JETTI
TCRIR

WRITE THE FUSS
TA8LE BACK TO
THE DISC
DARN, IT'S STUCK IN CORE,
GET PORT NUMBER
ANO GO INFORM VICTIM

CROAK

ALSO INFORM THE SYSTEM OPERATOR WHAT WE'VE DONE.
60574 103100
60575 114200

elF

Ii)

.J SB GMQBP, I

GO GET POINTER To MESSAGE

Q

PAGE 0281 #23
0505
0506
0507
0508
0512'9
0510
0511
0512
0513
0514

0515
0516

0517
0518
0519
0520
0521
0522
0523

0f)25
0526

0521
0528
0529
0530
0531
0532
0533
0534
0535

SWAP TRACK ERROR USER ZAPPER

60576
60577
60600
60601
60602
60604
60605
60606
60607
60610
60611
60612
60613
60614
60615
60616
60617
60620
60621

126622
072625
062624
006400
100400
001727
0400Bl
040530
072634

60622
60623
60624
60625
60626
60627
60630
60631
60634
60635
60646

070360
071610
000000
000000
060627
000036

JHP JSCH1,1
STA JETT2
LOA· JETTi
CL8
OIV .+10
ALF,ALf

JEll

006006
026613
126622

05 0 11 7
000000
020115
"06412

IT

JSCH1
JDEQU
JETT!
JETT2
JETHS

TO

ASCII
INSERT IT INTO THE MESSAGE
GET ADDRESS OF
STUFF TO BE MOVED
MOVE
IT
INTO
THE
MESSAGE
QUEUE
BUFFER
DONE, RETURN TO.SCHEDULAR

ADA ASC00

036625

006412

CONVERT

ADA B

062626
012624
064337
162624
172625
036624

NO ROOM, SORRY
SAVE POINTER TO AVAIl.ABLE BUFFER
GET PORT NUMBER

STA JETNO
LOA JETMS
STA JETT1
LOB .-16
LOA JElTl,I
STA JETT2,I
lSZ JETTI
ISZ JETT2
INB,SZ8
JMP JETl
JMP JSCH1,I

OEF 5tH1
OEF OEQUE

ass
ass

t
1
OfF *+1
DEC 30
OCT 6412

Ase

3,PORT

CR LF
#

JETNO BSS 1
ASe g, HADE UNAVAILABLE.
OCT 6412
CR LF

PAGE 0282 #24
0002*
0003..0004*
0005*
0006.
IiHc107 *
0008*
0009*
0010*
01'11*
0012.
0013*

0014*
001 5*
0~' 16*
0~17*

001ij*
0019*
0020*

SYSTEM DEATH

~MERGENCY

TRACK

G~ABaEH

THE SALVG ROUTINE IS CALLED WHEN A SYSTEM TRACK WITH VITAL
IN~ORMATION, SUCH AS A DIRECTORY OR lOT TRACK, CANNOT BE
WRITTEN BACK TO ITS AsSIGNED DISC ADDRESS, BUT WHEN RECOVERY
MIGHT BE POSSIBLE IF THE INfORMATION CAN BE SAVED. SALVG
ASSUMES THE FOLLOWING POINTERS HAVE BEEN SET:
LIBUS • STARTING CORE ADDRESS OF THE TRACK
MWORO • NEGATIVE L~NGTH OF THE TRACK IN CORE
STOAP • ADDRESS OF A DOUBLE WORD CONTAINING
THE TRACK'S DISC ADDRESS
SALV G READS THE ADT IN PIECES INTO THE UPPER 2K OF THE USER
AR~A AND SEARCHES FOR AN ENTRy LARG~ ENOUGH TO HOLD THE TRACK.
IF AN ENTRY IS FOUND, THE TRACK IS WRITTEN TO DISC AND ITS NEW
ADDRESS IS STORED INTO THE DOUBLE WORD LOCATION POINTED TO BY
STDAP (SYSTEM TABLE DISC ADDRESS POINTER.) THE ADT 18 THEN
UpDATED BY RETURNING spACE FOR THE OLD TRACk AND CLAI"ING SPACE
FOR THE NEW ONE.

0021~

0022*

0023*
0024.
0025*
0°26*

SALVG CALLS CLNOr TO PRINT ANy REMAINING SYSTEM MESSAGES AND
AN INDICATION OF SALVG'S SUCCESS OR FAILURE, AND THEN HALTS.
THE THREE POSSiBLE HALTS HAVE THE FOLLOWING MEANINGSI

328 - RECOVERY POSSIBLl BY BOOTING UP FROM DISC
~ RECOVERY POSSIBLE By LOADING FRoM MAG TApE
34B • RECOVERY IS OUT OF THE QUESTION
338

0027*
0028*
0029*
0031
0032
0033
0034
0035
0036
0037
00 3 8
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
00~9

0050
0051

0052
0053
0054
0055
0056
0057

60647
6065(?!
60651
6065'60653

000000
002400
170632
060"77

60654
60655
6 0 656
60660
60662
60663
60664
60665
6 0 666
60667
60670
6 0 672
60674
60675
60676
60677
60700
60701
60702

060204
0 7 3216
104200
104400

073215

060347
073217
063221
073222
04 0 361
073223
104200

104400
163223

,,73227
067227
006003

026744
047231

00602121
60703 026706

60704 063227
60705 PJ06401

SALVG NOP
elA
STA

LOA
STA
LOA
STA
DLD
DST
LOA
STA
LOA
SAL"! STA
ADA

BLOCK
Dele',I
STDAP
SALAD
MWORD
SALLN
STDAP,I
SOADR

... a

seNTi
SADTP
SADTA
.+2

SADTL
OLD SADTA,I
08T SAOA,I
LOA SADTl,I
STA SADL
SAL02 LOB SADL
5ZB,RSS
JMP SAL05
AD8 D1536
SSB
JMP SAL03
LOA SAOL
ClB,RSS
STA

,CLOCK

SAVE ADDRESS
POINTER AND
DISC LENGTH OF
TRACK TO BE SALVAGED
SAVE DISC ADDRESS
FOR FADT ROUTINE
INITIALIZE ADT
TRACK COUNTER
INITIALIZE ADT
ADDRESS poINTER
INITIALIZE ADT
LENGTH POINTER
INITIALIZE
CURRENT DISC
ADDREss AND
LENGTH
B .. .# OF WORDS LEFT
ANY MORE ON THIS TRAtK?
NO
REDUCE COUNT BY 6 BLOCKS
ANY LEFT?
yES

NO, GlT ORIGINAL LENGTH
SET ADJUSTED" LENGtH TO zERO

PAGE 0283 #24
005~

0059
0060
0061
0062
0063
0064
0065
0066
0061
0068

6rl'706
60707
60710
60711
60712
60714
60715
60716
60117
60720
60721

SYSTEM DEATH EMERGENCY TRACK GRABBER

063230
070204
077227
007400
100400
073220
063224
064614
046027
114206
026750

SAL03 LOA M1536
STA M~ORD
5T8 SADL

eca

DIv .+3
STA SCNT2
LOA SAD A
LOB L8192
ADB 8IT15

JSB DISCZ,I
JMP DOOM

02169*
0010 ••
CHECK ADT FOR A LARGE ENOUGH
0071.
LOB L8192
0072 60722 064674
0073 60123 044361 SAL04 ADS .+2
LOA B,I
0074 60724 160001
ADA M32
0075 60725 040450
0076 60726 002021
SSA,RSS
JMP SAL06
0077 60727 026756
0078 60730 006004
INS
lSz SCNT2
0079 60731 037220
JMP SAL04
0080 60732 P.J26123
0081 60733 104200
DLO SAOA,I
elf
0082 60735 00sa40
0083 60736 044365
ADB .+6
0084 60737 002040
SEZ
0085 60140 002004
INA
DST SADA,I
0086 60741 104400
JHP SAl02
0087 60743 026676

MAXIMUM LENGTH FOR READ
SET DISC LENGTH WORD
SAVE ADJUSTED TRACK LENGTH
COMPUTE AOT
.
ENTRY COUNT
AND SAVE IT
->

DISC

ADDRESS

• CORE ADDRESS
ADO READ BIT
READ ADT CHUNK
DISC FAILURE • FLUSH SYSTEM
ENTRY
START OF TABLE
LENGTH WORD
• LENGTH
IS THIS ENTRY LARGE ENOUGH
FOR THE ~YSTEM TRACK?
YES
a>
a>

NO, ANY ENTRIES LEfT?
YES
ADJUST
DISC
ADDRESS
FOR NEXT
6 BLOCK
CHUNK
CHECK NEXT CHUNK

0088*
0089 ••
ADJUST POINTERS FOR CHECKING NEXT ADT TRACK
0090.
0091 60144 063222 sALes LDA SADlA
0092 60745 04 0 362
ADA .+3
0093 60146 031217
ANY TRACKS L.EFT?
ISZ SeNTt
0094 60747 026665
JMP SAL0!
YES
0095.
THIS SySTEM IS B~YONO HELP
0096*.
0091.
0098 60750 1~3100 DOOM CLF 0
LDB SALf'A
0~99
GET ADDRESS Of FAILURE MESSAGE
60751 067156
JSB
CLNOT
PRINT MESSAGES
0100 60752 017412
LOA
SALVG
GET
THE CALLING ADDRESS
60753
062647
0101
0102 60754 102034
HLT DEATH+348 EXPIRE
JMP ... 1
NO CHANCEl
0103 60755 026754
0105.
0106 ••
A
0101.
0108 60756
0109 60757
0110 fi076e1
0111 60761
0112 621763

NEW TRACK HAS BEEN FOUND
170001
044355
077222
104200
104400

SAL06 STA
AD8
ST8
OLD
DST

B,l
.-2

SAOlA
B,I
SALAD,!

UPDATE ENTRy.S LENGTH WORD
DISC ADDRESs
SAVE POINTER
PUT NEW DISC ADDRESS IN SALVAGED
TRACK,S CORE RESIDENT TABLE
a>

PAGE 0284 #24
0113
0114
0115

0116
0117
011a
0119
0120
0121

SYSTEM DEATH EMERGENCY TRACK GRABBER

60765 000040
6 0 766 044417
60767 002040
60770 002004

60771
60773
60774
60775

104400
060204

073227
063216

0122

0123

60776 070204
60777 063215
61000 064676

0i24
0125

61002 026750

611001 114206

eLf
ADS ,+32

SEZ
INA
DST
LOA
STA
LOA
STA
LOA
lOB
JSB
JMP

upDATE
ENTRY'S
DISC
ADDRESS

sADrA,I

MWORD
SAOL
SALLN
MWORD
SALAD
LISO
DISCZ,l
DOOM

WORDs

SAYE LENGTH OF AOT CHUNK

THAT ENTRY WAS FOUND ON
SET TRANSfER LENGTH OF
TRACK TO BE SALVAGED
FOR TRACK

-> NEw DIsC ADDRESS
-> CORE LOCAtION

SALVAGE THE TRACK

DANG ITI TUBE THIS SYSTEM

0127.

TRACK HAS BEEN SALVAGED • NOw uPDATE ADT
0128*.
0129.
LOA gAOL.
SET TRANSFER L.ENGTH
0130 61003 063227
STA MWORD
01 3 1 61004 070 20 4
OF UPDATED ADT CHUNK
0132

0133
0134
0135
0136
0137

0138
0139
0140

0141
0142
0143
0144
0145
0146

61005 063224
61006 064674
61007 114206
61010 027035
61011 111232

61012 160043
61013 070204

61014 060044
61015 064700
61016 114206
61017 0272135
6102~ 060417

61021 070045
61022 111233
61023 ~60044
61024 064676

0147
0148 6102.5 114206
0149 61026 027035
0150*

0151*
0152*.
0153*
0154
01 55
0156

0157

0 15 a
0159
0161*

0162*.
0163*
0164
0165
0166
0167

LOA SADA
L.OB L8192
JSB OISCZ,I

JMP sPsuc

JSB SFAOT,I
LOA SOLPR,I
STA MWORD
LOA SDAPR
LOB LIBDI
.J5B DISCl, I

JMP
LOA
STA
JSB
LOA
LOB
JSB

spsuc
.+32

SOAlN
SRBAT,I
SDAPR
LIBD
DISCZ,l

.JMP SPSUC

.> DIsC ADDREss of AOT CHUNK

• CORE ADDRESS

WRITE TO DISC
BLEw IT
FIND ADT OF SALVAGED TRACK
SET TRANSFER
WORD
.>READLENGTH
ADT DISC ADDRESS
IN
ADT TRACK
MORE PROBLEMS
SET AMOUNT TO

BE RETURNED
RETURN THE BLOCKS
WRITE THE
UPDATED TRACK

TO THE DISC
FOUR OUT OF FIVE AIN'T
BAD FOR A SICK DISC

THE ADT HAs BEEN UPDATED
61027
6 1 030
61031
61032

103100
067 043
017412
062647

61033 102032
027033

61~34

elF 0
LOB SALSU
Js8 CLNOT
LOA SALVG
HlT DEATH+32a
JMP ... 1

LOAD ADDRESS OF cOMPLETE SUCCESS
OUTPUT MESSAGEs
LOAD CALLING ADDRESS
KICK OFF

THE ADT COulD NOT BE UPDATED
61035 103100
61036 067111
61037 017412
6104'1 062647

SPsuC elF
LOB
JSB
LOA

0
SALPS
CLNOT
SALVG

LOAD ADDRESS OF PARTIAL SUCCESS
PRINT MESSAGES
LOAD CALLING ADDRESS

PAGE 0285 #24

SYSTEM DEATH EMERGENCY TRACK GRABBER

0168
0169

61041 102033
61042 027041

121111
0172
0173

61043
61044
61045
6 10 46
61067

0174

0175
0176
0177
0179
0180
0181
0182
0183

0184
0186

0187
0188
0189
01 9 0

0191
0192
0194

0195
0196

0197
0198

0199
0200

0201
0202
1212 °3
0204
121205
0206
02 0 7
0208
0209

·0210
0211

HLT DEATH+33B DIE
JMP .-1

61070 005123
6 1 071 046105

SALSU DEF ·+1
DEC 72
OCT 6412
ASC 17,MOVED SYSTEM TRACK.
EMERGENCY DIS
C.CR
OCT 41415
IF .. S
OCT 5123
ASC 16,LEf:.P AND THEN BOOT UP FROM DISC.

61111
61112
61113
61114
61133
61134

('161112
000106
006412
0465\7
006412
0465Vltl

SAlPS OfF
OEC
OCT
ASC
OCT
Ase

61156
61157
61160
61161
61175
61176
61177

061151
2106412
04 15 01
027015
005122
042503

SALFA DEF .+1
DEC 58
OCT 6412
ASC 12,CAN'T WRITE SYSTEM TRACK
OCT 27015
•• CR
OCT 5122
LF.R
ASC t4,ECOVERY OUT OF THE QUESTION.

000000

SALAD BSS 1

0" 0·0 121 fa

SAL.LN BSS 1
sCNTt OCT 0

61215
6121 6
61217
61220

~61044

000110
006412
"'46517

12141415

000072

000000
000000
61221 000116
61222 000000
61223 000000

61224
61225
61227
61230
61231
00043
00044

061225
00121000

SCNT2
SADTP
SADTA
SAoTL
SADA

000000

SAOL

11500121

M1536

003000

00045
0004 6
61232 072357

61233 072415

01536

8DLPR
SOAPR
SDALN
SDAOR

SFADT

OCT
OfF
BSS
BSS
OfF
BSS
sSS
DEC
DEC
EQU
EQU
EQu
EQU
OfF

*+1
70
6412
15,MOVlD SYSTEM TRACK. EMERGENCY
6412
18,MAG TAPE SLEEP ANO RELOAD FROM TAPE.

.> ADOR, OF TRACK TO Bf SALVAGED

• LENGTH OF TRACK 10 BE SALVAGED

0
ADrAT
1
1
.+1
2

a" ADT TABLE
AOT DISC ADDRESS POINTER
ADT TRACK LENGTH POINTER
.,. ADDRESS OF CURRENT AOT CHUNK

1

• ADT TRACK REMAINDER'S LENGTH

.1536

1536
LTEMP+l1
LTEMP+12
LTEMP+13
LTEMP+14
FADT

SRBAT OEF RBADT

-DI.PTR

• OAPTR

• DALEN
• OADDR

a> FIND AOT ROUTINE
.~

RETURN BLOCK TO ADT ROUTINE

PAGE 0286 *24

SYSTEM DEATH EMERGENCY TRACK GRABBER

THIS ROUTINE IS CALLED WHEN THE SYSTEM CANNOT CONTINUE
OPERATING BUT MAY BE ABLE TO BE RESUSCITATED.
0216
0217
0218
0219

0220
0221
0222
0223.

0220225
0226

0227
0228

0230*
0231*
0232.
0233*

0235
0236

0237
0238
0239
0240
0241

61234 000000
61236 067243
61237 017412
61240 063234
61241 102033
61242 027241

61243 i2i6i244
61244 000073
61245 006412
61246 041501
61271 020122

0249.
0250.
02 5 1 *
0252.

0253.
0255
0256

0257
0258
0259
0260

0261
0262.
0263

0264
0265
02 66

NOP
elF
LDB
JSB
LOA
HLT
JMP

SICKM OfF
DEC
OCT
ASC
ASC

0

sICKM
ClNOT
SICK
DEATH+33s
•• 1

DISABLE INTERRUPTS
GET ADDREsS of OPTIMISTIC MESSAG
GO PRINT MESSAGES
A GETS CALLING ADDRESS
CROAK

.+1
59
6412

19,CAN'T ACCEss SYSTEM SEGMENT OR TABLE.

10, RECOVERy POSSIBLE.

THIS ROUTINE IS CALLED WHEN THE SYSTEM CANNOT CONTINUE
OPERATING ANO HAS ALTERED ITS TABLEs IN SUCH A WAY THAT
THEY CONTAIN CONFLIcTING INFORMATION ANti RESUSCITATION IS
IMPOSSIBLE,
61303
61304
61305
61306
61307
61310
61311

000000
103100
067312
~17412

063303
102034
021310

0242.
0243 61312 061313
121244 61313 000063
0245 61314 Pl06412
024 6
0241

SICK

61235 103100

613t5 05 1 5 31
61J4~ 044515

DEAD

NOP
elF
LOB
JSB
LOA
HLT

0

DEADM
CLNOT
DEAD
DEATH+34B

DISABLE INTERRUPTS
GET ADDRESS OF PESSIMISTIC MfSAG
GO PRINT MESSAGES
A GETS CALLING ADDRE$3.
PASS AWAY

J"'P .·1
DEADM OEF .+1

DEC
OCT
Ase
ASC

•

51
6412

19,5YSTfM TABLES INCOMPATIBLE.
6,lMPOSSIBLE.

RECOVERY

THIS ROUTINE IS CALLED WHEN THE SYSTEM HAS BLOWN IT WRITING
THE DISCS. THE SITUATION
IS SIMILAR TO THOSE WHIcH CALL "DEAD", aUT SINCE LOCKEDSLOCK8
TABLEs ARE I"'MORTAL, THE OPERATOR MUST BE INFORMED THAT ONE
HAS BEEN DAMAGED.
ON THE LOCKED BLOCKS TABLE OF ONE OF

61346 000000

61347 103100
61350 067355
6 1 35 1.
61352
61353
61354

0 1 7 4 12
063346

61355
61356
61357
6 13 6 0

061356
000066
006412

102034
027353

046117

MDEAD NOP
elF
LOB
JSB
LOA
HLT
JMP

0
MDEDM
CLNOT
MDEAD
DEATH+348
.-1

MDE-OM OfF .+1
DEC 54

DISABLE INTERRUPTS
GET ADDRESS OF WARNING MESSAGE
GO PRINT MESSAGES
A GETS CALLING ADDDRESS
HUERTO

OCT 6412
ASC 16,lOCKED BLOCKS TABLE DESTROYED.

PAGE 0287 #24
9267

6140~

SYSTEM DEATH EMERGENCY TRACK GRABBER

051105

ASC 10,RECOVERy IMPOSSIBLE.

PAGE 0288 #24
0269*

0270fr
0271*
0272*
0273*

0274*
0275*
0277
0278
0279

SYSTEM DEATH

0282
0283
0284
0285

0286

61423 027442

0281

61424
61425
61426
61427
61430
61431
61432
61433
61434

~280

0288
0289
0290
0291
0 2 92
0293
°294
0295

0296
0291

PRINTER

THIS ROUTINE SENDS A SYSTEM DEATH MESSAGE TO THE USERS,
NEXT, IT COMPLETES ANY OUTPUT WHICH HAS BEEN STARTED
BY THE SYSTEM CONSOLE DRIVER. IT THEN PRINTS ANY MESSAGES
REMAINING IN THE MESSAGE BUFFER. If IT IS ENTERED WITH (8)
NONZERO, IT WILL LAST PRINT THE ASCII STRING WHOSE LENGTH
IS POINTED TO BY (8) AND WHICH STARTS IN THE WORD FOLLOWING
THIS LENGTH.
61412
61413
61414
61415
61416
61417
61420
61421
61422

0281

HfSSAG~

000000
002400
t70632
077473
003400
017477
103100
060311
002021

CLNOT

NQP

CLA
STA Dele1,1
STB CLNB

ceA

JSB TCRIR
elF 0
LOA T35Ft
SSA,RSS
.JMp CLN 1
SFS 1SC
JMP ... 1
LOA CLADR,I
elE,ELA
lOB CLTOG,I
SLB
INA
STA SYCBA
LOB TeNT
STB SYCCC
LOB CLN1P
518 SYCON
LOA SYBIT,l

102312
027424
16 34 7 4
000066
167475
004010
002004
073723

064074
61435 077722
61436 067476

BLOCK
CLOCK
SAVE SpECIAL MESSAGE pOINTER
INFORM USERS OF
SYSTEM DEATH
WAS SYSTEM CONSOLE DRIVER

DOING INPUT OR OUTPUT?
INPUT, Go CHECK FOR MESSAGES
OUTPUT, WAIT FOR CURRENT
CHARACTER TO BE OUTPUT
GET CHARACTER POINTER
DOUBLE FOR SyCON AND lOSE BIT 15
GET LEFT.RIGHT WORD
WHERE IS NEXT CHARACTER?
ON THE RIGHT. BUMP POINTRE
SAVE POINTER FOR sVeON
GET REMAINING CHARACTER COUNT
AND STORE FOR SYeON
GET RETURN ADDREsS
AND STORE IN SyeON
GET CURRENT OUTPUT CONTROL BITS
JUMP INTO MIDDLE OF ROUTINE

0298 61437 077656
0299 61440 163724
0300 61441 "27664
JMP SVC3
0301*
COME HERE TO CHECK FOR MORE MESSAGES IN QUEUE
0302*

0303.
0304 61442 003400
0305
0306
0301
0308
0309
0310

61443
61444
61445
61446
61447

0311
0312
0313
0314
0315

61451 054307
61452 064310

0311

61457 027442

0321
0322
0323

MSQCT
.-1
Cl.N2
MSQCT
MSQPl
.+MESL.N
cPa MSQNO
LOB MSQBG
STB MSQPl
LOA B,I
INS
JSB SYCON
JMP CLNI

61453 11374305
61454 160001
61455 006004
61456 011656

eeA

AOA
CPA
JMP
STA
LOB
ADB

6145", 044426

0316
0318*
0319*
0320.

CLNI

040304
050356
027460
070304
064305

ARE THERE MESSAGEs
IN THE
QUEUE?

NO
YES, DECREMENT THE COUNT
BUMP POINTER

TO NEXT MESSAGE BUFFER

WRAP AROUND?
YES
SAVE NEW CURRENT MESSAGE POINTeR
GET CHARACTER COUNT INTO A
POINTER TO FIRST WORO INTO B
GO OUTPUT IT
CHECK FOR MORE

COME HERE TO PRINT FINAL SPECIAL MESSAGE
6146~ 067473
61461 006003
61462 "27466

CLN2

LOB CLNB
SZB,RSS
JMP CLN3

GET SPECIAL BUFFER poINTER
IS THERE A MESSAGE?
NO

PAGE 0289 #24
0324
0325
0326
0327
0328
0329
0330

a331
0332*
0333*
0334
i0335

0336
0337

61463
61464
61465
61466
61467
61410
61471
61472

SySTEM

160001
006004
01 1 656
002400
017656
011656
017656
127412

61413 000000
.: . . . '7 ..
,,56652
61415 056651
61476 06 144 2

Ol"'tif

D~~ATH·

CLN3

CLNB

LDA
IN8
JS8
CLA
JSB
JSB
JSB
JMP

MESSAGE PRINTER
8,1
SYCON
SYCON
SYCON
SyCON
CLNOT,I

BSS 1

CLADR OfF TADR
CLTOG oEF TOG
cLN1P DEF CLNI

yES, G~T CHARACTER COUNT
BUMP POINTER TO FIRST MES, WORD
GO OUTPUT IT

FINALLy,

OUTPUT 3

"AGONIZING DEATHCRLF'S AND

RETURN

8 REG. SAVE WORD
POINTER TO 1TT35'8 CHAR POINTER
POINT~R TO 11T35'8 LEFT.RIGHT WD
RETURN ADDRESS FOR FAKE SYCON CL

PAGE

~290

0348
0349
0350
0351

0352
0353
0354
0355
0356.
0357
e35a
0359
0360
0361 *
0362
0363
0364
0365
0366*
0367
0368
0369
0370
0371
0372
0373*
0374
0375
0376
0377
0378
0379
0380
0381
0382
0383
0384
0385
0386*
0387
0388
0389
0390
0391

0392
0393

SYSTEM DEATH OR SWAP TRACK ERROR TOWN CRIER

THIS ROUTINE IS CALLED TO INFORM ALL USERS THAT THE SYSTEM
IS GOING DOWN BECAUSE OF A HARDWARE FAILURE OR TO INFORM A
SINGLE USER THAT HIS PORT IS BEING HADE UNAVAILABLE (BECAUSE
OF A SWAP TRACK ERROR),
IT MUST BE ENTERED WITH THE AFFECTED
PORT NUMBER IN A IN THE LATTER CASE OR WITH A.-I TO INFORM
ALL USERS OF SYSTEM DEATH,

0339*
0340*
0341*
0342*
0343*
0344*
0346
0347

~24

61477 000000
61500 073647
61501 003002

61502 027511
61503
61504
61505
61506
61507
61510

073647
064167
07765 0
060417
067626
027515

TCRIR NOP
STA TCRPT
CMA,SZA
JMP TeR1
STA lCRPT
LOB NPORT
STB TCRPC
LOA ,+32

LOB TCRSO
JMP TCR2

ceA

61511 0034~0
61512 073650
61513 060424
61514067602

TCRt

61515
61516
61517
61520

003000
073651
004066
077652

TCR2

61521
61522
61523
61524
61525
61526

060374
017552
060371
017552
060371
017552

LOA
JSB
LOA
JSB
LOA
JSB

61527 037651

ISZ
RSS
JHP
LOB
ISZ

.

6153~

STA lCRPC

LDA

002001

61531 027543
61532 067652
61533 037652
61534 004065
61535 160001
61536 002041
61537 001727
61540 010474
61541 017552
61542 027527
61543
61544
61545
61546
61547

060374
017552
060371

017552

"60371
6155~ 017552
61551 127477

.+37

LOB TCRPU

SINGLE PORT BEING ZAPPED
SET PORT COUNT TO -I
GET LENGTH OF MESSAGE

AND POINTER TO IT

CMA

SAVE .MESSAGE

STA TeRCC
CLE,ELB
STe TCRSA

SAVE MESSAGE
BUFFER CHARACTER POINTER

,+158

TCROT
,+128
rCROT
,+126
TCROT
TCRCC
TCR4
TeRSA
TCRS'

CLE,ERB
LDA 8,1

SEZ,RSS
ALF,ALF
AND B177

JSB TeROl
.IMP TCR3

TCR4

SAVE PORT NUMBER
IS THIS A SYSTEM DEATH1
NO, GO SET UP FOR 1 PORT NEWS
yES, SET FIRST PORT TO ZERO
GET COUNT OF PORTS TO G£T NEWS
ANO SET IT INTO TCRPt
GET L~NGTH OF MESSAGE (CHARS)
AND POINTER TO MESSAGE

LOA
JSB
LOA
JSB
LOA
JSB
JHP

.+158
TeROT
,-+128

TCROT
.+128
TeROT
TeRIR,I

LENGTH-l

PRECEDE
MESSAGE

wITH
CR

Lf
LF
ARE THERE MORE CHARACTERS?
YES
NO, GO FINISH UP
GET BUFFER POINTER
BUMP IT
CALCULATE WORD ADDRESS
GET 2 CHARACTERS
WHICH ONE?
LEFT ONEI MOVE IT
ISOLATE CHARACTER
GO SEND IT
CHECK FOR MORE
SEND
USER(S)

FINAL
GASP
FORM
FEEDS

PAGE 0291 #24

SYSTEM DEATH OR SWAP TRACK ERROR TOWN CRIER

0394*
0395 61552 000000
0396 61553 073653
0397 61554 063650
0398 61555 013654
0399 61556 063647
0400 6,1557 073655
0401 61560 063655
0402 61561 12101721
0403 61562 ~30240
0404 61563 114736
f.lA~K
1rI~1rI'"

0406
0407
0408

0409
0410
0411
0412
0413
0414
0413
0416
0417
0418

61554
61565
61566
61567
61570
61571
61572
61573
61574
61575
61576
6 1 577

SFS CH2
JMP ... 1
LIA CH2

002002

SZA

0432

JMP TeRS
l,OA TCR04
ALF,ALF
lOR OCR
lOR TCR02
JSB S14SC,I
lSZ TCR04
ISZ TCR03
JMP TCR5
JMP TCROT,1

027560
063655
001727

030213
033653

114736
037655
037654

61600 027560
61601 127552

0423 61626 061627
0424 61627 044101
0425*
0426 61647 000000
0427 61650 000000
0428 61651 01210000
0429 61652 000000

61653 000et0i\
61654 0,00000
61655 000000

COME
SAVE
SAVE
OF

HERE TO OUTPUT CHAR IN
CHARACTER
NUMBER
PORTS
AND FIRST
PORT
ASK 2114 IF
THIS USER'S BUFFER

~

IS FULL

.JS8 S14SC, I

102311
027564
102511

0419*
0420*
0 4 21 61602 061603
0422 61603 044101

0430
0431

TCROT NOP
STA TCR02
LOA TCRPC
STA TCR03
LOA TCRPT
STA TCR04
TCR5 LOA TCR04
AlF,ALF
lOR ISF

TCRPU OfF
ASC
TCRSO OfF
ASC
TeRPT
TCRPC
TeRce
TCRBA
TCR02
TeR03
TCR04

GET RESPONsE
yES, GO ASK AGAIN
NO, GET PORT "
OUTPUT CODE
AND CHARACTER
GO SEND IT
BUMP PORT NUMBER
OUTPUT TO ANOTHER?
yES

NO, RETURN

.+1
t9,HAROWARE FAILURE ~~ PORT UNAVAILABLE.
.+1
16,HARDWARE FAILURE ... SYSTEM DOWN.

BSS 1
BSS 1
BSS 1
ass 1
BSS t
8SS 1
BSS 1

•

NUMBER OF FIRST PORT TO GET NEws
TOTAL
OF PORTS TO RECEIY! NEWS
LENGTH OF MESSAGE
MESSAGE CHARACTER POINTER
OUTPUT CHARACTER
ROUTINE
TEMPS

*

PAGE

r

0434*
0435*
0436*
0438
~439

0440
0441
",442

0443
0444
0445
0446
0 44 7
0448
0449
0450
04 51
~452

0453
0454
0455
0456
0457
0458

0459

~292

#24

SYSTEM DEATH TELETYPE DRIVER

UPON ENTRY (A) HOLDS THE NUMBER OF CHARACTERS TO BE OUTPUT.
BIT 15 OF A • 0 FOR X·OFF eR LF AFTER OUTPUT.
eB) POINTS TO THE FIRST WORD OF THE BUFFER TO BE OUTPUT.
61656 000000
61657 073722
6166121 004066
61661 077723
61662 060220
61663 173724
61664 102612
61665 063-722
61666 001265
61667 002003
61670 027711
61671 Ql03400
61672 043722
61673 073722
61674 067723
61675 037723
61676 004065
61677 160001
61700 002041
61701 001727
61702 010474
61703 030476
61704 102612
61705 103712
61706 102312
61701 027706
61710 021665

0460
0461
0462
0463
0464
0465*
0466.
0467 61711
0468 61712
0469 61713
0470 61714
0471
61715
0472 61716
0473 61717
0474 61720
0475 61721
0476*
0477*
0478 61722
ff'479 61723
0480 61724
0481 61725
0482 61726
0483 61727
0484

SYCON NOP
STA svcct
CLE,ELB
STB SyeSA
LDA SBP
sTA SYBIT,I
SYC3 OTA 1SC
BYe1 LOA sYeec
RAL, eLE', ERA
SZA,RSS
JMp sYC2
ceA
ADA sycec
STA sycec
LDB sytSA
ISZ SYCBA
CLE,ERB
LOA B,I
SEZ,RSS

AL.F,ALF

AND 8177
lOR 8200

OTA 1SC
STe ?St,C
SFS 1SC

.JMP .... 1

JMP SYC1

002040
127656
060362
031027
073722
067725
004066
077723
027665

SyC2

000000
000000
056642

SYCCC
SYCBA
SYaIT
SYCCL

061726
011415
005~H'J0

SEz
.IMP SYCON, I
L.OA .+3

lOR BI115
STA SYCCC

LOB sveCl
CLE,ELB
STB SyCBA
JHP SYCl
BSS
Bss
OfF
OEF
OCT
OCT
UNS

1
t

TBITS
... 1
011415
0fd5000

SET CHARACTER COUNT
INITIALIZE
CHARACTER POINTER
BITS FOR "PRINT ONLY"
SAVE THEM
SEND THEM
HAVE ALL CHARACTERS
(COpy CRLF 8IT INTO E)
BEEN OUTPUT7
yES, GO SEE ASOUT CRLF
NO, DECREMENT
CHARACTER COUNT
COMPU-TE
WORD.CHARACTER
ADDRESS
LOAD WORD
POSITION
CHARACTER
EXTRACT CHARACTER
ADD IN BIT 7
OUTPUT IT
REQUEST CHARACTER TRANSfER
WAIT FOR
COMPLETION FLAG
GO DO NEXT CHARACTER

WANT CRLF1
NO, RETURN
yES, 3 CHARACTERS
WITH NO CRLF
FOLLOWING
ADDREss OF
X-OFF CR LF
GO OUTPUT THESE
COUNT OF CHARACTERS TO BE OUTPUT
CURRENT CHARACTER POINTER
POINTER TO CURRENT CONTROL 8ITS

x.OFF CR
l.F

PAGE 0293 #24
0486.

DRIVERS

CO~MUNICATIONS

~487.

THESt ROUTINES ARE USED FOR COMMUNICATION BETWEEN THE 2114

0488.

AND 2116

0489.

0490. 21\6 TO 2114 SEND DRIVER
0491.
0492 62000
0493 62000 000000
049. 62001 1213100
0495
62002 070073
0496 62003 076245
0497 62004 164632
04 9 8 62005 005726
0499 62006 006400
0500 62007 174632

0501
0502
05~3

0504
05 0 5
0506

0507
1(J50a
0509
0510

0511
0512
0513
0514.

ORG 620008

Sl4SH NOP

eLF 0
STA SVCH2
518 SVBC2

LOB DCLCt,I
BLF,ELB
CLB
STB DCLC1,I

6201((1 102100
62011 102311

sr,

6 2 012
62013
6 2 014
62015
62016
62017

JMP
OTA CH2

026011
102611
1 03 711
106711
164634
103100
62020 002040
62021 174632
62022 066245
62023 102100
62024 126000

SAVE COMMUNICATION

GET CLOCK WORD
IF IT IS A JMP, BIT 12
WILL BE SET
BLOCK CLOCK

0

·-1

SFS CH2
STC CH2,C

wAlT FOR ACKNOwLEDGMENT
OF PREVIOUS TRAN&MISSION
OUTPUT wORD
INTERRUPT OTHER MACHINE

CLC CH2
LOB OCLC2,I

elF QJ
SEZ
STB Dele1,I
LOB SVBC2
STF 0
JMp SlASH, I

UNBLOCK CLOCK UNLESS IT WAS
BLOCKED WHEN wE ENTERED
ExIT

0515. 2114 TO 2116 RECEIVE DRIVER
0516.
0517 62025 000000
05ta 62026 070070
0519 62027 07 40 71
0520 62030 001520

R14CM NOP

STA eMA
ERA,ALS
SOC

0521

62031 102201

0522

62032 002004

0525

~524

62033 070012
62034 102510
62035 001723

INA
STA CME
Ll. CH1
ALF,R"R

0526

62036 010366

AND .+7

0523

0527 62037 042041
052a 62040 124000
0529.
0530 62041 162042
0531 62042 062062
0532 62043 062017
0533 62044 062145
0534
0535
0536

0537
0538

62045
62046
62047
62050
62051

062154
062166
062204
062052
062052

SAVE

STB eMS

AOA CMTBL

JMP 0,1

CMTBl. DE'
OEF
OEF
DEF
OEF
DEF
OEF
OEF

.+1,1

HVL
ABR
BFL
aFE
ETO

UHU
R14RT
OEF R14RT

A,8,E

AND OVERFLOw
LOAD REQUEST wORD
OPCODE IN BITS a.e,
MASK TO THREE 8ITS
"DO ON DECODE TABLE POINTER
BRANCH TO APPROPRIATE ROUTINE
HAVE LINE
USER ABORTED
BUFFER FULL
BUFFER EMPTY
ENTER STATEMENT TIMED OUT
USER HUNG UP

PAGE 0294 #24
0040*
0541*
0542*
0543
0544
0545
0546
0547
0548
0549
0550
t'IOIrr.

COMMUNICATIONS DRIVERS

ALWAYS RETURNS HERE
62~52 060072
62053 103101
62054 0000136
62055 102101
62056 060070

62057 0164071
62060 103710

62061 126025

R14RT LOA eME
CLO
SLA,ELA
5TO
LOA CMA
LOB eMS
STC CH1,e
JMP R14CM,I

RESTORE
A,B,E
AND OVERFl.OW

ACKNOWLEDGE RECEIPT
EXIT

~

1rJ'O.1'O.1'.

0552. 2114 HAS A LINE
0553.
0554 62062 016227 HVL
JSB
62063
002002
SZA
"555
CPA
0556 62064 2150361
RSS
0557 62065 002001
JMP
0558 62066 026052
LOA
0559 62067 160001
lOR
0560 62070 030462
0561 '62071 170001
srA
0562 62072 1212510
LIA
0563 62013 010500
AND
ADB
0564 62074 044377
0565 62075 170001
STA
JMP
0566 62076 026052
t1567.
0568* USE~'S ABORT REQUEST
0569.
JSB
0570 62077 016227 ABR
0571 62100 160001
LOA

0572

62t(.11 010524

0573
0574
0575
0576
0577
0578

621~2

0579
0580
fti581

0582
0583

0584
0585
0586
0587
0588
0589
05921

0591
0592

62111 030476
62112 170001
026052
ASRt
044374
160001
050363
026052
040344

62121 002020
62122 026135
62123 060412
62124 003004

0593

62125 140001

0594

62126 002020

0595

62127

~26052

%INPT
R14RT
1,1
COM14
1,1
CHI
8377

,+7RTIM
1,1
R14RT

FOTTy
1,1

AND B30M

050600
62103 026052
62104 160001
62105 010377
62106 002003
62107 026114
6211~ 160001
62113
62114
62114
62115
62116
62117
62120

FOTTY

B.~ FIRST wORD OF TTY TABLE
SKIP IF STATUS IS IDLE.

NO SKIP IF INPUT WAIT
IDLE OR WAITING FOR INPUT

IGNORE

SET 2114
COMMUNICATION
BIT
STORE RESPONSE
TIME IN TTY
TABLE ("0 IF NO
ENTER TIMING)
RETURN TO 211. DRIVER

B.> FIRST WORD OF TTy TABLE

CPA PBFLG
CBFL Ga 0 AND PBFLG-l1
JMP R14RT
YES, ABORT NOT ALLOWEDt
LOA 8', I
NO. ABORT POSIBLE'
AND UNABT
UNA8LE TO
SZA,RSS
ABORT?
JMP ABRl
NO
LOA t,l
lOR ABTRY
DELAY ABORT
STA 1,1
ATtEMPT
JMP R14RT
RETURN TO 2114 DRIYER
EQU •
ADB ,+19TAT
B.> STATUS
LOA 1,1
A • STATUS
CPA XSYNT
CHECK FOR SYNTAX.
JMp R14RT
CAN'T ABORT OUT OF syNTAX,
ADA .+.-XSyNT-l.COMJ+COH2
SSA
SKIP IF LIBRARY PROGRAM.
JMP ABR2
OTHERWISE ABORT ALWAyS ALLOWED,
LOA ,+%SYNT-.+l+CATwCOM2
CMA,INA
ABQRTABLE
AOA B,I
LIBRARY
SSA
PROGRAH1
JMP R14RT
NO

pAGE 0295 #24

COMMUNICATIONS DRIVERS

0596

6213~

\60001

0591

62131

~0J004

059d
0599
0600
0601
0602
0603
0604
0605
0606

62132 rlI4Q1421£1
62t33 "02020

I'll ... ,.. . .

IfJOtCl,

LOA B,I
MAYBE
CMA,INA
ADA .+XSYNT-.+l+STA.CQM2
5SA

b2tJ4 0126052
A~R2

62135
621J~ 044342
62136 t6A001

62137 030462
62140
62141
62142
62143
62144

170001
044374
003400
170001
026052

.)MP R 14HT

NO

E.QU.
ADS .-1STAT
LOA 1;1
lOR COM14

B.> fLAGS
SET 2114

STA 1,1
ADS .+15TAl
eCA
5rA 1,1

SET
STATUS TO
ABORTING

0608
.JMP R14RT
0609
0610.
0611. BUFFER IS FULL
0612.
0613 62145 016227 BFL
JSB F01TY
121614 62146 050362
CPA XOUTW
JMP R14RT
0615 62147 026052
0616 62150 160001
LOA 1,1
lOR OUTWT
0617 62t51 030417
STA t,I
061a 62152 170001
0619 62153 026052
JMp R14RT
0620.
0621.
0622. BUFFER IS EMpTY AGAIN
0623.
JSB FDTTY
0624 62154 016227 BFE
0625 62155 050362
CPA XOUTW
CCA,CCE,RSS
0626 62156 003701
0627 62157 003500
CCA,CLE
XOR OUTWT
0628 62160 020417
0629 62161 110001
AND 1,1
0630 62162 002040
SEZ
lOR COM14
0631 62163 030462
0632 6216 4 110001
STA t,I
0633 62160 A26052
JMP .R14RT
0634. ENTER STATEMENT lIMED OUT
0635*
•
0636 62166 016227 ETO
.J5 8 FOrTY
ADS .... ?RSTR
0637 62167 044373
0638 62170 160001
LOA 1,1
CPA Dt::NRT
0639 62171 052246
06 4 0 62172 0l2J20~1
RSS
~641
62173 026052
JMP R14RT
0642 62174 044343
A08 .-?RSTR
LDA 1,1
0643 62175 160001
JOR COM14
0644 62176 030462
4
STA 1,1
06 5 62177 170001
0646 62200 044374
AoB .+15TAT
0647 62201 060354
LOA XENTO
0648 62202 17~001
STA t,l
~649

62203 026052

JMP R14RT

COMMUNICATIONS
BIT

RETRUN TO 2114 DRIVER

B .~FIRST wORD OF TTY TABLE
IGNORE IF
ALREADY OUTPUT WAIT
SET

OUTPUT
WAIT BIT
RETURN TO 2114 DRIVER

B.~ fIRST WORO OF TTY TABLE
CHEcK FOR STATUS OUTPUT WAIT

A ".1, E .. 1

A .... 1, E ..
CLEAR OUTPUT
WAIT BIT
IF STATUS _ 10UTW, TMEN DON'T
51.1

SET 2114
COMMUNICATIONS BIT
RETURN TO 2114 DRIVER

Ba. fIRST WORD Of TTY TABLE
B -> RESTART ADDRESS
A • RESTART ADDRESS

wAITING FOR ENTER1
YES, SET COM BIT.
NO, MUST SE MISTAKE,

SET 2114
COMMUNICATIONS

BIT
SET

STATUS TO

ENTER TIMEOUT
RETURN TO 211~ DRIVER

PAGE 0296 #24
0651"
0652.*
0653*
065'-

0655
0656
0657
0658
0659
0660
0661
0662
0663
0b64
0665
0666

0667
0668
0669
0670
0671*

0672

COMMUNICATIONS DRIVERS

USER HUNG UP
JSB FOlTY
ADB .... ?LINK
CpA XSyNT
JMP UHUl

62204 016227
62205 044375
62206 050363
62207 026213
62210 040344
62211 002020
62212 026215

ADA

62213 054272
62214 026225
62215 044356
62216 060355
62217 170001
62220 044342
62221 160001
62222 030462
62223 170001
62224 026052

UHUl

62225 074260

UHU3

UHU2

CAN'T OIsCONNECT
OUT OF SYNTAX

.+.~XSYNT.l.COM3+COM2

SSA
LIBRARY PROGRAM RUNNING'
JMP UHlJ2
NO
CPS MLINK+1
YES, IS USER HEAD OF QUEUE?
UHU3
yES
JMP
ADS •• ?STAT-?LINK NO
SET STATUS
LDA XDl8C
STA

B,I

AOB
LOA
lOR
STA
JMP

,.?FLAG.1STAT
B,1
SET 1/0
COM14
COMMUNICATIONS
B,I
BIT
R14HT
RETURN

TO DISCONNECT

STB HQDIS
0673 62226 026052
JMP R14RT
0674..
••
0675. FIND FIRST WORD OF TTY TABLE.

0676..

SET DISCONNECT FLAG

••

0677. EXIT WITH (B) .> FIRST WORD OF TELETyPE TABLE
0678*
CA) • USERS STATUS
0679*
0680
0681
0682
0683
0684
0685
0686
0681
0688
0689
069 0
0691
0692
0693

62227 000000
6223(}1 102510
62231 001727
62232 010416
62233 1002PJ0
62234 000403
62235 064000
62236 044644
62237 060001
6224 0 040374

62241 160000
6 2242
62243
62244
622 4 5
62245

050353

026052
126227

FOTTY NOP
LIA CH1
ALF,ALF

LOAD REQUEST WORD
TTV* IN 4.0
MASK TO 5 BITS

AND ,+37B
MPy .+TTY01-TTy00

LOB "

A08
LOA
ADA
LOA
CPA
JMP
JHP
R14ED EQU
SVBC2 8SS
OENRT OEF

OTTY0
1
.+15TAT
0,1
IPUN
R14RT
FDlTY,I
•

COMPUl LOCATION

OF FLAG WORD
A .> FLAGS
A .> STATUS
A • STATUS

CHECK FOR PORT UNAVAILABLE

IGNORE IF SO

0694
t
0210000
0695 62246 041235
ENTRT
WHERE ENTER WAITS.
0696*
0697. ROUTINE TO CLEAR PBFLG & CbFlG BITS AND TO TELL
0698* THE OTHER MACHINE ABOUT THE ABORT.
0699*
0700 62247 000000 TRNOF NOP
ADB ... 1STAT
0701 62250 044342
elF 0
0702 62251 103100
LOA 830M
0703 62252 060524
C~EAR PBFLG & CBFLG
0704 6225,~ "03000
eMA
BITS.
0705 62254 110001
AND 8,1

PAGE 0297 *24
0706
0707
0708
0709

0710
0711

0712.
0713.

~2255

COMMUNICATIONS DRIVERS

170001
0060214
160001
0.130251
114136
62262 126247
62256
62257
62260
6226t

ST. B,I
INB
LDA B,I
lOR AST
JS8 S14SC,I
JMP TRNOF,I

a••

7TNUM
.- 7TNUM

TELL OTHER

M.CHIN~.

PAGE 0298 #25

0002
0003
0004
0005
0006

0007
0008
~009

0010

0011
0012

SCHEDULER
ORG

70000

000140
17772 0
177737
177645
106051
70~05 071540
700A6 047040
70007 0431(IJ6
70010 020100
70011 030040

7A000
70001
70002
'0003
70004

0013

,~~a1~
..... ..., ..... 072037

0014

70013
70014
70015
70016
7 001 7
70020
70021
70022

0015
0016
0017
0018
0019
0020

0021
0022

057324
000000
177776
000000
~00000

000000
072024

rti74252

70023 0162247

7000~B

OCT 14~
M608 OCT -60
M41B OCT .. 41
M133B OCT .. 133
MCOM2 ASS .COM2
M36K
ABS ... JrlH,HH,..6000
ASCIN ASC t, N
ASCFF ASC tIFf
Ases. ASe 1,
ASC0B ASC 1,0
OCOM6 OEF COM6
TTYCK ABS TTY00
OUTM1 ASS 1
TE.MPS USED BY ourCH ROUTINE.
)(
OCT -2
CTEMP sss 1
SMAIN OCT 01
CURRENT Slt4APR DRUM TRANSFER FLAG
FMAIN OCT 0
OLD TOp OF Q fLAGS pOINTER
XCOM5 OEF COM5-2
INSQA DEF INSE.Q
TRNFP OEF TRNOF
B140

,

PAGE 0299 #20

""24.
0025"""260021.
0028.
0029.
00J0.
0031*

0033

0034
0~35

0036
0037
0038
0039

0040
0041
0042

0043
0044
0045

SCHEDULER

THE CLOCK DRIVER IS THE CENTRAL POINT THROUGH WHICH CONTROL IS
PASSED TO THE SCHEDULER. ENTRY COMES TO THE DRIVER WHENEVER THE
CLOCK (REAL TIM~ SCALAR) INTERRUPTS. THIS EVENT OCCURS EVERY
100 MS. BESIDES GIVING CONTROL TO THE SCHEDULER, THE CLOCK
DRIVER ALSO HAS THE TASK OF UPDATING THE TIME OF DAY CLOCK.
THIS CLOCK IS A TWO WORD ENTRY WHOSE VALUE IS AS fOLLO~SI
DATI M8 24.0AY+HOUR
DATIM.t.600*MIN+10*SEC.36000

10024 000000
10025 072016
70026 034172
70021 026034
70030 062005
702131 010172

70032 034171
70033 000000
10034 036015

eL.KIN NOP
STA CTEMP
ISZ DATIM+l
JMP CLC0
LDA M36K
STA OATIM+l
ISZ DATIM
Clca

70035 026042
70036 060355

70037 072015
10040 062 0 16

NOP
ISZ X
JMP CLC1"'1
LOA ,-2
5TA X
LOA CTEMP

ENTRY POINT.
SAVE A.
BUMP 100M8 COUNTER
NO PROBLEM IF NO SKIP
RESET 100MS COUNTER,
BUMP HR COUNTER.
JUST IN CASE.

ENTER SCHEDULER THIS TIME1
NO
YES, RESET
RESET SKIP WORD

RESET A

0047., THE NEXT INSTRUCTION 15 NORMAL~Y A JHP. WHEN THE
0048. SCHEDULER IS RUNNING, HOWEVER, IT PREVENTS ITSELF
0049. FROM BEING REENTERED BY "INSERTING A NOP,

0051
0052
0054

70041
10042
70043
10044

0056

70045 026046

0053

0058.
0059.
0060.

000000
062016

103114
126024

70046 071224
70047 0024V10

0064

7005~ 072041
10051 062024
70052 071227

~071

111072

CLC2

NOP
tOA CTEMP
elF CLOCK
JMp ClKIN,I

RESET A
ALLOW ANOTHER CLOCK INTERRUPT,
RETURN,

JMP SCHED

USED TO INSERT IN CLC1.

THE SCHEDULER SECTION OF TSB DETERMINES WHICH
PROGRAM IS TO RUN NExT. FIRST IT CLEARS CLC1,
ALLOWING THE CLOCK TO CONTINUE INTERRUPTING.
,

0062
0063
0065
0066
0067
0068
0069
0070

CLCl

70053 103114
70054 075225
70055 001520

70PJ56 102201
70057 002004
7006", Ql71226

SCHEO STA AREG
CLA
STA CLe1
LOA eLKIN
STA PREG
eLKED elF CLOCK
STB BREG
ERA,ALS
sOC
INA
STA EREG

0kJ73

70061 064272

t DB MLINK+l

0074

70062 044341
70063 076020

ADS ... ?LINK
STB FMAIN

1ti075

SAVE A-REGISTER,
INSERT NOP IN CLCl TO PREVENT
REENTERING SCHED.
SAVE THE PROGRAM COUNTER
ALSO,
NOW LET THE CLOCK IN AGAIN,
SAVE 8 REGISTER,
E.REGISTER,
AND OVERFL.OW REGISTER.
GET POINTER
TO FLAG WORO

PAGE 0300 #25

SCHEDULER

LOA TIMEF
GET TIMER FLAG.
70064 060262
SZA
IF 0, THIS IS NOT A TIMED PROG.
0077 7°065 002002
ISZ TIMER,I
IF NOT 0, BUMP TIMER.
0078 70066 134057
0079 70067 026360
JMP 8CHl
If NOT OUT OF TIME, SKIP
ROTATING THE RUN QUEUE
0080*
0081*
AT THIS POINT WE HAVE DISCOVERED THAT THE PROGRAM THAT HAS
0082*
0083*
AE[N RUNNING HAS EXHAUSTED ITS TIME LIMIT. THE NEXT STEP IS
TO ADJUST THE QUEUE SO THAT THIS PROGRAM IS MOVED TO THE
0084*
BOTTOM, THIS IS ACcOMPLISHED BY DELETING THE PROGRAM
0085*
FROM THE QUEUE AND THEN REINSERTING IT WITH ITS NEW PRIORITY.
0086*
0076

t:llnlO"7--...

lCJKlO' ..

70070 V'164272
70071 et06004

0088
0089
0090
0091
0092

7007J 170001
70074 044356

~093

70075

1600~1

0094

70072

~60363

0~95

70076 070272
70077 116022

0096

7010{(t 017251

0097
0098*

701~"

0100*

0101.,.
0102*
0103

0104
~105

0106
0107
0108
0109

SCH3

026360

LDB
INS
LOA
STA
ADS
LOA
STA
JSB
JSB
JMP

MLINK+l
.+4
1,1

GET THE ADDRESS OF PRIORITY
FOR THE CURRENT PROGRAM,
SET IT TO LdW PRIORITY.

,+?LINK~?PLEV

1,1
MLINK+l
INSQA,I
SWAPR
SCHl

GET THE LINK FROM THE CURRENT
PROGRAM AND STORE IT IN MLINK+t
INSERT USER IN QUEUE
START EARLY SWAPPING
CHECK FOR COMMUNICATION
FROM 1/0 PROCESSOR

TEST fOR ANY TTV35 BUSINESS
70102
70102
70103
70104
70105
70106
70107
7"110

5tHS1 fQU •
064644

Ql76013
003400

050311
026271
050313
026222

SCH5

LDB
STe
eCA
CPA
JMP
CPA

DTTV0
TTYCK
T35F1
SCH15
T35F3

JUST fINISHED CHECKING TTYS
REINITIALIZE
POINTER
TEST FOR DRIVER BUSY
DRIVER IS BUSY,

.JMp sCH 16
COMMAND ENTERED BUT NOT STARTED
0110
0111*
0112. WHEN T35F1-0, THE CONSOLE IS QUIET SO WE CAN 00 LOGGING.

0113*
0114 70111 040304
0115 70112 050356
0116 70113 026126

0117*
011S.
~121

0122
0123
0124
0125
0126
0127

,,",128
0129

CPA .-1
.JMP SCH52

TEST FOR ANY ENTRIES ON MESSAGE
MESSAGE QUEUE EMPTy

oUTPUT AN ELEMENT OF THE MESSAGE QUEUE

0119*
0120

ADA MSQCT

70114
70115
70116
70117
70120
70121
70122
70123
70124
70125

0130.
v.l131 70126

070304
064305

044426
054307

064310
074305
1600~1

00 6 004
114760
026271

Sf A
LOB
ADB
CPB
LOB
STB
LOA
INB

MSQCT
MSQPl
.+MESLN
MSGND
MSQBG
MSQP1
B,I

.JSB TTY35, I

JMP SCH15
SCH52 E.gU •

DEcREMENT MESSAGE COUNTER
ADVANCE MESSAGE POINTER
If AT END OF BUFFER
THEN WRAP AROUND
SET UP NEW ADDRESS
GET ADDRESS AND
LENGTH OF MESSAGE
AND OUTPUT IT

PAGE 0301 #25
0132
0133

0134
0135.
0136*

SCHEDULER

70126 "'40772
70127 050356
70130 026222

121142
0143
°144
0145
0146

0147
0148

0149
0150
0151

0152
0153

0154
0155
0156
0151
0158

0159
0160
0161
0162

0163
0164
0165
0166

0167
"1168
0169

0170
flI171

0172
0173

0174
0175

0176
0177
0178
0179
0180

70131
70132
70133
70134
70135
10136
7 0 137

070772
060706
0020~4

050704
060702
07C't706
16 0 706

7014~

066006
70141 002020
70142 066007
70143 016212

70144
70145
70146
70147
10150
70151
721152

101052
010416
042010

072213
160706

010512

006400
10153 100400

70154 000371
70155 005127
10156 0A6011

70157 076215
70160 017063
7 0 161 072214
10162 034706
70163 160106
,0164 010416
7!a165 017063
70166 072221
70167 160706
70170 006400
70171 101025
70172 100400
7"173 000456
70174 174706
7 0 175 017 0 6 3
70176 072216
70177 160706
70200 017063
70201 072217
70202 060405

702"'3 066206
70204 114760
70205

~26271

0182

0183
0184
0185

JMP SCH16

T[8T FOR ANY tNTRIES IN LOGTABLE
LOG TABLE IS EMPTy.

SET UP lOG BUFFER

0137.
0138
0139
0140
0141

ADA LOGeT
CPA .-1

70206 1702~7
70207 025052

STA LOGCT
LOA LOGPl
INA

DECREMENT LOG COUNTER.
BUMP LOG POINTeR

CPA L.OGND

IF AT END,
WRAP AROUND.

LOA
STA
LOA
LOB
SSA
LOB
5T8

LOGBG
lOGPl

LOGPt,I
ASCIN
ASCfF
lOGBF+3

LSR 10

.AND
ADA
STA
LOA
AND
eLB
OIV

TEST FOR LOGON
OR LOGOUT.

SHIFT LOG CHAR TO LEAST 5 BITS •
MASK OFF OTHER STUFF,
CONVERT TO ASCII.

.+378
ASCBA
LOG8F+4
LOGP1,I
81777

GET ACCOUNT NUMBER AGAIN,
KEEP ONLY. PART,

.+10

GET 1ST 2 DIGITS IN AI LAST IN B

BlF,BLF
ADS ASC0B
STe LOGBF+6

SET UP LAST DIGIT AS
ASCII LEFT HALF.

.JS8 #L TEN

CONVERT FIRST"2 TO ASCII ALSO

STA
ISZ
LOA
AND
JSB
STA
LOA

eLB

LOGBF+5
LOGPl
LOGP1,I
.+318
lfiLTEN
lOGBF+10
LOGPt,I

NOW GET THE TIME.
GET TERMINAL NUMBER
CONyERT ANO STORE IN BufFER,

ASR 5

oIV 060

STe
JSB
STA
LOA
JSB
STA

LOG P1,I
NLTEN
LOG8F.7

SAYE SECOND HALF
CONVERT FIRST HALF TO ASCII.

LOGP1,I
,lTEN
LOGBF+8

CONVERT 2ND HALF TO ASCII,

LOA .+22

LOB LOGR2
SCH21 Jse TTYJ5,I

TO PRINT THE
STUFF.

JMP SCH15

SUP
LOGR2 OEF *+1,1
BUFFER ADDRESS
LOGBF ASC 11,**LOGOFF A123 0930 *01
UNS

(I.~PUNCH)

PAGe 0302 #25
B187*
0188*.
0189*
0190
0191
0192
0193

0194
0195
0196
0191

0198
0199*
0200*

SCHEDULER

TTY35 110 COMPLETE
10222
70223
7 0 224
10225
10226
70227
70230
70231
;0232

050312

SCHl6 CPA T35F2

0020~1

RSS

026271
060276
064300
050362
026254
002002
026271

JMP
LOA
LOB
CPA
JMP

SCH15
T35ST
T35PR
,OUTW
SCH23

SZA

JMP 5CH15

TEST DRIVER COMMUNICATE FLAG.

GET CONSOLE STATUS,
IF OUTPUT WAIT,
GO SET HIM UP,
IF NOT IDLE wEVE ALREAOy
QUEUfD HIM!

TTY35 INPUT COMMAND

0201*
0202
0203

70233 060301

0204

7~235

0205
0206
0207
0208
0209
0210
0211

70236 07 00 6 1

70234 el70060
t~60J02

70237 V)60417
10240 070064
7 0 241 017111
70242 026262

70243 026264
70244 026264

LOA
5TA
LOA
STA
LOA
STA.
J5B
JMP
JMP
JMP

121212*

0213* SET UP QUEUE ENTRY FOR

L-J214.

'f3582
SBHED
T35ND

SCHL
.... 408
SCHP
SCOM
8CH17
SCH18
SCHl8

POINTER TO FIRST CHARACTER
OF CONSOLE BUFFER,
POINTER TO ENO Of
CONSOLE BUFFER.
INITIALIZE COMMAND

HOL.DER,

GET COMMAND,
BLANK LINE
ERROR

ERROR

CONsoLE.

0223

721255 060361

0224

70256 070300
70257 064263
7 0 260 026077
70261 106056

LOA SBHEO
SET POINTER fOR
STA T35CP
T35CR.
LOA .... 408
SET UP THE LAST
STA T35LC
CHARACTER AS A BLANK
LOA #LIB*
SET RESTART ADDRESS.
STA T35RS
AOB SCH19
SfT PHOGRAM STATUS
seH23 srB T355T
TYPE.
LDA .+2
SET PRIORITY.
STA T35PR
LOB T35LN
GO INSERT IN QUEUE
JMP SCH3
SCH19 ASS .COM2+XSYNT_ •• 1

0229

70262

SCH17 LOA ONE!

0230
0231
0232

70263 002001

~233

70266 074312

0234
0235

70267 064636
70270 026204

13215

. 0216
0217

021tJ
0219
0220
0221

0222
0225
0226

0221

10245 060060

70246 070054
70247 060417

70250 070055
10251
70252
70253
70254

060606
070275
046261
074276

06~722

70264 ",60363
70265 006400

OUTPUT LINE FEED

RSS

seHl8 LOA .+4
CLB
STB T35F2
L080EH
JMP SCH21

OUTPUT ERROR MESSAGE

PAGE

#25

~J03

SCHEDULER

0237*

0238.
0239 70271

~17251

SCH15 JSB SWAPR

0240*
0241*
0242*

0244*
0245*
0246*
0247*
0249
0250
0251

0252
0253
0254

THE PROGRAM TO RUN IS AT THE HEAD OF THE QUEUE, ANO aWAPR HAS
GUARANTEED THAT IT IS IN CORE. THE FOLLowING SECTION OF CODE
SETS IT uP TO RUN, ANO ALSO SETS uP THE CLOCK DRIvER SO THAT
FUTURE INTERRUPTS WILL GO BACK INTO THE SCHEDULER,
70273
70274
70275
70276
70277

060272

LOA
ADA

0271
0272
0273
0274

0275
0276

0277
0278

0279
0280

0281
0282

0283
028 4
0285
·0286

STA

040356
164000

70300 044344

0266
0267
0268
0269
0270

INHIBIT INTERRUPT,
RESTORE A CJMP SCHED. IN THE
CLC1
CLOCK INTERRUPT ROUTINE.
MLINK+l
GET THE STATUS
.+1STAT-?lINK
OF THIS PROGRAM
A,I
AND CHECK TO SEE
.+,-xSyNT+COM2.COM3.t IF IT 18 TyPE III
.+1PLEV-?STAT

LDA CLC2

10301 040361
70302 006020
70303 026306
70304 006400
70305 174000
70306 040354
70301 164000
70310 ~06002
70311 075227
70312 006400
70313 1140021

0265

o

062045
072041

0256
0257
0258
0259 .
0261
0262
0263
0264

elF

70272 103100

0255

0260

CHECK FOR ANYTHING TO DO, IF NOT
SWAPR WILL GO TO 8CHi AGAIN,
IT WILL RETURN HERE Jf THERE IS
AN EXECUTABLE PROGRAM IN CORE,

70314 074262
70315 002004
70316 164000.
70317 0 .. 0355
70320 070057
70321 054364
7 0 322 03426 2
70323 040344
70324 064000
703 2 5 160001
70326 010520
70327 070203
70330 061226
7 0 33 1 10 3101
7 0 332 000036
70333 102101
70334 061224
70335 065225
70336 102100
70337 125227

LOB
ADB
ADA
SSB

SCH2

JMP SCH2
NOT TyPE 111
CLB
IT IS, SO SET THIS
STe A,I
USER'S PRlORITY TO ZERO
ADA .+?RSTR.1PLEV GET RESTART ADDRESS
LOB 0,1
IF NOT 0, PUT IT IN PREG
SZB
·TO START UP PROPERLY.
STB PREG
CLB
PUT 0 INTO TABLE IN ANY CASE
STB ~,I
STe TIMEF
SET TO SAY NO TIMING,
INA
GET PROGRAM STATUS.
LDB 0,1
ADA .... ?ClOC .. ?STAT
SET TIMER POINTER,
STA TIMER
CPS XSYNT+l
IF STATUS IS RUN, SET
ISZ TIMEF
TIHEFLAG FOR CLOCKING,
ADA .-?CLOC
SAVE FLAGS
LOB A
POINTER
LOA B,I
RESTORE
AND MBUST
DISC BUSY
STA ~BUSY
FLAG
LOA EREG
RESTORE E
CLO
AND OVERFLOW
SLA,ELA
REGISTERS,
STO
LOA AREG
RESTORE A AND
LOB BREG
B REG,
STF 0
ENABLE INTERRUPT AND
JMP PREG,I
TRANSFER TO PROGRAM,

PAGE 0304 #25

SCHEDULER

0288.

0289.*
0290.
0291
0292
0293
0294

0295
0296
0297
0298
0299
0300
0301
0302
0303

START OF SYSTEM
060362
102614
103114
206711
106712
103 4 5 060167
70346 003000
70347 001727

10340
70341
70342
70343
70344

TSB

70350 030222
70351 114736

70352 102311

LDA .+3
OTA CLOCK
8TC CLOCK,e
CLC CH2
CLC ?SC
L.DA NPORT
eMA
AlF,ALF
lOR INI
JSB S14SC,1
BFS CH2
JMP
8TC CH1,e

.·1

10353 026352
70354 103710

START CLOCK COUNTING IN
100 MS UNITS.
START CLOCK

A • NUMBER OF LEGAL PORTS • 1

PLUG IN INITIALIZATION COOl,
wE'RE STARTING
WAIT FOR 2114
TO FINISH

0304 70355 060365
LOA ,+6
START SYSTEM
LOB READY
TELETYPE BY OUTPUTTING
0305 70356 064265
0306 70357 114760
JSB TTY35,I
READy MESSAr;E~
0307.
0308.
THIS SECTION IS THE BEGINNING OF THE MAIN pART OF THE SCHEDULER. CONTROL ALWAYS COMES HERE TO EXAMINE THE TTQ UNTIL IT'S
0309*
0310*
EXHAUSTED, OR WHEN THERE IS NOTHING TO DO. SWAPR ALWAYS COHES
0311.
TO THIS POINT ~HEN THE QUEUE IS EMPTY OR THE FIRST PROGRAM ON
THE QUEUE IS ABSENT,
0312*
0313. THIS SECTION ACTUALLY PROCESSES A TTQ ENTRY, THERE ARE SEVERAL
0314* KINOS OF ENTRIES WHICH MAY BE CLASSIFIED AS FOLLOWS,
0315*
1) ABORT. THIS IS INDICATED By THE TELETyPE STATUS BEING"
0316.
0317.
-1. THE ACTION TAKEN IS TO STOP THE PROGRAM (IF IT IS
IN THE QUEUE), AND TO INITIATE THE ABORT MESSAGE.
031S*

0319*
0320*
0321.
0322*
0323*
0324*
0325.
0326.
0327.
0328.
0329*
0330*
0331*
0332*
0333*
~334*

2) OUTPUT TERMINATE • THIS IS INDICATED By THE STATUS BEING

XOUTW. THE TTQ ENTRY REALLY MEANS THAT THE OUTPUT BUFFER
IS ALMOST EMpTY. THE PROGRAM IS pLACED 8ACK ON THE QUEUE
ACCORDING TO ITS PRIORITY,

3) INPUT • THIS IS INDICATED By STATUS BEING IINPT, IT INDI-

CATES THAT A USER PROGRAM OR SYSTEM PROGRAM THAT HAS
REQUESTED INPUT HAS GOTTEN IT. THE PROGRAM IS PLACED IN
THE QUEUE.

4) COMMAND • WHEN STATUS IS XIDlE, EITHER A COMMAND OR
A SYNTAX STATEMENT HAS BEEN ENTERED, THESE CAN eE DISTIN.
GuISHED By THE FIRST NON BLANK INPUT CHARACTER, WHICH IS
A DIGIT ONLY IF SYNTAX HAS BEEN ENTERED,

1r1336*

5) DISCONNECT e THIS IS INDICATED By STATUS BEING XDISC.
THE ACTION TAKEN IS TO CALL THE BYE ROUTINE

0337.
°338*
0339*
034"*

6) ENTER TIMEOUT ~ THIS IS INDICATED BY THE STATUS 8EING
IENTO. THE RESTART ADDRESS IS BUMpED AND THE PROGRAM IS
PLACED ON THE QUEUE.

0335.

~341·

0342
(11343

7036~

102100

70361 A66013

SCH1

STF 0
LOB TTYCK

PAGE 0305 #25
0344
0345
0 34 6

SCHEDULER

0351

70363
70364
70365
10366
10367
7037et
70371

0352
0353

70372 044333
70373 103100

~354

70374
70375
70376
70377
70400
70401
70402
70403
70404

"341
""348

0349
ItJJ~0

0355
0356
0357
0358
0359

0360
0361

0362
0363
0364
0365

0366
0367
0368
0369

0370
0311
0372
0373*
0374*

HAVE ALL TELETYPES BEEN CHECKED?
YES
LOA 1,1
LOAD STATUS FOR THIS USER
ADB .+TTY0t-TTY00 GfNERATE ADDRESS FOR NEXT
STB TTYCK
USER
AND COM14
COMMUNICATION FROM 21141
SlA,RSS
SKIP IF SO
JMP SCHl
NO •• CHECK NEXT ONE
ADB .+TTY00-TTYBl MOVE ADDRESS BACK TO THIS u

CPS OTT32
JMP SCHSt

70362 054642

026102
160001
"44403
~7601J

"'10462
et020~J
02636~

elF 0

XOR
STA
STB
ADB
STB
ADB
LOA
ADA

1,1
CLEAR
t,I
COM14 BIT
TTQ
SAVE TABLE ADDRESS
STORE 10
.+11D
SCHIO
ADDRESS
.+?STATp?ID
1,1
A-STATUS
.-4
MAKE SURE
SSA,RSS
STATUS<4
JMP SCH1
IGNORE OTHERwISE
ADA •• 2
BRANCH TO SECTION
JMP 0,1
TO HANDLE REQUEST
OEF •• 8
JMp 9CH4
ENTER TIMEOUT
.JMP SCH8
DISCONNECT
ABORT
JMP SCH7
JMP SCH6
COMMAND
.]MP SCH5
ABORTING
NOp
INPUT

120001
170001
074062
044364
07 4 063
044367
160001

040353
002021

70405 026360
10406 042410

704,,7 124000
70410 07042 0
70411 026527
70412 026512
70413 026431
70414 026533
7 0 415 0261°4
70416 000000

COOF TO HANDLE INPUT OR OUTPUT.

0375.
0376 70d17
~377
7121420
0378 70421
0379 70422
0380 70423
0381
70424
0382 70425
0383 70426
0384 70427
0385 7043~

044361
160001
044355
170001
102100
044361
002400
170001

ADB
SCH51 LOA
ADB
srA
STF

.+?PLEV-?STAT
1,1
GET ACTUAL STATUS
.+?STAT.?PLEV
t,l
sET ACTUAL STATUS
'"

ADS .+?PlEV~?STAT

CLA
SET PRIORITY TO B
STA 1,1
ADS .+?LINK.?PLEV
JMP SCH3
GO INSERT USER IN QUEUE

~44356

026077

0386*

0387*

CODE TO HANDLE ABORT

0388.
0389 70431 102100
0390 70432 006004
0391
70433 017610
0392 70434 06 4 062
0393 70435 060417
0394 70436 003000

0395
0396
0397

70437 1031"'0
70440 110001
70441 170001

0398
0399

70442 006004
70443 16tH~01.

SCH7

STF
INS
JSB
LOB
LOA
eMA

elF

0
DEQUE
TTQ
OUTWT

S·:'LINK
REMOVE USER FROM QUEUE.
CLEAR
OUTPUT

~

AND 1,1
STA 1,1
INB
LOA B,1

WAIT

BIT
GET TTY NUM8.ER

PAGE 0306 #25
0400
0401
0402
~403
~404

040~

SCHEOULER

7Q1445
10446
10447
7045Q1

114136
044356
0606A2

110001
70451 002003

0406
0401
0408
0409
0410
0411
0412
0413
0414
0415
0416

10452 026413
70453 060377
10454 130001

0417

044356
042021
160000
170001
044361
026017

0418
0419
0420
0421

0422
0423
0424

0425

lOR KAO
JSB 514SC,1
AD8 .-1
lOA OFtHK
AND t,I
SZA,RSS

70444 030235

.JMP sCH15

LOA
lOR
STA
STF
ADB
CLA
STA
ADB
LDA
STA
ADB
ADA
LOA
STA
ADB
JMP

70455 170001
70456 102100
70457 044316
70460 002400

70461 170001
70462
70463
70464
70465
10466
70467
70470
70411
70472
70473
70413
70474
70475

044355
060370

170001

044314
170001
116023

0426
0427*
0428 70476 054253
0429 70477 017227
0430 70500 064062
0431 70501 060347
0432 70502 ~17073
0433 70503 006412
0434 70504 051524
705~5 047520
0435
70506 006412
-043 6
70507 06 40 6 2
0437 70510 ~17711
0438 70511 026360

UNABT
B,1
8,1

KILL OUTPUT

NEED TO UPDATE CHANGE DATE,
NO
YES
DISALL.OW
ABORTS

0

.+?PLEV

B,l

SET PRIORITy TO 0

•• ?STAT.?PLEV
.+ISyNT~.+1+UCDA8.COM2

B,1
SET STATUS TO LAST CHANGE DATE
.+?RSTR-?STAT
XCOM5
FIND POSITION IN TABLE
A,I
GET RESTART ADDRESS

B,l

SAVE IT

.+?LINK_?RSTR
SCH3
GO INSERT IN QUEUE
SCH75 EQU •
SET STATUS
ADS .+18TAT
STA 1,1
JSS TRNFP,I
CLEAR PBFLG & CBFlG 8ITS

cpa PRIST
JSB SCLPR
LOB TTQ
LOA .",,8
JSB TyPE
OCT 6412
Ase 2,STOP
OCT 6412

LOB TTQ

AND TELL OTHER MACHINE.
USER HAVE LP?

YES,
NO. PRINT ABORT
MESSAGE
CRLF
CRL.F

SCRATCH If $HELLO IS RUNNING

JS8 HTEST
JMP SCH1

~439.

0440*.

CODE TO SET uP FORCED DISCONNECT

0441.
0442 70512 044360

0443

70513 017610

0444
044 5
0446
0447

70514 064062

70515 060377

~448

70516 030476
70517 030502
70520 003000

0449
0450
0451

70521 110001
70522 170001
70523 102100

0452

70524 060~01
70525 040373
70526 026766

0453
0454

SCH8

ADS

JSB
LOB
LDA
lOR

.+?LINK~?STAT

DEQUE

TTQ
UNABT
ABTRY
lOR DFCHK

REMOVE FROM QUEUE
CLEAR

ABORT

CMA

AND 1,1
STA 1,1
STF 0

fLAGS

LOA 1

ADA .+?RSTR
JMP SCH61

GO SET UP STARTING INFO.

PAGE 0307 #25
0455.
0456.
0457*
0458
0459
0460
0461
0462*
0463*
0464.
0465.
0466
0467
0 4 68
0469
04 7 0
0471
0 4 72
0473
0474
0475.
0476*
0477*
0478.
0479
0480
0481
0482

0483
0484
l1485
0486
0487
0488
0489
0490
0491
0492
0493

0494
~4g5

0496

SCHEDULER

CODE TO HANDLE ENTER TIMEOUT
70527 044356

70530

70531 ~44362
10532 026420

",500

051211
0502

0503
0504
0505
0506
"'507
0508
0509

",510

ADB
ISZ
ADB
JMP

.+?RSTR-?STAT
1,1
BUMp RESTART ADDRESS
.+?pLEV.?RSTR
SCH51
GO RESTORE STATUI

CODE TO HANDLE COMMANDS.
70533 102100
70534 0 02 400

SCH6

7°5 3 5 07 00 6 0
70536 ~70064
7°537 017 1 11
70540 026566

SYF '"

CLA
STA SBHED
STA SCHP
.ISB SCOM

JMP seHle

705-41 0265 44
10542 026611
10543 026623

JMP SCH9

JMP EHERR

JMP SCH11

FLAG BUFFER HEAD TO
SAY BUFFER IN 2114
INITIALIZE TO HOLD CHARACTERS
INTERPRET COMMAND
EM-PTy LINE.
FIRST CARACTER A DIGIT
INVALID COMMAND.
COMMAND IS OK.

THE FIRST CHARACTER·IS A DIGIT. THIS MEANS THE LINE
WE HAVE TO QUEUE IT AS SUCH,
70544 064062
7054b 060612
70546 003000
70547 110001

70550 170001
70551 044316
70552 002400
70553 150063
70554 026627

70555 17121001
70556 044354
70557 060446

70560 170001
70561 044360

70562 060363
70563 170001
70564 00601214
70565 026017

0497.
0498
0499

SCH4

lJ40~1

70566 064062
70567 060361
7121570 110001
70571 006004

7k1572 002003
70573 026603

70574 160001
70~75 030215
70576 114736
70577 160001
7060~

030236

706"'1 114736
70602 026360

SCH9

TTQ
LDA PUALT

IS SyNTAX AND

LDB

CMA

AND
STA
ADS
CLA
CPA
JMP
STA
ADB
LOA
STA
A.OB
LOA
STA
INS
JMP

B,I
B,I
,+?PLEV

REMOVE
PROGRAM
UNALTERED
FLAG
B•• PRIORITY
SET PRIORITY TO 0
IF NO ID, GO LOG IN,

SCHID,l
SCH25
1,1
,+?RSTR-?pLEV SET UP STARTING ADDRESS
SYNTA
FOR SYNTAX
1,1
.+?STAT~?RSTR

XSYNT
1,1
SCH3

SCH30 LOB TTQ
LOA TAP~F
AND B,I
INS
SZA,RSS
JMP SCH31
LOA 1,1
lOR GTC
JSB S14SC,I
LOA 1,1
lOR ALI
JSB 814SC,I
JMP SCH1

SET STATUS TO
SyNTAX,
GO INSERT IN QUEUE.
TEST FOR TAPE MODE IF NULL LINE,

NO TAPE • GO EMIT LINE FEED
SPACE.

PAST

CARRIAGE RETURN
INFORM 2114
THAT MORE INPUT

IS ALLOWABLE

PAGE 0308 #25

SCHf::DULER

0511*
IF USER HAS LP,
0512 70603 054253 SCH31 CPB PRIST
1a513 70604 017227
JSB SCLPR
REL..EASE IT
OUTPUT A LINE FEED.
70605 060371 SCH20 LOA .+12B
~514
LDB TTQ
0515 70606 rtJ6 4 062
JSB DUTCH,1
0516 70607 114724
JMP 5CHl
0511 70610 Pl26360
0518*
0519. COME HERE WHEN ANY ILLEGAL INPUT IS FOUND.
0520*
0521 70611 064062 EHERR LOB TTQ
",01..::.." 005004
INB
0522 '''''VIr..
CPB PRIST
IF USER HAS LP,
0523 70613 054253
0524 10614 017227
.JSB SCLPR
REL.EASE IT
LOA .-6
0525 70615 060351
JSB TYPE
0526 7~616 017073
0527 70617 005077 E.H
(111)
OCT 5077,37477,6412
7062~ 037477
70621 006412
JMP 5CH1
0528 70622 026360
0529.
~530*

0531*
0532
0533
0534
0535
0536
0537
05 3 8
0539

~54"

0541
0542
0543
0544
",545
~546

~547

0548
0549
0550
~551

H552
~)553

~554

0555

21556
0557
fl)558

0559

COME HERE WHEN A LEGITIMATE COMMAND IS fOUND

10623
70624
70625
10626
70627
70630
70631
70632
7063:3
70634
10635
10636
70637
70640
70641
70642
70643

160063
002003
056642
026644
060337
017013
005120
046105
040523
042440
046117

SCH11 LOA SCHIO,I

SZA,RSS
cpa HI

PRoCESS COMMAND ONLY IF
10*0 OR
HELLO cOMMANO.

JMP SCH22
SCH25 LDA ... 16

PRINT LOG IN MESSAGE
JSB TyPE
OCT 5120
LF-P
Ase 6,LEASE LOG IN

~43440

044516
006412
026360
071750
071734
10644 064062
'0645 1600~1
70646 010367
70647 ~02003
70650 026671
70651 "'06004
70652 160001
70653 030233
70654 114736
70655 102311
70656 026655
70657 102511
70660 rfl02002
70661 026611
7056? 103100
70663 0443 56

HI

OCT 6412
JMP 5CH1
OfF HELLO

DTAPR OEF CTAPR
SCH22 LOB TTQ
LDA 1,1

AND TAPEF

rAPE
MODE?

SZA,RS5

.JMP SCH24
INB
LOA 1,1

lOR ILl

.JSB 5145C,1

SFS CH2
JMP .-1
LIA CH2
SZA

JMP E:HERR

elF

(21

AD8

_-1

NO
YES .... CHECK
FOR ADDITIONAL
INPUT
WAIT FOR
ACKNOWLEDGMENT

ILLEGAL INPUT?
YES
NO

PAGE 0309 #25
0560

0561
0562
0563
0564

0565
0566

0567
0568
0569

0570
0571
0572
0573

SCHEDULER

10664 060367
10665 003000
70666 110001

70667 170001
70670 102100
70671 160064
70672 053750
70673 026707

70674 053724
70675 026707
70676 053751
70677 026707

70700 160001
70701 010360

0574 70702 002003
0575 70703 026713
0576*
0~77
70704 062643
0578 70705 070064
0579 70706 026713
0580*
0581 70707 060360
0582 70710 003000
0583 70711 110001
0584 7 0 712 170001
0585 70713 044365
0586 70714 160001
0587 70715 002021
0588 70716 026732
ra589 70717 160064
0590 10720 053143
0591 70721 026746
0592 10722 053744
0593 70723 026746
~594
70724 053730
0595
70725 026746
0596 70726 053731
0597 70727 026746
0598 70730 053732
0599 10731 026746
0600.
0601 70732 064064
0602 70733 046004
0603 70734 006021
0604 70735 026756
0605 70736 060062
0606 70737 002004
0607 7074'" 050253
0608 70741 ·017227
~609
70742 ~64064
el6121
70743 0 4 6745
0611 70744 124001

LOA TAPEF
CMA
AND 1 , I
STA 1 , I
STF 0
SCH24 LOA SCHP,I
CPA HELL.O
JMP SCH27
CPA seR
JHP SCH27
CPA BYE.
JMP SCH27
LOA 1,1
AND TERR
SZA,RSS
JMP SCH26
LDA DTAPR
STA SCHP
JMP SCH26
SCH27 LOA TERR
CHA
ANO 1,1
STA 1,1
SCH26 AD8 ,.?NAME
LOA 1,1
SSA,RSS
JMP SCH28
LDA SCHP,I
CPA SAVE
JMP SCH29
CPA CSA\'
JMP SCH29
CPA LIS
JHP SCH29
CPA PUN
JHP SCH29
CPA XPUN
JMP SCH29

CLEAR
TAPE.

FLAG
TEST FOR HElLO,BYE, OR 8CRATCH
OK TO PROCEDE IF ANy

OF THESE.

TEST FOR ANY TAPE ERRORS,
NO TAPE ERRORS •• CONTINUE.
OTHERWISE, SET UP FOR EXEC·uTION OF TAPE ERROR
PRINTOUT ROUTINE,

IF HELLO, BYE OR SCRATCH,
CLEAR TAPE

ERROR BIT
AND PROCEED

TEST FOR
RUN-ONLY PROGRAM,
NOT RUN.ONLY.
IF RUN-ONLY, DON'T
ALLOW THESE
COMMANDS.

0612

70745 100102

SCH28 LDB SCHP
ADB MCOM2
TEST fOR TYPE I COMMAND,
SSB,RSS
JMP SCH12
NOT TYPE It
LOA TTQ
INA
•• TyPE I COMMAND
**
CPA PRIST
IF USER HAS LP,
JSB SCLPR
RELEASE IT
LOB SCHP
COMPUTE STARTING ADDRESS
AOB *+2
FOR COMMAND PROCESSOR
JHP B,I
AND GO THERE
OfF COMS-COMi,I

0614

70746 060345

SCH29 LDA .'l1li10

0615
0616

0617
0618
0619

7074.7
70750
7 0 751
70752
70753
71(1754
70755

017073
005122
05251 6
020117
047114

JSB TYPE
OCT 5122
ASC J,UN ONL

054415

OCT 54415

026605

JMP SCH20

0621*
TypE II AND III
0622*·
0623.
0624 10756 ~44364 SCH12
0625 70157 060062
0626 70760 040374
0627 70761 174000
0628 70762 040356
0629 7"'63 044344
0630 10764 006020
0631 721765 026777
0632 7~766 064606 SeHel
(iJ633 70767 174000
0634 70770 064361
0635 70771 040362
SCH!4
0636 70772 1740e0
0637 70773 "'07400
0638 70774 044000
0639 70775 026077
0640 70776 072037
0641
70777 046776 SCH13
0642 7100~ 164001
0643 712101 174Q100
1tt644
71002 006404
",645 71003 026771
0646.
~647 • "SCRATCH" COMMAND
• ",648.
",649
71004 064062 #SCR
0650 71005 017007
0651 71006 026605
0652.
0653 71007 000000 StRAT
~654
71010 060612
0655 71011 003000
0656 71012 110001
0657 71013 t70001
0658 71014 060726
0 65 9 71015 054255
0660 71016 070056
0661
71017 044363
0662 7102V1 17~001
0663 71~21 044361
0664 71~22 002400
~665

0666
0001*

71023 17"'001
71024 127007

y.CR

COMMANDS

A08 XSYNT+1

DETERMINE PROGRAM STATUS.

LOA TTf.J

ADA .+18TAT
518 0,1

ADA .+?RSTR.?STAT A8>RESTART ADDRESS
Aoe .+ •• XSyNT+COM2.COM3-1
TyPE II OR III 11

sse

JMP SCH13
LOB #LIB#
5T8 0,1

LOB
ADA
STB

eeB
Aoe
JMP
OfF

ADB
LDB

TYPE II COMMAND
TYPE III COMMANDS HAV~ A STANOARD STARTING ADDRESS AND
.~2
PRIORITy 2.
,+?PLEV.?RSTR
0,1
GET LINK POINTER IN 8 AND GO
0
TO INSERT INTO QUEUE.
5CH)
COM3+COM5 w COMl
.-1
GET STARTING ADDRESs FOR TyPE
1,1
II COMMANDS,

5TB r;,,1

CLB,INB
JMP SCH14

GO SET PRIORITY TO 1

LOB TTQ
JS8 SCRAT
JMP SCH20

S.,..TTY TABLE.
PERFORM SCRATCH FUNCTION.
TERMINATE,

NOP
LOA PUALT
eMA
AND B,1

SCRATCH A PROGRAM (S_>USERS TTY)
REMOVE

STA B,I
LOA PBUFF
CPB MAIN
STA PBPTR
ADB
ST.
ADa
CLA
STA
JMP

.+?PROG
1,1

PROGRAM

uNALTERED
FLAG
IF MAIN.B, SET PBPTR I

S•• PROGEND
RESET TABLE(PROG)
.+?NAM~.?PROG
CLEAR
PROGRAM NAME
t,l

seRAT,1

PAGE 0311 #26

SCHEDULER

0002. "TAPE" COMMANO
0003*
0004 71025 103100 *TAp
0005
71026 064062
0006 71&')27 006004
0007 71030 16012101
0008 71031 03121252
0009 11032 114736
0010 71033 103100
0011 71034 102311
0012 71~35 021034
,.\YJoJV
0013 "'4II'!I~£
102511
0014 11037 002003
0015 71040 027051
0016 71041 060345
0017 71042 017073
0018 71043 005111
0019 71044 046114
71045 042507
71046 040514
0020 11047 006412
0021 7105~ 02 6 3 6 0
0022 71051 ~64062 #TA P1
0023 '1052 160001
0024 71053 030367
0025 71054 170001
0026 71055 102100
0027 71056 006004
0028 71057 160001
0029 71060 030232
0030 71061 114736
0031 71062 0266Qt5
1c1032.

"033*
0034
0035
0036
0037
0038
0039
0040

..

71063 000000
71064 006400
71065 100400

elF
LOB
INS
LOA
lOR
JS8
elF

0

TTQ

B,l
WTP
S14SC,I
0

SFS CH2
JMP ··1
LIA CH2
SZA,RSS
JMP *TAPl
LOA .-10
JSB TYPE
OCT 5111
ASC 3,LlEGAL

OCT
JMP
LOB
LOA
lOR

6412

SCHI
TTQ

1,1
TAPEF

STF

INS
LOA
lOR
JSB
JMP

"1 , I

OK

LF, I

CR, LF
PRINT MESSAGE & TERMINATE,
B _lit FLAG wORD
SET TAPE BIT

TELL

TPO

S14SC., I

SCH20

cLe

DIV .+10
ALF,ALF
ADA 1

ADA ASC00
JMP #LTE.N,I

71072 127 0 63

TYPE *1,

STA 1, I

!f#LTEN NOP

71066 000371
71067 001727
7107121 040001
71071 040530

B -> ?FLAG
Sa> ?TNUM
.a 1TNUH
ASK WHAT TYPE.

2114

TERMINATE.

*

CONvERT A FROM 1.99 TO ASCII.
GET FIRST D1&IT IN A,
SECOND IN B.
POSITION FIRST ON L.EFT,
ADD IN SECOND,
ADD IN ASCII BITS,
RETURN.

0042*
TypE
0043*·
0044*
0045.
0046. lyPE SENDS AN ENTIRE STRING TO A TELETyPE, IT IS CALLED AS FOllOwS
0047·
A.·'OF CHARS-~MUST END ON RIGHT HALF OF WORD
0048*
..TS8 TYPE

0049.
RETURN
0050*
0052
0053

71073 000000
71074 073110

TYPE

NOP
STA TYPEr

SAVE COUNTER

PAGE 0312 #26

SCHEDULER

0~54

71075 163073

0055
0056

71076
71077
11100
71101
71102
71103
71104

0051
0058
0059
0060
0061
0062
0063

0064
ge65
0067.
0068*.

067110
006011
001727
004S10
037073
064062
114124

,1105 A37110
71106 027075

71107 127013
71110 000000

TYPEL LOA TYPE,I
LOB TYPET
SL8,RSS
ALF,ALF
SL.B

ISZ
LOB
JSB
ISZ
JMP
JMP
TYPET NOP

TypE
TTQ
OUTCH,l
TYPET
TyPEL
TYPE,l

GET WORD CONTAINING CHAR,
GET COUNT IN 8,
IF COUNT IS EVEN, TAKE HIGH
CHARI
IF COUNT IS ODD,
BUMp TypE.
OUTPUT CHARACTER TO TTY
ANY MORE?
yES.
NO,

seoM

0~69.

0070* seOM SCANS A COMMAND INPUT BUfFER TO DETERMINE WHAT
0071* THE COMMAND IS. THE CALLING SEQUENCE TO SCOM lSI
0072*

0073*
0074_
0075*

0016.
0017",

JSB SCOM

FIRST CHARACTER A DIGIT>
NO LEGAL COMMAND>
COMMAND FOUNE-~8.COMHAND ADDRESS>

0078*
0079* SCOM ASSUMES THAT BEFORE IT IS CALLED, SBHED AND
0080* SCHL ARE INITIALIZED AS REQUIRED BY SCHAR"
AND

0081* SCHPa0 FOR NORMAL USERS AND OCT40 FOR CONSOLE,
0083
008 4
0085

0086

0fd87

0088
0089
0090
0091
0092
009 3
0094
0095
0096
0097
0098
0099
0100

71111 000000
71112 064354

71113
71114
71115
71116
71117
71120
71121
71122
71123
71124
71125
71126
71127

074065
0175410
127111
037111
042001
002020

ADA .-10

0107

ENTRY poINT,
INITIALIZE CHAR, COUNT TO .3
GET A CHARACTER.
NOT THERE_BLANK LINE,
BUMP SeOM TO POINT AT DIGIT RET.
TEST FOR FIRST CHAR A DIGIT,
AUTOMATIC FAILURE IF
< ASCB

002021

SSA,~SS

027136

JMP SCOME

06 4 06 4

IF <-ASC9, RETURN TO P+2 IF A
DIGIT, P.3 IF NOT

L,08 SCHP
SZB

CONS-OLE?

71143

0105

0106

SCNT
SCHAR
SCOM,I
SCOM
M60B

ISZ SCOM

0109

0104

STB
JSB
JMP
ISZ
ADA
SSA

040345

0108

0102
0103

Nop
LOB •.• 3

031111

006002
127111
71tJ~ 064062
71131 006004
71132 160001
71133 030245
71134 114736
71135 127111
71136 037111
71137 042002
7114t1 002~21
71141 127111
71142 040411

0101

SCaM

002~20

JMP SeOM,I
. LOS TTQ
INS
LOA 1,1
lOR BKS
JSB 8148C,1
JMP SCOM,I
SCOME ISZ SCOM
AOA M41B
SCOMR SSA,RSS
JMP SCOM,I
ADA .+328
SSA

YES
NO
TELL 2114

TO BACKSPACE
TEST fOR LETTER,
NOT AlETTER,

PAGE 0313 #26
1tJ110

0111
0112
0113

0114
0115
0116
0117
0118
0119

0120.
12'~' .......
0122.
~14C;;~W-

~123

0124
0125
0126
0121
0128

0129
0130
0131
0132
0133

0134
rdlJ5

0136

0137
0138

SCHEDULER
JMP SCOM,l
lOR SCHP
ISZ seNT
ALF,SlA,RAL
JMP SCOMA
5TA SCHP
JSB SCHAR
JMP SCOM,1
AOA M133B
JMP SCOM8

11144 121111
71145 030064
71146 034065

11147
71150
11151
71152
71153
71154
71155

001732
027156

070064

011540
127111
042003
027140

NOT A LETTER.
TEST fOR 3 LETTERS I~.
NO •• ROTATE FOR NEXT ONE.
YES~~GO TO SEARCH TABLE.

GET NEXT CHARACTER
FAIl..

SEARCH COMMAND TABLE
71156
71157
71160
71161

064746
002020
044431

150001

71162 021167
71163 054750

71164 127111

71165
71166
71167
71170
71171
71172
71173
71174
71175

~06004

021161
037111
2174064
017540
021176
'150434

SCOMA

LOB seOMI

e.)ltTABLE

5SA

ADB .... COM4 .. COMl
SCOMD CPA 1,·1
JMP SCOMC
COMMAND FOUND
CPB SCOM5
JMP seOM,l
ILLEGAL COMMAND

INS

JMP SCOMD
seOHC ISl SCOM
STa SCHP
JSB SCHAR
JMP *.4
CPA .... 55B
RSS

0139

002001
02 7 171
11176 C?l64064

LOB SCHP

0140

71177 121111

JMP SCOM,I

JHP

··4

RETURN O,K.

SAVE ADDRESS OF COMMAND.
SCAN

FOR CR

OR DASH.

PAGE 0314 #26
0142"
0143 ••
0144 •••
0145*.
0146.
01~7"

0148 ••
0149·
0150.
0151.·
0152.
0153*

0155
~156

0157

SCHEDULER

RELEASE LINE PRINTER

SCRLP. USER BUFFER MAy BE FULL
MLINK+l • POINTER TO USER
SCLpR - USER BUFFER EMpTY
TTQ • POINTER TO USER
71200 000000
71201 064272

0158
0159
0160
0161

71202 044341
11203 077246
71204 060351
71205 073247
11206 063245

~162

71207 073250

~163

71210 163250
71211 PJ01727
71212 0672 .. 6
71213 114724
11214 163250
71215 067246
71216 114724
71217 037250
7122k't 037247
71221 027210
71222 06024,3

0164

0165
0166
0167
0168

0169
0170
~171

0172
0173
017 4
0175

0176

0179

71227 00"000
712J~ 060343
71231 017073
11232 011423
71233 005114
71234 050040
712J5 043122

0184

0185
0186
0187
0188
0189
~190

0192
0193
0194

71236 0425rt'5
71237 006412
71240 060243
71241 114736
71242 002400
71243 07025 3
71244 127227

71245 071232
71246 000000
71247 000000

STB RI.PFW
LOA ._6
STA RLPCT
LDA LPMES
STA RLPTR
LOA RLPTR,1
ALF,ALF
LOB RLPFW

JS8 OUTCH,I

LOA
LOB
JSB
ISZ

RlPTR,I
RlPFW
OUTCH,I
RlPTR

ISZ RLPCT

JMP
LDA
JSB
ClA
STA
JMP

71225 070253

71226 127200

0183

RLP

71223 11 4 736
71224 002400

0177

0180
0181
0182

SCRLP NOP
LOB MLINK+1
ADS ,_?L..INK

RLP
LPD
S14SC,I

PRIST
SCRLP,I

INITIALIZE
POINTER TO
USER'S Fl.AG WORD
SET COUNTER

INITIALIZE POINTER
TO MEsSAGE BUFFER
LOAD NEXT WORD FROM THE BUFFER
A-LEFT CHARACTER
III> FLAG WORD
OUTPUT CHARACTER
A-RIGHT CHARACTER
a>FLAG WORD
OUTPUT CHARACTER

INCREMENT POINTER
DONE?
NO
yES, TELL 1/0 PRoc£seOR

TO REMOVE USER FROM LP

REMOVE. USER FROM
SYSTEM INDICATOR

SClPR NOP
LDA .-12

JSB TYPE
LPM

OCT 11423
OCT 5114
ASC J,p FRE.E
OCT 6412
LOA

LPD

JSB S148C,1
CLA
STA PRIST
JMP SClPR,I
LPMES OfF LPM
RLPFW ass 1
RLPCT 8SS 1

A ... # OF CHARACTERS
OUTPUT MESSAGE
X-OFF, X-OFF
IF, L

CR, LF
TELL 1/0 PROCESSOR TO
REMOVE USER FROM LP
REMOVE USER FROM
SYSTEM INDICATOR

PAGE 0315 #26
0195

SCHEDULER

71250 000000

RLPTR

ass

1

PAGE 0316 #26

SCHEDULER

0197.

fa19tJ**
0199***
SWAPR
0200**
0201.
0202* THE swAPR ROUTINE IS CALLED FROM VARIOUS POINTS IN THE SCHEDU~ER
0203* IN ORDER TO DETERMINE IF A PROGRAM IS READY TO RUN, IT IS ALSO
0204. CALLED WHENEVER THE QUEUE IS UPDATED. THE FUNCTION OF SWAPR IS TO
0205* DETERMINE IF THERE IS • PROGRAM ON THE QUEUE, AND IF 80, IS THE
0206* PROGRAM AT THE HEAD OF THE QUEUE READY TO RUN. IF SAID PROGRAM IS
0207* NOT READY, SWAPR INITIATES THE NECESSARY DRUM TRANSFERS, SWAPR IN0208* DICATES WHETHER A PROGRAM CAN8E RUN OR NOT AS FOLLOWS:
0209*
0210*
READY
: NORMA.L RETURN
0211*
NOT READYs TRANSFER TO 8CH1
0213

71251 000000

0217
0218

71252
11253
71254
71255
71256

0214
0215
0216
0219
0220

0221
0222
0223
0224
0225
0226
0227
0228
0229
~230

0231
0232
0233

0234

0235
0236
0 23 7
0238
0239
0240
0241
02412

060203
002f'20
Pl26360
066017
006002

71257 0121324
71260 066020

71261 006003
71262 027216
71263 060520
71264 003000
71265 103100
11266 112 0 2"
71267 064203
71270 006002
71271 030520
71272 172020
71273 1021~0

71274 006400
71275 076020
71276 064272
71277 054271
71300 026360
71301 060313
71302 050356
71303 027335
71304 060772
71305 030311

0243

71306 054263
71307 002003

0244

71310 021335

0246
0247

71313 040440

0245
0248

71311 060276
71312 003004

0249
0250

71314 002020
71315 027335
71316 017610

0251

71317 060276

SWAPR Nap
LOA MBU8Y
SSA
JMP SCHI
LOB SMAIN
SZB
JMP SWAP5
LOB FMAIN
SZ8,RSS
JMP SWAP?
LOA MBUST
eMA
elF 0
AND FMAIN,1
LOB MBUSY
SZB
lOR MBUST
STA FMAIN,I
STF ~
CLB
S18
SWAP7 LOB
CPS
JHp

FMAIN
MLINK+l
HlINK
SCHl

LOA T35F3

TEST FOR
DISC BUSY
WAIT FOR TRANSFER COMPLETION

WAS SWAPR DOING A TRANSFER?
YES, GO CHECK SUCCESS
NO, HAVE WE SAVED
DRIVER FLAGS FOR THIS USER1
YES, DON'T SAVE CURRENT ONES
NO, SAVE DISC

"NOT BUSy"

FLAG IN
THIS USERfS

FLAGS WORD
sAy DRIvER
FLAGS SAVED
GET FIRST QUEUE ENTRY
TEST FOR QUEUE fMPTY.
EMPTY.wNOTHING TO Do.
HAS A COMMAND BEEN
ENTERED BUT NOT STARTED?
YES • GO START IT

CPA .-1
JMP SWAP4
LOA lOGCT
NO, IS THERE
lOR 135Ft
CURRENT OR
CPB T35lN
IMMINENT
SZA,RS8
OUTPUT TO TTY35?
JMP SWAP4
NO
LOA T358T
GET THE STATUS
CMA,INA
ADA .+XSYNT~.+1.ROSwCOM2
5SA
CHECK TO SEE IF THIS IS
JMP swAp4
A ROUTINE THAT CAN'T BE DEQUEO
JSB DEQUE
suaPEND UNTIL ITS DONE.
LOA T358T

PAGE 0317 #26
0252
0253
0254
0255
0256*
0257
0258
0259
0260

0261
0262
VI~""

Sol .............

0264
0265

71320
71321
71322
71323

SCHEDULER

0103013

STA
l.DA
STA
JMP

060362

070216
021252

71324 00240"
71325 072017
71326 050203
71327 027276
71330 010203
11331 006020
71332 114207

11333 124210
71334 026360

T35PR
IOUTW
T355T
SWAPR+1

SWAPS CLA
STA SHAIN
CPA MBUSy
JMP SWAP?
STA MBUSY
SSB
JSB SICKP,I
JMP PTZAP,I
JHP SCHl

CLEAR "SWAPR INVOKED

TRANSFER- FL.AG

WAS DISC TRANSFER SUCCESSFU~1
YES, CONTINUE
NO, CLEAR MBUSY FOR KICKS

WERE WE SWAPPING A USER'
NO, GO "FOLD CON GRAtIA
YES, GO FLUSH HIM OR HER

0267 71335 044356 SWAP4 ADB ,+?STAT~?LINK _> STATUS OF FIRST ENTRY
0268 71336 16001211
LDA 1,1
A-STATUS
CPA , .. 2
TEST fOR SPECIAL DISCONNECT,
0269 71331 05121355
0270 71340 0604~6
LOA XSYNT+1+BYE-COM2
ADA .·5.COM2~COM3 TES' FOR TYPE II OR III.
0271 71341 040344
SSA,RSS
0272 71342 002021
JMP SWAp3
0273 71343 027406
PROGRAM IS OF TYPE III.
TEST FOR PROGRAM IN CORE.
ADS ,-1STAT
0274 71344 044342
0275 71346 054255
CPB MAIN
JMP SWAPR,I
PROGRAM PRESENT,
0276 71346 121251
0277 71347 060255
LDA MAIN
FIND OUT WHAT PROGRAM IS,
IS ANy PROGRAM PRESENT?
SZA
0278 71350 002002
0279 71351 027372
YES,
JMP SWAP!
ST8 MAIN
SET MAIN TO NEW PROGRAM.
0280 71352 074255
0281*
INITIATE DISC TO CORE TRANSFER
0282**
0283.
STB SMAIN
SAVE TABLE OF USER IN QUESTION
0284 71353 076017
ADS .+?PROG
B.~PROGRAM ENO LOCATION,
0285 71354 044363
0286 71355 160001
LOA 1,1
COMPUTE NUMBER OF
STA PBPTR
0287 71356 070056
0288 71357 003000
WORDS IN PROGRAM,
eMA
ADA USE
0289 71360 12141213
0290 11361 ,,70204
STA MWORO
SAVE -LENGTH
0291 71362 044355
AD8 ,+?DISC",,?PROG
A •• DISC ADDRESS
LDA B
0292 71363 060001
0293 71364 065214
LOB USEI
a.CORE ADDRESS
CALL DISC DRIVER
0294 71365 114201 SWAP8 JSB DISCA,I
0295 71366 102030
HLT DEATH+308 ORIVER BUSY
HLT OEATH+31B OISC NOT PRESENT
0296 71361 102031
JMP 8CH1
RETURN BUSY.
0297 71370 026360
0299*
"300*"
0301*
0302
0303
0304
0305
0306

INITIATE CORE TO DISC TRANSFER
7137\ 060255

71372
71373
71374
71375

07 2 017

SWAP2 LOA MAIN

SWAP1

STA

SHAIN

0064A0

CLB

A74255
040363

STB MAIN

ADA .+?PROG

SAVE TABLE => OF USER
SET MAIN TO SAy
NO USER IN CORE

SAVE PROGRAM

PAGE 0318 #26
0307

0308
0309
0310
0311
0312
0313
0314

0316.
0317.·
0318.
032rt'J

0321
0322
0323
0324
0325

0326
0327
0328

0329
0330

0331
0332

0333
0334

0335
0336
0337

0338
0339

1a340
0341
13342

0343
0344
0345

0346
0347
0348
0349

0350
0351

SCHEDULER

LOB PBPTR
STB A,I
eMS
ADS USE

71376
71377
71400
71401
71402
71403

064056
174000
007000
045213
014204
040355
71404 065213
71405 027365

STa
ADA
LDB
JMP

END lOCATION

COMPUTE AND
SAVE. .TRANSFER
MWORO
LENGTH
.+1DISC .. ?PROG .> DISC ADDRESS
USE
• CORE ADDRESS
SWAPS
GO START DISC WRITE

TypE III PROGRAMS
71406
71406
71407
71410
11411
71412
71413
71414
11415
71415
71416
71417
71420
71421
71422
71423
71424
71425
71426
71427
71430
71431
71432

160001
050425
002401
027415
044361
170001
044355
044356
160001
050606

070264
044360
160001
050355
060406
040344
064255
006002
12127371
001000
042012
71.,33 050256
71434 127251
71435 070256
71436 064315
71437 0742"4
71440 007400
11441 076017
71442 064610
71443 027365

SWAPJ EQU *
LDA 8,1
GET STA.TUS
CpA .+XSYNT~.+1+0pE.COM2
ClA,RSS
SET PRIORITY TO 0 IF OPEN
JMP S.WAP6
ADS .+?PlEV-?STAT
STA B,l
ADa .+1STAT~?PLEV
SWAP6 EQU •
ADS .+?RSTR~1STAT B.> RESTART ADDRESS
LOA 8,1
CPA *lIB#
IF THIS A FRESH CALL,
STA LCHCR
ZAP THE LCHCR FLAG
ADB .+?STAT.?RSTR
lDA B,I
CPA ... 2
LOA XSYNT+l+8YE-COM2
ADA ._5.COM2.COH3
LOB MAIN
TEST FOR MAIN PROGRAM IN CORE
SZB
JMP SWAP2
GO TO WRITE OUT MAIN PROGRAM.
AlS
MULTIPLY BY 2
AOA OCOM6
A.~ LIBRARY PROGRAM DISC ADDRESS
CPA LIB
IS IT IN CORE?
JMP SWAPR,I
YEI-p.RETUAN PRESENT.
STA LIS
IF NOT, INITIATE REAO IN,
LDB M512
LENGTH OF PROGRAM • 512
8T8 MWORD
ce B
SMAIN • -I SEZ
STB SMAIN
READING LIBRARY PROGRAM

0353.
0354 ••
ENTRY POINT FOR
0355.
0356 71444 000000 SCHIQ
0357 71445 103100
0 3 58 714 4 6 064272
0359 71447 044342
0360 71450 130001

L.OB #L.IBI

JMP SWAPS

INITIATE DISC READ

INPUT REQUEST
NOP

elF 0
LOB MLINK+l
.08

INTERRUPT INHIBIT,

.+1TNUM~?LINK

lOR 1,1

TELL 2114

PAGE 0319 #26

SCHEDULER

0362
0363

11451 11413671452 103100
71453 044372

~361

0364

71454 063444

0365
0366
0361
0368

71455 170001
11456 006004

a369

0373

71461
71462
71463
71464
71465

!a374
0375

71466 170001
71467 027662

0370

0371
a"t"~
'IlJ~'G.

Al77.

037S*.

71457 160001
71460 002020

027662
044361
1702101
044355
060361

JSB
elF
ADB
LDA
STA
INB
LOA
5SA
JMP
ADB
STA
ADS
LOA
STA
JMP

Sl4se,I
ABOUT INPUT WAIT
0
.+1RSTR.?TNUM
SCHIQ
1,1
GET PROGRAM TYPE
1,1
QUIT IF ABORT REQUEST,
SUSP
.+?PLEV-?STAT
1,1
SET INTO PLEV.
,+?STAT.?PLEV
XINPT
CHANGE STATUS TO
1,1
INPUT wAIT,
SUSP
GO REMOVE FROM QUEUE.

ENTRY POINT FOR TERMINATION

0379.
0380

0381
0382
0383

0384
0385
0386
0381
0388
0389
0390
0391

71470
71471
71472
71473
71474
71475
71476
71477

103100
060260
002003

0275,,7
002400
070260
064272

044341

71500 160001

71501 030462
71502 170001
71503 044374

0392

71504 060355

0393

71505 110001

0394
0395

71506 027662
11501 060272

0396

71510
11511
71512
71S13
71514
71515

0397
0398
0399
0400
0401
0402
04 0 3
0404
0405
0406
0407
0408
0409

002001
021523
060254
002002

71516 "27521
012°4 1

11517
71520
71521
71522
11523
71524
71525

1fl410

11526

0411
0412
0413
0414
0415

11527

~416

040342
050253

71530

017200
002400
070254

064272
054263
027531
044341
017711
064272

71531 044356

71532 1602101
715 33 050 3 56
71534 027662

SCHEQ ClF 0
LOA HQOIS
SlA,RSS
JMP SCHQl
CLA
STA HQDIS

LDB ML.INK+l
ADB .·?LINK
LOA 1, I

DID THIS GUY TRY TO
DISCONNECT1
NO
yES

RESET DISCONNECT FLAG

SET

COMMUNICATIONS
lOR COM14
STA 1,1
BIT
ADS •• 1STAT
SET STATUS
LOA XOISC
STA 1, I
TO DISCONNECT
JMP SUSP
SCHQl LDA MlINK+l
DOES THIS
USER HAVE
ADA .+?TNUMII!II1LINK
CPA PRIST
THE LINE
RSS
PRINTER1
JMP SCHQ3
NO
YES .. IS THE LPR
LOA LFlAG
COMMAND FLAG SET1
SZA
JHP SCHQ2
YES
STA CLCl
NO, BLOCK CLOCK
JSB SCRLP
REMOVE USER FROM LP
CLA
CLEAR
STA lFlAG
FLAG
LOB MLINK+t
SCRATCH IF
CPB T35LN
JMP ·+4
AOB ."?lINK
THIS IS
JSB HTEST
SHELLO,
LOB MLINK+l
CHANGE
ADe .+?STAT~?LINK STATUS
LOA 1,1
CPA ... 1
QUIT IF A80RT REQUEST.
.}MP SUSP

PAGE 0320 #26
0417
0418
0419

SCHEDULER

71535 002400
71536 170001
71537 027662

CLA
STA 1,1
JMP SUSP

TO IDLE

PAGE 0321 #26

SCHEDULER

0421*
SCHAR
0422*·
0423.
0424* SCHAR FETCHES THE NEXT CHARACTER fROM A BUFFER. BUFFER
042 5* POINTERS FOR SCHAR ARE INITIALIZED AS fOLLOWS:
SBHED8> FIRST CHARACTER If TTY35, -0 OTHERWISE
0426*
SCHL,I8> END OF TTY35 BUFFER
0427.

0428*

0429* SCHAR CALLING SEQUENCE'
0430*

0431*
0432*
0433.
0435
0436
043 1

0438

JSB SCHAR
RETURN HERE IF CR
RETURN HERE IF ANY OTHER CHARACTER
71540 000000
71541 064060
71542 006003

71543 027562

0439

71544 004065

0440

71545 160001
71546 005610

0441

0442
ft1443
1lJ444
0445
0446
0447
0448
0449
0450
9451
0452
0453
0454
0455
0456
0457

0458
0459
0460
0461
0462

0463
0464
0465
0466
0467
0468
0469
0470

0471
0472
0473

0474
0475

SCHAR NOP
LOB SBHEO
SlB,RSS
JMPSCHRI
CLE,ERB
LDA 1,1
ELB,SLB

71547 002001
7155~ 001727

RSS

71551 010500
71552 050374
71553 127540
71554 006004
71555 074060
71556 050417
71557 027542
715601 037540
71561 127540
7 1 562 064062
71563 006004

AND 8377

11564 160001

71565
71566
11567
71570

030215
114736
102311
027567

71571 102511

11572
71573
71574
71575
71576
71577
71600
71601
71602

05 0 4 17
027564
050374
021604

040317
"02021
040450
042000

037540

'1603 127540
71604
71604 160001
71605 030245

716216 114736
71607 127540

ALF,ALF
CPA
JMP
INS
STe
CPA
JMP
ISZ
JMP
SCHRl LDB

.+158
SCHAR,I
88HED
.+408
SCHAR+2
SCHAR
SCHAR,I
TTQ

INB
LDA t,l

lOR GTe
JSB S14SC,1
SFS CH2

GET POINTER,
TTY351
NO
YES.·POSITION AS WORD POINTER
GET WORD CONTAINING CHARACTER,
REPOSITION POINTER ANO TEST
fOR UPPER OR LOWER.
MASK OUT CHARACTER.

RETURN IMMEDIATELY IF CR
BUMP

C~ARACTER

POINTER,

SKIP BLANKS

FETCH
CHARACTER
FROM 2114

WAIT FOR RESPONSE

JMP • .,.1

LIA
CPA
JMP
CPA
JMP

CH2
.+408
SCHR1+2
.+158
SCHR2

ADA M96

SSA,RSS
ADA M32
ADA 8140
ISZ SCHAR

JMP
SCHR2 EQU
LDA
lOR

SCHAR,!
•

1,1
BK8
JSB S14SC,I
JMP SCHAR,I

BLANK?
YES .. p.IGNORE IT
NO, CARRIAGE RETURN?
YES
CHECK FOR CODES
GREATER THAN 140.

CODE IS lOWER CASE, HAKE UPPER,
RESTORE ASCII CODES.

NOw.EXIT

TO (P+2)

B->TTY j
TELL 2114
TO BACKSPACE

PAGE 0322 #26

SCHEDULER

0477*
DEQUE
0478**
0479.
0480* DEQUE REMOVES A USER FROM THE QUEUE. IT IS CALLED WITH THE USER'S
0481* LINK ADDRESS IN 8.
0482*
0483 71610 0021000 OEQUf NOP
0484 71611 060271
GET POINTER TO FIRST ENTRY.
LOA Ml..INK
TEST FOR ENTRY FOUND.
0485 71612 154000 DEQ1 CP8 ",I
0486 11613 027620
JMP DEQ2
LINK TO NEXT ENTRY.
LOA 0,1
0487 71614 160000
CPA MLINK
TEST FOR END OF QUEYl.
0488 71615 05QJ211
NOT ON QUEUE.·RETURN.
0489 7 1 616 121610
JMP DEQUE,1
JMP DEQl
LOOP.
0490 71617 027612
0491 71620 164001 DEQ2 LOB ! , I
LINK AROUND THIS USER.
ST8 0,1
0492 71621 114000
JMP DEQUE,I
0493 71622 127610

PAGE 0323 #26
0495*
0496·
0497*
0498*
0499.
0500*
0501*
°5 0 2*
0503*
0504.

OUTPUT CHARACTER ROUTINE

THE QUTCH ROUTINE OUTPUTS A CHARACTER TO A USERtS
BUFFER IN THE 2114. THE CALLING SEQUENCE lSI
JSB QUTCH,I

A-CHARACTER TO BE OUTPUT
S.TTY TABLE ADDRESS.

DUTCH FIRST CHECKS TO MAKE SURE THAT TH~ 2114 CAN ACCEPT
CHARACTERS. IF NOT, THE USER IS PLACED IN OUTPUT WAtT STATUS
AND A TRANSFER IS MADE INTO THE SYSTEM TO DELETE TH! USER
FROM THE QUEUE

0505*

0507
0508
0509
0510
0511
0512

0513
0514
0515
0516

0517

71623
71624
7 16 2 5
71626

000000

10310(21

01 0 5 00
072014
71627 160001
71630 010417
71631 002002
71632 12'27641
716 33 006004
71634 160001
71635 032014
71636 030213

*OUTC NOP
eLF

0

1, I

MASK AND
SAvE CHARACTER
CAN 2114
TAKE THIS
CHARACTER?

OUTC1

NO

t,1

BUILD OUTPUT WORD

AND 8377

STA
LOA
AND
SZA
JMP
INS
LOA
lOR
lOR

OUlM!

QUTWT

OUTMI

YES

WIlH USER'S TTY

"

OCR
CHARACTER AND OPCODE.
0518
0519 71637 114736
~JS8 S14LP,1
CALL 2114 DRIVER
JMP *OUTC,I
0520 71640 127623
0521*
0522* TAKE CARE OF fULL BUfFER IN 2114
0523*
0524 71641 044374 OUTCt ADS ,+?STAT
rlJ525 71642 160001
LOA 1,1
0526 71643 002020
58.
IF ABORTED GO DIRECTLY
JMP SUSP
0527 71644 027662
TO SUSPEND.
ADB • +?PL.EV.?STAT MOVE STATUS TO
0528 71645 044361
0529 71646 170001
ST. 1,1
PLEV AND SET
0530 71647 044355
ADS ,+7STAT"'?PLEV
STATUS TO
0531 71650 0621362
LOA XOUTW
OUTWAIT.
0532 716 5 1 170001
STA 1 , I
0533 71652 003400
CtA
SET RETURN ADDRESS TO
34
3
043623
1
AOA -OUTt
RECALL OUTt
7 65
"5
0535 ,1654 044356
ADS .+?RSTR .. ?STAT
0536 71655 170001 .
STA 1,1
0537 71656 062014
LOA OUTHt
0538 71657 071224
STA AREG
0539 71660 044343
ADS ... ?RSTR
0540 71661 075225
STB BREG
0541 71662 160272 SUSP LOA MLINK+l,I
0542 71663 070272
STA MLINK+l
0543 71664 002400
CLA
L.OCK
STA CLel
0544 71665 072041
CLOCK
JMP 5CH1
0545 71666 026360
JUMP TO SCHEDULER
0546*
0547 71667 000000 SCHOQ NOP
OUTPUT SUSPEND REQUEST ENTRy,
0548 71670 103100
elF 0
TURN OFF INTERRUPT,

PAGE 0324 #26
0549

0550
0551
0552
0553

OUTPUT CHARACTER ROUTINE

71671 063667
71672 002004
71673
71673 073623

LDA
INA
SCHSQ EQU
ST.
LOB
ADB
LDA
lOR
STA
INS

SCHOQ

•#OUTe

ML.INK+l
,-?LINK
1,1

0558

71674 064272
71675 044341
71676 160001
71677 030417
71700 170001
71701 006004

0059

71102 160001

LDA 1 , I

f'lIr;;:£f'lI

,"."nI~
I., 'U..,

039237

0561

71704
71705
71706
71701
71710

114736
103100
064272

lOR
JSB
elF
LOB
ADB
JMP

0b54

0555
0556

0557
~~v~

0562

0563
0564

0565
0567.
0568*
0569.
0570
0571
0572
0573
0574
0575
0576
0577
0578
0579
0580

044356

021642

SET UP RETURN ADDRESS.

OUTWT
1,1

SET OUTPUT WAIT BIT
PUT USER

01141

IN OUTPUT WAIT
0
NO INTERRUPTS DURING IUSPEND
MlINK+1
FOOL OUTeR INTO DOING THE WORK,
.+?STAT-?LINK
OUTCt+1
S14LP,1

HTEST SCRATCHES A PROGRAM IF THE ASSOCIATED HFLAG 8IT IS SET.
B POINTS TO THE USER'S TTY ADDRESS,
71711
71712
71713
71714
71715
71716
71717
71720
71721
71722
71723

000000
160001

010363

HTEST NOP
LOA 1,1
AND t-4FLAG

127711

SlA,RSS
JMP HTEST,1

103100

elF "

002003

120001
170001
102100
017007

127711

XOR t,I
STA t,I

GET HFLAG BIT,

RETURN IF HFLAG BIT .1,

CLEAR HFLAG BIT

STF "

.JSB stRAT

JMp HTEST,I

RETURN.

PAGE 0325 #27

COMMAND TABLE

0002.
0003 ••
0004 •••
0005 ••
0006.
0001. THIS TABLE CONSISTS OF TWO PARTS. PART 1 CONTAINS THE [NCODED
0008* SYMBOLIC COMMANDS. THESE ARE CODED AS THREE BYTES, EACH 8YTE
00°9· BEING OF LENGTH 5 BITS AND OF OCTAL VALUE 101 LESS THAN THE
0010. OCTAL VALUE OF THE CHARACTER, THE THREE ByTES ARE IN BIT POSI.
0011* TIONS 14-10,9-5, AND 4 eB , RESPEcTIVELY. BIT 15 IS SET TO lFOR
0012. COMMANDS THA~ ~RE LEGAL FOR THE SYSTEM CONSOLE.
0013.
0014· PART 1 IS ITSELf DIVIDED INTO 3 SECTIONS. COMMANDS IN SECTION 1
0015. ARE THOSE COMMANDS WHICH ARE HANDLED IMMEDIATELy By THE EXECUTIVE
0016* WITHOUT ANY DISC ACCESS. THOSE IN SECTION 2 ARE COMPILER COMMANDS

0017.
001S·

0019*
0020.
0021.
0022.
0023.
0024.
0025.
0026*

WHICH ARE RESIDENT BUT WHICH REgUIRE THE PROGRAM TO BE LOADED
COMMANDS IN SECTION 3 ARE SYSTEM COMMANDS ~HICH ARE
DISC RESI6ENT. ALL SYSTEM COMMANDS ARE OF THIS TypE AND MUST BE
LOCATED AFTER COM4.
FROM DISC

PART 2 OF THE COMMANO TABLE CONTAINS THE CORE STARTING ADDRiSSES
FOR THOSE COMMANDS IN SECTIONS 1 AND 2, AND THE TWO WORD DISC
ADDRESSES OF THOSE IN SECTION 3.
PART I

0021.
0028. SECTION I
0029.
0030 71724 044121
0031 71724
0032 7\725 046017
0033 71726 024230

COMI
seR

OCT
EQU
OCT
OCT

44121
COM!
46017
24230

SCRATCH

TAPE
KEY

~034.

0035.
0036*

0037
0038
0039
0040
0041
0042
0043*
0044.
0045.
0046

0047
0048

0049
0050
0051

0052
0053

0054
0055

0056

0057

SECTION II
71727
71730
71731
71732
71733
7 17 34

043215
026422

037215
0 5 676 4
177777
177777

OCT
oCT
PUN
OCT
XPUN OCT
UCDAB OCT
CTAPR OCT
COM2
LIS

26422

RUN
LIST

37215

PUNCH

43215
0 5 676 4
-1
·1

XPUNCH
FOR ABORT UPDATE CHANGE DATE
USED fOR TAPE ERROR PRINTOUT,

SECTION III
71735
71736
71737
7174 0
71741
11742
71743
71744
7 1 7 45
71746
71747
71750

177777
177777
177777
177777
177777
177777

COM3

044025

SAVE

005100

177777
014223
000757
~16213

COMFL
ASGNA
COMCH
CSAV
SAVO

HELLO

OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
nCT
OCT

.1
... 1
.1
... 1
-1
"1

FOR LENGTH SECTION
FOR TWO HAlVES
OF FUSS TABLE

FOR FILES
ASSIGN

.1
14223

FOR CHAIN
SAVE
ClAVE
FOR SAVE OVERLAY
GET

757
16213

HELLO

44025

5100

APPEND

PAGE 0326 #27
0058
0059
0060
0061
0062
0063
0064

0065
0066
0067
0068
0069

0070
0071

02172
0073

0074
0075
0076

0077
0078
0079
IiH;tsa

0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093

0094
0095
0"96

0097
00 9 8
0099

011210
0101

71751
71752
71753
71754
71755
71756
71757
71760
71761
,1762
71763

COMMAND TABLE

003404
024413
042215
032014
004023

BYE

CAT

026401

015056
006421
042217

045140
177777

ST.

7176 4 006213

71765
7 1766
71767
71770
71771
71772
71773
71774
71775
71776
71776
71777
72000

0464\4
037056
050657
03 4 744
026215
21121107
030222

A26761
036721
COM4

142217
10 6421
145140
72001 177777
12002 136721
72003 142722
72004 100655

72005
720~6

72007
72~IA

7 2 011

OPE::

142222
104340
'144544
1164"'1
132226
124413
131215

12012
72013
7 2 014 130556

72015 177777
72016 104717
72017 102222
7202 0 137221
72021 130006
72022 136356

,2023 13 7 0 5°
72024 144744
72025 103044

RCS

OCT 3404
OCT 24413
OCT 42215
OCT 32014
OCT 004023
OCT 26401

OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
EQU
oCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCr
OCT

15056

6421
42217
45140
-I

6213

46414
37056
50651

347 4 4
2621e
10107
030222
26761
36721

•142217
1 0 6421

145140,~1

136721

142122
100655

142222
1"4340
144544
116401

BYE
KILL
RENUMBER
NAME
CATALOG

LIBRARY
GROUP
DIRECTORY • USER CONSOLE
REPORT • USER CONSOLE
STATUS • USER CONSOLE
STATUS OVERLAy • USER CONSOLE
DELETE
TIME
PROTECT
UNPROTECT
OPEN
LENGTH
ECHO
MESSAGE
LPRINTER
PORT"'U9ER CONSOLE
REPORT • SYSTEM CONSOLE
DIRECTORY • SYSTEM CONSOLE
STATUS- SYSTEM CONSOLE
PORT.SySTEM CONSOLE
ROSTER
ANNOUNCE
RESET
CHANGE

SLEEP

HIBERNATE

NEWIO
KILLIO
MUNLOCK
131215
130 55 6,.1 MLOCK
132226

124413

104717
102222
137221
130006
136356

1371215 0
\44744
103044

COPy
BESTOW
PURGE
MAGTApE
PHO
PRINTER
SPEED

BREAK

COMMAND TABLE

PAGE 0327 *27
0103.
r!

0104.

PART II

__

STARTING ADDRESSES

0105*
0106*

S.ECTION I

0197*

72026 071004
01a9 72027 071025
0119 72030 010605
0111*
0112* SECTION II
0113.
01A8

0114

0115
0116
0117
0118
0119
0120.
0121*
1£1122*
0123.
0124*

COM5

DEF .SCR
OEF _TAP
OEF SCH20

KEY

DfF CMPLE
OEF LIST
OEF PUNCH
OfF XPNCH
OfF ABUCD

72031 036006
72032 052143

72033 052142
72034 052140
72035 073506
12036 044737

OfF TAPER

SECTION III

THIS SECTION CONTAINS THE TWO WORD DISC ADDRESSES OF THE
LIBRARY ROUTINES, THIS TABLE IS FILLED BY THE LOADER.

0125.
8SS COM5.COM3+COM5.COM3

0126

72037 000000

COM6

0128

FILIB EQU COM6.COM3+COMFLp.COH3.COMFL

0129

12045
72051

0130

72047

ASNIB EQU COM6-COM3+ASGNA-COH3·ASGNA

0132

72221 000000

DSERA

0134

72231 000000

LOGGR SSS 64

CHL.IB EQU COM6.COM3+COMCH-COM3.COMCH

BSS 8

FILES
CHAIN

ASSIGN

ERROR MESSAGE DISC ADDRESSES
HOLDS INFO FOR LOGGING

PAGE 0328 #27

LIBRARV SUBROUTINES

01J6.
LIBRARV SUBROUTINE POINTERS AND TEMPORARIES
0131 ••
0138.
0139 72331 000000 LSTPl BSS 1
0140 72332 000000 LST P2 BSS t
0141 72333 000000 LSTP3 BSS 1
0142 72334 000000 LSTP4 8SS 1
0143 72335 000000 LSTP5 BSS 1
0144 000 35
TEeNT EQU LTEMP+5
• TABLE ENTRY COUNT (NEGATIVE)
OLPTR EQU LTEMP+l1 .> TO A TRACK LENGTH
0145 00043

0146

OAPTR EQU LTEMP+12
OALEN EQU LTEMP+13
DADDR E'QU LTEMP+14
EQU LTEMP+15

00044

0147 00045
0148 00046
0149.
0151
0152
0153

0154
0155
0156
0157
·0158
0159
0160
0161
0162
0163

0164
0165
0166

0167

72336 000116

72337 000113

72340
72341
72342
72343
72344
72345
72346
72347
72350
72351
72352
72353

025130
000000
000000
000000
0000210

074434

074450
031073
074561
074516
070431
00~161

72354 160002

72355 005040
72356 ~30057

->

TO A TWO WORD DISC ADDRESS

• DISC ADDRESS LENGTH
CONTAINS A 2 WORD
DISC ADDRESS

OEF ADTAT
.> TO AOT ADDRESS TABLE
OfF IDEC"'11
a> LAST IDEe ENTRY TRACK LENGTH
OfF LIBUS+10176 DIRTY FILE NAMES BUFFER
BSS 1
COUNT of FILEs TO BECHECKEO
BSS 1
COUNT OF CHANGED (DIRTY) FIL!S
BSS 1
POINTER TO USER ID
aSs t
POINTER FOR LtD'S SEARCHES
OEF MOVEB
OEF MOVEW
OEF OLOOK
OEF LOUT
OfF LEN02
OEf 5CH7
DfF SYSID
M8190 DEC "'8190
lFSPA OCT 5040
ZERSL ASC 1,01

ADTAP
IDECL
DFNAM
lCOFC
DFCNT
LCOID
LeDBS
MOVFB
MOVFW
DLOKA
LOUTA
LEN2A
OSCH7
DSYID

PAGE

(11329 #27

LIBRARY SUBROUTINlS

0169.
0178.·

FIND ADT
0171.·.
0172.·
0173*
0114* THIS ROUTINE fINDS THE ADT THAT THE DISC ADDRESS CONTAINED IN
0175* DADDR SHOULD GO INTO, THE Rt-TURNED RESUL.TS ARE,
DAPTR -> ADT DISC ADDRESS
0176.
DLPTR a> AOT LENGTH
0177*
017S.
0179
018e
0181
0182
0183
0184
~185

0186
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0198
0199
0200

0201
1tl2~2

0203
0204
0205
0206
0207

72357
72360
72361
72362
72363
72364
72365
72366
72367
72370
72371
72372
72373
72374
72.375
72376
72377
72400
72401
72402
72403
72404
72405
72406
724 0 7
72410
7 2 411
72412
72413
12414

00B0r;,0
060346

OJ72331
060177
040437
070044
104200

100044
000065
005500

016611

FAOT

NOP
LDA
STA
LOA
ADA
FAUlt ST.
OLD

... 9
LSTPt

MHAD
.+48

DAPTR
DAPTR,I

CLE,ERA
ERB
JSB DASUB
SSA,RSS
JMP FADT3
LOA DAPTR

SET COUNT FOR
NUMBER OF ADTS
A .> DISC TABLES
START WITH LAST ENTRY
A .> DISC TABLE ENTRY
A8 • FIRST ADDRESS ON THIS DISC
CONVERT
TO BLOCKS

002021
026402
060044
040351
036331
026364
102037
026400

GO TRy NEXT DISC
FAOT2 HL.T DEATH+37S SETTER FINO DISC
JMP .... 1

062331

FAOT3 LDA LSTPl

~03000

0 503 67
026400
100200
000362
042336
070044
040361
070043
126357

ADA .... 6

RESULT POSITIVE, FOUND THE DISC
RESULT NEGITIVE,MOVE
TO PRECEEDING ENTRY

ISZ LSTPl

JMP FADT1

eMA
CPA ,+8
JMP FAOT2
MPy .+3
ADA ADrAP
STA DAPTR
AOA .+2

STA DLPTR
JMP FADT,l

CHECK FOR BAD

DISC

ADDRESS

GENERATE TABLE

ADDRESS FOR DISC
POINTER • AND
POINTER FOR

DISC LENGTH

PAGE 0330 #27

LIBRARY SUBROUTINES

0209.
0210**
·RETURN BLOCK TO ADT
0211***
0212**
0213*
0214* THIS ROUTINE ADDS A BLOCK OF DISC SPACE BACK INTO TH! lOT.
0215* THE ROUTINE ASSUMES THE FOLLOWING,
0216*
DAODR = 2 WORD DISC ADDRESS OF BLOCK TO BE ADDEO
0217*
DALEN • LENGTH OF THE BLOCK
0218*
OApTR .> 2 WORD DISC ADDRESS OF ADT TRACK
0219~
DLPTR _> LENGTH OF ~DT TRACK
0220.
".~~.
lJoC;C,,,

THE CORRECT AOT TRACK IS IN CORE

0222*
0223.

0224.
0225*
0226*
0228
0229
0230

0231
0232
0233
0234
0235

0236
023 7
",,238
0239

0240
0241

0242

THE ROUTINE R~TURNS WITH THE LENGTHS IN MWORO AND DLPTR,I BOTH
UPDATED, BUT THE TRACK IS NOT WRITTEN OUT.
72415 000000
72416 f2160B45

RBADT NOP

72417 0212003
72420 126415
72421 160043

SZA,RSS
JMP RBADT,l
LDA OLPTR,I
CMA,INA
ADA LI8D
STA lSTPl
LOB LISD
RAOTI STB LSTP2
CPB LSTPl

12422
72423
72424
72425
7 242 6
72427
72430

003004
040676
072331

064676
076 332
056331

026532
72431 104200
72432 172332
72433 016611
12434 002020
72435 026441

LOA DALEN

.JMP RAOT3

OLD LS·TP2, I
JSB DASUe
SSA

DON.T WASTE
TIME ON
ZERO L.ENGTH
GET AOT LENGTH

END OF ADT TRACK
8EGINNING OF AOT TRACK
B -> CURRENT ENTRY
CHECK FOR END OF TRACK
YES, INSERT INTRY AT END
GET OISC ADDRESS FOR THIS ENTRy
a>
a>

SUB. FROM ADDRESS BEING RETURNED
FAR ENOUGH?
YES, FOUND NEXT ENTRY GREATER
NO, ADVANCE
AOT POINTER
TO NEXT ENTRY

0243
JMP RADT2
LOB LSTP2
0244 72436 066332
0245 72437 044362
ADS .+3
JHP.RADTl
0246 7244~ 12126.426
0247*
0248*
CHECK TO SE~ IF THE NEw ENTRY IS
024 9*
ADJACENT TO THE FOLLOwING ENTRY
0250*
GET CURRENT DISC ADDRESS
0251 72441 104200 RADT2 DLD OADDR
72442 000046
eLE
0252 72443 000040
AD8 DALEN
ADO LENGTH OF RETURNED BLOCK
0253 12444 044045
1d254 72445 002040
SEZ
CHECK FOR
INA
0255 72446 002004
OVERFLOW
0256 7 2 447 15 2 33 2
CPA LSTP2,I
CHECK FOR MATCH
CLA,INA,RSS
0257 72450 002405
FIRST WORDS ARE EQUAL
0258 72451 026532
JMP RADT3
NO MATCH
0259 72452 042332
ADA LSTP2
CHECK SECOND
0260 7 2 453 1540~0
CPS A,I
WORD FOR HATCH
RSS
72454 002001
~261
yES, COMBINE THE THO ENTRIES
0262 72455 026532
JMP RADT3
NO, ENTRIES CAN'T BE COMBINED

PAGE 0331 #27
ij263.
0264*
0265*
0266 72456
72457
1ri267 72460
72461
0268 72462
0269 72463
0270 72464
72465
0271
0272 72466
0273*
0274*
0275.
02 76*
0277*
0278 72467
0279 72470
0280 72471
0281 72472
0282· 72473
0283 72414
0284 72475
72476
0285 72477
0286 72500
0287 72501
0288 72502
0289 72503
0290 72504
0291
72505
0292 72506
0293 72507
0294 72510
0295 7 2 511
0296.

t(J301
0302
0303
0304
0305
0306

0307
0308
0309
0310

0311

COMBINE THIS ENTRY WITH THE NEXT ENTRY
1042AkJ
"'00046

OLD OADOR

1044'-"0

OST LSTP2,I

172332
066332
044361
060045
140001
170001

LOB lSTP2
ADS ,+2
LOA DALEN
ADA B,1
STA B,I

REPLACE THE NEXT ENTRy WITH
DISC ADDRESS Of RETURNED BLOCK
B -> LENGTH OF ENTRY
A .. RETURNED LENGTH
ADD RETURNED LENGTH
TO CURRENT LENGTH

CHECK TO SEE IF THE NEw ENTRY 18
ADJACENT TO THE PREVIOUS ENTRY
(DID RETURNED BLOCK BRIDGE THE GAP)
062332

0521676
126415
040356
072331
040355
104200
100000
000040

146331
002040
002004
152332
002405
126415
042332
154000
1302005

126415 .

LOA
CPA
JMP
ADA
STA
AOA
OLD

LSTP2
LIBD
RBADT,I
, .... 1
LSTPt
.-2
A,I

elf
ADB lSTP1,I

SEl
INA

CPA LSTP2,I
CLA,INA,RSS
JMP RBADT,I
ADA LSTP2
CPS A,I
INA,RSS
JMP RBADT,I

CHECK FOR NO
PREVIOUS ENTRY
NONE
-> PREVIOUS ENTRY

LENGTH

• PREVIOUS ENTRy DISC ADDRESS
ADD PREVIOUS LENGTH
TO PREVIOUS ADDRESS

CHECK FOR FIRST WORD MATCH
FIRST WORDS ARE EQUAL
NO HATCH
CHECK SECOND
WORD FOR MATCH
.> LENGTH OF COMBINED ENTRy
NO MATCH

COMBINE PREVIOUS ENTRy WITH THE COMBINED ENTRy

0297*
0298*
0299
03 00

LIBRARY SUBROUTINES

72512
725 1 3
72514
7 2515
72516
72517
72520
72521
72522
7 25 23
72524

72525
72526
72527

0312
tt'31J 72530
0314 72531
0315*

164000
04 0 354
144000
17 40 00
066332
074051
044362
074050
044774
144043
116346
160043
040362
170043
070204
126415

LDB
ADA
ADe
STB
LOB
STB
ADB
STB
ADB
ADS
.IS8

LDA
ADA
STA
STA
JMP

A,I
.-3
A,I
A,I
LSTP2
MOVED
.+3
MOVES
MLIBD
DLPTR,I
MOVFW, I
OLPTR,I
.+3
DLPTR,I
MWORO
RBADT,I

B • LENGTH of COMBINED ENTRY
A a> LENGTH OF PREVIOUS ENTRY
SUM AND THEN

UPDATE L.ENGTH
NOW SET UP FOR MOVE
COMBINED
ENTRY IS TO
BE REMOVED
COMPUTE LENGTH
OF MOVE
MOVe TABLE DOWN
A • CURRENT ADT LENGTH
SHORTEN AND
UPDATE AOT

UPDATE LENGTH WORD

PAGE 0332 #27

LIBRARY SUBROUTINES

0316*
NOT ADJACENT TO THE FOLLOWING ENTRY •
CHECK FOR COMBINABIlITY WITH PREVIOUS ENTRy
0317*
0318.
CHECK FOR NO
0319 72532 062332 RADTJ LOA LSTP2
0320 72533 ~50676
PREVIOUS ENTRY
CPA LISD

0321

72534 026560

0322
0323

72535 040356
72536 072331

0324
0325

72537 0421355
7254 0 121 4200

0326

72541 100000
72542 000040

0I~"7
IU .... c;.'

0328
0329
0330
0331
0332
0333
0334
0335
0336
033 7
0338

0339

72543 146331
72544 002040
72545 002004
72546 050046
72547 002001
72550 026560
72551 054047
72552 002001
72553 026560
72554 060'l45
72555 142331
72556 172331
72557 126415

JMP
ADA
STA
AOA
OLD

RADT4
•• 1
LSTP1
... 2
A,I

eLE
ADB LSTP!,I

sEZ
INA

CPA DADDR
RSS

JMP RADT4
CPB..._DAOOR+ 1
RSS
JMP RADT4
LOA DALEN
ADA LSTP1,I
STA LSTP1,1
JMP RBADT,I

NONE

.>

PREVIOUS ENTRy LENGTH

• PREVIOUS ENTRY DISC ADDRESS
ADO PREVIOUS LENGTH
TO PREVIOUS ADDRESS
CHECK FOR FIRST
WORD MATCH
NO MATCH
00 SECOND WORDS MATCH?
YES, ENTRIES CAN COMBINE
NO MATCH
COMPUTE NEW
l.ENGTH AND
UPDATE ENTRy

~J40.

THE NEW ENTRY IS NOT ADJACENT TO
THf FOLLOWING OR PREC~EDING ENTRY
MOVE TABLE IF POSSIBLE AND ,INSERT

0341*

0342*

0343*
0344.
0345
0346
0347
0348
0349
0350
0351
0352
0353
0354
0355
0356
0357

0358
0359
0360
0361
0362
0363
0364
0365
~366

1d367

72560 164043
72561 056354

725,62
72563
72564
72565
72566

126415
007000

044676
074050
044362
72567 074051
72570 007004
72571 044361
72572 046332
72573 116345
72574 1042210
72575 000046
72576 104400
72577 172332
72600 066332
72601 044361
72602 060045
72603 170001
72604 160043
72605 040354
72606 170043
72607 070204
72610 126415

RAOT4 lOB DLPTR,l
CPB M8 1g0
.JMP RBADT, I
eMB
ADS LIBD
STe MOVES
ADS ,+3
STe MOVED

8

IF THERE IS NO RROM
TO EXPAND THE ADT,

THE SPACE IS LOST

SET UP FOR
THE MOVE

(Ma,INS
ADS .... 2

ADS LSTP2
JSB MOVFB,I
OLD DADOR

-OST LSTP2,I

MOVE TABLE UP TO MAKE ROOM
GET DISC ADDRESS AND
SET INTO THE ADT

LOB LSTP2

ADa .... 2

LOA DALEN
STA B,1
lOA DLPTR,I
ADA , ... 3

STA DLPTR,I
STA MWORO
JMP RBADT,I

GET LENGTH OF
NEW ENTRY AND
SET INTO AOT
INCREASE ADT
TRACK LENGTH
THREE WORDS

pAGE 0333 #27

lIBRARY SUHROUTINES

0369*
0370*.
~ISC ADDRESS SUBTRACTION
0371**.
0372**
0373.
THE TWO WORD DISC ADDRESS IN AS IS SUBTRACTED
0374*

FROM THE DISC ADDRESS IN DADOR AND DADDR+t

0375*
0376*
~377

72611 000000
72612 007104
~379
72613 003040
0380 72614 002004
, ".,.., 000040
0381 ..,?*,i"
0382 72616 044047
0383 12617 002040
0384 72620 002004
0385 ' 72621 040046
0386 72~22 126611

0378

..

DASUB

NOP
CMB,CLf,INB
CMA,SEZ
INA

eLE

ADS DADDR+l
SEZ
INA

ADD LOWER ADDRESS WORDS

ADA DADDR

ADD UPPER ADDRESS WORDS

JMP DASUB,I

PAGE 0334 #27

LIBRARY SUBROUTINES

0388*

0389*.
1tJ390***

R~TURN

TABLE TO ADT

0391**
~J92*

0393*
0394*
0395*
0396*
0397*
ki398*
0399*
0400.
0401*
0402*
0403.

THIS ROUTINE SCANS A TABLE AND PUTS DISC SPACE BACK INTO
THE AOTS. THE ROUTINE RETURNS ALL SPACE ON ONE ADT 8EFORE
WRITING IT BACK. THE DISC ADDRESS OF EACH ENTRY IS ZEROED
AS THE SpACE IS RETURNED. THE FORMAT OF THE TABL.E IS.
LIAUs+8192 I
~

•
•

~404.

0405.
0406.
0407*
0408
1tS409
0410
0411
0412
0413
111414

0415
0416
0417
0418
0419

0420
04 21
0422
'0423
0424
0425
04 2 6
0427

•
TEeNT - CONTAINS THE NEGATIVE NUMBER OF ENTRIES
72623 000000
72624 060035
72625 072333
72626 002003
72627 126623
72630 064674
72631 006004
72632 160001
72633 070045
72634 006004
72635 076~34
72636 104200
72637 1009101
72640 002003
72641 '006002
72642 002001
72643 026734
72644 104400
72645 000046
72646 002400
7 2 647 0064 00
72650 104401tJ

72651 172334
72652 016357
72653 104200
72654 100044

0430

7265fS 030091

0431

72656
72657
72660
72661
72662
72663
72664
72665
72666

0432
0433
0434

0435
0436
0437
",438
~439

(10)

LENGTH
, DISC
ADDRESS
I
I

002003
026734
160043
070204
060044
072335
064700
114206
~'26727

RTADT NOP

RTAot LOA TECNT
STA LSTP3
SZA,RSS
JMP RTADT,I
LOB L8192
INB

RTAD2 LOA B,l
STA DALEN

INS
STB lSTP4
DLD B,I

GET ENTRY COUNT
ANO SAVE IT
DON'T WASTE TIME
ON A NULL TABLE
LOAp TABLE BASE
-> DISC LENGTH Of FIRST ENTRY
GET LENGTH AND SAVE
FOR FACT AND RBADT
II> DISC ADDRESS
SAVE POINTER
GET THE DISC ADDRESS

SZB
RSS

CHECK FOR
NULL ENTRY
NON.ZERO ENTRY, RETURN SPACE

JMP RTNUL
oST DADDR

SAVE DISC ADDRESS FOR FADT,RBAOT

SZA,RSS

CLA

CLB
DST LSTP4,1
.JSB FADT

OLD OAPTR,I

lOR B
SZA,RSS
JMP RTNUL
LOA DLPTR,I
STA MWORO
LDA DAPTR
srA LSTP5
LOB LIBDI
JSB DISCZ,1
.JMP RTDER

NULL ENTRY

PREVENT SECOND
RETURN OF
SPACE
FIND THE CORRECT ADT TRACK
CHECK FOR
ExISTANCE
OF A01 TRACK
DOESN'T EXIST
GET THE ADT'S LENGTH AND
SET UP FOR DISC TRANSFER
.> DISC ADDRESS
SAVE POINTER
READ IN
AOT TRACK

DISC ERROR

PAGE 0335

"-'-

#~7

LIBRARY SUBROUTINES

JSB RBADT
RTAOJ ISz LSTPJ

RETURN BLOCK TO ADT
CHECK COUNTER
MOR! f:.NTRIES

0440

72667 016415

L1441
k1442

0444

7267V1 "'3633J
72671 026671
7 267 ') L~ 6 004 4
7267J 064676

~44b

72674 1142Q16

.158 DISCI, I

0446

72675 flt26727
72676 026624

.JMP RTDER

1fJ44J

0447
0449
0450
0451
0452

0453
0454

72677

~66334

72700 044362
72701 160001

72702 070045
72703 00612104
72704 076 3 34

0455

72705 104200
72706 100001

0456
0457

0463

72707
72710
72711
72712
72713
72714
7271!i
72716
72717

"'464

72720 002401

0465

72721 026670
72722 006400

04b8

0459
0460

0461
L1462

0466
0467
0468
0 46 9

0471
0472
0473
0474
0476
0477
0478
0479

0480
0481

002003

.JMP

RTAD~

DISC

DISC ERROR
SCAN TABLE UNTIL EMPTY

JMP RTADl
RTA04 LDB LSTP4

a> NEXT DISC LENGTH
GET LENGTH AND SAVE
FOR FAD! AND RBAD!
:I> DISC ADDRESS
SAVE UPDATED POINTER
GET DISC ADDRESS

ADS ,+3

LOA
STA
INB
STB
OLD

B,I
DALEN
lSTP4
8,1

CHECK FOR
NULL. ENTRY
NON.ZERO, RETURN SPAC~
NULL, GO TRY NEXT ENTRY
SAVE ADDRESS

SlA,RSS

~060"'2

SIB

002001

RSS

02667"-'
104400

JMP RTAD3

~00046

WRITE.ADT
BACK TO

LOA OAPTR
LOB LlBD

DST OADDR

JSB FADT
LOA DAPTR
CPA lSTP!5

72723 104400

(LB
OST LSTP4,I

FIND THE CORRECT ADT TRACK
DOES THIS ENTRY GO
ON THE ADT TRACK
CURRENTLY IN CORE?
NO .. - DEFER
YES • PREVENT
DOUBLE RETURNS

72724 172334
72725 0164t.5
72726 026670

JSB RBADT
JMP RTADJ

RETURN BLOCK TO ADT
PROCESS NEXT ENTRY

72727
7273'"
72731
72732
72733
72734
72735
72736
72737

016357
060044

052335

CLA,RSS
.JMP RTAD3

0024~0

RTDER CLA

0064Ct10
170043
104400

CLB

STA DLPTR,I
OS1 OAPTR,I

DISC ERROR DURING ADT 1/0
REMOVE ADT
TRACK fROM
ADTAT

100044

036333
00201211

126623

066334

RTNUL ISZ LSTP3
RSS
.JMP RT ADT,

LDB LSTP4

72740 044362

ADS .+3

72741 026632

JMP RTAD2

I

CHECK THE
COUNTER
DONE, NO MORE ENTRIES
GET THE TABlE POINTER
.> NEXT DISC LENGTH
TRY THIS ENTRY

PAGE 0336

~27

LIBRARy SUBROUTINES

""483.
0484.*
FINO lOT
1d485.*.
~486 ••
1l1487.
0488* lHtS ROUTINE FINDS WHICH 10
0489* READS THAT TRACK IN10 CORE,
0490* RETURNED RESUL1S AHE.
0491*
0492*
0493.
0494*
0495.
0496
0497
0498
04 99
0500
05 0 1
0502

0503
0504
1t1505
05~6

0507
0508

0509
0510
0511
0012
0513
0514*

V)b15
0516
~517

0518
0519
0520
0521
0522

TRAC~

ENT~R

IDTAD -> DISC ADDRESS
IDTLN .> LENGTH OF 10
MWORD = LENGTM OF 1D
LSTPl =~ IF 1D NOT ON
000000
060354
072331
062337
070076
16 40 00
7275~ 040354
72751 006003
72752 026760
72753 \64000
72754 007~04
72755 {lJ44052
72756 006021
72757 026764
7276£11 040356
72761 eJ36331
72762 ~'267 46
72763 \ll02004

FIDT

72764
7 2 7 65
72766
72767
72770
72771.
72772
72773

0020(214

FIDTJ INA

'17~Hi1I75

STA

164076
",74204

LOB
STB
LOB
JSB
JSB

72742
72743
72744
72745
72746
72747

06470V1

114206
114207
126742

THE SPECIFIED 10 IS ON AND
WITH THE IoCOOE IN ID. THE

OF lOT
TRACK
TRACK
ANy TRACK

NOP
LOA .-3

STA
LOA
FlOTt STA
LOB

LSTPl
IDECl
IDTLN
A,I

INITIALIZE:.
COUNTER
.> LAST IDEe ENTRY TRACK LENGTH
STORE IN POINTER

SKIP THIS ENTRY

ADA .... 3

SZB,RSS
.IMP F 10T2
lOS A, I

CMB,INS
ADB tD
SSB,RSS
JMP FIOT3
FIDT2 ADA .-1
lSZ LSTPI
,JMP f-"IDTI
INA

.JMP

IF THE TRACK
LENGTH IS ZERO
• FIRST 10 ON THIS TRACK
> OR <

?

FOUND THE TRACK
.> NEXT TRACK LENGTH
ANY. MOPE TRACKS?

YES

NO, READ IN 1ST TRACK AS DEFAULT
.> DISC ADDRESS

IDTAD
IDTLN,l
MW ORO
LIBDI
DIseZ,l
SICKP,I
FIOT,I

STORE IN POINTER
SET Olse DRIVER
TRANSfER LENGTH
READ loT
FROM DISC
BAD NEWS
RETURN

PAG~

0337 #27

0524*
0525**

LIBRARY SUBROUTINtS

SE:ARCH IDT

~526.*.

0527.*
0528.
0529* THIS ROUTINE SEARCHES THE ID TRACK IN CORE FOR THE IDCODE
0530. SPECIFIED BY 10, AND RETURNS WITH B POINTING TO IT.
IF 8 • 0,
~531.

~532·

THEN THE IDCODE WAS NOT FOUND.
TRACK LfNGTH,

MWORO MUST EQUAL THE NEGATIVE

~533.

~534

Vj535

0536
0537
V)538
0539
0540
0541

72774
72775
72776
72777
73000
73001
73002

000000
0642~4

007004
044676
,,60052
054676
027007

NOP
LDS MWORD
CMa,INS
ADB LIBD
LOA ID
SIDTt CPS LIBD
JMP 810T2

SlOT

ADS ,<1!98

0542

73Pl03 044347
73004 150001

CPA 8,1

0543

7300f> 126774
730v)6 0270~1

.JMP SLOT, 1
.IMP SlOT 1

~544

0545*
0546 73007 0eJ6400
0547 73"'10 126774

510T2 CLB
.IMP S lOT, I

E01+1
GET THE 10
START OF TABLE?
YES, NO SUCH 10
=> NEXT ENTRY
CHECK FOR 10
FOUND IT
TRY NEXT ENTRY

.>

10 DOE.S NOT
EXIST, 8=0

!f'b49.

VJ550 ••
"'051.*.
0052*·
0553*
0554* GCIOT READS THt PROP~R 10 TRACK INTO CORE, SEARCHES IT FOR
°555* THE cURRENT USER'S 10, AND RtTURNS WITH B POINTING TO IT.
~556*

IF

~562
~o63

0564
"'565

TH~

USER LOGGED OFF OR HIS 10 DOES NoT EXIST.

CH10000

GeIDT NOP
LOB MLINK+1
ADS .+?ID-?LINK
LOB B,1
GET USER'S ID
STS ID
ANO SAVE IT
SZB,RSS
RETURN WITH e-0 IF
JMP GeIDT,I
USER NOT LOGGED ON
JSB FIDT
FIND 10 TRACK
LOB L5TPt
RETURN WITH
SZB,RSS
a_0 IF TRACK
JMP GeIDT,I
NOT FOUND
JSB SlOT
SEARCH 10 TRACK
JMP GCIDT,l

A=~,

0557.
0558 73011
73-012
0 55 9
0560 73013
0561
73014

064272
044346
164001

7 31(115 07 4 052
73~16

006003

73017 127V'tl

10566

7302V1 ~16742
73021 066331

0567
0568

7302~

0060Ql3

73023

127~11

~569

0570
0001*

73024 016774
73025 12711111

PAGE 0338 #28

LIBRARY SUBROUTINES

0003*
0004*.
0005.*.
RfTURN TABLE TO lOT
0006**
0007*
0008. THIS ROUTINE SCANS A TABLE AND UPDATES THE AMOUNT OF DlSC SPACE
0009* IN USE FOR THE SPECIFIED IDS. THE FORMAT OF TH( TABLE IS,
LIBUS.S192 I (10)
0010*
I LENGTH
0011*
I OISC
0012*
I
ADDRESS
0013*
00i4.
•
0015*
•
0016.
•
0017."
TEeNT ~ CONTAINS THE NEGATIVE NUMBER OF ENTRIES
0018.
0019*
0020 73026 000000 RTIDT NOP
0021 73027 060035
LOA TECNT
GET CHARACTER
COUNT AND SAVE
STA LSTP2
0022 73030 072332
0023 73031 0022103
SZA,RSS
DON'T WASTE TlME
JMP RTIOT,!
ON A NULL TABLE
0024 73032 121026
0023 73033 064614
LOB L8192
WI> HEAo OF TABLE
5TB LSTP3
SAVE IN POINTER
0026 73034 076333
0027 73035 160001 RTID1 LOA 8,1
GET AND SAVE
STA ID
NEXT IDCOOE
"'028 73036 010052
0029 73037 016742
JSB FIOT
FIND 10 TRACK
SfARCH'OR 10
0030 73040 016774 RTID2 JSB SlOT
0031 73041 006003
sze,RSS
WAS 10 FOUND?
JMP RTID3
NO
0032 73042 021061
73043 044366
0033
ADB ,+1
.> SECTORS USED
LOA LSTPJ
a> TABLE ENTRy
0034 73044 ~62333
INA
73045 002004
0035
16000~

~~36

732146

0037
0038

73047 003004

0039

0040
0041
0042
0043
0044
0045
0046
0047.
0048
0049
0050
0051
0052
0053
1d054
0055
0056

73050 140001
73051 170001
73052 066333

7 3 053 044363

73054 076333
73055 160001
73056 070052

7 3 0 5 7 036332
73060 021040
73061
73062
73063
73064
73065
73066
73067
73070
73071

060075
064676
114206
114212
062332
002003
127026
066333
e27035

LOA A,I
CMA,INA
AOA B,I
STA B,I
LOB LSTP3
ADB ,+4
S1! LSTP3
LOA B,I
STA 10
ISZ LSTP2
jMP RTI02

RTID3 LOA 10TAO
LOB LISD
JSB DISCZ,1
JSB DEAOP,1
LOA lSTP2
5lA,RSS
.J MP RTID T, I

LOB LSTP3
JHP RTIO!

• LENGTH TO BE RETURNED
UPDATE
DISC SPACE
USED
SET POINTER
TO NEXT
ENTRy
GET AND
SAVE 10
OONE?
NO
.> DISC ADDRESS

WRITE OUT
to TRACK
BAD NEWS
WORK ALL. DONE1
YES. RETURN
NO, PROCESS
NEXT ENTRY

PAGE 0339 #28

LIBRARY SUBROUTINES

B05a.
"059 ••

e060.*.

0061*·
1062*

0063.
0064*
0065.
0066.

0067
0068
0069
0070
0071
0072

0073
0074
0075
0076
0077
0078
0079
0080
0081
0082

0083
0084
0085
"086
0087
0088
0~89

009O
0091
0092
0093

0094
0095

0096

0097

009·8
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111

St.T UP HEADING
HDBUF SETS UP THE HEADING FOR DIRECTORy, STATUS, AND REPORT
ON THE SYSTEM CONSOLE. THE HEADING CONSISTS OF THE S'8rEM
10, DATE, AND TIME.

73072
73073
730;4
73075
73076
73077
73100
73101
73102
73103
73104
73105
73106
73107
73110
73111
13112
73113
73114
73115
73116
13117
73120
13121
73122
73123
7 3 124
73125
73126
73121
73130
7313t
73132
73133
73134
73135
73136

000000
~60303

070041
062355

110041
060532

034041
170041
060303
040361
070051

062353
010050
064352
116346
060532
064041
044365
170001
044361
074041
060111
006400
100400
000407
074042
006400
1°04 00
000371
005727
046356
114041

01716!')

001400
044041
170001
044361
73137 074041
73140 060110
73141 017165
73142 170041
73143 060532
73144 034041
73145 170041
73146 060042
73147 017165
7 3 150 034041

HD8UF

NOP
LOA T3581
QT ...

u, "

I. . T~MD
..... o
, ... , . , ..... WI

INITIALIZE TTY
BUFFER POINTER
LF.SPACE

LOA LFSPA
STA LTEMP+9,I
TWO SPACES
LOA ASCBB
ISZ LTEMP+9
STA LTEMP+9,I
MOVE
LDA T3581
ADA .+2
SrA MOVED
SYSTEM
LOA OSYID
STA MOVES
1D TO
LOB ,-5
JSB MOVFW,I
BUFFER
TWO SPACES
LDA ASC88
LOB LTEMP+9

Aoe

.+6

srA 8,1

ADS .+2
STB LTEMP+9

LOA OATIM

DIV ,+24

GET HOUR OF YEAR
CONVERT
TO OAY

5T8 LTEMP+t0
CLB
DIV .+1 0

SAVE HOUR REMAINDER
GET LAST
DIGIT

eLB

SLF,BLF
ADS ZERSL
MERGE IN SLASH
STa LTEMP+9,1
JSB TONUM
FIRST TWO DIGITS OF DAY

eee

ADB LTEMP.9
STA B,I
AD8 ,+2
5T8 LTEMP.9

LOA YEAR
YEAR OF CENTURY
JSB TDNUM
STA LTEMP+9,I
LOA ASCBB
TWO SPACES
ISZ LTEMP+9
STA lTEMP+9,I
LOA LTEHP+10 HOUR OF DAY
JSB TDNUM
ISZ LTEMP+9

PAGE 0340 #28
0112
0113
0114

0115
. 0116

0117
0118
0119
0120
0121
0122
0123.
0124*
0125*
0126
0127
1a128
0129
0130

0131
0132

73151
73152
73153
73154
73155
73156
73157

LIBRARY SUBROUTINES

170041
060172
040526

006400
100400
000510

017165

7 3 160 034041
73161 170041

73162 060413
13163 ~64303
"?:1'&A 121012
,

........ AV-'"

STA

LTEMP+9,I

LOA DATIM+l
ADA 036K
Cl.8
DIV 0600

CONVERT
110 MS
UNITS TO
MINUTES

.IS8 TDNUM

OF HOUR
15Z LTEMP+9
STA LTEMP+9,I
28 CHARS IN HEADING
LOA .+28
LOB 13581
JMP HDBUF,1

CONVERT A NUMBER <100 TO ASCII
73165
73166
73167
13170
73171
73172
13173
13174

000000
006400
100400

000371

TDNUM NOP
(LS
DIV .+10

001727

ALF,ALF

040001

ADA 8

040530

AOA ASC00
JMP TDNUM,l

127165

FIRST DIGIT
SECOND DIGIT
ASCII OFFSET

PAGE 0341 #28

LIBRARY

SUAROUTIN~S

0134*
0135*.

0136*.*
0137*·
Blla.

01 39*
0140*
0141.

PRINT HEADING
UHDBF PRINTS THE HEADING FOR DIRECTORY, STATUS, AND REPORT
ON THE USER TERMINAL. THE HEADING CONSISTS Of THE SYSTEM
10, DATE, AND TIME.

01~2.

0143
0144
1c1145
0146
0147
0148
0149
0150
0151
0152

13115 00000~
13176 060311
73177 11635rd
73200 060417
73201 116350
73202 060417
73203 11635~

73204 060417
73205 116350
13206 062353

0153

73207 070040

0154
0155

73210 060352
73211 070041

0156

73212
73212 160040
73213 001727
73214 01°500

0157
0158
0159

0160
0161
0162
fd163
0164

°165
0166
0167
0168

0169
0170
0171
0172
0173

73215 116350
73216 16004 0

73217
7322 0
73221
73222
73223
73224

010501fl

11 6 35 0

Pl34040
034 0 41
021212

060417
73225 116350

73226 060417
73227 116350
73230 060171

0176

73231 006400
73232 100400
73233 000407
73234 074041
73235 006400
73236 100400

0177

7 3 237 0003,1
73240 074040

0174
0175

0178
0179
0180
0181

0182
0183

0184
0185
0186

0187

7 3 241 017274
73242 060040
73243 040437
73244 116350
73245 060436
73246 116350
73247 060170

73250 017214
73251 060417
73252 116350

UHDBF NOP
LOA .+128

JSB
LOA
JSB
LOA
JSB
LOA
JSB
LDA
STA
LOA
STA

LOUTA;I
,+408
LOUTA,I
.... 40B
LOUTA,I
,+488
LOUTA,I
DSYIO
LTEMP+8
.-5
LTEMP+9

LF
BL.ANt<
BLANK

BLANK
-> SYSTEM ID

5 WORDS
UHOBl fOQU *
LDA LTEHP+8,I OUTPUT
ALF,ALF
AND 8377

JSB
LOA
AND
JS8
ISZ
ISZ
JMP
LOA
JSB
LDA
JSB
LOA

LOUTA,I
LTEMP"8,I

SYSTEM

8377

LOUTA,I
LTEMP+8
lTEMP+9
UHDBl
,+408

LOUTA,I
.... 408
LOUTA,!
OATIH

eLI

10

BLANK
BLANK

GET HOuR OF yEAR

DIy .+24

CONvERT TO DAy

STB LTEMP+9

SAVE HOUR REMAINDER

(L8
OIY ,+10

1ST 2 DIGITS IN A, LAST IN B

STB
JSB
LDA
ADA
JSB
LOA
JSB
LOA
J8B

LTEMP+8
UTDNM
LTEHP+8

OUTPUT 1ST 2

,+60 8

lOUTA,I

OUTPUT LAST ONE

.... 578

, I'

LOUTA,I
YEAR
UTDNH

GET Yf.AR

LOA ,+468
JSB LOUTA,l

AND OUTPUT

BLANK

PAGE 0342 *28
0188
0189
019"
0191
0192
21193
0194

0195
0196
0197

e,9g

0199
0200

0201
0202
01203

13253
73254
732S5
732ee
73257

LIBRARY SUBROUTINES

060417
116350
060041

017214

060172
73260 040526
73261 006400
73262 100400
13263 000510

73264 017214
73265 060402

73266 11635l!J
73267 060374
7 3 270
73271
73272
73213

116 3 5 0

060311
116350

127175

LOA
JSB
LOA
JSB
LOA

.+408

LOUTA,I
lTEMP+Y
UTDNM
DATIM+l
AOA 036K
CLB
DIV 0600

JSB UTDNM
LOA .+238
JS8 LOUTA,!
LOA .+158
JS8 LOUTA,I
LOA ,+128

JSB l.OUTA,I
JMP UHDBF,I

BLANK
HOUR OF DAY
CONVERT
100MS
UNITS TO

MINUTES
OF HOUR

X_OFf
CR

IF

0204.
0205. CONVERT A #<100 TO ASCII AND OUTpUT IT
0206.
0207 73274 000000 UTDNM NOP
0208 13275 006400
CL8
0209 73276 100400
DIV ,+121

0210
0211

0212
0213

0214
0215
0216

73277
73300
73301
73302
73303

000371
074043
040437
116350
060043

73304 040437
73305 116350
73306 12727 4

ST8 LTEMP+l1
AOA .+608

JSB LOUTA,1
LOA LTEMP+l1
ADA .+60 8

JSB LOUTA,I
JMP UTDNM,I

PAGE 0343 #28

UPDATE LAST CHANGED DATE ROUTINE

0218*
UPDATE LAST CHANGED DATES IF NECESSARy
0219.
0220.
*LCDL EQU •
0221 73307
0222 7 3 307 064272
LOB MLINK+l
IS THERE
A NEED TO
0223 73310 044341
ADS ,-"LINK

0224
0225
0226
0227
0228

0229
0230
0231
0232
0233
0234

0235

0236
0237
0238
0239
k1240

0241
0242
0243
0244
0245
0246
0241
0248
0249
0250
0251
0252
0253
0254
0255

0256
0257
0258
0259
0260
0261

0262
0263
0264
026e
0266
0261
0268
0269
0270

73311
73312
13313
73314
73315

1621001
010502
002003

027361
044376

73316 "02400
73317 103100
73320 170001

73321 010262
73322 044355
73323 060363
73324 170001
73325 044346

LOA 8,1
AND DFCHK
SZA,RSS
JMP EXIT1

eLF o
STA B,I
STA TIMEF

B,I
WE WON'T GET SWAPPED
ADB .+1PROS.?STAT

STA

ADA USE
STA MWORO

73333 044355
73334 060001
73335 065213
73336 114206
73337 124210
73340 061550

A08
LOA
LOB
JSB
JMP
LOA
LOB

73341 064272
73343
73344
73345
73346
73347
73350
73351
13352

017367
021361
"02400
110632
060212

040345

164000
001000
73353 045213
73354 074204
73355 040355
73356 065214

73357 114206
73360 124210
73361

73361 002400
73362 170632
73363 114614
73364 160634
73365 17 0 632
73366 125556

SET PRIORITY TO 0
NO TIMING

ADe .+?STAT-?PlEV
SET STATUS TO SYNTAX 80
LOA ISYNT

73330 003000

73342 044346

LCD UPDATE

ADS .... 'PLEV

13331 041213
73332 070204

73327 170001

FOR POSSIBLE

CLA

LDA PBPTR
STA B,l
eMA

7 3 326 060056

CHECK FILES

A08
JSB
JMP
ClA
STA

BOUND INTO
TTy TABLE
CAl.CULATE LENGTH

'OR WRITE
TO DISC

.... ?DISC·1PROG
w> SWAP TRACK DISC ADDRESS

8
USE
DISCZ,1
PTZAp,I

OUTPUT USER
TO DISC
BLEw IT, Go ZAp UsER
FRMAT
GET FILE COUNT (.)
MlINK.1
GET POINTER
.+?IO-1lINK
TO ID WORD
LCD
GO uPDATE LAST CHANGED DATEs
EXIT7
CORE INTACT, EXIT
BLOCK
Dele1,I
CLOCK
MlINK+l
RESTORE

LOA
ADA .+1PRQG .. ?LINK
USER
LOB A,l
eMS
ADS USE

5T8 MWORD
SWAP
ADA ,+?DlSC-?PROG
LOB USEI
JSB DISCZ,1
AREA
JMP PTZAP,I
BLEW IT, GO ZAP US!A
EXIT1 EQU •
CLA
BI.OCK
STA

Dele!,I

STA

Delel,I

JSB ABCK,I
LOA DCLC2,I

JMP LCDLP,I

CLOCK

CHECK FOR ABORTS
UNBLOCK

CLOCK

PAGE 0344 #28

r
~

UPDATE L.AST CHANGED DATE ROUTINE

0272*
THIS ROUTINE ASSUMES THAT THE USER'S SWAP AREA IS IN CORE,
0273*
4
THAT THE B REGISTER POINTS TO HIS 10 WORD IN THE TELETYPE
027 *
TABLE, AND THAT A CONTAINS THE N!GATIyE OF THE NUMBER OF FILES
0275*
",276.
0271*
NOP
ENTRy POINT
8278 73367 000000 LCD
STA LCDFC
SAYE FILE COUNT
0279 7 3 37 0 0123f11
BTB LCDID
AND 10 POINTER
0280 73371 016343
0281 73312 002021
SSA,RSS
MAKE SURE THERE REALLY ARE
JMP LCD9
SOME FIL.ES
0282 73373 027452
CLA
INITIALIZE DIRTY
0283 13374 002400
STA DFCNT
0284 13375 072342
FILE COUNT TO ZERO
028 5 73376 062340
GET ADDRESS FOR FIRIT
LOA DFNAM
STA MOVED
DIRTY FILE'S NAME
0286 73377 070051
l.DB FIl.TS
GET START OF FILE TABLE
0287 7340A 065502
0288 7 3 401 006004
IN8
BUMP POINTER TO WORD 1
STB LCOBS
OF ENTRy AND ·SAYE
0289 73402 ,,76344
611290*
0291 73403 160001 LCDl LDA B,I
GET DIRTY FILE BIT
AND BIT14
HAS THIS FILE
0292 734 0 4 °1 0 215
5ZA
BEEN CHANGED?
0293 73405 002002
0294 73406 021462
JMP LCD2
YES
NO, POINT TO NEXT ENTRY
0295 73407 044376 LCOJ ADB ,+FTfL
0296 73410 036341
ISZ LCDFC
ARE THERE MORE FILES?
JMP LCOl
YEI, CHECK NEXT ONE
0297 13411 027403
0298 73412 062342
NO, WERE
LDA OPCNT
5ZA,RSS
0299 73413 002003
ANY DIRTY?
JHP l.CD9
NO, RETURN
0300 73414 027452
0301.

0302
0303
0304
0305
0306
0307
0308
0309
0310

0311
0312

0313
0314

0315
0316
0317
0318
0319

0320
0321*

0322
0323
0324
0325

73415
7 3416
73417
73420
73421
73422
7 34 23
73424
7 342 5
13426
73427
73430
73431
73432
73433
73434
73435
73436
73437
13440
73441

ISZ LCD
CMA,INA
STA OFCNT
LOB DFNAM

037367
003004
072342
066340
076344
162343
070030
16012101
070031
006004
104200
100001

ST8 l,COBS

LCD6

73442 060257
73443 002003
73444 027452
73445 006400

LCDID,I
LTEMP
8,1
LTEMP+l
B,l

OST LTEHP+2

104400
000032

116347
027472
066344
044362
076344
036342
027424

LOA
SrA
LOA
STA
INB
OL.D

JS8 OLOKA,I
Leo5

lCD7

JMP
l.OB
ADa
STe

lC08S
,+3

LCDBS
ISZ OFCNT
JMP LCD6

LDA DIRWD
SZA,RSS
.JMP LCD9

CLB

yES, BUMP RETURN (COR! 18 0IFF)
SAVE NEGATIVE OF
DIRTY FILE COUNT
GET ADDRESS OF FIRST
DIRTY fILE'S NAME
STICK 10 IN LTEHP
FOR DLOOK
MOVE DIRTY

FILE'S
NAME
INTO

LTEMPS
GO HUNT FOR DIRECTORY !NTRY
FOUND IT
BUMP
POINTER TO
NEXT NAME
MORE DIRTY FILES?
YES, PROCESS NEXT ONE

NO, WRITE DIRECTORY TO
DISc IF ANY IS IN tORE
ELSE, RETURN
TELL DLOOK

PAGE 0345 #28
0326

0327
032S
0329
0330
0331
0332
0333
0334
0335
0336

0337

73446
73441
73450
73.51
73452

UPDATE lAST CHANGED DATE ROUTINE

074257
064676
114206
114211
066343

LC09

73453 044352
73454
73455
73456
73457
73460

060502
103100
120001
170001
102100

DIRWD
THERE ISN'T
WRITE TRACK
LI8D
DISCZ,1
TO DISC
SlVAG,I
BAD NEWS, TRY TO 8ALVAaE
CLEAR
LCDID
CHECK
.-110
LOA OFCHK
FOR
DIRTy
eLF 0
XOR 8,1
FILES
ST8
LOB
JSB
JSB
LOB
ADB

STA

e,l

STF "
JMP lCO,I

73461 121367

8IT

RETURN

0338.
MOVE NAME OF DIRTY FILE TO SAFE PLACE
0339*
0340*
0341 73462 036342 lCD2 ISZ DFCNT
BUMp DIRTY FILE COUNT
STB LCDBS
SAVE POINTER TO FILE TABLE ENTRY
0342 73463 076344
GET POINTER TO FILE NAME
ADS ,+10
0343 73464 11'44371

0344

73465 07 4050

5T8 .MOVES

0345
0346
0347
0348

73466
73467
73470
73471

LOB ,-3

~J49*

064354
116346

JSB MovFW,I
LOB LCOBS
JMP lC03

066344
027407

AND SET IN MOVEW'S SOURCE ADR
MOVE THE 3
NAME WORDS
GET ENTRY POINTER BACK
RETURN TO SCAN OF FILE TABLE

PROCESS A FOuND OIRECTORy ENTRy

0350*
0351.
0352
0353
03 5 4
0355
0356
0357
0358
0359

·73472
73413
7 34 7 4
73475
73476
73477
73500
73501

0360

73502

0361
0 3 62
0363

73503
73504
73505

060034
040364
07 02 57
064035
044361
1600~1

002021
027435
044363
060171
170001
027435

LCD5

LOA
AOA
STA
LOB
ADB
LOA

LTEMP,..4
,+5
DIRWD
LTEMP.5
,+2
8,1

SSA,RSS
JMP LCD1
ADB .... 4

LOA OATIM
STA B,I
JMP LCD7

TELL. DLOOK WHICH
DIRECTORY TRACK
GET

IS IN CORE

WOAD
2

IS THE ENTRY A FILE?
NO, GO PROCEss NEXT NAME
YES, UPDATE I.AST
CHANGED DATE IN
DIRECTORY ENTRY
GO PROCESS NEXT NAME

PAGE 0346 #28
0365.
0366*
0367*
0368.

0369
0370

0371

0372
0373
037~

0375
0376

0377
0378
037 9
0 3 80
0381

0382
0383

0384
0385

0386
0387
0388

0389
0390
0391
0392
0393

0394
0395
0396

0397
0398

UPDATE LAST CHANGED DATE ROUTINE

THIS ROUTINE SETS UP THINGS TO UPDATE THE LAST CHANGE DATE
WHEN A USER HAS ABORTED
73506
13507
13510
73511
73512
73513
73514
73515
73516
73517
73520
73521
73522
73523
73524
73525
73526
73521
73530
73531
73532
73533
73534
73535
73536
73537
7 3 54 0
73541
73542
73543

060255
040363
064056
174000
007000

045213
074204
040355
065213
114206
124210
061500
003004
VJ64255
044364
017367
080000

ABUCD LOA
AOA
LDB
STB
eMS
ADB
STB
ADA
LOB

MAIN
.+?PROG
pBPTR
A,1

SET BOUND IN
TTY TABLE

COMPUTE AND SET
TRANSFER LENGTH
!+?DISC~?PROG
_> DISC ADDRESS
USE
WRITE SWAP
JSB DISCZ,I
TRACK TO DISC
JMP PTZAP,I
BLEW IT, FLUSH USER
LOA FCNTR
CHA,INA
_# OF FILES
LOB MAIN
ADS .+110
a> ID WORD IN TTY TA8~E
JSB LCD
UPDATE LAST CHANGE DATE
NOP
elF B
LDB MAIN
STB TTQ
FOR SCHEDULER
LDA UNABT
lOR ABTRY
eMA
AND e,I
STA B,I
CLEAR ABORT FLAGS

103100
064255
074062

060377
030476
003000

110001
170001

USE
MWORO

CL.A

002400
01 02 55

170632
044374 .

STA MAIN
STA Dele1,I
AOS .+18r AT

USER NO LONGER IN CPRE
BLOCK CLOCK
•• STATUS WORD

126352

.JMP DSCH1, I

ENTER ABORT CODE IN SCHEDULER

0399.

0401
0402
0403

0404
04f(J5
0406
0407
0408
0410
0411
0412

73544
7 3 5 44
73545
73546
73547
73550
13551

SUP

MLKFL EgU
LOA
LOB
JMP
OfF
OCT

060410
~61547

126351
073550
005114
0415 0 3

73565
73565 005104
73566 044523

ASC

73601 000000
74004

.. +2

LEN2A,I
•• 1

5114

12,OCKEO BLOCKS TABLE FULL

DDERL EQU ..
OCT 5104
ASC
UNS

0413
0415
0416

•.... 25

FIL8F

11,ISC E:.RROR, CAN'T DO IT

BSS 131

ass

"

FILE BUFFER

PAGE 0347 #29
0002
0"03
0004
0005
0006
!a007
0la08

0009
0010
0011
0012
~013

0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024

0025
0026.
0027
0028
0029
0030
0031
0032
0033
0034.
0035
0036
02137
0038
0039
0040
0041

LIBRARY SUBROUTINES

LIBse 'EQU LTEMp+8
LisS' EQU LTEMP+9

00040
00041

000-45
14004 025055
14005 030055
74006 171645
740~7 001400
74010 A05040
74011 00£1000
74012 000000
14013 000000
74014 000000
14015 000'900
74016 074532
74017 031073
74020 072357
74021 072742
74022 073011
74023 073072
74024 061346
74025 073544
7 4 026 07 4 671
74027 072415
74030 0021116
74031
74032
74033
74034
74035
74036
74037
74040
74041
74043
74045
14046
74047
74050

072623
013026
071667
010360
072174
071662

073175
000000
000000
0021000

000000
0210000
074050
000000

LISpS
AseAM
AseaH
M133.

EQU
ASC
ASC
OCT

lTEMp+13
1, ••

BSS
BSS
BSS
OEF
OEF
OEF
DEF
OfF
DEF
OfF
OEF
OfF
OfF
OEF

RTAO
RTID
SCHOU
SCHR
8IoTP

OEF
OEF
OfF
OEF
OEF
suspp OfF
UHDBA DEF

1,0-

1
1
t

USED BY STATUS
uS[D By
STATUS WHILE SU8PfNDED

GeIDr

LINK TO DIRECTORY SEARCH ROUTINE
s> FINO ADT
II> FIND lOT
.> GET CURRENT USER.S IDT

LCHAR
DLOOK
FADT
flOT
HDBUF
MDEAD
Ml.KFL
CRLF
RBADT
AoTAT
RTAOT
RTIDT
SCHOQ
StH1
SlOT

.> RETURN BLOCK TO AOT

cYCLIC POINTER TO CURRENT

DISK ADT TRACK ADDRESS
.> RETURN TABLE TO ADT
.> RETURN TABLE TO IDT
-> SCHEDUL.ER
-> SEARCH lOT

SUSP

UHOBr

MlKCT BSS 1
MLKL.B BSS 2
MLKIN BSS 2
MLKLN BSS t·
MLKRO ass 1
MLKRP OfF .+1

ass

•

.133

PRTMI< OCT 1400
PLFBK OCT 5040
LTyPl BSS 1
LTYP2 BSS 1

STABf
STAV1
STAV2
OLCHR
DLOKP
FAOTP
FIOTP
GelD
HDBFA
MDEOP
MLFLA
PCRLF
RBAO
RKCYP

SEMI-COMpILED FLAG
START OF PROGRAM POINTER
END OF PROGRAM POINTER (P8PTR)

6

THESE
WORDs
ARE
USED

ey
HLOCK

PAGE 0348 #29
0043*
0044.
0045*
0046
0041
0048
0049

0050
0051

0052
0053

005 4
0055
0056
0057

0058
0059
0060
0061
0062

LIBRARY 8UBROUTINtS

RDPRG READS THE CURRENT USER INTO CORE.
14056 000000

14057 060272
14060 040345
74061 t64000
74062 074056
14063 007000
74064 045213
74065 014204
74065 006400

74067 174632
74070 040355
74071 065214
74012 114206

74073 124210

74074 160634
7 4 12115 110632
74076 126056

RDPRG NOP
lOA MLINK+1
AOA .+?PROG""llINK
GET PROGRAM BOUND
LDB A,I
518 PBPTR
CMS
COMPUTE
TRANSFER
ADS USE
8T8 ~WORO
LENGTH
CLB
BLOCK
STB DelC1,1
CLOCK
ADA .+?DISC·?PROG .~ DISC ADDRESS
READ IN
LDB USEI
USER
JSB DI8CI,1
JMP PTZAP,I
BLEW IT, ZAP THIS USER
LOA DCLC2,1
UNBLOCK SCHEDULER.
STA Delel,I
RETURN
JMP RDPRG,I

0063.-

0064.*
0065***

GETIO

0066.*
0067*
0068.
0069. GElID

SCANS THE INPUT BUFFER FOR AN ID NUMBER. IF NOT FOUND, IT

007,,* OUTPUTS A MESSAGE ANO TERMINATES,

0011* IF FOUND, THE RESULT IS PLACED IN 10, -RESULT

0072. IN MID, IF THE FOLLowING CHARACTER IS A cR, GElID SKIPS ON THE
0073* WAy BACK. IN ANY CASE, THE NEXT CHARACTER IS IN A.
0074* GETID USES LTEMP.12,t3,14,15.

0075*
0076
0077
0078

00044
00045
00041;

0079

001£'47

0081
0082
"'°8 3
0084
0085
0,,86
0087
0088
0089
0090
012191
00Q2
012193

GETtH
GETlt
GETI2
GETI3

74077 000000

74100 060212
74101 066016
14102 050263
74103 064754
74104 014044

74105
74106
74107
74110
74111
74112
14113

114044

EQU
EQU
EQU
EQU

LTEMP+12
LTEMP+13
LTEMP+14
LTEMP+15

GETID NOP
LOA Ml.INK.l
LOB OLCHR
CPA T35L.N

LDB T35CH
5T8 GETCH
JSB GETCH,I

JMP GTFER

0095

026616
042006
002021
026616
040411
002024
74114 026616 .
14115 100032

0096

74116 070045

STA GETl1

0097
0096

14117 060354
74120 070046

lDA .-3

0094

AOA M13J.
SSA,RSS
JMP GTFER

DETERMINE WHICH SCANNER TO USE

USE LeHAR IF

USER

SCAN INPUT BUFFER FOR FIRST
CHARACTER,
TEST FOR LETTER

ADA .... 328

SSA,INA
JMP GTFER
ASL 10

STA GETI2

-TELETYPE,

T35CH IF SYSTEM.

SAVE FOR LATER.
SET DIGIT
COUNTER.

PAGE 0349 #29
0099

0101
0101
0102

0103
0104
0105
0106
0107

011218
0109
0110
0111
10112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123

LIBRARy SUBROUTINES

74121 006400
14122 014047

74123 114044
14124 026616
74125 040322
14126 002021
14127 026616
74130 040311
74131 002020
74132 026616
14133 064047
74134 0105222
74135 044047

CLB
GETI4 5T8 GETI3

JSB GETtH,I
JMP GTFER
AOA "'728
StA,RSS
JMP GTFER
ADA ,+10
5SA
JMP GTFER
LOB GETI3

RaL,RaL

74136 005200

ADB GETI3
RBL

74137 04400ta

ADS 0

034046
74141 026122
74142 044045
74143 074052
74144 007004
74145 014053
74146 116021
74147 114044

ISZ GETI2
JMP GETI4
AOB GElI!

7414~

74150 036077
74151 126077

STa IO

CMe,INB
STB MID
JSB FIOTP,I
JSB GETtH,l
ISZ GETID
JMP GETIO,l

SET NUMBER
TO 0.
GET NEXT CHAR,
fAll..

TEST FOR DIGIT
FAIL..

fAll.
GET PARTIAL VALUE.
MULTIPLY BY 10,

ADD IN NEW DIGIT,
TEST FOR DONE,
MERGE IN LETTER,

FIND ID TRACK
GET NEXT CHARACTER.
SKIP RETURN IF CRt

~124*

0125**
0126***

0121.·
0128.
0129",

0130.

0131.

0132.
0133",

SCHEDULE LIBRARY ROUTINE FOR EXECUTION
THIS ROUTINE IS CALLED By THE COMPILER WHEN IT WANTS TO EXECUTE
ONE OF THE FOLLOWING LIBRARY ROUTINES, CHAIN, FILES, OR AS8IGN.
THESE LIBR~RY ROUTINES ARE ALWAYS EXECUTED WITH A PRIORITY Of 0,
AS ALL LIBRARY ROUTINES ARE, THE CALLING SEQUENCE IS.
JSB SCHLB,I
OEF cPOINTER TO DISC ADDRESS OF



0134.
013 5*
0136*

!d137.
0138.
0139
01 4 0
0141
0142
~143

0144

74152
74 15 3
74154
74155
74156
74157

00~000

103100

064272
044341
160001
010462

7416~

0145
0146
0147

002002
74161 126036
74162 160001

~148

74163
7416 4
74165
74166
74167
7417Vt
74t71

0149
121150

0151
L1152
0153
0154

SCHlQ NOP

eLF o

LOB MLINK+l
ADB .-?LINK
LDA B,l
AND COM14
SZA

~44376

JMP SUSPP,I
LDA 1,1
lOR UNA8T
STA 1,1
ADB .... 1PLEv

002400

CL.A

030377
170001

ROUTINE~

~70262

srA TIMEF

170001
044355

STA

SUSPfND

IF USER
TRIED TO
ABORT
SET UNABLE
TO ABORT

BIT

NO TIMING.
1,1
sET PRIORITY TO 0
AOB .+?5TAT.?PLEV SET STATUS TO SYNTAX

PAGE 0350 #29
0155
~166

0157
0158
0159

0160
~161

0162

0163
0164
0165
0166
0167
0168
, 0169

0170
0171
0172
0173

0174
0175
0176
1211 77
0178

74172
74173
74174
7 4 175

LIBRARY SUBROUTINES

060363
170001

044346
960056
74176 170001
74177 0030~0
14200 041213
74201 070204
74202 044355
74203 06 0 001
74204 065213
74205 114206
74206 124210
74201 162152

74210 036152
74211 050256
74212 027000
74213 070256
74214 064315
74215 074204
74216 064610

74217 114206
74220 114207
14221 027000

LOA XSYNT

SO SCHEDULER DOESN'T KNOW

srA 1,1
WHAT WE'RE DOING,
AOB .+1PROG.1STAT
LOA PBPTR
8ET P8PTR IN TABLE.
STA B,I

eMA

COMPUTE
TRANSFER
MWORD
LENGTH
.+?DISC.1PROG
B
a> SWAP AREA DISC AODRESS
USE
SWAP USER
01SCZ,1
OUT OF CORE
PTZAP,l
NO GOOO, REMOVE THIS BUM
SCHLQ,t
.> LIBRARY ROUTINE DIsc ADDREsS
SCHLQ
LIB
IF ROUTINE IS ALREADY
LIBRA
IN CORE, TRANSFER TO IT
LIB
SET POINTER
M512
SET TRANSFER
MWORD
LENGTH
#LIBt
READ IN
D1SCz,I
LI8RARY ROUTINE
SlCKP,I
BAD NEWS

ADA USE

STA
ADS
LOA
LOB
JSB

JMP

LOA
IaZ
CPA
JMP
STA
LDB
STe
LOB
JSB
JSB
JMP LIBRA

0179.

COMPILER CALLED ROUTINES ALWAyS RETURN HERE
0189.·
0181*
0182 14222 1213100 SCMBl elF 0
LOB MLINK+t
01 8 3 74223 064272
ADB .+18TAT~?LINK
0184 74224 044356
0185 74225 134001
tSl 1,1
TRUE STATUS Is RUN
0186 74226 034262
lSZ TIMEF
sET FLAG FOR tIMING
0187 74227 044355
ADS .+?CLOC.?STAT
ISl 1,1
TIMED OUT1
0188 74230 134001
0189 74231 026250
JMP SCHBl
NO
AoB .+?PLEV~?CLOC
0190 74232 044363
0191 74233 060363
LOA ,.4
SET PRIORITY TO 4
STA B,l
0192 74234 1721001
0193

74235 044354

0194
0195
0196
0197

74236 062152

0198
0199
0200
0201
0202
0203
0204
0205
0206

74237 110001
74240 0024210
74241 170632
74242 10210kl
74243 064272
74244 160001

74245 070272
74246 016252
74247 126034
74250
74250 102100

74251 126152

ADB .+?HSTR_?PLEV
LOA SCHLQ
STA B,I
SET RESTART ADDRESS
CLA
STA DelCl,I
BLOCK CLOCK
STF '"
LOB MLINK+l
REMOVE
LDA B,r
USER FROM
srA MLINK+l
QUEUE
JSB INSEQ
INSERT AGAIN AT END
JMP SCHR,1
RETURN TO SCHEDULER
SCH81 EQU •
STF 0
JMP SCHLQ,I
RETURN TO LANGUAGE PROCESSOR

PAGE 0351 #29

LIBRARY SUBROUTINES

0208.
0209 ••
0210 •••

INSERT USER INTO THE QUEUE
0211' ••
0212*
0213*
0214* THIS SUBROUTINE INsERTS A USER INTO THE QUEUE IN ORDER OF HIS
0215*
1fJ216*
0211*
021S*
0219*
0220*

121221
0222
0223

0224

0225
0226

0227
0228
0229
0230
i'l231
0232
0233
0234
0235
0236

121237
023~

0239
0240
~241

0242
0243

0244
0245
0246

0247
0248
0249
0250
0251
1a252*

PRIORITY. WHEN wE ARRIVE HERE, THE 8 REGISTER POINTS TO THE LINK
WORD FOR THE USER, INSEQ TRANSFORMS THE USERS ENT£RIN& PRIORITY
(EP) TO ANEW PRIORITY (NP) BY THE FOLLOWING ALGORITHM.
NP • EP.NPORT/4
WHERE NPORT IS THE NEGATIVE MAXIMUM NUMBER OF PORTS.

74252
74253
74254
74255
74256
74257

000000
074061
044360

74261
74262
1426 3
74264
74265
74266
7 4 267

001121

074067
160001

t00200
7426I(J 000167

7421~

170067

003004

070067
064271
074064
16 40 01
054271

74271 026303
74272 060001

74273 040360

74274 0700-66
74275 160000

74276 040067
74277 002021
74300 026266
74301 134066

7431212 000000
74303 174061
74304 060061
74305

170064

74306 040354
74307 064345
74310 174000
74311 126252

INSEQ NOP
STB SCHL
SAVE LINK ADDRESS
ADS .+?PLEV"?LINK
STB SCHPR
SAVE PRIORITY ADDRESS
COMPUTE AND
LDA B,I
MPy NPORT
SAVE PRIORITy
ARS,ARS
BASED UPON THE
STA SCHPR,I
• OF AyAILABLEPORTS
CMA,INA
SAVE POSITIVE
STA SCHPR
VALUE FOR TEST
LOB MLINK
-. PHONY USER
SAVE LINK POINTER
INSl ' ST8 SCHP
LOB B,I
B .> NEXT USER
cpa MLINK
DID WE REACH END Of QUEUE'
JMP INS2
YES
LOA B
NO
ADA .+?PLEY-?LINK
STA SCHT
SAVE THIS USER'S PRIOR!TY ADOR,
... ,
LOA A,l
GET THE PRIORITY AND
ADA SCHPR
ADO THE TEST VALUE
SSA,RSS
IF >.
TRY THE
JMP INS1
LINK TO NEXT USER
ISZ SCHT,1
INCREMENT PRIORITY
NOP
OF PREVIOUS ENTRY
SET NEW ENTRY TO PO!NTTO USER
INS2 STB SCHl,I
LOA SCI"U.
STA SCHP,l
SET PREVIOUS ENTRY •• NEW ENTRY.
ADA .+?ClOC-1LINK SET NEW USERS CLOCK TO -18.
LOB .-10
STe 0,1
JMP INSEQ,I
, !

0253 ••

ABORT CHECK
0254***
0255*.
0256*
0257.
0258. TEST FOR ABORT ATTEMPT WHEN THEy wEREN'T
0259* THE SCHEDULER KNOW TO ABORT HIM
026121 14312 0000~0 ABCHK NOP
LOB ML I t.IK+ 1
CLEAR
0261 74313 064272
ADS ._?LINK
0262 74314 044341

ALLOwED~

IF 80, LET

PAGE 0352 #29

LIBRARY SUBROUTINES

0263
0264
0265

74315 ,,60377
74316 003000
74317 10310ki

0266
0267

74320 11 00 01
74321 110001
74322 102100
74323 010476
74324 0020~3
74325 126312
74326 10310k'
74327 030506
74330 003000
14331 110001
74332 030462
74333 170001
74334 002400
74335 170632
74336 044374
74337 003400
74340 170001
74341 102100
74342 126034

0268
0269

0270
0271
0272

0273
0214
0275
0276
0277

0278
0279
0280
0281
0282
0283

0284

LOA UNABT

eM.

UNABLE TO

elF A

ABORT

AND 1,1
STA t,I

STF 0
AND ABTRY

SlA,RSS
JMP ASCHK,I
eLF 21
lOR CHNFG

eM.

ANO t,I
rOR COM14

STA
CLA
STA
ADB
CCA
STA
STF
JMP

1,1

Dele1,I
.+?STAT
1,1
0
SCHR,I

FLAG
ABORT ATTEMPTED?
NO
YES
CLEAR ABORT

TRY FLAG
SET COM1" BIT
TO SIGNAL SCHEDULER
BLOCK
CLOCK
SET STATUS
TO ABORTING
RETURN TO SCHEDULER

0285*

0286.*
0287.*ta28tJ.*
0289.
0290.
0291.

0292.
Ld293.

02 9 4 *

SEMI-COMPILE CHECK

CHECK IF THE PROGRAM WHICH HAS JUST BEEN LOADED FROM THE USER
LIBRARY IS SEMl.COHPILED, AND SET THE NECESSARY COMPILER
VARIABLES. LIBse, LI8SP, AND LISPB ARE PASSED TO THIS ROUTINE
FROM THE LIBRARy ROUTINE WHICH CALLS IT (CHAIN, GET, OR HELLO)

0295.
0296
0297
0298
0299

0300
0301
03 02
, 0303

0304
0305

0306
0307
0308

0309
0310
0311
0312

0313
0314
0315

0316
0317
0318

74343
74344
74345
74346
74347
74J5~

74351
74352
7 4 353
74354
74355
74356
74357
74360
74361
74362
74363
74364
74365
74366
74367
74370
74371

000000
103100
060040
002020
026362
002400
071573
060045
07 0 056
064272
044341
060361
003000
1100~1

026414
~60045

040350
070056
071502
164000

075573
002004
164000

SEMIC NOP
Cl.F o

LOA LIBSC
5SA

JMP SEHll
CLA
srA SYMTB
LOA LISPS
srA PBPTR
LOB MLINK+l
ADS .-?LINK
LDA CFLAG
eMA

SEMI.COMPILED?
YES
NO •• CLEAR OUT-OFSTORAGE FLAG
SET LENGTH
POINTER
SET
UNCOMPILED

BIT

AND 1 , I

JMP SEMIJ
SEMIl LOA LISPS
ADA .-7

PBPTR
STA FILTB
LOB 0,1
STB SYMTB
INA
LOB
STA

SET
LENGTH
POINTER

SET ENO-OFPROGRAM POINTER
SET cFILES
STATEMENT>

PAGE 0353 #29
0319
0320
0321
0322

0323
·0324

0325
0326
0327
0328
0329
r.a"Z"lI.tJI
'Q,J,JIJ

0331
0332
0333

(21334
(21335

74372
74373
74374
74375
74376

LIBRARY SUBROUTINES

075230

74377 002004
74400 164000

74401 175603
74402 035603

74403 03523kJ
74404 026377
74405 002004
74406 164000

74407 075605
74410 064272
74411 044341
74412 1600"1

0336
0337
0338
0339
0340

74413 030361

0341
0342
0343

74420 075575
74421 102100

0344.
0345*
0346·
0347.
0348
0 34 9
0350
0351
0352
0353
0354

0355

74414 030612

74415 170001
74416 074255
74417 064041
74422 126343

FILeT

LOB OFILT

COUNTER
POINTER TO

LOB ,,,,4

4

STB

075604
064444
075603
06.353

STa FILPT
STB
SEMI2 INA
LOB
STB
ISZ
ISZ
JMP
INA
LOB
STB
LOB

SPTR

0,1
lJSESN
MLINK+l

LOA
lOR
SEMI3 lOR
STA
5T8
LOB
STS
STF
JMP

1,1
CFLAG
PUALT
B,1
MAIN
LIBSP
SPROG
0
SEMIC,I

0,1
FILPT,1
FILPT
SPTR
SEMl2

STATEMENT.»
cFILES
STATEMENTS> POSSIBLE
STORE
POINTER
TO  BUFFER (BIl 15 = 1 FOR PUNCHING)
74502
74503
74504
745215
74506

000000
114760
1031Ot0
062502
0'0275
74507 060276
74510 070300
74511 ('}60362
14512 070216
74513 126036

T35SP Nap
JSB TTY35,I
elF 0
LOA T35SP
STA T35RS
LOA T355T
STA TJBPR
LOA %OUTW
STA T358T
JMP SUSPP,I

FIRST OUTPUT,
MOVE RETURN AODR~SS
INTO TABLE.
MOVE STATUS INTO PRIORITY
SET STATUS TO OUTWAIT.
GO HANG

OUTPUT LF TO SYSTEM CONSOLf AND TERMINATE

PAGE 0356 #29
0439
0440

LIBRARy SUBROUTINES

LEND

LDA ONEI

0441

74514 060722
7 45 15 06 4 636
74516 114760

0442
0443

7452~

eLF
(LA

0444
0445

74522 12474'"

JMP SCHEN,I

7 4 517

1031~0

002400
4
7 521 070312

0446.

LDB DEH
LtND2 JS8 TTYJ5,I

OUTPUT THE

LINE FEED.

OUTPUT BUFFER AND TERMINATE

(21

STA T35F2

OUTPUT ILLEGAL FORMAT MESSAGE TO SYSTEM CONSOLE ANO TERMINATE

~447*·

0448*
0449 74523 060376
0450 74524 066713
0451
74525 026516

0452*

L.FRER LOA .+15

LDB LfRDF
JMP LEN02

OUTPUT DISC ERROR MESSAGE TO SySTEM CONSOLE AND TfRMINATE

0453.·

0454.
0455
0456
0457
0458

74526
74526 060414
74527 066531
74530 026516

0 4 59 7 4 531 073565
0460*
0461.·

0462**.
0463*·
0464*
~465.

0466*
"467*

0468*
0469*

0470*
",471*
0472*

0473

'.t,

0493

74556 c;,40470

0494

74557 036532

04 80

.+29

.+2
lEND2
OEF ODERL

LCHAR IS USED By LIBRARV PROGRAMS TO OBTAIN CHARACTERS FROM THE
USER'S INPUT BUFFER IN THE 1/0 PROCESSOR, EACH TIME IT IS
CALLED, IT FETCHEs THE NEXT CHARACTER, SKIps BLANKS, AND CONvERTS
LOWER CASE CHARACTERS TO UPPER CASE. THE CHARACTER IS LEFT IN
LCHCR AND A. WHEN A CR IS ENCOUNTERED, LCHAR RETURNS TO
OTHERWISE TO P+2.

0481
0482
0483
0484
0485
0 4 86
0487
0488
0489
0490
0491
0492

~479

•

USER TELETYPE INPUT ROUTINE

74532 000000
74533 060264
74534 050374
74535 126532
74536 064272
74537 044342
74540 160001
74541 030215
74542 114736
74543 102 311
74544 026543
74545 102511
74546 070264
14547 050417
7455~ 026536
14551 050374
74552 126532
74553 040317
74554 "02 0 21
74555 040450

0474
0475
0476
0477
0478

DDERR EQU
LOA
LOB
JMP

LCHAR NOP
LOA
CPA
JMP
LCHRt LOB
ADB
LOA
lOR
JSB
SFS
JMP
LIA
STA

LCHCR
.+158
lCHAR,1
MLINK+l

GET CARRIAGE RETURN FLAG

PREVIOUS RETURN?
YES

.+?T~UM-?LINK

1,1
GTe
8145C,1
CH2
... 1
CH2
LCHCR

CPA .... 408

LCHR2 JMP LCHRl
CPA .+15B
JMP LCHAR,l
ADA M96
SSA,RSS
ADA MJ2
ADA .14(»
lSI LCHAR

FETCH
CHARACTER
FROM 2114
WAIT FOR
REsPONSE
SET CARRIAGE RETURN FLAG
BLANK?
YES, IGNORE IT
NO, CARRIAGE RETURN
YES."EX I T'
LOWER CASE?
yES, CONVERT

NO
NO.-EXIT

PAGE 0357 #29
0495

7456~

LIBRARy SUBROUTINES
JMP LCHAR,I

126532

0496.

0497 ••
0498.*.
04t99 ••
0500.
1tJ501.

USFR TELETyPE OUTPUT ROUTINES

0502*. OUTPUT CHARACTER IN A TO USER'S TELETYPE
0503.
0504 74561 000000
0505 74562 064272
0506 74563 044341

0507
0508

0509*

0510*.
0511*
0512*

0513*
0514

0515
0516
0511

0518
0519
0520
0521
0522
0523
0524
0525
0526

0527

74564 114724
74565 126561

0530*.

74566
74567
74570
74571
74572
74573
74574
74575
74576
74577
74600

7461211
74602
74603

000000

LTYPR NOP

072011
076012
162012
001727
016561

STA LTYPt
STB LTYP2
LTYPJ LDA LTYP2,I
ALF,ALF
JSB LOUT

~541..

OUT.

ISZ LTYPt

ANY MORE'

002001
126566
162012
016561
036012
036011
026571
126566

RSS
.JMP

NO,

LTVPR,I
LOA LTYP2,I

.J9B

LOUT

ISZ LTYP2

ISZ LTYPl

JMP LTYP3
.JMP lTYPR,I

YES

SEND 2ND

CHAR,
BUMP POINTER.
ANY MOREl
yES

oUTPUT BUFFER AND CR-LF TO USER'S TELETyPE
A. .NUMBER OF CHARACTERS
B .> BUfFER
LTYPE NOP
JSB
LDA
LOB
JSB
JMP

LTYPR
, .. 2

PCRI.F
LTYPR
lTYPE,I

OUTPUT LF TO USER'S TTY AND TERMINATE

0542*
0543 74613 060371
0544 74614 016561
0545 74615 124740

lLEND LDA .+128
JSB LOUT
JMP SCHEN,I

0547.

0548..
1(,1549.

SAVE CHARACTER COUNT
SAVE BUfFER POINTER
GET FIRST
CHARACTER OF WORD

~36011

0533*
0534 74605 000000
0535 74606 "'16566
0536 14607 060355
0537 74610 066026
0538 74611 016566
0539 74612 126605

1d540*

NOP
LDB MLINK+l
ADS ~"?bINK
JSB OUTCH,I
JMP LOUT,I

OUTPUT BUFFER TO USER'S TELETYPE
A. .NUMBER OF CHARACTERS
B -> BUfFER

0528 74604
0529.

, 0531*
0532*

LOUT

ERROR MESSAGE TERMINAL

CU~CK

pAGE 0358 *29

LIBRARY SUBRoUTINES

0550 74616 060044
0551 74617 050754
0552 14620 ~2652J
0553*

0554 ••
0555.
0556

0557

GTFER LOA GETCH
CPA T35CH
JMP LFRER

IF SYSTEM TELETYPE, PRINT
ERROR MESSAGE THERE,

OUTPUT ILLEGAL FORMAT MESSAGE TO USER'S TTV AND TERMINATE

74621 060340
74622 066713

ILFER

LOA' ... 15

LOB LFROF

OTHERWISE PRINT IT ON
USER TELETYPE.

0558*

OUTPUT BUFFER AND CR.LF TO USER'S TTY AND TERMINATE
0559 ••
0560*
74623 ~16605 LIBER JSB LTyPE
0561
1.1562 74624 12474Ld
JMP SCHEN,l
TERMINATE.
0563*
0564**
BUFFERS AND MESSAGES
0565*.*
0566 ••
0567.
SUP

0568

BUFFER FOR INPUT AND REPLIES.
MUST FOLLOW T368F

0569
0570

74625 000000
74671 006412

T35BF BSS 36
CRLF OCT 6412

0512
0573
0574

74672 074673
74673 005111
74674 046114

HELK

0576
0577
0578

74703 074704
74704 005116
74705 047440

HELH

0580

74713 074714
74714 005111
74715 046114

LFRDf OEF .+1
OCT 5111
ASC 7,LLEGAl FORMAT
UNS

0581

0582
0583
0585

74724

OEF *.1

OCT 5111
ASC 7,LLEGAL ACCESS

OfF *.1
OCT 5116
ASC 6,0 TIME ,LEFT

BSS "

PAGE 0 3 59 #30

LIBRARY SIZES

0002.
0003*
0004.
0005·
0006.

THIS TABLE IS USED BY THE TSB PAPER TAPE LOADER, THE SLEEP
ROUTINE, AND THE MAG TAPE LOADER. IT CONTAINS THE LENGTHS Of
ALL THE REMAINING LIBRARy ROUTINES, AND ENABLES THE LOADER TO
ALLOCATE THE MINIMUM NUMBER Of DISC SECTORS FOR EACH OF THEM,
THE TABLE IS WRITTEN ON THE DISC AS THE FIRST LIBRARY ROUTINE,

0008
0009
0010
0011
0012
00i3

75000

ORG

75000 177703
75001 177000
75002 177000
75003 177216

0014

;5004 i77255
75005 177414

0015

75~06

0016

75007
75({11rtJ
75011
75012

0017
0018
0019

0020
0021
0022

0023
0024
0025

75013

75014
75015
75016
75017

75020
75021

177000
177000
177005
177433
177321
177267
177521
177460
177171
177653
177431
177431
177431
177332
177425

0026
0027

75022

0028
0029

75023
75024

0030
0031
0032
0"33
0034
0"'''35

75025 177010

0036

0037
0038
0039
0040

75026
75027
75030
75031
75032
7 5 033
75034
75035
75036

0041

75037
75",4VJ

0042

75041

0043
0044

75042
75043
75044

0045
0046
0041
0048

75e45

75046
75047

0049

7505~

0050

75051
75052
75053

0051
0052

75~54

0053
0054

75055

0055

75~56

0056
0057

75057
7506~

177010
177644
177644
177654
177654
177000

177717
177737
177655
177723
177625
177426
177416
177003
177003
177635
177663
177606
177614
177624
177362
177362
177135
177305
177202
1770Al
177111

LIBRA

LIBRA",SSLPL
DEC .512
TWO HALVES Of
ABS

DEC .512
ABS LIBRA .. SFLB
ASS

ABS
ABS
ABS
ABS
ABS
ABS
ASS

ABS
ABS
ABS
ASS
ASS

ABS
ABS
ABS
A8S
ABS
ABS
ABS

ABS
ABS
ASS
ABS
ABS
ABS
ASS

ABS
ABS
ABS
ABS
ABS
ABS
ABS
ABS
ABS
ASS
ASS
ASS
ASS
ASS
ABS
ASS
A.SS
ASS

LIBRA .. SASN
LIBRA-SCHN
LIBRA",SSAV
LIBRA.SSAV
LIBRA-SSSAV
LIBRA.sGET
LIBRA-SAPP
LIBRA.SHEL
LIBRAp.$ByE
LI8RA.SKIL
LIBRA .. SREN
LIBRA .. SNAM
LIBRA.SCAT
LIBRA_SCAT
LIBRA.SCAT
LIBRA .. SDIRS
LIBRA-SREPS
LIBRA-sSTAS
LIBRA-sSTAS
LIBRA",SDEL
LIBRA-STIM
lIBRA·SPRO
LIBRA .. SPRO
LISRA-SOPE
LIBRA-ILEN
LIBRA"'SECH
LIBRA.SMES
LIBRA-SLPR
LIBRA.SPORI
LIBRA.SREP
lIBRA.SDIR
LIBRA-SSTA
LIBRA.SSTA
LIBRA-SPQR
LIBRA..,SROS
LIBRAwSANN
LIBRA-SRES
LIBRA.-SCHA
LIBRA-SSLE
LIBRA .. SSLE
LIBRAfltSNEW
LIBRA .. SKID
LIBRAt!PSMUN
LI8RA.SMLO
LIBRA ... SSMLO

FUSS TABLE

SAVE OVERLAY.

GROUP

-,

MESSAGE

HIBERNATE

PAGE 0360 #30
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067

15061
75062
75063
75064
75065

LIBRARY SIZES

177000

177000
177377
177130
\77747
75066 177716
75067 177417
75070 171671
752171 177000
75072 177000

0067
0067

"C;tlI"""

0067
0068

75074 177000
75075

,

••lIfJ, W

177000

ABS LIBRA-SCOP
LIBRA-SBES
ASS LIBRA.SPUR
A88 LIBRA-SHAG
ASS LIBRA"'!PHO
ASS LI8RA-SPRI
ABS LIBRA-SSPE
ASS LIBRA-SBRE
REP 4
DEC -512
DEC .512
DEC .-512
DEC .512
SSl,PL EQU •
,\BS

PAGE 0361 #30
0070*
0071*
0012*
0073*
0074*
0075*
0076.
0077
0078
0079
"080
0080
0080
0080
00 8 0
0fl80
0~80

0080

0080
0080
0080

FUSS

THF. FUSS TABLE CONTAINS A 32 WORD ENTRY FOR EACH PORT, THESE
WORDS ARE THE DISC ADDRESSES OF THE FILES HE IS CURRENTY USING.
A ZERO INDICATES NO FILE, THE TABLE IS READ OUT TO THE DISC
IN TWO HALVES, AND THEY ARE ASSUMED TO BE ON CONTIGUOUS
SECTORS, (THIS IS GU~RANTEED IF FUSS IS ONE OF THE FIRST
LIBRARY ROUTINES,
ORG LIBRA
SUP
REP 32

75000 000000
75020 000000

75040 000000
75~60 000000
75100 000000
75120 00~000
75140 000000
7516A 000000
752l?J0 000000
75220 0"~000
75240 000000

75260 000000

0080
0080

15300 000000

0080

75320 A00000

'0080
0080

75340 000000
75360 000000
7540~ 000000
75420 000000
75440 000000
75460 000000

0080
0080

0080
0080
0080
0080
0080
0080
00 8 0
0080
0080
008"
0080
0080
0080

0080
"081*
0082
0083
0084
0084
0084
0084
0084
0084
0084
0084
~084
~084

0084

75500 00£1000
75520 000000
75540 000000

75560 00000iZJ
75600 000~00
75620 000000
75640 000000
75660 000000
75100 000000

75720 0000210
75740 000000
7516~ 000000
7500C?1

OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT

OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT

0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
A,0,0,0,0,0,0,0,0,0,0,0,0,e,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,e,0,0,0,0,0,e,e
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
~,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

0,0,0,0,0,0,0,0,0,0,O,O,0,1,0,0
0,0,0,0,0,0,0,0,0,0,0,8,.,8,0,0

0,O,O,0,0,0,0,0,0,0,O,0,0,0,0,0
O,O,0,0,O,O,0,0,0,0,0,0,0,O,8,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.
0,0,O,O,0,0,0,0,0,0,0,1,8,1,1,8
0,0,0,0,~,0,0,0,0,0,0,0,0,0,1,0
~,0,0,0,0,0,0,0,0,0,0,0,0,0,0,e

0,0,0,0,0,0,0,0,0,0,0,O,0,0,0,8
0,0,0,0,0,O,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,O,O,O,0,0,0,0,0,0,0,0,0,1,0,0
0,0,0,0,0,0,0,0,0,0,0,O,0,0,0,0
0,0,0,O,O,0,0,0,0,0,0,0,0,0,0,0
0,0,0,O,O,O,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0,0,0,1,0,0,0.1
0,0,0,O,O,0,0,0,0,0,0,0,0,1,',1
0,0,0,0,0,0,0,0,1,0,0,0,0,B,8i 0
0,0,O,O,0,0,0,0,&,0,0,0,0,0,8,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0
0,0,O,0,0,0,0,0,0,0,0,0,0,1,1,0
0,0,0,0,0,0,0,0,0,0,8,8,0,e~l,e

0,0,0,0,0,0,1,0,0,0,0,0,0,8,1,0
0,O,0,0,0,0,0,0,0,0,0,0,0,1,8,0

ORG LIBRA
REP 32

75"00
75020
75040
75060
75100
75120
75140
7516(11

000000
000000
000000
000000
000000
000000
000000
000000
75200 000000
75220 000000
75240 0000~0

OCT

~,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

OCT

~,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

OCT 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

OCT
OCT
OCT
OCT
OCT
OCT
OCT
OCT

0,0,0,0,~,0,0,0,0,0,0,0,0,0,e,0

0,O,O,0,0,O,0,0,0,0,0,1,1,8,0,0
0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0
~,0,0,0,0,0,0,0,0,1,0,e,0,e,0,e
~,0,0,0,0,0,0,0,0,0,0,0,0,0,8,e
~,0,0,0,0,0,0,0,0,0,0,0,0,e,0,e

0,0,0,0,0,e,0,0,0,0,0,0,0,0,e,e
0,0 / 0,O,O,O,0,0,O,O,0,0,0,0,0,0

PAGE
0084
0084
0084
0084
0084
0084
0084
0084
0084
0084
0084
0084
0084

0084
0084
0084
0084
0084
0084
0084
0084
0085

0362 #30

75260
75300
15320
15340
75360
15400

FUSS

000000
00B0~0

000000
000000
000000
000000
75420 0000"'0
75440 0000~1fJ
75460 000000
75500 000000
75520 000000
75540 000000
75560 000000
75600 0rz10000

75620
75640
75660
75700
75720
75740
75760

000000
0000CiJ0

000000
000000
000000
0000"'0
000000

OCT 0,0,0,0,0,0,0,0,0,0,~,0,0,0,e,0
OCT 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
OCT 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,8

OCT 0,0,A,0,0,0,0,0,0,0,0,0,0,0,0,0

OCT 0,0,0,0,0,0,e,0,0,0,0,0,0,0,0,8
OCT 0,0,~,0,0,0,0,0,0,0,0,0,0,0,8,1

OCT
OCT
OCT
OCT
OCT

0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0
~,0,0,0,0,0,0,0,0,0,0,B,0,0,e,e

0,0,0,0,0,0,0,0,0,0,0,8,0,O,0,0

0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8
0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0
OCT 0,O,O,0,0,0,1,0,0,0,1,1,0,0,0,0
OCT 0,0,0,0,0,O,0,0,0,0,0,0,0,0,0,0
OCT 0,0,0,0,0,0,0,0,0,0,8,0,0,1,1,0
OCT 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
OCT 0,0,0,0,0,0,0,0,0,1,0,O,0,0,0,1
OCT 0,0,0,0,0,0,0,0,0,O,O,0,0,1,1,1
OCT 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0
OCT 0,O,0,0,0,0,1,0,0,0,0,1,O,8,O,8
OCT 0,0,0,0,0,0,0,0,0,8,0,1,0,1,0,1
OCT 0,0,0,0,0,0,0,0,0,0,0,0,1,1,.,0
UNS

PAGE 0363 #30

~I

0087*
0088.
0089*
0090.
0091·
0092*
0093_
0094*
0095*
0096*

FILES

THE FILES ROUTINE IS USED BY THE BASIC COMPILER TO PROCESS FILES
STATEMENTS DURING PHASE II, THE PURPOSE OF THE ROUTINE 11 TO PRO.
VIDE THE COMPILER WITH INFORMATION ABOUT THE REQUESTED FILES. THIS
INFOHMATION CONSISTS OF THE FILE'S DISC ADDRESS, ITS LENGTH,
ANO ITS RECORD SIZE.
THE COMPILER PASSES PARAMETERS TO THE FILES ROUTINE A8 FOlLOW8.
FILCT •• 5+# OF FILES STATEMENTS
FILTBa>BEGINNING OF TABLE AREA FOR FILE INFO,
SCHLB,Ia>FIRST POSSIBLE RETURN ADDRESS.

01d97*

0098* THE CALLING SEQUENCE TO THE FILES ROUTINE IS AS FOLLOWSI
0099*
0100.
JSB seHLB,I
OEF FILlB
0101.

0102.
011213*

0104.

°1°5*

0107
01 (2U3*
0109
0110
0111
0112
0113

0114
0115
0116

0117
0118
0119

75A00

ORG LIBRA

75000 063561

l.OA FILBP
STA FLBUf
STA FLBFP
LDA ... 17
alA FLBet
LOA FILeT
ADA , .. 5
CMA,INA
5TA FLBfC
LOA DFILT
STA FLBFF

75001 070036

75"02 07A037
75~H~3 060336
75004 070040
75005 061604
75006 040364
75007 003004
7501~ 070046
75011 060444
75012 070047

GET POINTER TO FILE BUFfER
sAVE BuFFER POINTER.
COUNTER FOR MAXIMUM NUMBER
FILES ALLOWED.
COUNT • e OF 'ILES STATEMENT
COUNT
NEGATIVE
SAVE COUNT
GET POINTER TO FILES
STATEMENT TABLE

SET
OF
GET
GET
GET

0120.
0121* INITIALIZATION IS COMPLETE. NOW BEGIN PROCESSING THE fILES STMTS,
13122*
0123 75013
fLBA EQU.
0124 75013 164047
LOB FLBFF,I
GET POINTER TO FILES STATEMENTS
eeA
'SET POINTER TO
75014 003400
~125
0126 75015 140001
ADA t,I
LAST CHAR ... 1 OF

75016

75017 001200
75020 070042
75021 006004
75022 005000
75023 e74043

0130

0131
0132
0133*
~134.

0 1 38
0139
0140

0141

INS
BLS
STB FLRCp

FILES STATEMENT.

INITIALIZE EOF STATEMENT POINTER
INITIALIZE POINTER TO
FILEs STATEMENT.

GET THf FILE NAME

0135ft
0136 75024 034040
~137

ADA 1
RAL
STA FLBP

04~001

0127
0128
0129

75025 002001
75026 02 71 77
750.27 060354
7503Q1 ~70041
75031 002400

FLBl

ISZ FLBC1
RSS

.IMP FLBa"'1
LDA ,.3

STA FLBC2
CLA

TEST FOR
TOO MANY
F·ILES
SET FLAG TO SAY
3 WORDS ALLOwED

PAGE 0364 #30
0142
0143
0144
0145
0146

0147
0148
0149
015121

75032
75033
75034
75035
15036
75037
75040
75041

0151

75043
15~43

0158

0159

070031
07003~

017527
050423
027060
050431

027064
050417
75042 027177

0152
r.t4 ... "l
u ... o ....
01 54
0155
0156

"'157

FILES

040030

;5044 001727
75045 170036
75PJ46 017527
75047 130036
7505~ 170036
75Q)51 034036
75052 017527
75053 034041

0160
0161 75Q154 027044
0162.
0163.
0164.
0165
0166
0167
0168*
01·69fr

Fl85

STA
STA
JSB
CPA
JMP
CPA
JMP
CPA

FLBCH
FLB!
FLBCH
.... 448
FLB2
.+528
Fl.B22
,+408

01a5

0186
0187
0188
0189
°190
0191
0192

BETTER NOT BE A BLANK.
FAIL IF IT IS.

FLB25 EQU ..
ADA FLB$
FL.S3 ALF,ALF
STA FLBUF,1
JSB FLBCH
lOR FlBUF,I
STA FLBUF,1
ISZ FLBUF
JaB FLBCH
ISZ FLBC2
JMP FLBJ

• OR S FLAG FIRST CHARACTER

POSITION ON LEFT

AND STORE IN BUFFER.

GET RIGHT CHARACTER

AND PACK IN.
BUMP BUFfER POINTER,
GET NEXT CHARACTER.
TEST FOR END OF FILE NAME,

75056 0271213
75057 027117

JMP FLee ... t

COME HERE IF 1ST CHARACTER
FLS2

LDA
STA
JSB
JMP

Is s

75 67
75070
75071
75072
75073
15074
75075
75076
75077
751 00
75101

IF 1ST CHAR IS S, SET FILl TO

8200
FLBS
FLBCH
FL.B5

INDICATE LIBRARY flLf.
GET NEXT CHAR,

*

JSB FLBCH

75066 017527
rl1

IF END OF FILE NAME, CHAR MUST
BE A BLANK.
FAIL IF NOT.

CPA .+406
JMP FLB4

75055 050417

0116. COME HERE IF 1ST CHARACTER Is
0177.
0178 75064 061027 FLB22 LOA BIT15
ST. FLBS
0179 75065 070030

0184

TEST FOR SNOWFLAKE

.JMP FL.BS ... 1

0174 75063 1£'21041
0175.

0183

GET FIRST CHAR.
TEST fOR DOLLAR SIGN.

TEST 7TH CHARACTER fOR BLANK

0170.
0171 75((160 060476
0172 7506\ 070030
0173 75062 017527

0180
0181
0182

CLEAR COMMA FL.AG.

CPA .+408

05 04 17
002401
027043
06435 0
17 0 036
034036
006006
027073
064502
174 0 36
002004

CLA,RSS

IF FIRST CHAR 18 ., ·I£T FILl TO
INDICATE GROUP LIBRARY FILE

GET NEXT CHARACTER
IS IT BLANK?
YES, * IS PLACE HOLDER

JMP FLB25
lOB ,"7
STA FLBUF,1
ISZ FLBUF
INB,sZB
JMP •• 3

NO, CONTINUE PROCESSING NAME.
CLEAR BUFFER
SINCE NO
FILE NOW

LOB B400

RESERVE 256 WORDS
IN CORE FOR FUTURE FILE

STB FLBUF,I
INA
JMP FLB26

75102 0271Q14
0193*
0194. THE FILE NAME HAS BEEN TESTED AS CORRECT AND STORED IN THE
0195.
TEMPORARY BUFfER

0196.

0197

75t~3

060364

FLBA

LOA •• 5

LEAVE ROOM FOR STORAGE

PAGE 0365 #30
0198
0199

0200
0201
0202
0203
021214
0205

75104
75104
75105
75106
75107
751-10
75111
75112
75113

FILES

040036
070036
060031
002002
027024
034047
034046
027013

FLB26 EQU *
ADA FLBUF
SrA FLBUr
LDA FLBCH
SZA

JMP FLBt
ISZ FL8FF
ISZ FLBFC

0206
0207.
0208. ALL FILE STATEMENTS
0209.
0210 75114 "'60040
0211 75115 0404010
0212 75116 003004
0213
0214

75117 ",70040
75120 070041

0215*
0216 75121 036152
0217
0218

,}MP

FLBA

HAVE NOW BEEN PROCESSED
LOA FLBCl
ADA .+17
CMA,INA
ST. FLBet
STA FLBC2

SET FILet TO EQUAL
OF FILES REQUESTED

ISZ SCHL.Q

BUMP RETURN ADDRESS $INC! WE'VE
NOW CHECKED FOR TYPE I ERRORS.
SET POINTER TO BUFFER AGAIN.

LOA FLBFP

75122 060037
75123 070036

OF FILE INFORMATION
FROM THE DIRECTORY
TEST FOR ANY MORE
FILES REQUESTED
yES IF COMMA WAS SEEN,
COUNT UP POINTER INTO TABLE
CHECK COUNTER
PROCESS ANOTHER FILES STATEMENT,

STA FLSUF

.*

0219*
0220* BEGIN BUILDING THE 'FILES' TABLE fOR THIS USER
0221*
0222 75124
0223 75125
0224 75126
0225 75127

0226.
0227

0228
0229
0230
~231

0232
0233
0234

0235
0236
0237
0238.

0239
0240
k1241

02042
0243
0244.

0245
0246
0241
0248
0249

0250
0251

75130
75131
75132
75133
75134
75135
751 3 6
75137

LOA MLINK+l
GET USER 10 AND SAVE IT.
ADA .+?ID .. ?LINK
LOA 0,1
STA FLBID

060272
040346
160000
A70044
164036
006003
027143
060044
006020
060514
005721
006020

7514'" 027147
75141 005727
75142 027165
75143
75143
75144
75145
75146

064036
044367
074036
027264

75147
75150
75151
75152
75153
75154
75155
75156
75157

005665
005727
174036
010512
006400
100400
000472
100200
000472

FLB6

LOB FLBUF,I
SZ8,RSS
JMP FLB27
LOA FLBIO

sse

LOA A000

BLF,BLF
sse
JHP FLB24
BLF,BLF

GET fIRST WORD OF FILE NAME,
18 THIS A PLACE HOLDfR
YES, SKIP DIRECTORY LOOKUP
IF BIT 15 OF FIRST WORD IS SET,
PERfORM SEARCH USING .811,
IF aIT 7 OF
FIRST WORD IS SET
sET UP FOR GROUP LIB sEARCH
ELSE RESTORE FIRST WORD

.JMP FLB23
FLB27 EQU '*
LOB FLBUp
ADB .+8
STB FLsUF

BUMP POINTER
TO NEXT TEMP
BUFFER ENTRY

JMP FLB28

FLB24 ELB,CLE,ERB
BLF,BLF
srB FLBUF,I
AND 81177

CLB
DIV ,100
MPy .10e

CLEAR BIT 1
AND
RESTORE TO TABLE
ISOLATE NUMERICAL PART OF 10
GET

PAGE 0366 #30

0253
0254
9255
0256
02&7

15160
15161
15162
75163
75164
75165
75166

"252

FILES

LIBRARIAN

06412100

l.DB A

060612

LOA M2000

010044
"30o,,,1
1640Jb
104400
000030

0258

75167 034036

0259

75170 104200

0260

75172 104400

AND FLBID
lOR 8
LOB FLBUF', I
FLS23 DST LTEMP
ISZ FLBUF
OLD FLBUF,I

USER
NUMBER
RESTORE FIRST WORD Of FILE NAME

GET NEXT 2 WORDS ALSO.

75171 100036

OST LTEHP+2

75i73 000032
0261*
0262 75174 116017
0263 75175 027203

121264.
0265 75176
0266 75177
0267 75200
0268 75201
0269 75202
027".
0271
0272
0273
0274
0275
0216
0277
0278
0279
0280
0281
0282
0283
0284
0285

0286
0287
0288
0289
0290
0291*
0292.
0293.
0294*
0295.
0296*
0297.
0298.
0299*

0300.
031211*
0302·
0303.
031214.

75203
75203
75204
75205
75206
75207
75210
75211
75212
75213
75214
75215
75216
75217
75220
7 5 221
75222

016056

FLB8

002400
070257
015322
026222

FLB1
060034
040364
070257
064035 .
044361
160001

002021
021176
060030
050044
027226
044356
160001
12102020
02717 6
044361
75223 160001
7f>224 002020
75225 027176

JS8 DLOKP,1
JMP FLB7

SEARCH FOR FILE
FOUND IT.

JSB RDPRG
CLA
STA DIRWD
JSB DCMpL
JMP SCHBL

FAILURE

EQu •
LOA LTEMP+4

ADA .+5
SrA OIRWD
l.OB LTEMP+5
AD8 ,+2
LOA t,I
SSA.,RSS
JMP FLBe
LOA LTEMP
CPA FLBIO

JMP FL.B9
A08 ,-1

LOA B,l
5SA

JMP FLBe
ADS .+2
LOA B,I
SSA

NO DIRECTORY BLOCK IN CORE NOW

LOAD POINTER TO DIREC ENTRY.
AND BUMP TO DISC ADDRESS
SET DIRHD FOR CLOOK
TEST TO SEE
IF THIS IS
REALLY A

FILE.

FAIl. If" NOT,
IS THIS THE
FILE OWNER?
yES

NO

IS THE FILE
PROTECTEO?
YES • FAIL

NO
18 THE. FILE
MASKED?

JMP FLB8

YES .. FAIL

THE FOLLOWING SECTION OF CODE FILLS EACH INTERIM 8 WORD
FILE TABLE WITH INFORMATION FROM THE DIRECTORY ENTRIES.
THE TABLE AppEARS AS FoLLowSS
1 fILE
2

;]

4

••

NAME

NOT USED

5
6

DISC
AODRESS
7 FILE LENGTH
8 RECORD SIZE
(NOTE: THE FILE NAME HAD

B~~N

INSERTED IN FLB3)

PAGE 0367 #30
0305
0306

0301
0308
0309
0310
0311
0312
0313

0314
0315
0316

0311
0318
0319
0320
0321
0322
0323

0324

0325
0326

0327
0328

FILES

75226 034036
75227 034036
7523~ £')02400
75231 170036
75232 034036
75233 064035
75234 044367
75235 104200
75236 100e101
75237 104400
75240 100036
75241 064035
75242 044372
75243 034036
75244 034036
75245 060044
75246 050030

75247
75250
75251
15252
75253
75254
75255
75256
75257
75260
75261
75262

0329
0330
0331
0332 75263
0333*

002401
061027
130001
170036

P.l34036
044350

160001
170036

034036
016423
064035
044364
170001

FLB9

ISZ FLBUF
ISZ FLBUF
CLA
STA FLBUF,I
ISZ FLBUF
LOB LTEMP+5
ADe .+8

DLD B,I

DST FLBUF,I
LOB
ADS
ISZ
ISZ
LOA

LTEMP+5
,+11

FLBuF
FLaUF
FLBID
CPA LTEMP
Cl.A,RSS
LDA BIT15

lOR B,I

STA
ISZ
ADB
LOA
ST.
182
JSB
LOB

FI.BuF,I
FL8u F

."'7
B,1
FLBUF,l
FLeUF
DATE
LTEMP+5
AD8 ,+5
srA B,I

*

0334

75264

0335

75264 034040

lSI FL.Bc1

~336

75265 02713 0

JMP FLB6

0337.
0338.
033g.
0340.
0341
0342
0343

0344

0345
0346

0347
0348
0349
0350

0351

FLB28 E.QU

75266 060257
75267 002003

LOA OIRWD
5ZA,RSS

75270
75271
75272
75273
75274
75275
7527'6
75276
75277

JMP Fl,.82 9

027276
064676
114206
114211
002400
070257
036152
060041

0352

75300

070~40

75301
75302
75303
75304
75305

003004

0355
0356
0357

THE
UNUSED
WORD

BUMP BUFF POINTER TO WORD e

GET DISC ADDRESS AND
PUT IT IN THE BUFFER
GET DIRECTORY ENTRY PDINTER

ADJUST TO FILE LENGTH WORD
BUMP BUFFER POINTER
TO LENGTH SLOT
TEST FOR USER REFERENCE
10 PUBLIC OR GROUP FILE
NO,CLEAR BIT 15
yES, SET BIT 15
OR IN FILE LENGTH
STORE IT IN BUFFER
BUMP POINTER TO RECORD SIZE -SLOT
SAME FOR DIRECTORV POINTER
TRANSFER RECORD SIZE
TO BUFFER
BUMP POINTER TO NEXT ENTRY
GET DATE AND SET
INTO PURGE (LAST
REFERENCED)
DATE,
TEST FOR ANY MORE FILES.

Wt HAVE FOUND ALL THE FILES. WE NOW HAVE TO UPDATE THE FUSS TABLE.
FIRST CHECK TO SEE IF THE PROGRAM HAS ROOM ENOUGH FOR THE TABLE.

~353

0354

CLEAR

100200
000376

LOB LIBD
JSB DISCZ,I
JSe SLVAG,I
CLA
STA DIRWD
FLB29 EQU *
ISZ SCHLQ
LOA FLBC2
STA FLBet
CMA,INA
MPy ,+FTEL

040056

ADA PBPTR

003~Vl0

CMA

75306 040716

ADA LWAUS

WRITE DIRECTORY TO DISC
IF ANY IS IN CORE
OUTGOING CORE ADDRESS.
CAN'T DO IT, TRY TO SALVAGE
SAy DIRECTORy
NOT IN CORE
BUMP TO NEXT ERROR EXIT.
GET II OF FILES,

COMPUTE NEW VALUE OF PBPTR

TEST FOR OVERFLOW.

pAGE 0368 #30

FILES

SSA
JMP FLB8

0358 75307 002020
0359 75310 027176
0360.
0361 75311 036152

0362
0363
21364
0365
0366

0367
0368.
"""ft
IQ.;JU"l/I

0374
0375
0376

0377
0378
0379
0380

0381

0382

BUMP TO NORMAL RETURN ADDRESS,
INPUT FUSS TABLE

JSB SICKP,I

IT.S STUCK ON THE DISC

LOA
STA
LOA
LDB
JSB

.,c;: ..

LOA MLINK+1
DETERMINE USER _.
ADA .+1TNUM-?LINK
LDA 0,1
USER # IN BITS 12.8
ALF,ALF
RIGHT JUSTIFy USER •
Al.F,RAL
MULTIPLY USER # BY 32 AND
ADA LIBO
ADD LIBD TO POINT AT UIIR"
STA FLBFS
SECTION OF FUS$,
STA LTEMP
LOB M32
ZERO OUT USER'S SECTION
CLA
STA LTEHP,I
ISZ LTEMP
INB,SZB

050272
75321 040342
75322 160000
75323 001727
7 5 324 001722
75325 040676
75326 070045
75327 070030
75330 064450
75331 002400
75332 170030
75333 034030
75334 006006
75335 027332

0373

ISZ SCHlQ
M2000
MWORD
FUSS

75312 060612
75313 070204
75314 060666
75315 064700
75316 11420 6
75317 11421(17
,

0370
0 3 71
0372

FAIL •• PROGRAM TOO LARGE,

,,~

oJ.;JC:r"

LIBDl
DISCZ,1

JMP .·3

0383*
03 8 4 NOW CHECK TO SEE IF ANY OF THE REQUESTED FILES ARE BEING USED BY
0385. ANOTHER USER. IF THEy ARE, ~E ALLOw ONLy FILE READS BUT NO WRITES,

*

0386*

IF THE USER IS AN 'A', WE SKIP THE TEST. \

0387.
0388 75336 060044

0389

LOA FLBID

75337 010612
75340 050514
75341 027407

0390
0391
0392*
0393 75342 060037

0394 "75343
0395 75343 070036

AND M2000

CPA AltJ00

JMP FLBt0
LOA FLBFP
FLBlt Egu •
STA Fl.,BUF

0396.

0397

75344 164036

LOB FLBUF,I

0398

75345 006003

kl399

753~6

SZB,RSS
JMP FLa30
ADA ,+4
STA FL.,BUF

0400

027372
75347 04eJ36J
75350 070036

0401
0402*
0403 75351 064676
0404 75352 077562
04 0 5 7535 3 t042~0
75354 100036
0406 75355 153562
0407 75356 027366
0408 7"5357 037562
0409 75360 037562
0410 75361 060672
75362 053562
~411
0412 75363 027402

ADDRESS,
GET FIRST WORD OF NAME
pLACE HOLDER1

YES
NO, BUMP POINTER TO

DISC ADDRESS

LOB LISD
FUSCH
DLD FLBUF,I

PUT ADDRESS OF FUSS
INTO FUSS SEARCH ~glNTER
GET DISC ADDRESS

CPA FUSCH,I
.IMP FLat8
ISZ FUSCH

WORDS EQUAL?
YES, GO COMPARE LOWER
NO, BUMp
FUSS POINTER
GET FUSS END ADDRESS
HAVE WE EXHAUSTED FUSS?
YES, GO CHEC~ NEXT FILE

sra
FLB14

SET BUFFER POINTER.

FLB19 lSI FlJ5CH
LDA L1024

CPA fUSCH
JMP fLB13

UPPER

PAGE
0413

0414
0415
0416

0417
0418

0419*
0420
0421
0422
0423.
0424
0425
0426
0427
0428

~369

75364
75365
15366
75367
75370
75371

#30

FILES

tOA FLBUF,I
160036
JMP FLBt4
027355
037562 "FLB18 ISZ FUSCH
CPS FUSCH,I
151562
027374
JMP FLB12
027360
JMP FLB19

75372
75372 060365
75373 027403

FLB30 EQU •
LDA .+6
JMP FLBI3+1

75374
75375
75376
75377
75400

03412136
PJ34036
160036
031027
110036

Fl..S12 ISZ FLBUF

75401
75402
75403
75404
75405
75406

082401
060361
040361
040036
034040
027343

CLA,RSS
FLBt3 LOA .+2

0429.
0430
0431
0432

0433
0434
0435

ISZ FLBUF
LOA FLBUF,I
lOR BIT15
ST.A FLBUF,I

ADA .+2

ADA FLBUF
lSZ FLBt1
JMP FLBlt

NO, RESTORE UPPER ADDRE.S WORD
AND GO COMPARE AGAIN
BUMP TO LOW ADDRESS WORD
IS LOW ADDRESS ALSO EQUAL'
YES, GO 'LAG READ ONLY
NO, GO CHECK NEXT FILE

SUMP 8UFFER POINTER
TO LENGTH WORD
SET DISC LENGTH TO SAy
READ ONL.Y.

ADJUST BUFFER POINTER
TO NEXT FILE NAME
TEST fOR ANY MORE

~436.

0437. NOW UPDATE FUSS BY PLACING THE DISC ADDRESSES JUST REQUESTED
0438* INTO THE USER'S fUSS AREA.
0439*
SET COUNTER,
0440 75407 060041 FL810 LOA FL.BC2
0441
75410 070040
STA FLBCt
LDA FLBfp
0442 75411 060037
SET POINTER TO FIRST ONE.
fLB15 EQU •
0443 75412
0444 75412 040365
ADA • +6
GET FILE LENGTH
LOB 0,1
0445 75413 164000
044 6 75414 0403 55
ADA ,--2
A POINTS TO HIGH DISC ADDRESS
SSB,RSS
IF NOT READ ONLy,
0447 75415 006021
CLB,RSS
LEAVE BIT 15 0,
0 44 8 75416 006 401
LOB BIT15
ELSE SET IT.
.a449 ".75417 065027
ADS 0,1
0450 7542ffJ 144000
0451 75421 174045
ST8 FLSFS,I
AND PUT INTO TABLE,
8UMP
ISZ FL.-BFS
0452 75422 034045
0453 75423 002004
INA
POINTERS AND
LOB A,I
STORE LOW
0454 7542A 1642100
0455 75425 174045
DISC ADO~ESS
STB FLBFS,I
0456 75426 034045
ISZ FLBFS
REBUMP
POINTERS
12'457 75427 040362
ADA • +3
ISZ FLBCt
045d
TEST FOR DONE.
75430 034040
0459
75431 027412
JMP FLB15
046".
LOA FUSS
75432 060666
0461
0462 75433 064676
LOB LIeD
.J S B 0 I S CZ, I
0463 75434 114206
0464 75435 114207
JSB SICKP,I
THE FUSS TABLE IS STUCK IN COR!
0465*

0466

75436 016056

0467
0468

75437 061502
75440 071574

JSB RDPRG
LOA FIl4'3
STA VALlB

READ IN USER'S PROGRAM AGAIN,

PAGE

~370

#3121

FILES

064037

0414
0475
0476
0477

75441
75442
75442
]5443
75444
75445
75446
75441
75450
75451
75452

noA71Ol
v-y,v

75453 002016

0479

75454
7 5455
75456
75457
75460
75461
75462
75463

~469

0470
0471
04 7 2
0473

0 4 80
0481

0482
21 4 83
0484
0485
0486
0487
0488

0489
0490

0491
0492
0493

75472

75473

ADB ,+6

BUMP TO LENGTH WORD
GET LENGTH WORD AND R£CORD SIZE

104400

OST VALTS,I

STORE THEM IN

101574
035574
035574

ISZ VAL 1B

BUMP FILE

001665

04121355
040356
06412137
044363
2177562

ISZ VALTS

ELA,CLE,ERA
ADA .-2
SLA,!NA,SZA
ADA .... 1
FL8FP

LOB

00612104

ADB ,+4
STB FUSCH
INB

000040

eLE

140001
067562

LOB FusCH

ADA B,1

LDB B,I

LOA .... 4
ADA vALTS
STA VALTB
OL.D FUSCH,i

BASE DISC ADDRESS
INTO FILE TABLE

swP

75474

0496

75477 104400

DST VALTS,I

75500
755 0 1
75502
75503

101574
035574
061574

ISZ VALTB
LOA VALTS

75506
75507
75510
75511
75512

175574
034037
035574
104200

LOB FLBFP,I
srB vALTS,I
ISZ FLBFP
ISZ VAL.TS
DLD FLBFP,I

100037
75513 104400

DST vALTB,I

050"
0505
0506
0507
0508
0509
0510
0511
0512
0513
121514

051-5
0516

121517.

ADD RELATIVE LAST RECORD ADDRESS
B GETS HIGH DISC

DST VALTS,I

75475
75476 175562

0503

TABLE POINTER

REMOVE 8IT 15 FROM LENGTH
COMPUTE RELATIVE
ADDRESS OF LAST
LOGICAL, RECORD
GET THE ADDRESS
OF HIGH DISC ADDRESS
AND SAVE IT
GET POINTER TO LOW DISC ADD WD.

101100
104400
101574
060363
041574
071574
104200

0495

0498
0499
0500
0501
0502

FILE TABLE

ADDRESS WORD
IF LOW ADO OVERFLOW,
ADD 1 TO HIGH PART
STORE 80TH WOROS
OF DISC ADDRESS

SEZ
INB

0494

0497

GET BUFFER POINTER

Ol.D B,I

044365
104200
100001

75464 164001
002040
006004

15465
75466
75 4 67
75470
75471

LOB FLBFP
FLB16 E.QU •

040363
75504 071574
75505 164037

75514 101574
75515 061574
75516 040362
75517 071574
75520 064037
75521 044366
75522 074037
75523 "'34041
75524 021442

75525 070056
75526 026222

ADA .+4
STA VAL.TB

LDA
ADA
ST.
LOB
ADS

VALTS

• +FTEL.-12
VALTB
FLBFP

ADJUST POINTER
BUMP POINTERS
MOVE
FIL.E

NAME

INTO

TABLE

.+7
STB FLBFP

ISZ Fl..BC2
.IMP FLB16
STA P8PTR
JMP SCHBl

TEST fOR ANY MORE.
ADVANCE PBPTR TO
FIRST UNUSED WORD

PAGE 0371 #30

FILES

S51a.

0519. FLBCH GETS THE NEXT CHARACTER OUT OF THE FILES

052"· STATEMf.NT, IF FLaCH-I, IT ASSUMES A COMMA HAS BEEN
0521. SEEN AND RETURNS A BLANK, OTHERWISE IF THE CHARAC.
0522* TER IS A COMMA, IT SETS F~BCM AND RETURNS A BLANK.
0523. IT ALsO RETURNS BLANKS AT THE END OF THE CODE.
0524*

0525
0526
0527

75527 000000
75530 060417
75531 064031

i1529

75532 006002
75533 127527

0530
0531

75534 064043
75535 006004

0532
0533
0534
0535
0536
0537
0538
0539
0540
0541
0542
0543
0544

75536
75537
75540
75541
75542
75543

0528

75552 040450
75555 002001
15556 127527

0551*

0556

0551
0558

00030
00031

00036
0003 ,
00040
00041

0559
05 6 0

0004 2
00043
00044

0561

~0045

0562

00"46
0563 00047
ft:1564*
0565*
0566 75561 073601
0567*
0568 75562
0569 75562 000~00

FL..BCP

FL8IO
FLBFS
FLBFe
FLBFF

POINTER.

ROTATE If NECESSARY.
MASK,

JMP FLBCH,l
ISZ FL8CH
JMp FLBCH+1

FLBS
FLBCH
FLBU F
FLBFP
FLeet
FLBC2
FLaP

IF END OF STATEMENT,

RETURN A BLANK.

ALF,ALF

RSS

75557 034031
75560 027530

GET CHAR. POINTER,
OTHERWISE BUMP

GET NEXT CHAR,

SZA,RSS
JMP FLBCH"'t
AOA H96
SSA,RSS
ADA MJ2
ADA .140
CPA ,+548

75550 040317
75551 002 0 21

RETURN BLANK IF
FLBCH IS SET,

CLE,ERB
LOA t,l
SEZ,RSS

AND B177

75547 027530

75554 0!50433

0555

INS
CPB Fl.BP
JMP FL.BCH,I
STS FLBCP

002041

0541

055 3
0554

LOB fLBCP

75544 001727
75545 010474
75546 002003

0546

0552

LDB FL.BCH
SZB
tM. &:'1 gr... T
VI··..
, ........... '.,.

074043
004065
160001

75553 040470

055e

LDA .+408

054042
127527

0545
0548
0549

FLaCH NOP

EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU
EQU

LTEMP
LTEMP+l

SKIP ill S.

LOWER CASE?

yES, MAKE INTO UPPER CASE
NO
TEST FOR COMMA,

NOT A COMMA,
IF COMMA, SET FLAG AND GO
RETURN A BLANK,
• OR S FLAG
COMMA FLAG

LTEMP+7

LTEMP+8

INTERIM FILE TABLE INDEx
INTERIM FILE TABLE POINTER
FILE COUNTER (NEG)

LTEMP+9
LTEMP+10
LTEMP+l1

END OF FILE STATEMENT POINTER
FILE STATEMENT CHARACTER POINTER

LTEMP"'6

LTEHP+12

LTEHP+IJ
LTEMP+14
LTEHP+lf)

FILBP OfF FILaF
SFLB EQU *
FUSCH BSS 1

USER 10 STORAGE

POINTER TO USERS FUSS TABLE
FILE STATEMENT COUNTER (NEG)
POINT~R TO 4 WORD AREA CONTAIN.
ING POINTERS TO THE FILES

STATEMENTS
POINTER TO 131 WORD TEMPORARY
FILE TABLE BUFFER
FUSS TABLE SEARCH POINTER

PAGE 0372 #31
0003.
0004*
0005.
0006*
0007.
0008*
0009.
0010.
0011*
0012*
0013*
0014.
0015*
0016.
0017*
001S*
0019*
0020*
0021*
0022*
0023*
0024
0025

0026
0027
0028

4SSIGN

THE ASSIGN ROUTINE IS USED By THE BASIC STATEMENT EXECUTION PROCES
(PHASE Ill) TO PROCESS AN ASSIGN STATEMENT, THE PURPOSE OF THE ROU
TINE IS TO REPLACE THE INFORMATION CURRENTLY IN THE FILE CONTROL
BLOCK REFERENCED BY A SPECIFIED ORDINAL NUMHER WITH INFORMATION AB
THE NEW FILE BEING ASSIGNED TO THAT ORDINAL NUMBER. INPUT PARAMETE
TO THE ASSIGN ROUTINE ARE AS FOLLOWS,
ASBFP: a> BUFFER CONTAINING FILE NAME
ASNIO: 0- USER LIBRARY, 1- SYSTEM LIBRARY, 2- GROUP LIBRARY
ORONO: SPECIFIED ORDINAL NUMBER
FILlSI a> FILE lABLE
THE CALLING SEQUENCE TO THE ASSIGN ROUTINE IS AS

JSB SeHLB,I
OEf ASNIB



75000
ORG LIBRA
LOA MLINK+t
GET USER 10 AND STORE
75000 060272
ADA .+?lD ... ?LtNK
75001 04£1346
LOA 0,1
750"'2 160000
75003 070041
STA ASNIO

0029*
0~30

0031
0032

0033
0034
0035

0036

012137
003g

0039
, 0040
0041*
0042
0043
0044
0045
0046
0047
004 8
0049*

75004
75005
75006
75007
75010
75011
75012
75013
75014
75015
75016
75017
75020

013505
070030
060041
020030
006400
100400
000472
100200
000472
030030
070030
063514
073512

75021
75022
75023
75024

064041
061466
050360
064514

75025 1li50361
75026 V1640J0
75027 177512

AND HI6
STA LTf.MP

LOA ASNID
XOR LTEHP
CLB
DIV ,100
MPY .100

JOR
STA
LOA
STA

LTEMP
L1EHP
ASFBF
ASBUF

LOB ASNID
LOA ASTYP
CPA ,+1

IN LTEMP
INITIALIZE INFORMATION
BUFFER POINTER

GET USER ID
GET LIBRARY INDICATOR
SYSTEM LIBRARY?
yES

LOB LTEMP
STB ASaUF,I

yES

SAVE SPECIFIED
ORDINAL NUMBER
SAVE POINTER

l.OA ORONO

0051
0052

7503 1 07 00 37
75032 100200

STA ASaRO
MPy .+fTEL

~00376

75035 070036
75036 0132004

AND SAVE

GROUP LI8RARY?

061550

75034 041502

LI8RARY ID

CPA ,+2

75Q13~

75~33

LOSE NUMERICS
SAVE
GET THE 10 BACK
LOSE THE TOP
SET uP FOR DIvISION
PRODUCE GROUP

LDB A000

0050

0053
0054
0055

FOLLO~SI

ADA FILTB
ST. ASFCB
INA

STORE CORRECT 10 IN sUFFER

TO FIt.E TABL.E
ENTRY

PAGE 0373 #31
0056
0057
B058

"05g
0060
0061
0062
0063.

75037
75040
75041
15042
15043
75044
1504b

ASSIGN
L,OB A,I

164000
004066
004066

CLE,ELB
CL.E,ELB
RBR,RBR
STB ASSAV
SEZ,RS!
JMP ASN21

005323

011511
002041
027111

CLEAR
"DIRTY" RECORD AND
"OIRTY" FILE
BITS
SAVE OLD RECORD SIZE
DID WRITE OCCUR ON OLD 'ILI1
NO

0064* UPDATE LAST CHANGED DArE OF OLD FIL.E

0065.
21066

0067
0068
0069

0070
0071

0072
0073
0074

0075
0076
0077
0078
0079
00821

0081
0082

0083
0084
0085
0086
0087
0088
0089
0090
009 1
21092

75046
75047
75050
75051
75052
75053
75054
75055
75056
75057
75A60
75061
75 0 62
75063
75,,64
75065
75066
75067
75070
75071
75072
7 5 "73
75074
75075
75076
75077

074030

040311
164000
074031
002004

104200
108000

21094
0095
0096
0097
0098
0099

061554

LOA ASBFP
LOB A,I
ST8 lTEMP+10
INA
OLD 0,1

164000

074 0 42
002004
1042~0

1000021

.JSB
RSS

116017
002001

OLOKP,I

JMP ASN20
LOA LTEMP+4

027102

060034

ADA .+5

040364
070257

ST. OIRWD
L.OA DATIM
LOB LTEMP+5

060171
064~J5

104400

SAVE
NEw FILENAME

BEFORE SWAP
OCCURS

DST LTEMP ... 11

104400

000043

75101 170001
75102 060042
75 1°3 07 00 31
75104 104200

ADe

,+6

srA 1 , I
ASN20

LOA LTEMP+10
srA LTEMP+l
OLD lrEMp+l1

FIND DIRECTORY ENTRY FOR OLD FIt..

NOT FOUND
SAVE CURRENT

DIRECTORY TRACK
FOR OLOOK
GET HOUR OF YEAR
AND UPDATE
'L.AST CHANGE.
LOCATION

GET

NEw

DST LTEMP+2

000032

027121
065554
160001

75113 070031

75114 ('106004
75115 10420'"
75116

0100

FILE NAME

~00032

75100 044365

75106
7510 7
75110
75111
75112

YES, SET UP
LTEMP(0IJ)
WITH OLD

OST LTEMP+2

104400

75105 000043
0093

LOB ASNID
STB LTEMP
AOA .+10
LOB t?I,I
STB LTEMP+l
INA
OL.D 0,1

064041

.IMP ASN22
ASN2t LOB ASBFP
LOA 1 , I
STA LTEMP+l
INS

FILE NAME

OST LTEMP+2

L.TEMP(lIJ)

OLD 1 , I

IN

10~0(iltl

75117 104400
75120 000k'32
75121 163512

0101
0102 7 5 122 07°030
0103*

ASN22 LOA ASBUF,I
STA

LTE~P

SET APPROPRIATE
10 IN LTEMP

PAGE 0374 #31
0104

0105

ASSIGN

75123 116~t7
75124 006401

0106

7512!5 001400

0107

75126
15127
1513ti1
75131
75132
75133
75134
75135
75136
75137
75140
75141
75142
1 5 143
75144
75145
75146
75147
75150
75151
75152
75153
15154
75155
75156
75157
75160
75161
75162

0108
0109
0110

0111
0112
0113
0114
0115
0116

0117
0118
0119
0120
0121
0122
9123

0124
0125

0126

0127
0128

0129
0130
0131

0132
0133
0134
0135
0136
0137

0138
0139
0140

0141
0142
0143

0144
0145
0146

0147
0148
0149
0150

0151
0152

75163

75164
75165
75166
75167
7 5 170
75171
75172
75173
75174
75175
75176
75177
7520VJ
75201
75202

060034
~40364

050257
027134
002400
010257
006003

0271.51
036152
060257
002003
027147

006400
07 4 2 5 7

064676
114206
114211
016056

027503
064035

044361

160001

002021
021136
06 4 035
160001
050041

027205
006004
16001211
002020
027136
044361
160001

002021
027222
064272
044347
160001
002021

027136
044351
1601il~1

010612

002003
75203 027136

0153 75204 027222
0154*
0155 75205 061611
0156 75206 051334
ri1157 75207 027222
0158 75210 160000
0159 75211 010570

JS8 DlOKP,I
CLB,RSS

cee

LOA LTEMP+4
ADA ,.5
CPA OIRWD
JMP ASN23
CLA
ST. DIRWD
ASN23 5ZB,RSS
JMP ASN4
ASN24 ISZ SCHL,Q
ASNJ LOA DIRWD
SZA,RSS
JMP ASN26
CLB
STB DIRWD
LOB LIBD
JSB DISCZ,1
JSB SLVAG,I
ASN26 JSB RDPRG
JMP ASN14
ASN4 LOB LTEMP+S
ADa ,+2
LOA 8,1
SSA,RSS
JMP ASN24
LOB LTEMP+5
LOA B,1
CPA ASNID
JMP ASN45
INB
LOA B,I

SEARCH FOR FILE
IF FOUND, CLEAR B
IF NOT, 8 GETS -1
GET CURRENT
DIRECTORY TRACK POINTER
SAME AS OTHER ONE?
YES (SO NONE HAS BEEN WRITTEN)
NO, 80 UPDATED ONE HAS·
BEEN WRITTEN OUT
IF ENTRY WAS FOUND
GO CHECK IT OUT
IS THERE A CHANGED
DIRECTORY TRACK IN tORE?
NO
yES, TELL DLOOK
THERE ISN'T
AND WRITE
IT OUT
BLEW ITl TRY TO SALVAGE
IS THE
ENTRY WE
FOUND
A FILE?
NO, fAIL
IS OWNER
TRYING TO
ACCESS FILE?
YES
NO, IS FILE
PROTECTED?

SSA

JMP ASN24

YES • FAll

LOA 8,1
SSA,RSS

IS MASK
BIT SET?

ADB ,+2

JMP ASN48

NO

LDB MLINK+l
yEs
ADB .+?NAME~?LINK
LOA 8,1
IS THIS FILE RUNNING
SSA,RSS
UNDER A PROTECTED PROGRAM?
JMP ASN24
NO • fAIL
ADB .+?FLAG~?NAME
LOA 8,1
GET PROGRAM
AND PUALT
UNALTERED BIT
SZA,RSS
HAS PROGRAM BEEN JIMMIED?
JMP ASN24
ATTEMPTED RIP.oFF, FAIL
JMP ASN48
ASN45 LOA
CPA
JMP
LOA
AND

TEMPt
PRGCT
ASN48
A,1
OPMSK

WAS A PROTECT
MASK REQUESTED?
NO
MAYBl

PAGE 0375 #31
0160
rl161

0162
0163
0164
0165
0166
0167
016S.
0169
0170
0·J"fl
.. •
0172
0173
0174

0115
0176
0177
0178
0179
0180
0181
0182
01 8 3
0184
0185
0186
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203

0204
0205
0206
0207
0208.
0209
0210
0211
0212
0213
0214
0215

75212
75213
75214
75215
75216
75217

ASSIGN

050514
002001
027222
064035

044362
160001

7522~

0312127
75221 170001
75222 064035
75223 044363

i5224
75225
75226
75227
7 5 230
75231
75232
75233
75234
75235
75236
75237
75240
75241
75242
75243
75244
15245

.~I':II~t2.

J.CK.ntlV ..

173512

003004
043511
002020
027137
036152
037512
002400
173512
A37512
044363
160001
173512
006004
A375t2
160001

173512

752 4 6 044361
75247
75250
75251
15252
75253
75254
75255
75256
75257

037512
164001
060041
050030
002001
045027
177512
016423
~6"0J5

044364
170001
002400
070257
060034
0 .. 0364
75266 064676
75267 114206
75270 114211
7526~

75261
75262
75263
75264
75265

75271
75272
75273
75274
75275
75276
75277

036152
060612
070204
060666
064700
114206
114207

CPA 8 2 000

COMMA

NEXT?

RSS

JMP
LDB
ADB
LOA
lOR
STA

ASN48

LTEMP+5
,+3
8,1
BIT15
B,I

ASN48 LOB LTEMP+o
ADB .... 4
I r\A
8-,
1..,,""

T
4

STA ASBUF,I
CMA,INA
ADA ASSAV
S5A
JMP ASNJ
ISZ SCHLQ
ISZ ASBUF
CLA
STA A58UF,I
ISZ ASBUF
ADS ,+4
LOA 1 , I
STA ASBUF,l
INS
ISZ ASBUF
LOA 1 , I
ST. ASBUF,1
ADS .+2
ISZ ASBUF
LOB t , I
LOA ASNIO
CPA LTEMP
RSS

ADB
STB
JSB
LDB
AOB
STA
CLA
STA

LDA

ADA
LOB
JSB
JSB

NO

YES

SET
MASK

BIT
GET L.OGICAL
Dl:rnan
~T7J:'
,'
,.".,." ... .............
AND SAVE IT
IS IT LARGER
THAN THE ALLOCATED
BUFFER?
YES, fAIL
NO

..

PUT
DISC
ADDRESS

IN
BUFFER

TEST FOR USER REFERENCE
TO PUBl.IC FILE

BIT15
ASBUF,I

SET BIT 15 OF LENGTH IF IT IS

DATE
LTEHP+5

GET DATE AND SET IN
PURGE LOCATION

STORE LENGTH IN BUFFER

.+5

1, I

DIRWD
LTEMP+4
.+5

LIBD
DISCI,1
SlVAG,I

ISZ 5CHLQ
LOA M2000
STA MWORD
LOA FUSS
LOB LIBDI
JSB DISCI,1
J8B SICKP,I

TELL OLOOK THAT NO DIRECTORY
TRACK 18 IN CORE AND
WRITE IT BACK

SCREWED UP - TRY TO SALVAGE
FILE EXISTS •• BUMP RETURN ADDRESS
INPUT FUSS TABLE

ITS STUCK ON THE DISC

PAGE

~376

#31

ASSIGN

121216.
0217 7530v.J 060272
0218 75301 043506
0219 15302 006400
0220 75303 100400
75304 000403
0221 753iH5 001122
0222 15306 040676
0223 75301 073507
0224 75310 064037
0225 15311 005000
0226 75312 04012101
9227 75313 070040
0228 75314 002400
121229 75315 096400
0230

0242

75331 027356

0243
0244
0245
0246
0247.
0248
0249
0250
0251

75332 150001
75333 027336
75334 044361

75341

006~04

0252

7534?
75343
75344
15345

150001
027346
006004

0257
0258

0259
0260
0261
0262

AL.F,RAl
ADA LISD

sr.

ADA 1

STA ASNFS

cLA

ASN6

ASN?

027323

75346
15346 077513
75347 060041
7535~

010612

75351
75352
15353
75354
75355

050514
"27356
163512
031027
173512

02 63
0264
0265
0266.
0267 75356 063512
0268 75357 040355
0269 75360 160000

ASN9

*

MULTIPLy USER, By 32 AND
ADD LI 80 TO POINT TO USER'S
SECTION OF fUSS
SET POINTER TO FUSS
ENTRY FOR THE
SPECIFIED ORDINAL NO.

CLB
08T ASNFS,I

ZERO OUT OLD FILE INFORMATION

CLA

SAY ENTRY NOT YET

STA ASNIF

75335 027326
75336 063512
75337 040356
75340 160000

ASUFS

LDB ASORO
BlS

75316 104400
15317 100040

0231*
0232 75320 002400
0233 75321 073513
0234.
0235 75322 064676
0236 75323 063512
0237 75324 040355
0238 75325 160000
0239 75326 057507
0241" 75327 044417
0241 75330 054672

0253
0254
0255
0256*

LOA MLINK+l
DETERMINE USER
ADA ASNSP
ell
DIV .+TTY0t_TTY00

FOUND IN FUSS TABLE

LOB LISD
LOA ASSUF
AOA .-2
LOA 0,1
cps ASUFS
ADB .+32
CPS L1024
JHP ASNit
CPA 1,1
JMP ASN9
ADB ,+2
JMP ASN7

LOA
AOA
LOA
INS
CPA
JMP
INB
JMP

ASBUF
,-I
0,1

USERS OWN FUSS
ALL FUSS CHECKED?
YES, NOT THERE

TEST F'OR THERE
IT IS
BUMP fUSS POINTER
LOOK AT NEXT ENTRY
GET 2ND WORD OF ADDREss

1,1

BUMP FuSS TO 2ND WORD
ARE THEY EQUAL?

ASN10

yES

ASN6+1

RETURN TO CHECKING FUSS

ASN10 EQU •
5T8 ASNIF
LOA ASNIO
AND M20k'0
CPA A000

JMP
LOA
lOR
STA

GET FIRST WORD OF DISC ADDRESS

SKIP ovER

ASNt1
ASBUF,1
BIT15
ASBuF,I

ASNlt LOA ASBUF
ADA .-2
LOA 0,1

MOVE TO NEXT FUSS ENTRY

SET TO SAY "IN FUSS·
IS THIS
AN "A"
USER?
YES
SET DISC LENGTH TO SAY
READ ONLY

GET HIGH DISC ADDRESS

PAGE 0371 #31
0270
0271

0212
0273

0274
0215
0276

0277
0278
0279
028(l1
0281
0282

0283
0284

0285
0286

0287
02 88

ASSIGN

167512
006021
027371
031027
064041
75366 054030
75367 027374
75370 027375
75371
75371 067513
75372 v.l06003
75373 W"_'IttJ,...,,,w ..
7 5 37 4
75374 036152
15375
75375 067512
75316 044356
75377 164001
7 5400 104400
75401 100040
75361
75362
15363
75364
75365

IJI"'''.''?

0289.
0290 75402 060666
0291 75403 064676
0292 75~04 114206
0293 15405 114207
0294.
0295 75406 016056
0296 75407 067512
0297 7541(,11 160001
0298 75411 t 70036
0299 75412 034036
0300 75413 044353
75414 164001
0301
0302 75415 174036
0303 75416 034036
0304 75417 001665
0305 75420 040355
0306 75421 002016
0307 75422 ~40356
0308 75423 067512
0309 75424 044355
0310 75425 077510
75426 006004
0311
0312 75427 0000413
0313 75430' 140001
0314 75431 167510
0315 75432 '-'02040
0316 75433 006"04
0317 75434 101100
0318 75435 104400
75436 100036
0319 75437 060036

0320
1a321
0322

75440 040363
75441 ~70036
75442 1 0 4 200
75443 175510

LOB ASBUF,I
SS8,RSS
JMP ASN30

lOR B1T15
LOB ASNID
cpa LTEMP

GET l.ENGTH
IF READ ONlYi
sET BIT 15 OF HIGH ADDRESS, AND
SKIP 1 OR BOTH RETURN INCREM
DEPENDING ON REASON FOR

JMP ASN31
JMP ASNJ2
ASNJ0 EQU •

LOB ASNIF
sze,RSS
lSZ SCHLQ

REAO.WRITE, WAS IT
IN FUSS?

NO: BUMP TWICE

ASN31 E:QU •

ISZ SCHLQ
ASN32 EQU •
LOB ASBUF
ADB .-1

LOB 1,1
DST ASNFS,I

LOA
LOB
JSB
JsB

GET LOW ADDRESS IN 8
STORE NEW FUSS INFORMATION

.FUSS

WRITE FUSS BACK TO DISC

LIBD
DISCZ,1
sICKP,I

CAN'T GET RID of IT

JSB ROPRG

READ USER.S PROGRAM SACK IN

LoB
LOA
STA
ISZ

GET LENGTH WORD
AND STORE IT

ASBUF
1,1
AsFCB,I
ASFCB

ADB , .. 4

LOB 1,1
5T8

AsFCB,I

ISZ ASFCB
ELA,CLE,ERA
ADA .-2
SlA,INA,SlA
ADA ,w1

LOB ASBUF
AOB
STB
INS
elE
ADA
LOB
SEl

.... 2
ASSCH

1,1
ASSCH,I

INB
sWP
DST AsFCB,l

GET NEW RECORD SIZE
AND STORE IT
REMOVE BIT 15 FROM LENGTH
COMPUTE RELATIVE
ADDRESS OF LAST
LOGICAL REcORD
GET ADDRESS
OF HIGH DISC ADDRESS
AND SAVE IT
GET POINTER TO LOW DISC ADDRESS

ADO RELATIVE LAST RECORD ADDRESS
B GETS HIGH DISC ADDREss WORD
IF LOW ADDRESS OVERFLOWS,

ADO 1 TO HIGH pART

STORE 80TH WORDS OF

DIsc ADDRESS

LOA ASP--CS
ADA ,+4

STA ASFCB
DLD ASSC!'i,I

STORE BASE DISC ADDRESS

~AGE

0323
0324
0325
0326
lti327
0328

0329
0330

0331
0332

0333
0334
0335
~336

0331
0338
0339
0340
0341
0342
0343
0344
0345
0346
0347
0348
0349
0350

0378 #31
75444
75445
75446
75447
75450
75451
75452
75453
15454
75455
75456
75457
7546~

75461
75462
75463
75464
75465
75466
75467
75470
75471
75472
75473
75474
75475
75476
75417
75500
75501
75502

ASSIGN
DST ASFCB,1

104400
100036
034036
060036
040354
065027
174000
063512
040353
067511
007004
144000
034036
160036
"40001
170036
034 0 36
170036
034036
002400
170036
034036

1SZ ASFCB
LOA ASFCB
ADA ,-;,

LOB BIT15
ST8 0,1
LOA ASBUF
ADA .",4
LOB ASSAV
CMS,INS
ADS 0,1
ISz ASFCB
LOA ASFCB,I
ADA 1
STA ASFCS,l
ISZ ASFCB
STA ASFtB,I
ISZ ASFC8
CLA
STA ASFCB,I
ISZ ASFCe
LOA ASBFP
Loa A,1
STe ASFCB,I
INA
ISl ASFCB
OLD 0,1

~61554

164000
174036
002004
034036
104200
10~000

INTO FILE TABLE
ADJUST POINTER

sET

'NULL RECORD'
CONDITION

COMPUTE DIFFERENCE BETWEEN

OLD AND NEW BUFFER SIZES

ADJUST BUFFER
ADDRESS

SET 'RECORD FULL' CONDITION
SET 'NO EOF EXIT'
CONDITION

MOVE

FIl.E NAME

TO

FILE TA8l!

OST ASFtB,I

104400 .
100036

0351*
0352
0353
0354
0355
0356
0357
0358*
0359
0360

75503
75503
75504
75505
75506
00036

ASN14 EQU ..
016312
026222
176000
'120436

JSB ABCHK
JMP SCHtJL

HI6

ASNSP ABS -TTY00-?LINK
AsFCB EQU LTEMp+6
pOINTER TO ORDINAL ENTRY IN FILE

00037
00040

ASQRD EGULTEMP+7
ASNFS EQU LTEMP+8

0362

~0041

0363

75507 000000

ASNID EQU LTEMP+9
ASUFS sSS 1
ASSC~ ass 1

0361*

ALL DONE

OCT 176000

TABL.E
ORDINAL FILE. IN FUSS ENTRY
POINTER TO ORDINAL ENTRY IN FUSS
TABLE

USER 10

POINTER TO USER FUSS ENTRY
POINTER TO DISC ADDRESS IN
TEMPORARY BuFFER
RECORD SIZE Of OLD FILE
BUFFER INDEX
CLEAR UNLESS FILE IN FUSS

0364 7551~ 0000~0
0365*
0366 75511 000000 ASSAV BSS 1
0367 75512 000000 ASaUF aSs t
0368
75513 000000 ASNIF sss 1
0369 75514 075515 ASFBF OEF *+1
BSS 6
TEMPORARy FILE TABLE INFORMATION
0370
75515 000000
0J71*
BUFFER
0372.
0373. LTEMP, LTEMP.l, LTEMP+2, L1EMP+3, LTEMP+4, LTEMP+5, LTEMP.10,
LTEMP+l1, AND LTEMP+12 AR: ALSO USED
0374·
0375*

PAGE
0376

~379

75523

#31

ASSIGN
SASN

EQU.

/

PAGE 0380 #31

0318*
0379*
0380*
0381*
0382*
0383*
0384
0385
~386

0387
0388

038;

0390
0391
0392
0393
0394

CHAIN

THE CHAIN ROUTINE IS USED BY THE BASIC COMPILER TO PROCESS A CHAIN
STATEMENT oURING PHASE III, THE PURPOSE OF THIS ROUTINE "IS TO
CHECK FOR THE REQUESTED PROGRAM ON THE USER'S PRIVATE LIBRARY OR
ON THE PUBLIC LI~RARy (IF THE NA~E IS PRECEDED By A OOLLAR SIGN)
OR ON THE GROUP LIBRARY (IF THE NAME IS PRECeDED BY A SNOWFLAKE),
IF THE PROGRAM IS FOUND IT IS LOADED AND COMPILATION 18 BEGUN.
15000
ORG LIBRA
1500~ 061500
LOA FCNTR
SET COUNTER TO
75001 003000
CHA
l'S COMPLEMENT OF
7500~ 011500
STA FCNTR
NUMBER 0' FILES
PUT 2tS COMPLEMENT INTO
75003 002004
INA
75004 070034
STA CNNP
SAFE KEEPING FOR LCD
75005 ~61232
LOA FCORE
LOAD FIRST BuFFER ADDRESS
75006 065502
LOB FILTB
LOAD poINTER 10
FIRST DISC ADDRESS (LOW WORD)
15007 044364
ADB ,+5
7501~ ~35500
CHN01 lSZ FCNTR
MORE FILES?

0396

75011 002001
75012 027027
75013 015236

0397

75014 071645

0395

0 398
0399
0400
0401
0402

0403
0404

0405
0406
0401
0408
0409
0410
0411

75015 015514
75016 065236
75017 044372
7502~ 160e01
75021 001423
75022 003004
75023 044366
75~24 140001

75025 ~44354
75026 ~27010
75027 064212

0412

044346
75031 074036
75032 044352
75033 16 0 001

0413
0414
0415

75035 002003
75036 027044

0416
0417
0418

0419
0420

7503~

75034 010502
75037
75040
75041
75042

060034

044364
117363
002001

75043 016056

0421

75044 160036

0422
0423

15045 070030
15046 060354

0424
0425
0426

75047
75050
75051
75052
75052
75053

0427
0428
0429

0430
~431

070034
063360
064640
006004
170001

75054 034034
75055 021052

RSS

yES

JMP CHAN0
STB FBASE
STA RQ3
JS& WR8UF
LOB FBASE
ADB .+FTEL~4
LOA 1,1
ALR,RAR

NO •• FINISHED DUMPING BUFFERS

WRITE
oUT

RECORD

CMA,INA

ADB .+7

ADA 1,1
ADe ,-3

JMP CHN01
CHAN0 LOB MLINK+l
ADB .+?IO-?LINK

srB CHNI
ADB .-?IO
LOA B,1
ANO DfCHK
SZA,RSS

=> USER 10

JMP CHN11

NO

LOA CHNP
ADB .+110
JSB LCDP,1
RSS
JSB ROPRG
CHN11 LOA CHNI,l
STA LTEMP
LDA .~3
STA
LOA
LOB
CHN00 EQU

CAN THERE BE
FILES WHOSE
LCO'S NEED

UPDATING?

GET NEGATIVE FILE COUNT
AND 10 POINTER
GO UPDATE LCD'S
CORE NOT CHANGED (OVERWRITTEN)
RESTORE USER AREA
GET USER'S 10

STORE IN LTEMP

CHNP
TWQSP
OLTEM
•

INB
STA 8,1

ISZ CHNP

INITIALIZE
NAME TO
BLANKS

JMP CHN00

0432

75056 002404

CLA,INA

~433

75057 071470

STA EOL

ALLOW STRING
CONSTANT

PAGE 0381 #31
0434
0435
0436

ta437
0438
~439
~440

0441

0442
0443
0444
0445
0446
0447
0448

0449
0450
k)451

0452
0453
0454

0455
0456
0457

045tt
0459
0460
0461
0462

121463
0464
0465
0466
0467
0468
0469

CHAIN

7506l'1 015336

JSB FORMX

75061 060355

LDA .-2

75062
75063
75e64
15065
15066
75067
15070
'5071
75012

004065
160001

012041
75~7J 001727
75074 010500
75075 0!S0423
75076 027116
75077 050431
75100 002001
75101 027122
75102 060030
75103 010512
15104 006400
75105 100400
75106 0004]2
75107 100200
75110 000472
75111 064000
15112 060612
15113 0100321

75116 060514
75117 070030
15120 035256
75121 1213541121

0481

75136 015350
75137

0472

0473
0474
0475
0476

0 4 77
0478

0480

0482
0483
04 8 4

0485
0486
0487

AND 8377
CPA .+448

JMP
CpA
RSS
JHP
tOA

061410
040366
002020
002 400
040350

071410
071406
~60640

002004
001000

071272
069654

751 3 7 00740~
7 5 14l!j 061611
75141 051334

75142 027147
75143 015356
75144

~15342

FIRST
CHARACTER
IS'?

CHAN2
,+528

YES
NO,
YES

CHAN3
LTE.MP

NO
GET USER'S 1D
CONvERT

AND B1777

CLB
DIV .100

TO
10

OF
GROUP·

LOB A

LOA M2000
ANO LTEMP
lOR 8

RSS

CHAN2

f~QU

LOA
STA
lSZ
lSZ
CHAN3 EQU
LDA
ADA

*
A000

LTEMP
TEMP4
TPRME

•

.+7

CLA
ADA ._7
STA TPRME
STA TNULL
LOA DL.lEM
INA
ALB
STA TEMP5
LOA FCUCA
JSB TRSTR
CHAN4 EQU •

LOA
CPA
JHP
JSB
JSB

LIBRARIAN

AND
SET UP FOR PUBLIC LI8RARY
SAVE 10
BUMP SOURCE POINTER
BUMP LENGTH

TPRME

5SA

cea

,*,"

IT

MPy .100

75114 03 0 001

15115 00201211
75116

.-1

JMP CHANA
STB TPRME
LOB TEMP4
Clf,ERB
LOA B,I
SEZ,RSS
ALF,ALF

027137
075410
065256

111479

0471

STA TEMP4

cpa

054356

75122
75122
75123
75124
75125
75126
75127
75130
75131
75132
,5133
75134
75135

0470

JS8 PSTR

015344
071256

EVA1.UATE STRING
PREPARE
STRING
SAVE SOURCE POINTER
NULL STRING?
YES
SAVE LENGTH
EXTRACT

TEMP1
PRGCT
CHAN5
FETCH
SBFIX

LENGTH > 61
YES, SET TO (;
NO

DESTINATION POINTER
UPPER CASE ONL,Y
TRANSFER STRING
SET FLAG FOR NO LINE NUMBER
END

YES

OF STATEMENT?

NO, GET LINE NUMBER

ROUND TO INTEGER

PAGE

~382

#31

CHAIN

0488
0489

75145 065023
75146 006004

1fJ490

75147
75147 071361

0491
0492
0493
0494
0495
0496
0497
0498
0499

75150 06157~
75151 073362
75152 116017
1~153

Pl02001

75154 027354
75155 064035
75156 044363
"710:.£'7

'oJIOJ'

t£nll'lI""i

.a.

""'Ur:.IICJ4

0500

75160 002021

0501
0502
051213
0504
0505

75161 ~21166
75162 160036

0506
~507

0508
0509
0510
0511
0512

i'5t6j 050030
75164 036152

75165 027354
75166 036152
75167 036152
15170 044355
75171 1600~1
75172 00212120
75173 027354
75174 036152

LOB
INS
CHANS EQU
S1e
LDA
STA

DVSRS

ILLEGAL LINE NUMBER
READJUST

•
PKCNT
SPROG
INWRD

SAVE THE LINE NUMBER

.J S8 OLOKP, 1

SEARCH DIRECTORY FOR PROGRAM

RSS

JMP CHAN7

PROGRAM NOT FOUND

LOB CHNPD

CHECK ILL-STORED
PROGRAM FLAG

ADB .... 4

LDA 8;!
SSA,RSS
JMP CHN14
LOA CHNI,I
CPA LTEMP
ISZ SCHLQ
.IMP CHAN?

CHN14 ISZ SCHL.Q
TSl SCHL,Q
ADB .-2
LOA 1,1
SSA
.IMP CHAN7
ISZ SCHL,Q

UNSUCCESSFULLY STORED?
NO; CONTINUE
GET USER'S ID
DOES HE O~N THE PROGRAM?
YES, BUMP TO ILL-STORED MESSAGE
NO, PRINT NONEXISTENT PROGRAM
pAST SECOND ERROR
AND ERROR 2.5

ENTRY IS A FILE
pAST THIRD ERROR

0513.
0514. FOUND CORRECT fNTRY. FIRST CHECK TO SEE IF IT FITS
0515.
0516
0b17
0518
0519
0520
052t
0522
0523
0524
0525
0526

13527
0528
0529
0530
0531
0532
121533
0534
0535
~536

75175 044356
75176 160001

75177 07 00 3 1
75200 044361
75201 160001

75202 c;,70040
75203 006004
75204

1600~1

75205 001665
75206 070041
75207 044366
7521~ 160001
75211 010042

75212
75213
15214
,5215
75216
,5217
1522£71
75221

0030~4

040041

070045
003004
064040
006021

027225
040716

0537

75222 0020'1

ill538

75223
75224
75225
75225
75226

~539

~5~0

0541
0542
0543

~27231

027354

ADB •• 1

.> FIRST WORD OF NAME

LOA B,l
STA LTEMP+l
ADB .+2
LOA 1,1
STA LIBSC
INS
LOA 1,1
ELA,CLE,ERA
STA LIBSP
ADS .+7
LDA 1,1
STA CHNLN
CMA,INA
ADA LIBSP
STA LISPB
CMA,INA
LOB LIBse

MOVE PROTECTED BIT
TO SAFE PLACE
-> THIRD WORD OF NAME

SS8,RSS
JHP CHN18

ADA LWAUS
SSA,RSS
JMP CHNlt
JMP CHAN7
CHN18 E.QU

040714

1302021
75227 "27231

*

ADA LW97
SSA,RS5

JMP CHN11

SAVE SEMI-

COMPILED FLAG

SAVE START.OF.
PROGRAM POINTER
GET PROGRAM LENGTH
COMPUTE FIRST
UNUSED WORD

COMPUTE NEGATIVE

SEMI·COMPILED?
NO
OK

TOO BIG

TOTAL LENGTH
COMPARE WITH MAX ALLOWED

P"GE PJ383 #31
0544

0545
0546

0547
054 8

0549

0550

0551
0b52

0553

CHAIN

75230 027354
75231
75231 036152
75232 016423
7 5 233 064035
15234 044364
15235 170001
15236 044362
75237 104200
75240 100001

JMP CHAN7
CHN11 EQU
ISZ SCHLQ
JSB DATE
LOB CHNPO
ADB .+5

75241 104400

DST CHNDI

75242 000046
0554
0555
0556

0551
~558

0559
0560
0561
0562
0563

0564
0565
0566
0567
1fJ568

0569
0570
0511
t1572

0573
0574
0575
0576

0577
0578
0579

1d580
0681

0582
0583

0584
05 8 5

0586
0587
0588
0589

75243
75244
75245
75246
75247
15250
75251
75252
75253
15254
75255
75256
75257

160034
070204

060034
040364
064616
1'1420 6
114207
064272
044345
160001
070037
063362
110001

752691 016056

75261
75262
75263
75264
75265
75266
75267

064042
074204
0640411
045027
06 33 57
114206

002001
7527V' 027276

75271
75272
75273
75274
75275
75276
75277
7 5 300
75301
75302
75303
75304
15305
75306

064272
044345
060037
170001

027354
160036

034036
06 4P1 31
050030

005665
174036

034036
104200
000032
75307 104400

•

STA 1 , I

AD8 ,+3
DLD B,I

PROGRAM TOO LARGE
PAST FOURTH ERROR
SET NEW DATE
INTO
DIRECTORY

SET
DISC
ADDRESS

LOA CHNP,I
WRITE DIRECTORY
STA f'o'WORD
BACK TO
LDA CHNP
DISC
AOA ,+5
LOB LIBD
JSB DISCZ,1
JSB SICKP,I
QUE PASA1
LOB MLINK+1 SET TO NULL. PROGRAM
ADB .+?PROG-?LINK
LOA B,I
SAVE CURRENT
STA CHNC
PROGRAM BOUND
LOA INWRD
STA 1 , I

JS8 RDPRG
LOB CHNLN
STB MWORD
LOB LlBSP
ADB BIT15
LOA CHNDP
JS8 DISCZ,l
RSS

READ IN FIXED AREA

READ
PROGRAM
FROM DISC
READ ERROR

JMP CHN13
LOB MLINK+l
ADB .+?PROG·?LINK
LOA CHNC
STA 8,1
JMP CHAN?
CHN13 LOA CHNI,1
GET USER'S ID
ISz CHNI
TO FIRSr WORD OF NAME
LOB LTEMP+l
GET FIRST WORD
CPA LTEMP
IF PROGRAM OWNER CLEAR
EL.B,CLE,ERS
RUN-ONLY BIT
srB CHNI,I
STORE FIRST WORD OF NAME
ISZ CHNI
BUMP POINTER TO NEXT WORD
DLD lrEMp+2 GET LAST 2 WORDS OF NAME
DST

CHNI,I

STORE IN TABLE

7531~

0590

1002136
75311 036152

0591
"'592

75312 016343
753 1 3 016312

0593*
0594* SET TO RUN
1d595*

lSZ SCHLQ
SEMIC
JSB ABCHK

.}5B

ABORT ATTEMPT?

PAGE

(I

0596
0597
0598
0599
0600
0601
0602
0603
0·604

0605
0606
0607
0608
0609
0b10

0611

0612
0613
0614

0615
0616

0617
0618

0619
0620
0621
0622
0623

0624
0625
~626

0627
0628
0629
0630

0631
"1632

0633
0634

0635
0636
0637
0638

0384 #31

CHAIN
eL.F

75314 103100

LOB
LOA
lOR
lOR

75315 064255
75316 160001

75317
15320
75321
75322
75323
75324
75325
75326
15327

030377·
030506
170001

STA

"

061573
002003
060056
067361
006020

8SB

JMP CHAN6
JSB FNOPS
JMP CHANg
NOP

75330 027335

75331 015314

75335 065575
75336 075334
75337 036152
15340
75340 0160417
75341 071571
75342 026222
75343 016312
'5344 060506
75346 003000
75346 064255
75347 103100
7535~ 110001
75351 170001
75352 102100
1 5 353 027340
75354 "'16056
75355 016312
75356 026222
75357 000046
75360 020040
75361 000000

75362 000000
75363 073367
00034
00035

0639
1d640 00036
06 4 1 00037
V}642
~0042
06 43 000 4 6
0644.

1,1
UNABT
CHNFG
1,1

STF
LOA SYMT8
SIA,RSS
LOA PBPTR
LOB PKCNT

102100

15332 027343
75333 000000
75334 002001
75335

"MAIN

RSS

•

CHAN6 EQu
LOB SPRaG
srB PRGCT
lSZ SCHL.Q
CHAN8 E'QU

DON'T Al.l.OW
ABORTS
DURING COMPILE
UNCOMPILED?
YES, USE PBPTR
LINE NUMBER

SPECIFIED?

NO
FIND REFERENCED STATEHNET
BAD LINE NUMBER

DEFAULT LINE NUMBER
sAvE FIRST STATEMENT

..

LOA ,+408

BLANK
JMP seHBl
CHANg .JSB ABCHK
LOA CHNFG
STA

eM.

LOB MAIN

elF

0

AND B,1

srA B,I
STF 0
JMP CHANS
CHAN, .158 RDPRG
JSB ABCHK
JMP SCHBL
CHNDp OEF CHNOI
TWOSP ASC 1,
PKCNT BSS 1
INWRD BSS 1
LCDP DEF LCD
CHNP EQU LTEMP+4
CHNPO EQU lTEMP+5
CHNI EQU lTEMP+6
CHNC EQU LTEMP"'1
CHNLN EQU LTEMP+10
CHNDI EQU LTEMP+14
LTEMP+15

CLEAR CHAIN FL.AG

READ BACK USER PROGRAM
ABORT ATTEMPT?
NO

PROGRAM LENGTH
DISC
ADDRESS

0645.
k1646.
Lil647.
~648

LTEMP, LTEMP+l, LTEMP+2 AND LrEMP+3 ARE ALSO uSED
75364

SCHN

fQu •

PAGE 0385 #32

SAVE

0002. THE SAVE COMMAND IS USED TO SAVE PROGRAMS IN THE US!RLI8RARY.
0003. THE PROCEDURE IS AS FOLLOWS;
1) CHECK THAT PROGRAM IS LISTABLE (OR 10.A000)I HAS A NAME,
0004.
0005.
AND ISN'T NULL,

2) DECOMpILE.
3) CHECK FOR lOT OR ADT OVERFLOW.
4) CHECK FOR DUPLICATELY NAMED PROGRAM,
5) UPDATE DIRECTORY,
6) UPDATE IDT AND AOT.
7) MOV~ PROGRAM TO LIBRARY AREA,

0006.,.

0007.
00013.
00Pl9*
1iJ010*
0011*
0012*

0013. STEP 5 IS WR!TTEN AS AN OVERLAY, WHICH IS CALLED WHENEVER THE PARTICULAR DIRECTORY TRACK NEEDED IS ALREADY FULL. ITS J08 IS TO GAR0015. BAGE COLLECT THE DIRECTORY TRACKS,
0~14.

0'-"17

750411(11

ORG LIBRA

0019
0020
0021
0022
0023
0024
0025

75000 064272
75001 044346
75002 074050

LOB M-LINK+1

'50~3

STB MOVES
ADB .... ?PROG.?ID
STB SAVP
ADS .... ?DISC .. ?PROG
STB sAVD
DLD MOVES,I
.-ID,8_1 ST WORD OF NAME.

044356

75004 074042

(,1027

75005 044355
750fJ6 074043
75007 104200
75010 100050
75011 006002

0028

75012 054532

CPS

0029
ki0J0

75013 027531
75014 164 0 42

~031

75015

.JMP SAV3
LOB SAVP,I
LDA .-11
CPS PBUFF

0~26

TEST FOR NO PROGRAM NAME

SZ8

~60344

0032 '5016 054726
0033 75017 ~27532
0034.
0~35.

B->LINK WORD,
ID LOCN.

ADS • _+ ? I D.? lIN K

ASCB~

TEST FOR

NUL.l. PROGRAM,

.JMP SAV4

WELL, AT LEAST THE PROGRAM HAS A NAME, NOW MAKE SURE IT IS

0036* DECOMPILED
0037.
13038 75020 ~16~56
0039 75"21 064042
75022 044353
ft1040
75023 160001
0~41
0042 75024 010361
0043 75025 002003
0044 75026 027044
kt045 15027 027 121 43
0046 75030 000011110
0047 15043 015322

sAve

JSB RDPRG
READ PROGRAM TO CORE.
LOB SAVP
TEST fOR COMPILED.
ADB .+?FLAG",?PROG
LOA 1 , I
AND CFLAG
SZA,RSS
JMP SAV5

JMP SAV5-1
ASS 11
JSB DCMPL

NOT COMPILED.

ROOM fOR CSAVE CODE

DECOMPILE IT.

0048ft

0049.,. NEXT MAKE SURE 'COMMON'
0050.,.

0051
0052

75044 ~65~75 SAV5
75045 054726 .
75046 015516

1r1053
0054*
0055* PUT

TH~

IS ALLOCATED IF NECESSARy

LOB SPROG
CP8 PdUFF
JSB ALtOM

COMMON
At-LOCATED?
NO •• OO IT

PROGRAM IN USERS SWAP AREA 50 SOME wORK CAN GET DONE

PAGE 0386 #32

SAVE

0056.
LOB PBPTR
RESET PROGRAM BOUND
0057 750)47 064056
ST8 SAVP,I
0058 75050 174042
INTO TABLE
CMB,INB
COMPUTE 1#
0059 75051 007004
ADS USE
OF WORDS
75052 045213
td060
21061 75053 074204
STB MWORD
0062 75054 060043
LOA SAVO
GET DISC ADDRESS POINTER
LOB USE
WRITE OUT TO
0063 75055 0652t3
0064 75056 114206
JSB DISCZ,I
SWAP TRACK
JMP PTZAP,I
BLEW IT • DUMP THIS DUDE
0065 75057 1242t(1
0066 75060 027104 SAV50 JMP SAV51
BSS 19
ROOM FOR CSAVE CODE
0067 75061 0000A0
0068*
0069tt DETERMINE IF THIS USER HAS ENOUGH ALLOCATED SPACE AVAILABLE TO
0070. SAVE THE PROGRAM,
0071*
COMPUTE
0072 75104 164042 SAV51 Lo8 SAVP,I
0073 75105 007004
CM8,INB
PROGRAM
0074 75106 045575
Aoe SPROG
L.ENGTH
STB SAVWD
SAVE IN
0075 75107 074040
. 0076 75110 101030
ASR 8
NEGATIVE WORDS AND
CMB,INB
POSITIVE
0077 75111 007004
818 SAvLN
0078 75112 076460
BLOCKS
0079 75113 065575
LOB SPROG
SAye: START.OF.
0080 75114 074042
STB SAVP
PROGRAM POINTER
0081*
0082 75115 116022
JSB GeID,1
GET USER lOT ENTRY
0083 75116 044366
ADS
GET DISC USED TO DATE.
0084 75117 160001
LOA 1,1
0085
75120 042460
ADA SAyLN
GET TOTAL AMOUNT TO
008 6 75121 003004
CHA,INA
USED AS A NEGATIVE QUANTITY
01387 75122 044356
ADS ,-I
elf
0088 75123 000040
0089 15124 140001
ADA 1,1
COMPARE WITH ALLOTMENT.
0090 15125 002040
SEl
0091
JMP SAV6
OK.
75126 027145
0092 75127 067132
LOB *.3
0093 15130 060334
LDA ... 19
0094 15131 026623
JMP LIBfR
DEF *+1
00 9 5 75132 075133
0096
75133 005114
OCT 5114
LF.L
0097 75134 "'44502
ASC 9,IBRARY SPACE FULL
75135 051101
75136 051131
75137 020123
75140 0501"'1
75141 041505
75142 020106
15143 052514
75144 046040
0098.
0099. SEARCH AOT FOR SPACE TO PUT THE PROGRAM.

.+'

I

~100*

(.1101

0102
0103

75145
75145 060347
75146 070044

SAV6

EQU

*

LOA

."'8

STA SAVDF

SET tOUNT OF POSSIBLE DI!K ADTS

PAGE 0387 #32

0113

75147
75147
'5150
75151
75152
75153
75154
75155
75156
75157

0114

1516e1

0115
0116
0117

15161
15162
75163
75164

",104

0105
0106

0107
0108
0109
0110
0111
0112

0118
0119

0120
0121
0122
0123

ta124
0125
~126

0127
0128
0129
0130
0131
0132
0133
~134

0135
0136

0137

75165

75166
75167
75170
75171
75172
75173
75174
75175
75175
75176
75177
7520~

75201
75202
75203
75204

SAVE

062030
040362
053553
063552
07212130
040361
070043
160043

002003
027205
070204
062030
064700
114206
114207
007400
160043
1 00 400

000352
07 21 2141
064676

044361
160001
0,,310~

042460

002041
027237
044362
034041
027175

75205

75205 034044
75206 027147

0138*

0139
~140

0141
0142

0143
L1144

0145

75201
75207 060337
75210 VJ67212
15211 A26623
75212 075213
75213 005123
75214 054523

SAVSA fQU
LOA
ADA
CPA

•

RKCYP
GET CYCLIC POINTER
AND ADVANCE
,+3
EALNA
IT TO THE
NEXT ENTRY
LDA EALCA
STA RKCYP
IN THE TABLE
ADA ,+AOTlN.ADTAT .)1 LENGTH WORD
STA SAVD
LOA SAVO,1
IS THIS DISK AVAILABLE
SZA,RSS
ZEAO srz NO AOT TABLE
JMP SAVBF
SO WE ADVANCE TO NEXT DISK
STA MWORD
OTHERWISE, SAVE LENGTH
LOA RKCYP
.,. DISC ADDRESS
LOB LIeDI
.J8B DISCZ, I
REAO IT IN
JSB SICKP,1
SORRY, IT'S STUCK ON THE DISC
ete
COMPUTE THE
ENTRy
LDA sAvO,1
COUNT
OI\' .+3
STA SAVe
LOB LISO

ADB .+2
'SAVBD EQU •
LOA 8,1
CHA,eLE
ADA SAVLN
SEZ,RSS
JMP SAV7
ADB .+3
ISZ SAVe
JMP SAVBD
SAVBF EQU •
lSz SAvDF
JMp SAVSA
SAV23 E.Qu

a>
a>

AND SAVE
FIRST ENTRY
LENGTH WORD

TEST THIS ENTRY FOR SI& ENOUGH
SKIP If TOO SHORT
GOTCHA
ADVANCE TO NEXT ENTRY
DECREMENT ENTRY COUNT
PROCESS NEXT ENTRY
PROCESS NEXT TRACK
TRIED ALL DISKS FOR ROOM1
NO, TRY THE NEXT ONE

*

LOA • -16

LOB .+2

PRINT "SySTEM OVERLOAD"

.JMP LIBER
D~F

*+1
OCT 5123
LF.S
ASC 7,YSTEM OVERLOAD

75215 052105

75216 ~46440
75217 047526
7522~ V142522
75221 046117
75222 040504
0146.
0147 75223 060337
1t114a

0149
"'-

~15e

0151
~152

75224
75225
75226
75227
7523((1

067226
026623
0 7 5227
005104
05252~

SAV12 LDA
LOB

JMP

PRINT "DUPLICATE ENTRY"

DfF *+1
OCT 5104
LF.O
ASC 7,UPLICATE ENTRY

PAGE 0388 #32
75231
75232
75233
75234
75235
75236

SAVE

0461t1
041501
052105
020105
047124

051131

e15J.
0154

0155
0156
0157
0158

0159
0160
0161

0162

75237
75237 062460
75240 003004

75241
75242
75243
75244

140001
010044
044355
074041

75~45 10420111
75246 100001

75247 1,,4400
75250 e00036

0163*
1d164

0165
0166
0167
0168

0169

75251
75252
75253
15254
75255
15256

060640
070051
06 4 353

016450
027260
000000

EQU •
LOA SAVLN
CMA,INA
ADA B,I

SAve:
NEGATIVE NUMBER OF

SECTORS LEFT

STA SAVDF

ADS ,-2
STB SAVe
Dl.D 8,1

SAVE LOCATION OF
DISK ADT ENTRY
GET DISK ADDRESS

DST SAvDS

AND SAvE

LOA
ST.
LOB
JSB
SAv10 JMP

DLTEM
~OvED

.-4
MOYEW
SAY11

ass 2

MOVE IO/NAME ENTRY TO
LTEMp(013).

ROOM FOR CSAvE CODE

~170.

0171. SEARCH THE DIRECTORy TO INSURE THE PROGRAM NAME DOES NOT ALREADY
0172* EXIST
0173*
~174
SAV1! EQu *.
7526'"
JaB DLOKP,I
0175 75260 116017
SEARCH f-OR ENTRY
0176 75261 027223
JMP gAV12
ENTRY FOUNO •• ILLEGAL.
0177*
LOB SAVI,I
0178 75262 16 4 034
IF TRACK IS FULL, GO 00
CPS M8184
OVERLAY SECTION.
0179 75263 054314
JMP SAv98
0180 75264 027545
1d181.
0182* EVERyTHING IS FINE, BUILD A NEW DIRECTORy ENTRy AND INSERT
0183.
0184
0185
0186
0187

0188
0189
0190
0191
0192
0193*
0194
1(.1195
0196
0197

75265 007000
75266 044676
7526i 074050

75270
75271
75272
75273
75274
75275

044373
074051
007000
044407
044035
016434

75276 060640
75277 ~70050
75300 060035

0198
0199

75301 040373
75302 070051
75303 064353

0200

75304

~1645~

CM8
AD8
STB
ADB
STB
eM8

LISD

SET UP SOURCf FOR
HOVE.

,+12

SET UP DESTINATION

MOVES
MOVED

COMPUTE LENGTH,

ADB .+24

AOB SAYS
JSB MOVES
LOA DLTEH
STA MOVES

LOA
AOA
STA
LOB
JSB

SAYS
,+12
MOVED
.... 4

MOVEW

MOVE 5 WORDS IN fOR
NEW ENTRY.

PAGE 0389 #32
0201
0202

0203
8204
0205
0206

SAVE

1 5305 060042
75306 110051
75307 016423

03.051
'531t 110051

1531~

034051

0209
0210
0211

75312
75313
15314
75315
75316
75317

~?~
"'

753291

~34051

75321
75322
15323
75324
15325
75326
, 532 7
75330

104200

0201
0208

........

0213

1tl214
0215
0216

0217
0218
0219.
0220
0221
0222
0223
0224
0225
0226
0227
0228
0229
023121
0231 .
0232tr

060171
170051
~J4051

002400
17 00 51
000036
104400
100051
064051
044362
~60040

170001

7 5 331 160034
75332 040343
75333 170034
75.334 070204
75335 060034
75336 002004
75337 070051
75340 040363
75341 064676
75342 074050
75343 114206
75344 114212

LOA SAVP

STA MOVED,I
JiB DATE
ISZ MOVED

MOVED,I
ISZ MOVED
LOA OAT 1M
STA

STA MOVED,I
ISZ MOVED
CLA
STA MOVED,!
lSI MOVED

OLD

SAVDS

OST MOVED,l

STORE START-OF.
PROGRAM POINTER
STORE DATE IN ALIO.

LAIT REFERENCE OAT!
GET HOUR 0,- YEAR
LAST CHANGE DATE

ZERO
WORD 7
GET DISK ADDRESS FOR

WORDS 8 ANO 9

LOB MOVED
ADB ,+3

LOA SAVWD

srA B,I

l.DA SAVl,l
ADA .-12

STA
STA
LDA
INA
STA
ADA
LOB

SAVI,1
MwORD
SAvI

.JSS

DEADP,I

.> WORD 11

GET THE L.ENGTH WORO·FOR
WORD 11
ADJUST
DIRECTORY
LENGTH,
WRITE DIRECTORY BACK OUT.

MOVED
.+4

LIBD
STB MOVES
JSB DISCZ,1

WRITE OUT
FORGET IT

75345 064353
75346 016450

LOB .-4
RESET OIREC.
JSB MOVEW
0234
02350236* NOW UPDATE THE USER'S AMOUNT OF DISC SPACE USED
0237.
0238 75347
SAv21 fQU
0239 7 5 3 4 7 116 022
JSB GelD, I
READ IN THE IDT
ADS .+7
k1240 75350 044366
0241 75351 062460
LOA SAVLN
ADJUST AMOUNT
ADA B,I
0242 75352 140001
OF DISK SPACE USED
0 2 43. 75353 170001
srA t,I
0244*
0245 75354 061?l075
LOA IDTAD
GET DISC ADDRESS POINTER
02 .. 6 75355 064676
LOB LIBO
TO WRITE lOT BACK
JSB DISCZ,I
0247 75356 114206
TO THE DISC
0248 75357 114212
JSS DEAOP,I
THIS SYSTEM HAS HAD IT
0233

•

0249.

0250".
0251*
02 5 2
0253
0254

NEXT, UPDATE THE ADT
7536 0 16 0 043
7 5 361 070204

75362 062030

LOA SAVD,1
srA MWORO
l.OA RKtYP

FETCH THE LENGTH 0' TH!
ADT TRACK

GET THE DISC ADDRESS POINTER

PAGE 0390 #32
0255
0256

0257
0258.
~259

0260
~261

SAVE

75363 064700
15364 114206
75)65 027407

LOB LIBOI
JSB DISCI,I
JMP SAVl0

1536b 064ftl44
75367 0060"2
75370 027415

LOB SAVOF

0262.
0263 15371 064041
0264 75372 074051
0265 75373 044362
0266 15374 074050
0267 75375 044774
0268 75376 044204
0269 75371 016450

027fct*

0271
0272
0273
0274
0275

0276
0277

75400 060362
75401 164043
75 .. 02 044000

154f.?13 174043
75404 040204
754~5 070204
75406 027431

SZB

JHP SAVCF
LOB
SrB
ADB
SrB
ADB
ADB

AND READ IN THE
AOT TRACK AGAIN
CAN'T • MAKE IT DISAPPEAR
ADT ENTRY COMPLETELY USED?
NO, SHORTEN IT

SAve
MOvED

YES, REMOVE IT

,+3

SET UP POINTERS FOR MOVE

MOVES
MLIBD
MWORD
.JS8 MOVEW

LOA .... 3
LOB SAVD,1
ADB A
Sfa SAVO,1
ADA MWORO
STA MWORD
JMP SAvCG

CALCULATE THE NEEDED
WORD COUNT
SHORTEN THE APPROPRIATE COUNTS
SHORTEN THE TABLE ENTRY
AND

THE DISC DRIVER COUNT

0278.
0279
0280
0281

75407 006400
7541(;1 ~02400
75411 170043

1a282

75412 104400

CLA
STA SAVO,1
DST RKCVP,I

0283

75413 174030
75 .. 14 027435

JMP SAV31

1d284.
0285 75415
0286 754 1 5 104200
75416 100041
0287 75417 000040
0288 7542~ 046460
0289 75421 002040
0290
0291
0292
0293
0294

02 95
0296*
0297
0298
0299
0300
0301
0302.

70422 002004
75423 10440'"
75424 100041
7 5425 06 404 1
15426 044361

75421 060044
75 430 170001
75431
75431
75432
75433
75434

062030
064616
114206
027407

SAVle! CL.B

SAyCF EQu •
OLD SAVe,1

eLf
ADB SAVI.N

SEZ
INA
DST SAve,1
LOB SAve
ADS ,+2

LOA SAvDF
STA B,I
SAVCG EQu
LOA
LOB
JS8

•
RKCYP
LIeu
DISCZ,l

.}MP SAv30

ZERO OUT ADT'S LENGTH
AND DISC ADDRESS WORDS

MOVE UP THE OISK ADDRESS
By SAVlN BLOCKS
CHECK FOR OVERFLOW

AND UPDATE THE COUNT

.> L.ENGTH WORD

GET SAyED LENGTH
AND PLUG IN
GET OISC ADDRESS POINTER
AND WRITE THE OISK ADT
BACK TO THE DI8C
CAN.T • MAKE IT DISAPPEAR

0303* RETRIEvE THE USER'S PROGRAM FROM THE SWAP AREA & wRITE IT OUT TO
0304* THE SELECTED AREA ON DISC.
0305.

0306

75435 016056

SAV31 JSB RDPRG

0307

75436 060040

LOA SAYWD

READ USER PROGRAM AGAIN
WRITE IT OUT.

PAGE 0J91 -32

SAVE

0309

75437 070204
75440 021 4 63

0310

75441 000000

030tt

0311~

0312
0313
0314
0315
0316

0317
0318.

75463
75463 063555
75464 06412142
75465 114206
75466 002003
75467 026613

0319. IF

TH~

STA MWORO
SAV24 JMP SAV25

TO LIBRARY
ROOM FOR CSAVE COD!

BSS 18

SAV2S EQU *
LOA SAVOP
LOB SAVP
JSB DISCZ,1
SZA,RSS
JMP LLEND

WRITE TO DISC
TRANSFER SUCCESSFUL1

TRANSFER TO DISC WAS UNSUCCESSFUL, INDICATE 'BADLy SAVED
PRINT ERROR MESSAGE,"

0320. PROGRAM' IN THE OIRECTORY ENTRY AND
0321*

0322

75470 116017

0323
0324

75471 002001
75472 10 2 0 35

0325

75473 064035
75474 044363
75415 160001
75476 031027

0326

0327
0328
0329
0330
. VJ331
0332

0333
0334
0335
0336

0337
033S
0339
taJ4te

JSB DLOKP,I
RSS
H~T DEATH.l58
LOB LrEMP+5
ADa ,+4
LOA B,I
lOR 81T15
STA B,I
LOA LTEMP+4
ADA .+5
L.DB LIeD

75.77 170001
75500 060034

75501 040364
75502 064676
75503 114206
'5504 114211
75505 063557
75506 067510
75501 026623
75510 075511
75511 005125
75512 047123
75513 052503

NO, GO GET DIRECTORY ENTRV AGAIN
FOUND IT
NOT FOUND. TROUBLE
GET POINTER TO [NTRy
_> ENO OF COMMON POINTER
SET BIT 15 TO
INDICATE BADLY SAvED
PROGRAM
WRITE OUT
DIRECTORY TRACK

,JS8 DISCZ, I

JSB SLVAG,I
LOA SM31

CAN'T DO IT, TRY TO SALVAGE

LDB •• 2

JMP
DEF
OCT
ASC

LIBER
PRINT FAILURE
.+1
e125
LF-U
t5,NsuCCEssFuLI KILL AND REPEAT.

LOA
LOB
JMP
OfF
oCT
ASC

.-16
.... 2
lIBER
."1
5116
LF_N
7,0 PROGRAM NAME

75514 041505
75515 051523

75516
75517
75520
75521
75522
7552J
75524
75525
15526
15521
1553~

0341
0342
0343
0344
0345
0346

043125
046013
020113
044514
046040
040516

042040
051105

050105
040524
021040

75531 060337

SAV3

75532 067534

SAV~

75533 026623
75534 0 7 5535

75535 005116
75536 047440
75537 050122
7554~ 047507
75541 051101

PAGE 0392 #32

0341
0348
0349
0350

0351
0352

0353
0354

0355
035&
0357
0358
0359.
0369
0361

75542
15543
15544
75545
15545

SAVE

046440
041101
046505

SAVge EQU

75546 07 0 2 0 4

75547
75550
75551
75552
75553
75554
75555
75556
15557

063554
064610
027773
000116
000146

072057
000036
177012'5
177741

0370

0371
0372.
0373.
0374*
0375
0376.
0377*
0378
0379
0380
1r1381

0382
0383

0384
0385

8 M31

SAVOY
SAV99

ADTAT
DKTBL
COM6+SAVO-COM3.SAVO-COM3
SAVOS
-> DISK AODR!88
.507

DEC -31

00036

SAVDS E.QU LTEMP+ti
LTEMP+7

SAVWD EQU LTEMP"'8
SAVe EQU LTEMP+g

SAVp EQU LTEMP+t0
SAVD EQU LTEMP,.,11
SAVDF EQU LTEMP+12

00042
00043
00CfJ44

SET UP
OVERLAY.

#1.181

SAYI EQU LTEMP+4
SAyS EQU LTEMP .. 5

0364*
0 3 65 0004 0
0366 00041
0367.
0368*
0369

LOA
LOB
JMP
EALCA OEF
EAI.NA DEF
SAVOY DEF
SAyDp DEF
SM501 DEC

00034
00035

0362.
0363

..

LOA SM507
STA MWORD

063556

•• DIREC ENTRY OF TRACK IN CORE
-> DIRECTORY ENTRY P~ECE£DING
SPACE FOR NEW ENTRY
DISC
ADDRESS

LENGTH IN WORDS OF PROGRAM
NUMBER OF ENTRIES IN AoT (NEG)
& pOINTER TO DIsC ADDRESS OF 1ST
AVAILABLE LOCATION FOR STORAGE

START-oF.PROGRAM PoINTER
DISC ADDRESS POINTER

LTEMP, LTEMP+l, LTEMP+2, AND LTEMP.3 ARE ALSO USED HERE
SAVLN EQU T35CQ

74460
75773
75773
75773
75774
75775
75776
75777
76000

LENGTH IN Bl.OCKS OF PROGRAM

ORG l.. IBRA+!507

114206

SAV99 EQU *
JSB DIsCZ,1

HLT 178

102077
027000

027347
027207
SSAV

JMP LIBRA
JMP SAV21
JMP 8A\l23
EQU •

NORMAl. RETURN
ERROR RETURN

PAGE 0393 #32

CSAVE

LIBRARY
IN
SEMI.COMPILED
FORM.
CSAVE
BORROWS
CODE
FROM
SAVE
AND
MUST
L4388.
0389* fOLLOW IT.

0387. THE CSAVE COMMAND IS USED TO SAVE PROGRAMS IN THE USER
0390.
0391
0392
0393.
0394
0395
0396

0397
103398

75000

ORG LIBRA

1500'" 064272

LOB MLINK+l

75025
75025
7512126
7512127
75030
75031
75032
75033
75034
7512135
75036

ORG
SlA
JMP
LOB
CPS
JaB
LOB
STB

002002

021042

065575
1354126
015516
065515

0399
0400
0401
075334
0402
060417
0403
071571
0404
002400
0405 , 75037 071513
0406 75040 12 7 041
0401 75041 036070
0408 75042 061230
0409 75043 002002
0410 75044 015520
75045 002400
0411
121412 75046 071230
0413 75047 065502
0414*
0415 75060
0416 75060 12165502
121417 75061 044366
0418 75062 01217004
0419 75063 044116
0420 75064 006021
0421 75065 12127103
0422 75066 060335
0423 75067 061071
121424 75070 026623
0425 752171 075072

0426

0427

75072
75073
75074
75075
75076

005120
051117

SAV0

COMPILED'l
CSAYl
SPRaG
PBUFF
ALCOM
SPROG
PRGCT

LOA .+40B

STA BLANK
CLA
STA SyMTB
JMP *+1,1
oEF CMP00
CSAVl LOA SPTR
SZA
JSS RSTPT
CSAY2 CLA
STA SPTR
LOB FILlS

vES

NO, COMMON
ALLOCATED?
NO •• OO IT

SET PROGRAM
COUNTER

TURN ON
BLANK SUPPRESSION
CLEAR O.uT.OF

STORAGE FL.AG
GO COMPIL.E IT
SEMI.COMPILED?
RESTORE SYMBOL TABLE POINTERS

fL.AG AS

SEMI-COMPIL.ED

QRG SAV50

LOB F'ILTS

ADS .+7
CMB,INS
ADB LWAUS
SSB,RSS
TOO 61G?
NO
JMP CSAV4
VES
LOA ,-18
LOB .... 2
JMP lIBER
DEF *+1
OCT 5120
LF.P
Ase 8,ROGRAM TOO LARGE

0~3522

040515
020124
75077 047517
75100 020114
75101 040522
75102 043505

0428

751133

0429

75103 065502
75104 044366

0430
0431.
0432 75255
0433 75255 060033
k1434
75256 031027
0435

75257

~7003J

CSAV4 EQU •
LOB FILTB
ADa ,+1
ORG
LOA
lOR
STA.

SAV10
LTEMP+3
BIT15
LTEMP+3

FLAG NAME
TO INDICATE

SEMI-COMPILED

PAGE 0394 #32
0436*
8437
0438
0439
0440
0441
0442
0443
0444
0445
0446
0441
044 8
0449

0450
0451

0452
121453
0454
0455
0456
0451*
0458.
0459.

75440
75440
75441
75442
75443
15444
15445
75446
75447

CSAVE

ORG SAV24

06U502
065513

LOA FILlS
L08 SYMTB

174000
002004

Sr8 0,1

INA

12165604
114000
064444

075603
75450 064353
75451 075230

75452 002004
75453 1656AJ
75454 174000

75455 035603
75456 035230
15457 021452
75460 002004

75461 065605
15462 174000

CSAV3

LOB FILeT
STB 0,1
LOB OFII.T
5rB FILPT
LOB .l1li4
5r8 SpTR
INA
LOB FILPT,I

srB

0,1

ISZ FIi.PT
ISZ SPTR
JMP CSAYJ
INA
LOB USESN

srB e,I

FIRST WORD AFTER SYMBOL TABLE
SAVE END-OF
PROGRAM POINTER
.~

SAVE ## OF


1ST DIREC ENTRY

001500160017.
0018
0019

75001 040364
75002 164000

~020

75003
750QJ4
75005
75006
75007
75010
75011
7 5 012
75013
75014

0021
0022

0023
0024
0025
0026
00 2 1
0028
0029
0030
0031
01d32
0033
0034
0035
0036

1tJ037
0038
0039
0(d40

0041

01342*
0043fr

0044*
0045*
0046.
0047
0048
0049
0050
005 1

0052
0053
0054
0055

002104

CLE,INA

144000
002040
006004

ADB A,I
SEZ
INS
ADA .-6
SlB,RSS
JMP SUP2

040351
006003
027024

16 40 00

THE
DIRECTORY
TRACK

LOS. 0, I

077730
A67727
002041
044356
077727
037732

SUP2
053723
027030
040373
027002

.>

CLE,SlB,RSS
JMP SUP2-1
ADB SUPS
STB SUPS
LOB SUPS-l
SEZ,RSS
ADS .-1
STB SUPS-l
ISZ SUPS

006103
027023

7 5 015 (iJ47730
75016
75017
75020
75021
75022
75023
75024
75024
75025
75026
75027

DIRECTORY DISC ADDRESS
DOES

ADA • +5
SUP! "LOB A,l

EXIST?
NO
GET DIRECTORY LENGTH.
LENGTH ZERO?
yES

ADD TO
TOTAL.

INCREMENTING DOUBLE WORD QUANTIT

BUMP DIRECTORY TRACK COUNTER.

EQU.

CPA
JHP
ADA
JMP

SDIRL
.+3

LAST DIRECTORy TRACK1
YES
NO _ GO TO NEXT ONE,

.+12

SUP1

AT THIS POINT THE DOUBLEwORD Su P.1

CONTAINS 12 LESS THAN THE

SUP

TOTAL NUMBER OF WORDS IN ALL DIRECTORY TRACKS.
75030
75031
75032
75033
75034
7S03t)

0637321
067727
100 400
000373
007400
100400
75036 075732

LOA SUPS
LOB SUPS.t
DIV .+12

eee

GET TOTAL # OF DIRECTORy WORDS,

GET ENTRY COUNT IN A

DIV SUPB

COUNT < 65535
COMPUTE , IN EACH DIRECTORY.

75037 053715
7504~ 0060"3

CPA M682
SZB,RSS

TEST FOR FULL UP.

75041 053716
75"'42 ~27705

CPA M68:;

JMP SUP3

ALL TRACKS ARE FULL

pAGE 0396 #33
0056
0057

121058
0059
0060

7512143
75044
75(,345
75046
75047
75050

SUpERSAVE

040356
044356

AOA ... 1
ADB .-1

077732

STB SUPS

MPY ,+12

11210200

INCREASE * OF ENTRIES/TRACK 8Y 1
LET e COUNT HOW MANY WILL HAVE
THIS LARGER SIZE.
CONVERT TO -WORD SIZE

00k"373

AND SAVE

ST. SUPS

073730

0061*
0062* COMPUTE AN EVEN DISTRIBUTION Of ENTRIES OVER ALL AVAILABLE TRACKS
0063.
0064 75051 067722
0065 75052 044364
0066 75053 16121001
9067 75054 0121601214
0068 7512155 130001
0069 75056 002003
0070 75057 027065

0071
0072
0073
121074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084*
0085*
0086.
0087*
121088
0089
0090*
0091*
0092*
121093*
999.
0095
0096

7512160
75061
75062
75063
75064

063739
12137732
027065

12140373
073730

75065

75065 173733
75066 044351
75067 2157723
75070 027014
75071 044373
75072 031733

LOB SDIR0
ADe .+5
SUP4 LOA 1,1
IN8
lOR B,I
SZA,RSS
JMP SUP5
LOA SUPS
IsZ SUpS
JMP SUP 50
ADA ,+12
STA SUPS
SUP50 EQu •
SUPS STA 5UPP,I
AD8 ,.6

CPS SDIRL
JMP SUP6
ADB .~t2
ISZ suPP
JMP SUP4

75",73 021053

75074 063112
75075 073733

SUP6

LOA DEFNN
STA SUPP

063723
073735
040364

12112199

121100

75103 144000

0101

75104 002040
75105 006004

0103
12111214
121105
0106

15106 006002
15107 027112

SZB
.JMP SUP21

0197

75112

0108
0109

75112 040351
75113 073737
75114 002400

011212

0110

YES • DECREMENT BY 1 ENTRY
AND SAVE
STORE IN TABLE,
TE8T FOR DONE.
FINISHED
BUMP TO NEXT TRACK
BUMP TABLE POINTER ALIO,

SET UP POINTER
TO NN AGAIN,

SQUEEZE ALL THE DIRECTORY ENTRIES ONTO THE LAST MOST OF THE
AVAILABLE TRACKS.

16 40 00
75102 002104

f(J098

IF TRACK DOfS NOT EXIST
DO NOT INCLUDE IT
GET TRACK LENGTH
HAVE ALL BIG TRACKS BEEN PROCESS

THE TABLE POINTED TO BY DEfNN NOW CONTAINS THE NEW LENGTHS OF EACH
Of THE DIRECTORY TRACKS

LOA SOIRl
STA SUPKI
ADA ,.5
SUP20 EQU •
LOB A,I
CLE,INA
ADS A,l
SEZ
INB

0097

GET POINTER TO FIRST TRACK AGAIN
GET THE DISC ADDRESS

75076
75077
75100
75101
75101

75110 040347
75111 027101

ADA
JMP
SUP2i EQU
ADA
STA
CLA

.> 1ST TRACK

FOR READ
GET ADDRESS

ZERO?

NO, THE TRACK EXISTS

... a
SUP20

*

,.6
SUPLl

.> 1ST TRACK
#

FOR WRITE
OF WORDS IN BUFFER

PAGE 0397 #33
0111
0112 ..
0113
0114
0115
0116
0117
0118
0119

0120
0121
~122

0123
0124
0125

75115 073736
75116
75117
75117
75120
75121
7 5 122
75123
75124
75120
75126
75127
15130
75131
75132
75133
75134
75135
75136

0126
01 27
012$
0129
13130
0131.
0132 7 5 137
0133 75140
0134 75141
0135 7 5 142
0136 75143
0137 75144
0138 7 5 145
0139 75146
0140 75147
0141 75150
0142 75151
0143 75152
0144 75153
014 5 7515 4
0146
0147.
0148

01 49
0150

0151
0152
0153
0154

0155
0156
01 5 7
0158
0159
0160
0161

0162
0163
0164
0165

SUPERSAVE

063735

164000
006003

027262
0 4 7736
047720
006020
027156
164000
074204
047736
077736
044712
0452127
040364
114206
114212

STA SUPK2

LOA SUPKl

SUP22 EQU •

LOB A,1
SlB,RSS
JMP SUP27
ADB SUPK2

ADB S818 4
SSB

JMP SUP23

LOB A,I
STB MWORD
ADB SUPK2
5T8 SUPK2

ADS
ADB
ADA
JSB
JSB

LULEN
BIT15
.+5
DISCZ,1
DEADP,I

06 3 736
050314

CPA M8184

002001

RSS

02126 2
070294
067737
170001
044364

JMP
SlA
LOB
STA
ADB
LOA

060001

067721
114206
114212
006400
077736
75155 027245

75156
75156 007"04
75157 005121
7516~ ,,"5121
75161 005121
75162 005121
75163 077742
75164 005727
75165 077741
75166 144000
75167 074204
75170 047736
75171 044712
75172 074A50
75173 040364
75174 104200
75175 100000
75176 000040
75177 047742

INITIALIZED TO ZERO

LOA SUPK2

SUP27
MWORO
SUPlt
B,I
.+5
B

GET LENGTH FOR READ
ZERO?

YES
NO, ADO IN j OF WORDS IN BUF'ER
ARE THE NUMBER OF WORDS IN TH!
BUFFER ,. 81841
YES
NO, SET
LENGTH
UPDATE 1# OF
WORDS IN CORE

CORE ADDRESS
II> DISC ADDRESS

EXACTLY 8184
YES
NO

WOADS'

SET LENGTH

IN DIREC
-> DISC ADDRESS
ADDRESS

LOB X2056

CORE

JSB DISCZ,1
JSB DEADP,1
CLB

BUFFER NOW EMPTV

ST8 SUPK2
JMP SUP24

SUP23 EQU ."
CMa,INS
BRS,BRS
BRS,BRS
BRS,BRS
BRS,BRS
5T8 SUPES

BLF,BLF
STa SJPEX
ADS A,1
5T8 MWORD
ADS SUPK2
ADB LULEN
STB MOVES
ADA • +5
DLD A,l
elf
ADB SUPES

CONVERT TO POSITIVE VALUE
COMPUTE
NUMBER
OF
EXTRA
BLOCKS
COMPUTE II OF
EXTRA WORDS
##

OF WORDS

TO READ

COMPUTE
ADDRESS
Of' REMAINING

PAGE 0398 #33
0166
0167
01tHS

0169
0110
0171
0172
0173

SUPERSAVE

75205
75206
75207
75210

INA

DST SUPET
LOA
LOB
ADS
J8B
JSB

SUPEA
MOVES
81T15
DISCZ,I
OEADP,I

060001

LOA
STA
LOB
STA
ADB
LOA

M8184
MWORD
SUPL1
B,I
.+5
B

067721

LOB X2056

064050
045027
114206
114212

0174*
0175
0176
B177
01 78
0179

0180
0181

0182
0183
0184*
0185

0186
0187
0188

0189
0199
0191
0192
0193*
0194
0195
0196
0197
0198
0199
0200
0201

0202

75211 060314
75212 010204
75213 067737
75214

1700~1

75215
75216
75217
75220
75221

044364

0208
0209
0210
0211
0212

0213
0214
0215
0216
0217
0218
0219

0220

LOB X2056

CMB,INB
ADS MOVES
STB SUPK2
LOA LULEN
ADA B
STA MOVED
JSB MOVEW

75225 077736
75226 060712
75227 040001
75230 070051
75231 016450

LOB SUPEX
CMB,INB
STB M~ORD
ADS SUPK2
ST8 SUPK2
ADS LULEN
ADS BIT15
L.DA SUPKt
AOA .+5
JSB DISCZ,1
.J5B DEAOP, I

067741
007004
074204

047736
2177736
044712
045027
063735

040364
0203 75243 114206
0204 75244 114212
0205.
0206 75245

0207

JSB DISCZ,1
JSB DEADP,I

114206
114212

75222 067721
75223 007004
75224 044050

75232
75233
75234
75235
75236
75237
75240
75241
75242

752 4 7
75250
75251
75252
75253

LOA .--2
SUP25

16 40 00
002104
144000

002040
006004

75254 006002
75255 027260
75256 040347
75257 027247

75260
75260 040351

.:.. DISC ADDHESS

CORE ADDRESS

##

OF WORDS
TO WRITE

SAVE IN DIREC

.>COREDISCADDREss
ADDRESS
* EXTRA
OF

WORDS
TO MOVE

DESTINATION POINTER
MOVE THEM
#.

OF WORDS

#

OF WORDS IN BUFFER

TO READ FROM
PARTIAL TRACK

CORE ADDRESS
:I> DISC ADDRESS

SUP24 EQU •

75245 060355
75246 043137
75247

WORDS
TO
READ

SEZ

75200 002040
75201 002004
75202 104400
15203 075744
15204 063743

ADA SUPll
EQU *
LOB A,I
CLE,INA
ADS A,I
SEl

BUMP TO NEXT
TRACK TO WRITE

GET ADDRESS

INB

SZB

ZER01

JMP SUP26

NO

ADA .-8

YES, MOVE TO NEXT ONE

JMP SUP25
SUP26 FQU •
AOA .-.6

BUMP TO LENGTH WORD

PAGE 0399 #33
0221

SUPERSAVE

75261 073737

9222*
0223

1224
0225
0226

0227
0228
0229
0230

0231*
0232
0233
0234
0235
0236
0237
0238
0239
0240
02.1
0242
0243
0244.
0245
0246
0247
0248
0249
0250
0251

0252
0253
0254
0255
0256
0251
0258
0259
026B

0261

0262
0263
0264

0265.
0266*
02 61*
0268.
026 9*
0270*
0271*
0272.
°273*
0274.
0275*
0276*

75262
75262
75263
75264
75265
75266
75267
75270
75270
75271
75272
75273
75274
75275
75276
75277
7 5 300
75301

063735
053722
021270

ADA ... ,

rlI73735
027117

STA SUPKt
JMP SUP22

063736
002003
027311
070204
067737
170001
044364
060001

063737

SAVE POINTER

•• CURRENT READ TRACK
LAST ONE
YES
NO, BUMP TO NEXT ONE

SUP28 EQU •

LOA SUPK2
SZA,RSS
JMP SUPJ0
srA MWORD
LOB SUPLI
STA B,I
AD8 ,.5
LOA B
L08 MWORD
AoB lULEN

# OF WORDS IN SUFFER
ZERO?

yES

NO, MUST WRITE OUT 8UFFER
SET LENGTH
IN DIREC
a> OISK ADDRESS

CORE ADDRESS

.IS8 0 lSCZ, I

JSB DEADP,I

LOA SUPLl
SUP29 EQU •

'153722
027326
040350
002001

75311 063737

75312
75313
75314
75315
75316
75317
75320
75321
75322
75323
75324
75325

SUP21 EQU *
LOA SUPKl
CPA SOIR0
JMP SUP28

040350

06 4 204
04 .. 712
75302 114206
75303 114212
75304
75305
75305
75306
75307
75310
75311

STA SUPLt

040364
164000
002104
144000
002040
096004
04 03 51

006003

021305
006400
174000
027305

CPA SDIR0
JMP SuP31
ADA .",7
RSS

SUP30 EQU •
LOA SUPLl
AOA ,+5
LOB A,I
CL!,INA
Aoa A,I
BEl
INS
ADA ,-6
SZB,RSS
JMP SU P29
CLB
STS A,I
JMP SUP29

LAST WRITE TRACK?
yES, DONE
NO, BUMP TO NEXT ONE

GET ADDRESS

ZERO?
yES
NO, SET
LENGTH 80

THE MAIN PART OF THE ALGORITHM CONSISTS OF TWO SECTIONS. IN THE
FIRST SECTION WE READ AS POSSIBLE INTO THE SWAP AREA. IN THE 2ND
SECTION WE WRITE OUT AS MUCH AS POSSIBLE, THE ENTIRE PROCEDURE IS
THEN REPEATED UNTIL WE ARE FINISHED. THE FOLLOWING MEANINGS ARE
ASSOCIATED WITH THESE VARIABLES'
SuPKla>OIREC ENTRy FOR TRACK BEING READ,
SUPL1a>OIREC ENTRY FOR TRACK BEING WRITTEN.
SUPK2-# OF WORDS READ SO FAR FROM Kl.
SUPL2a# OF WORDS wRITTEN SO FAR ON Lt.
SUP
-# OF WORDS IN CORE.

PAGE 0400 #33

0277.
0278.
0279
0280
0281
0282
0283
0284

0285
0286.
0287
0288
0289
0290
0291*
0292

0293
0294
0295
0296

SUPEHSAVE

supp a>

w#

OF WORDS TO BE WRITTEN ON Lt.
SUP31 EQU ..

75326
75326
75327
75330
75331
75332
75333

002400
073136
073740
063722
073735
073737

75334
75335
75336
75337

06374 0
003004
153733
027542

SUP1

75340
75341
75342
75343
75344

A63731
043726

SUP8

75345
75346
75347
75350
75351

067735
057724
027553
163735
043736

CLA
STA SUPK2
STA SUPL.2
LOA SDIR0

STA SUPKt
5TA SUPLl

2102021
027553
070204

0297.
0298
0299
0300
0301
0302
0303
0304
0305
0306

0307
03218

INITIALIZE
LENGTH
wORDS

INITIALIZE
DIREC
POINTERS

LDA SUPl2
CMA,INA
CPA SUPP,1
JMP SUP10

IS # OF WORDS WRITTEN SO FAR ON
L18# OF WORDs TO 8E HRITTEN7

LDA SUP
ADA STLE
SSA,RSS
JHP SUP11
SlA MWORO

IS THE SWAP AREA PULL

LOB SUPKt
CPS SDIRU
JMP SUPt1
LOA SUPK 1, I.

ADA SUPK2

75352 0i02002

SZA

75353
75354
75355
75356
75357

027360
044366
077735
073736
027340

JHP
ADB
STB
SrA
JMP

75360
75361
75362
15363
75364
75365
75366
75361
75370
75371

010001
007004
044204
006020
0273]0
060204
1340500
010316
002003
027553

SUP9

,+7
SUPKl
SUPK2
SUP8

YES.wGO ADVANCE Ltg

yES •• GO TO WRITE SECTION,

NO
SAVE •• OF CORE WORDS
AVAILABLE
tIP

.' ..

HAVE WE READ ALL OF THE TRACKS?
YES.~GO TO wRITE SECTION,
A.a., OF WORDS ON THIS TRACK,
A-.# NOT READ YET,
ENTIRE TRACK READt
NO,
YES"-BUMP Kl TO NEXT TRACK,

# OF WORDS READ TO 0,
TEST THIS TRACK,

SET

0309.

0310
0311
0312

0313
031 4
0315
0316
0317
0318
0319
0320.
0321
75372 070204
75373
063736
0322
21323 75374 006400
0324 75375 101030
0325 75376 073744
0326 7 5 377 0 6 7735
0327 75400 044364
0328 75401 10420~
75402 100001
0329 75403 000040
0330 75404 047744
754~5 002040
0331

SUP9

SrA 1
CMB,INB
ADe MWORD
SSB

S-•• OF WORDS NOT VET READ ON Kl
MAKE POSITIVE.
IS
OF WORDS ON TRACK • • OF
WORDS WE HAVE ROOM FOR?

*

SZA,RSS
JMP SUP1!

NO.~READ IN ENTIRE TAACK.
GET .* WE HAVE ROOM FOR.
REDUCE TO NEXT SMALLER
BLOCK SIZE,
IF WE CAN'T READ IN ANy, GO TO
WRITE SECTION,

STA MWORD
LOA SUPK2
CLB

SET WORD •• * OF WORDS. TO READ.
GET
OF WORDS READ SO FAR.
DIVIDE By 64 TO GET

JMP .+4

LOA MWORD
ADA 8377
AND M256

ASR 8

STA
LOB
ADS
OL.D

*

BLOCK ADDRESS.

SUPET
SUPKl

.+5
H,l

elE
ADB supEr
SEZ

GET DIRECTORY
TRACK ADORESS

PAGE 0401 #33
0332
0333
0334
0335
·0336
0337
0338

75406
75407
75410
75411
75412
75413
75414
75415

SUPERSAVE

002004
t 044·00
075744
063743
064700
047731
114206
114212

0339.
0340 75416 064204

INA
DST SUPET

LOA supEA
LOB LIBDI
ADB SUP

JSB DISCZ,I
JSB DEADP,I
LOB MWORO
CMB,INB

0341

75417 007004

r.a"A~
u.."
...

75420 047731

A08 SUP

0343

75421
75422
75423
75424
75425

077731
064204
007004

STB SUP
LOB MWORD
eMB,INB

75426
75427
75430
75431
75432
75433
75434
75435
75436
75437
75440
75441
75442
75443
75444
75445
75446

0344

0345
0346
0347

~47736

ADS SUPK2

077736

STB SUPK2

063734
002092
021340
063740
006400
100400
000373
060001
087004
077741
043731
006400
100400
000373
100200
000373

LOA SUPTG

0348*
0349
03S0
0351
0352
0353
0354
0355
0356
0357
0358
0359

0360
0361
0362

0363
0364
0365
0366
0367
0368
0369
0370
0371
0372
0373
0374
0375
0376
0377
0378

0379

040676
754147 043741
75450 006003
75451
75452
7545 3
75454
75455
75456
75456
75457
75460
75461

040343

073741
06464°

117125

027340
067741
077742
044343

077741
75462 044174
75463 006020
75464 027 4 71
75465 067741

75466 060640

0380 75467 117725
0381
75470 027456
0382.
0383 75471

SZA

JMP SUP8
LOA SUPL2
CL8
DIV ,+12

a> DISC ADDRESS
COMPUTE CORE LOCATION
TO READ INTO.

UPDATE # OF WORDS
IN CORE.

*

UPDATE
OF WORDS
READ FROM Ki.

HAVE WE INSERTED THE NEW ENTRY
YET?
YES.~GO TRY TO READ MORE,
GET THE AMOUNT ALREADY WRITT!N
ON THIS TRACK
FIND EXCESS· OVER EVEN ENTRy

LOA B

CMB,INB
STB SUPEX
AOA SUP
CLB
DIV .+12

GET THE COUNT
OF WORDS IN CORE
CONVERT TO ENTRY COUNT

t-1Py ,+12

AND BACK TO WORD COUNT

ADA LISD
AOA SUPEX

SO THAT WE LOOK AT

SZB,RSS
ADA ..... 12
STA SUPEx
LOB OL.TEM

JSB DIReS,I
JHP
SUPJ2 EQU
LOB
STB
ADa
ST8
ADS

sse

JMP
LOB
LOA
JS8
JMP

SUP8

*

SUPEX
SUPES
.-12
SUPEX
MLIBD

SUP3J
SUPEX
DLTEM
DIReS,I
SUP32

SUP33 EQU •

AN EVEN BOUNDARY

a> ID/NAME OF NEW ENTRY
GO COMPARE
DOESN'T GO ON THIS TRACK

GOES ON TH!S

TRACK, SO

SEARCH BACKWARDS

TO FIND
NO SKIP IF SEARCH DONE
OUT WHERE
COMPARE THIS ENTRY
NOT THIS ONE

PAGE 0402 #33
0384
0385
0386

0387
0388

75471
75472
75473
75474
75475
75476
75477
75500
75501
75502
75503

SUPERSAVE

037734
060676
043731
064000
040312
070051
040343
070050
007004
047742

S389
0390
0391
0392
0393
0394
~16434
0395*
0396 75504 063742
0397 75505 070051
0398 75506 060640
0399 75507 070050
0400 75510 064353
0401
75511 016450
0402 75512 060042
0403 75513 170051
0404 75514 034051
0405 75515 016423
0406 75516 170051
0407 75517 034051
0408 75520 060171
0409 7 5 521 170051
0410 75522 034051
75523 002400
0411
0412 75524 170051
0413 75525 034051
0414 75526 104200
75527 0110036
0415 75530 104400
75531 100051
0416 75532 064051
0417 75533 044362
0418 75534 060040
0419 75535 170001
0420 75536 063731
0421 75537 040373
0422 75540 073731
0423 75541 027340
0424.
0425.
0426.
0427 75542 063737
0428 75543 053723
0429 75544 027672
0430 75545 040366
0431 75546 073737
0432 75547 002400
0433 75550 073740
0434 75551 037733
0435 75552 027334

ISl
LOA
ADA
LOB

StJPTG
LIBD
SUP
A

SET TOGGLE TO SAY WE'VE INSERTED
COMPUTE DESTINATION
OF WORDS TO BE
MOVED

ADA ,+11

STA MOVED
ADA ,.12
STA MOVES
eMB,INB
ADS SUPES
JS8 MOVES
LOA
STA
LOA
STA

SUPfS
MOVED
DLTEM
MOVES

JSB
LOA
STA
ISZ
JSB

MOVE'"
SAVP
MOVEO,l
MOVED

toe , .. 4

STA

ISZ
LOA
STA
ISZ

DATE

MOVED,l
MOVED
DATlH
MOVED,I
MOvED

CLA
STA MOVED,I
lSI MO·VED
OLD SAVDS
DST MOVED,!

LOS
ADe
LDA
srA
LOA

MOVED
,+3
SAVWD

B,I

SUP

AOA ,+12
STA SUP
JHP SuP8

SUP10 LOA SUPLl
CPA SDIRL
JMP SuP16
AOA ..... 7

STA SUPLl
CLA
STA SUPL2
lSZ supp
JMP SUP7

COMPUTE SOURCE'

CALL REVERSE MOVER,

SET SOURCE

AT

LTEMP.

MOVE IN FIRST 4
WORDS,
STORE START.OF ...
PROGRAM POINTER

INSERT DATE IN WORD 5
AND

GET HOUR OF yEAR FOR
WORD 6

GET THE DISK ADDRES8AND 8ET IT
INTO wORDS 8 AND 9
.> WORD 11
GET L.ENGTH
AND STORE AWAY
UPDATE THE COUNT OF WORDS
IN CORE BY TWELVE

TEST fOR LAST TRACK.
ALL DONE.~GO CLEAN UP DIREC,
BUMP TO NEXT TRACK.

SET # OF WORDS WRITTEN SO FAR
TO 0,
BUMP POINTER TO WORDS TO BE
WRITTEN.

PAGE 0403 #33

SUPERSAVE

0437* THE NEXT SECTION IS THE OUTPUT SECTION, WE ONLY COME TO THIS SEC-

0438* lION WHEN wE HAVE DETERMINED THAT NO MORE CAN 8E READ, IN THIS
0439* PART WE WRITE OUT AS MUCH A8 POSSIBLE UNTIL WE HAVE EXHAUSTED ALL
0440* WE HAVE IN CORE OR WE REACH THE POINT WHEN FURTHER OUTPUT WOULD
0441* DESTROY INFORMATION NOT YET READ, IN THIS SECTION, THE VARiABLE
0442. SUPS = # OF WORDS THAT HAVE BEEN OUTPUT FROM "THE CURRENT CORE
0443. LOAD.
0445
0446

0447
0448
0449

75553 002400
75554 073730
75555 063740
75556 143733

75557 067737

75560 057735

75561
75562
75563
75564

0453
0404

0455
0456
0457
0458
0459
0460
0461
0462
0463

0464
0465
0466
04 61
0468
0469

0470*

LDB SUPL,l

CPS SUPKl
JMP SUP12
067730 SUP13 LOB SUPS
007004 "
eM8,INB

0450
0451

0452

SUP11 CLA
SUP15 STA SUPS
LOA SUPL2
ADA SUPP,1

027575

047731
75565 077732
75566 044000
75567 et06021
75570 027604
75571 063732
75572 010316
75573 003004
75574 027604
75575 067740
75576 007004
75577 047736
75600 044000
7 5 6 01 007025
75602 040001
75603 027562

SET # OF
ZERO,

~ORDS

OUTPUT SO FAR TO

SET WORD • .# OF WORDS LEFT

TO BE WRITTEN ON Lt.
TEST FOR W~ITING ON A TRACK NOT
COMPLETEL.Y READ.

WE ARE.

SET

e-*

Of WORDS LEFT IN CORE.

ADS SUP

ST8 SUPB
ADS 0

SSB,RSS
JMP SUP14
LOA SUPS
AND M256
CMA,INA
JMP SUP14
SUP12 LOB SUPL2
CMa,INS
ADB SUPK2

0471* A NOW CONTAINS -#
0412*
0473 75604 070204 SUP14
0474 75605 0212003
0475 75606 021655
0476 75607 003004
0477 75610 ~73732
0478 75611 063740
0479 75612 002002
0480 75613 027625
0481.
0482 75614 063737
0483 75615 0£12004
0484 75616 070051
0485 75617 060676
0486 75620 043730
0487 75621 070050
0488 75622 064353
0489 75623 016450
0490 75624 002400
0491*

SAVE IN B.
COMPARE WITH

#

WE WANT TO WRITE,

HAVE ENOUGH •• j IS IN A.
ONLY WRITE WHAT WE HAVE.
USE ONLY FULL BLOCK'S WORTH
MAKE NEGATIVE.
IF WRITING ON UNREAD TRACK, MAKE
SURE WE DON'T GO INTO UNREAD
AREA.

ADB0

CHB,SSB,INB,RSS
ADA 1
CHANGE A TO AVOID OVERLAY.
.JMP SUP13
OF WORDS WE'RE GOING TO WRITE.

STA MWORD
SZA,RSS
JMP SUP17
CMA,INA
STA SUPB

IF NO WORDS TO BE

WRITTEN GO TO SLID! CORE FOR
NEW INPUT.

LOA SUPL2
SZA
JMP SUP18

TEST FOR FIRST WRITE ON THIS
TRACK.

LOA SUPLl
INA
srA MOVED
LOA LIBD

IF FIRST WRITE,

ADA SUPS

STA MOVES
LOB .-4
JSB MOVEW
CLA

ADJUST DIREC TO TELL
NEW FIRST ENTRY ON THAT
TRACK.

PAGE 0404 #33

0492
0493

0494
04915

0496
0491

049a
0499
0500

0501
05e2
0503
0504
0505

0506
05e7
05e8
0509
0510
0511
0512
0513

75625
15626
75627
75630

75633 100001
75634 080040
75635 047744
75636 012040
75637 002004

75640
75541
75642
75643
75644
75645
75646
75647
75650
75651

0524
0527
0528

184400
075744
063743
064676
041730

114206
114212
063732
043740
073740

75652 063732
75653 043730
75654 027554

0514*

0525
0526

006400
101030
067737
044364

75631 013744
75632 11 4200

0515. COME
0516*
0517
0518
0519
0520
0521
0522
0523

SUPERSAVE

ASR 8

LOB SUPl1

CONVERT WORDS TO BLOCK
ADDRESS
ADD IN TRACK ADDRESS,

ADS •• 5

STA SuPET
DLD B,I

CLf
ADB supET
SEl
INA
DST SUPET
LOA SUPEA
LOB LISD
ADB SUPS

JSB DISCZ,1
JSB DEADP,I
LDA SUPB
ADA SUPL2
STA SUPL.2
LDA SUPB
ADA SUPS
JMP SUP15

.> DISC ADDRESS
COMPUTE CORE
ADDRESS.
OUTPUT TO DI8C

ADJUST • OF WOR080UTPUT TO
TRACK,

*

ADJUST
OF CORE WORDS WRITTEN
OUT SO FAR.
lOOP FOR ANy MORE WRITING.

HERE WHEN WE CAN'T WRITE ANyMORE.

75655 053730
75656 027334
75657 067730
75660 007004
75661 041731

75662 077731
75663 001004
75664 06 0 676

75665
75666
75667
75670
.,5611

SUP18 CLB

070051
043730
070050
016450

SUP17 CPA SUPS
JMP SUP?
LDB SUPS

CMB,INS
ADB SUP

STB SUP
CMB,INB
LDA LISD
STA MOVED
ADA SUPS
STA MOVES
JSB MOVEW
JMP SUP1

IF NOTHING WRITTEN AT ALL, GO TO
TRY AND READ AGAIN,
ADJUST # OF WORDS IN CORE,

MAKE NEGATIVE FOR eORE MOVE.
SET DESTINATION AND SOURCE.

0529
027334
0530.
0531* ALL TRACKS WRITTEN BACK. NOW uPDATE WORD COUNTS IN
0532. DIREC.
0533.
0534 75672

0535
0536

0537
0538
0539

0540

0541
0542
0543
0544
0545

SUP16 EQU •

75612 ,,63713
75673 073731
75674 067722
75675
75675 163712
75676 170001

75677
75700
75701
75702
75703

037712
044366

037731
027675
063717

LDA
STA
LDB
SUPLL EGU
l.OA
STA
ISZ
ADS
ISZ
JMP
LOA

Mae

SUP
sDIRe
•
DEFNN,I
B,I
DEFNN
.+1
SUP
SUPLl
SUPRl

SET COUNT
0' DIRECTORY TRAX
a> FIRST DIREC ENTRY
COpy NEW LENGTH WORDS INTO
THE DIREC TABLE ENTRIES
WIPE OUT "CONSTANT"
'
ADVANCE DIREC POINTER

SET UP RETURN ADDRESS.

PAGE
0546
0541
0548

0549
e550
0551
0552
0553
0554

0555
0556
0"101:'7
v...,,
0558
0559
0560
0561
0562
0563
0564
0565
0566

0567
0568
0569

0570
0571
0572

0573
0574
0575
0576
0577
0578
0579
0580
0581

0582
058 3
0584

0585

0405 #33

157214
15705
75705
75706
75707
75710
75711
75712
75713
75714
75715

SUPERSAVE

073772

SUP3
063714
~70204

060256

064610
027770
~73601

117660
177010
176526

75716 176525

75 7 1 7
75720
75721
75722
75723
75724
75725
75726
75727
75730
75731
75732
75733
75734
75735
75736
75737
75740
75741
75742
75743
75744
75770
75770
75770
7 5 77 1
75712
75773

02 777 6
011770
005240

030000
031051
0131060
03 1 2 0 3
154024
177771
177764
000000
000000
073601
000000
000000
000000
000000
ra00000

000000
000000

075744
2100000

1142'i6
114212

027777

STA SUPR
EQU •
LOA SM504

SET WORD COUNT

STA
LOA
LOB
JMP

.> DISC ADDRESS

MWORD

LIB
_LIBt
SUPRR

DEFNN DEF FILSF
DEC .a0
M8e
8M504 DEC .504
M682
M683

DEC .682

DEC !'-683
SUPRI JMP LIBRA+510 JUMP fOR NORMAL RETURN
S8184 DEC 8184
x2056 DEF LIBU8+uLEN .. 8184
SOIRe OfF DIREC
SOIRL OEF DIREL
SDIRU DEF DIREU
DIRCS DEF DIReM
STLE ABS .ULEN+20
OCT .1
SUpS DEC -12
SUp· OCT
SUPS OCT e
Supp DEF FILBF
SUPTG OCT 0
SUPK1 aSS 1
SUPK2 ass 1
SUPLt sss 1
SUPL2 Bsa 1

"

supEx ass

1

SUPES BSS 1
SUP!. DEF S'UPET
SUPET BSS 2
ORG LIBRA ... 504
SUPRR EQU •
JSB DIsCZ,1
JSe DEADP,I
SUPR ,JHP LIBRA+511
SSSAV EQU •

POINTER TO DISC ADDRESS
DOU 8 lEWORD TO HOI.D DISC ADDRESS

OVERLAY wITH ORIGINAL ROUTINE
CAN'T GET IT BACK, ARRGHI
SET FOR ERROR ROUTINE

PAGE 0406 *34

GET

0002. THE GtT ROUTINE IS RESPONSIBLE FOR LOADING A PROGRAM FROM THE
0003* USER LIBRARY. IT CAN BE USED TO LOAD FROM EITHER THE USER'S
0004* PRIVATE LIBRARY, THE ~ROUP LIBRARY, OR THE PUBLIC LIBRARY.
0005* IF THE PROGRAM 18 TO BE FROM THE USER'S GROUP LIBRARY THE
0006* PROGRAM NAME SHOULD BE PRECEDED BY A SNOMFLAKE (.).
IT IS TO
0007* BE FHOM THE PUBLIC LIBRARY, THE PROGRAM NAME SHOULD BE PRECEDED
0008* BY A DOLLAR SIGN (S).

iF

9010

75000

0012
00iJ
0014

75"00
75e0i
75002
75003
75004
75005

0015
8016
0017
0018

0019
0020

0021
0022
0023
0024
0025
0026
0027
0028
0029
0030

0031
0032
0033
0034
0035
0036
0037
0038
0039
0048
0041*
0042
0043
0044
0045

0046
0047

ORG LIBRA
060272

040346
070036
160000
010030
060640

75006 002004

75007 070034
75010 060354
75011 070037
75012 016532

75"13 027035
75014 050423
75015 027050
75016 05 0 431

75017 027055
75020 001127
75021 170034
75022 01 65 32

GET3

75023 06'0417

75024 130034
75025 170034
75026 034034
75027 016532
752130 060417
75031 034031
75032 ~27020

75933 050417
75034 027074

75035 060342
75036
75037
75040
75041

GETI

067040

026623
075,,41
005111

75042 041126
75043 040514
75044 044504
75045 020116
75046 040515
75047 042440

LOA MLINK+l
GET USER'S 10.
ADA .+?IO.1L.iNK
STA GETI
LOA 0,1
STA lTEMP
STORE IN LTEMP.
LOA OLTEM
SET UP POINTER FOR NAM!.
INA
STA GETP
SET UP COUNTER,
LOA •• 3
SrA GETC
.lg8 LCHAR
GET FIRST INPUT CHAR.
ERROR IF NONE.
JHP GETl
CPA .+448
IF S GO TO SET UP FOR
JMP GET2
SEARCHING PUBLIC LI8RARY,
CPA ,+52B
IF * GO TO SfT UP FOR
JMP GETlA
SEARCHING GROUP L.IBRARY
ALF,ALF
SAVE CHARACTER IN TABL.E.
STA GElP,I
JSB LCHAR
GET RIGHT CHARACTER.
IF END CHANGE TO BLANK.
LOA ,+408
lOR GElP,I
STA GETP,I
ISZ GETP
BUMP POINTER.
JSB LCHAR
GET NEXT CHARACTER.
LOA ,+408
ISZ GETe
DO WE WANT ITl
JMP GET3
YES,
CPA ,+408
NO •• A SHOULD NOW 8E8LANK.
JMP GET4
LDA
LOB
JMP
OEF
OCT
ASC

,.13
*+2
LIBER
.+1
5111
6,NVALID NAME

0048*
0049. PUBLIC LIBRARY PROGRAM

"050*
0051

0052

7505~ 060514
75051 070030

GET2

LOA A000

STA LTEMP

SET UP FOR PUBLIC Ll8RARY SEARCH

PAGE 0407 #34

GET

00f>3
0054

75052 016532
75053 027035

0055

75054 027020

JSB LCHAR
JMP GETl
JMP GET3

GET fIRST CHAR OF NAME.
FAIL IF NONE,

9056.

"0e1.

GROUP LIBRARY PHOGRAM

0059
0060
0061
0062

75055 060030
75056 010512
75057 006400

0051.

7506~

100400

75061 000472
75062 1082021
75063 000 4 72
0064
0065

0066

75064 064000

GET14 LOA LTEMP
AND 81777

CLB
DIV .100
MPV .100

LOB
LOA
AND
lOR
ST.
JSB
JHP
JMP

75065
15066
752167
7507QJ
75071
75072
75073

060612
010030

75075
75076
75077
75100

061575
070043
116017
021133

LDA
STA
JSe
JMP

75101
75102
75103
75104
75105
75106

060337
067104
026623
075105
005116

GET19 LOA
LOB
JMP
DEF

A
M2090

LTEMP

GET USER'S ID
ISOLATE NUMERICAL PART
DIVIDE By 100 AND
MULTIPly BACK, DROPPING REMAIN

SAVE RESULTING MULTJPL! OF S81
GET UPPER 6 8ITS MASK
GET ALPHABETIC PART -OF,ID
MERGE NEW NUMERICAL PART
STORE LIBRARIAN 10
GET FIRST CHAR OF NAME
FAIL IF NONE
ELSE, CONtINUE

B
0061
030001
9068
070030
lTEMP
LCHAR
016532
0069
027035
0070
GET1
021020
0071
GETl
0072*
0073* AT THIS POINT THE 10 OF THE LIBRARY CONTAINING THE D!81REDPROGRAM
0074.
IS IN LTEMP AND THE PROGRAM NAME IS IN LTEMP+l, LTEMP+2, AND
0075.
LTEMP+3
0076.
0077 75074 016056 GET4 JS8 ROPRG
0078
0079
0080
0081
0082.
0083
0084
0085
0086

0087

0088

047440

SPROG
GETS
DLOKP,I
GET18

SAVE END.OF.
COMMON POINTER
SEARCH DIREcTORY FOR PROGRAM

•• 16
*+2
LIBER
.+1

OCT 5116

ASC 7,0 SUCH PROGRAM

75107 051525
75110 041510

0089
/(Ja90
0091

0092
0093

0094

75111
75112
75113
75114
75115
75116
75117
75120
75121
75122
75123
75124
75125
75126
75127
75130

020120
051117
043522
040515

060334
067120
026623
075121
005111
2146114
026523
052117
~51105

042040
050122
047507

GET22 LDA .... 19
LOB *+2

JMP
OEF
OCT
ASC

LIBER
.+1

5111

9,LL.STORED PROGRAM

PAGE A408 #34

GET

75131 051101
75132 046440

0095.

0096. THE PROPER DIRECTORy TRACK
THE PROGRAM ENTRY
0097*

me9S*

0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113*
0114
0115
0116
0117
ftJ118
0119

0120*
0121*
0122*
0123
0124
0125
012 6
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
ra140
0141
0142

75133
75134
75135
75136
75137
75140
75141
75142
75143
75144
75145

064 0 35
044363
1600"1
002021
027144
160036
050030
027115
027101
044355

GETt8

GET9

160~01

75146 044 3 65
75147 002021
75150 021165
75151
75152
75153
75154
75155
15156
75157
75160
75161
75162
75163
75164

fOUND CORRECT ENTRy,
75165
75166
75167
75 1 7 0
75171
75172
75173
7 5 17 4
75175
75176
75177
75200
75201
75202
75203
75204
75205
75206
75207
75210

044350
160001
070031
044361

160001
070040
00600 4
16 00 01
001665
0702141

044366

160001
010042
003004
040041
070045
003004
~64040

006021
027215

GETPD
A08 .+4
LOA B,l
SSA,RSS
JMP GET9
LOA GETI,1
CPA LTEMP
JMP GET22
JMp GET19
ADB .-2
LOA 1,1
ADa .+6
SSA,RSS
JMP GET15
LD~

LDA
LOB
JMP
OEF
OCT
Ase

1360337
067154
026623
075155
005105
047124
051131
02al11
051440
040440
043111
046105

IS NOW IN CORE WITH GETPO POINTING TO
CHECK ILL-STORED
PROGRAM FLAG

UNSUCCESSFUlLY STORED1
NO, CONTINUE
YES, GET USER'S ID
DOES HE (OR SHE) ·OWN THE PROG?
YES, PRINT ILL.STOR!DPROGRAM
NO, PRINT NO SUCH PROGRAM
rEST FOR FILE
a>

DISC ADDRESS

SKIP IF FILE

.-16

*+2

LIBER

*+1
5105

LF.E

7,NTRY IS A FILE

CHECK TO SEE IF THE PROGRAM FITS

GETtS ADS .-7
LOA B,I
STA LTEMp+l
AD8 .+2
LOA 1 , I
STA LIBSe
INB
LOA 1,1
ELA,CLE,ERA
STA llBSP
ADS .+7
LOA 1,1
STA GETLN
CMA,INA
ADA LIBSP
STA LISPB
CMA,INA

-> FIRST WORD OF NAME
MOVE WITH PROTECTED FLAG
TO SAFE pLACE
.> THIRD WORD OF NAME
SAVE SEMI.
COMPIL.ED FLAG
RETRIEVE START.
OF-PROGRAM

POINTER
GET PROGRAM

L.ENGTH.
COMPUTE fIRST
UNUSED WORD
COMPUTE NEGATIVE

LOB LIBse
SSB,RSS

JMP Gt:T25

SEMI-COMPILED?
NO

PAGE 0409 #34
0143
0144
0145
0146
0141
0148
0149
0150·
0151
0152

0153
0154
0155
0156
0151
0158

GET

75211 040716

75212 002021
75213 027235
15214 027220

75215
75215 040714
75216 002021
75217 027235
75220
75220 060335

75221 0b7223
75 222 026623
75223 075224
75224 005120
051117

75225
75226
75227
75230
75231
75232
75233

ADA LWAUS
SSA,RSS
JMP GETI]
JMP GET26
GET2!5 EQU *
ADA LW97
SSA,RSS
JMP GET13

GET26 EQU

TOO BIG?
NO
yES

TOTAL LENGTH
COMPARE wITH MAX ALLO"!O.
OK

LDA
LDB

JMP LIBER
OfF *+1
OCT 5120
LF-P
Ase 8,ROGRAM TOO LARGE

043522
040515
020124
047517
020114

040522

75234 043505
0159.
0160. EVERyTHING CHECKS, GO GET THE PROGRAM

0161.
0162 75235
0163 75236
0164 75237
0165 75240
0166 75241
0167 75242
75243
0168 75244
75245
0169.
0170 75246
0171 75247
0112 75250
0173 75251
0174 75252
0175 75253
0176 75254
0177.
0178.
0179 75255
0180 75256
0181 75257
0182 75260
0183 75261
0184 75262
0185 75263
0186
0187
0188
0189

016423

064035
044364
1721001

044362
104200
100001
104400
000046
16 00 34

010204
060034
040364
064676

1141206
114207

GET13 JS8
LDB
AOB
STA
ADB
OLD

DATE
GETPD
.+5
1,1
.+3
B,I

DST GETDl
LOA GETP,I
STA MwORO
LDA GETP
ADA .+5
LOB LIBD
JSB 018CZ,1
JSB sICKP,I

SET NEW DATE
INTO
DIRECTORY.
GET PROGRAM

DISC
ADDRESS

WRITE DIRECTORY
BACK TO

DISC

HUy MAlOj

160001
070037

LOB MLINK+l
SET TO NULL PROGRAM
Aoa .+?PROG-1lINK
LOA B,I
SAVE PROGRAM
STA GETe
LENGTH

060043

LOA

170001

STA

016056
75264 064042
75265 074204
75266 064041

JSB
LOB
STB
LOB

064272
044345

75267 045027

GETS

1,1
RDPRG
GETlN
MWORD
LIBSP
ADS BIT15

READ IN CURRENT USER PROGRAM,
GET WORD COUNT
STORE WORD COUNT
GET START OF PROGRAM POINTER
AND READ BIT

PAGE 0410 *34
0190
0191
0192

0193
0194
0195
0196
0197
0198
0199

0200
0201

0202
0203

0204
0205
020 6

75270
75271
75272
75273
75274
75275
75276
75277
75300

GET
LOA GETDP
JSB DISCZ,1

063344
114206
002001
021327

RSS

JMP GET17

LDB MLINK+l

064212
044341

ADB
STB
ADB
LOA

074255
044363

060037

75301 1702101
75302 016056
75303 060450

STA

75323

~20114
~44502

.-7LI.Nt<
MAIN
,.,PROG
GETC

B,I

JS8 RDPRG

........... M32
LOB *+2
JMP LIBER

InA

75304 067306
75305 026623
15306 075301
75307 005125
75 310 0 4 1101
75311 041114
7531~ 042440
75313 052117
75314 020122
75315 042524
75316 051111
75317 042526
75320 042440
75321 043122
75322 047515
75324

GET PTR TO DISK ADDRESS

DEF *+1

OCT 5125
LF.U
ASe 15,NABlE TO RETRIEVE FROM LIBRARY

75325 051101

75326 051131
0207.
WRAP THINGS Up.
0208. THE PROGRAM IS NOW IN CORE,
0209.
0210 75327 160036 GET17 LOA GETI,I
GET USER'S
0211 753J~ 034036
FIRST WORD
ISZ GETI

0212

15331 064031

0215

75 332 05 0030
75333 005665
15334 174036

0213
0214

0216 . 75335
°2 1 7 75336
75337
0218 75340

0219
0220
0221
0222*
0223
0224

034036
1 0 42 00
000032
104400

75341 100036
75342 016343
15343 026613

LOB LTEMP+l
CPA LTEMP
ELB,CLE,ERB
STB GETI,I
ISZ GETI
OL.D LTEMP+2

GET IT
IF PROGRAM OWNER CLaAR
RUN .. ONL.y BIT,
STORE FIRST WORD OF NAME.
BUMP POINrER TO NEXT wORD.
GET LAST 2 WORDS OF NAME.

DST GETI,I

STORE IN TABLE.

75344 000046

JSB SEMIC
JMP lLEND
GETOP DEF GETDI

"0034

GETP

~QU

GETPO
GETI
GETC
GETLN
GETS
GETDI

EQU LrEMP ... e
EQU LTEMP+6
EQU LTEMP+7

00035

0225

00036

0226

00037

(1227

00042

0228
0229

~0046

00043

ID
OF NAME.

LrEMP.4

EQU lTEMP+10

EQU LTEf.:"'+ll
EQU LTEMP+14

TERMINATE,
DISK ADDRESS

->

.> DIREC ENTRy

.> DIRECTORY ENTRY
USER 10
COUNTER
PROGRAM LENGTH
a>

START.OF~PROGRAM

DISC

PAGE 0411 #34

GET

0230.

LTEMP+15

0231*

ADDRESS

0232.lTEMP, LTEMP+l, LTEMP+2, LTEMP+3, LTEMP+8 & LTEMP+9 ARE ALSO USED
0233.

0234

75345

SGET

EQU.

PAGE 0412 *34
0236*
0237*
0238.
023 9*
0240*
0241.
0242*
0243*

APPEND

THE APPEND COMMAND ALLOWS A USER TO APPEND A LIBRARY PROGRAM ON TO
THE END OF HIS CURRENT PROGRAM, THE FIRST STATEMENT OF THE NEW
PROGRAM MUST HAVE A SEQUNCE NUMBER GREATER THAN THAT OF TMEL.ST
STATEMENT OF THE ORIGINAL PROGRAM, IF THE NEW SECTION 18 PROTEcTED
THE ENTIRE PROGRAM WILL BE PROTECTED, SEMI.COMPILED PROGRAMS AND
PROGRAMS WITH COMMON MAY NOT 8E APPENDED
THE CODE FOR APPEND MUST FOLLOW THE CODE FOR "GET",

0245

75000

0246
0247

75000 060272

ORG LIBRA
LOA MLINK+l
ORG GETtS

THE CODE IS IDENTICAL TO "GETUP TO LOCATION GETlS

0248*
0249* THE PROPER DIRECTORy ENTRy IS NOW IN CORE AND IS

025,,*

GETPO.

0251*
0 2 52 75165 04435 2
0253 15166 160001
0254 75167 002021
0255 75170 027210
0256.

0257
0258
0259
0260
0261

0262

0263*
0264_
0265*
0266
0267
0268
0269
tt:1270*
0271
0272

75t7t
75172
75173
75174
75175
75116
75177
7520'"
15201
75202
75203
75204
75205
75206
75207

060331
067174
026623

,,7!St75
005123

042515
044455
041517
046520
044514

ADS

.~5

lDA t,l

SSA,RSS
JMP APPel

LDA
LOB
JMP
DEF
OCT
ASC

SEMI-COMPILED?
NO

*+2
LIBER
*+t
5123

LF_S
10,EMI.COHPILED

PROGRAM

042504

020120
051117
043522
040515

THE PROGRAM TO BE APPENDED IS NOT SEMI.COMPILED
APpal INS
LOA 1, I
CPA PBUFF
JMp APP02

LOA .-23
LDB * ... 2
JMP LIBER

0274

75214 060330
75215 ~67217
75216 026623
75217 07522121

0275

7522~

0276

.> THIRO WORD OF

... 22

006004
75211 160001
75212 050726
75213 021234

0273

POINTED TO By

7521~

005116
75221 047440
75222 041511

75223 046515
75224 ~47516
75225 020101
75226 el511~5
75227 040440

COMMON AREA?
NO

OfF *+1
OCT 5116
LF.N
ASC 11,0 COMMON AREA AL.LOWED

NAME

PAGE

~413

75230
75231
75232
75233

*34

APPEND

040514
046117
053505
042040

0277*
027S*
0219.
0280
0281
0282

75236 044364

0283
0284

75237 170001
7524 0 044353

0285

75241 160001
75242 070036
75243 PJ44366.
75244 104200
75245 100001
75246 104400

0286

0287
0288
0289

NOR DOES IT CONTAIN ANy COMMON STATEMENTS
75234 016423
75235 064035

75247
75250
75251
75252
75253

000046
06 4 035
044372
160001
070042

APP02 .JSB
LOB
AOa
Sf A
ADa
LOA
STA
ADB

DATE
GETPD
.+5
I,I
@-4
1,1
APPlS
.+7

OLD B,I

SAVE 'PROTECTED' eIT
GET

PROG~AM

DISC

DST GETDI

ADDRESS

LOB GETPD

AND

02 9 0
0291
0292
0293
0294*
0295.
0296*
0297
0298
0299
0300

75254
75255
75256
75257

0301

7526~

0302

75261 114206
75262 114211

LOA
STA
LOA
ADA
LOB
JSB
JSB

75263 016056
75264 12115322

JSB ROPRG
JSB DCMPl

0303

SET OATE OF LAST REFERENCE
INTO DIRECTORY ENTRY,

ADB ,+11

LOA 8,1
GETLN

PROGRAM

LENGTH·

STA

RETURN uPDATED DIRECTORy TO DISC
160034
070204
060034

04121364
064676

GETP,1
MWORD
GETP

WRITE DIRECTORY
BACK TO DISC

.+5

LIBD
DISCZ,1
SLVAG,I

BLEW IT, TRY TO SALVAGE

0304.
0305

0306
0307.
030S*
0309.
0310
0311
03 12
0313

0314

READ IN USER'S PRQGRAM ANO
DECOMPILe: IT.

CHECK IF COMBINED PROGRAMS wILL FIT IN CORE
75265
75266
75 2 67
75270
75271
75212
75273
75274

A60042
1211213004
04°°56
07121045
00301214
040714

0315
0316
902021
021315
0317
031S*
0319 75275 06121272

0320
0321
0322

75276 1214121341
75277 070255
75300 ~60335

0323
0324
0325
0326

75301 061303
75302 026623

75303 075304
75304 005120

LOA GETLN
CMA,INA
ADA PBPTR
STA LIBPS
CMA,INA
ADA LW97
SSA,RSS
JMP APPl
LOA
AOA
STA
LOA
LOB
JMP
DEF

MLINK+l
.... ?L.INK
MAIN
.-18
•• 2
LIBER
*.1
OCT 5120

TEST fOR PROGRAM TOO
LARGE.
LAIT WORO.1 OF COMBINED PROGS.
COMPUTE NEGATIvE
TOTAL LENGTH
COMPARE WITH MAX ALLOWED.
O,K,
SET MAIN TO SAY PROGRAM IN

CORE.

PAGE 0414 *34
0327

15305
75306
75301
75310
15311
75312
15313
15314

APPEND

051117

ASC 8,ROGRAM TOO LARGE

043522
2140615
020124
047517
020114
040522
043505

0328*
0329. EVERYTHING IS FINE. GO GET THE PROGRAM
0330*
Ql~"'t
GET LENGTH OF PROGRAM TO SE APPO
..,
......... 15315 064042 APPl LOB GE1'LN
0332 75316 07421214
STB MWORD
STORE WORD COUNT
LOB PBPTR
INITIATE
0333 15317 064056
ADS 81T15
0334 75320 045027
121335 75321 063456
LOA APPDP
DISK
JSB
DISCZ,I
READ
0336 75322 114206
JMP
APP9
UNABLE
TO READ PROGRAM
0337 75323 027403
0338."
0339. SCAN ORIGINAL PROGRAM

TO DETERMINE LAST SEQUENCE NUMBER.

121340*
LOA SPRQG
0341 75324 061575
03 4 2 75325 0020 0 4
INA
LOB PBPTR
0343 75326 064056
0344 75321 006004
INS
CPA
1
121345 75330 050001
121346 75331 021354
JMP APP2
CMA,INA
0347 75332 003004
ADA B
0348 75333 040001
SSA,RSS
121349 75334 002021
JMP APP5,,2
121350 15335 027341
00
LOA PBPTR
0351 75336 06 56
STA SPROG
0352 '5337 011575
0353 75340 027354
JMP APP2
0354*
LOA SPROG
0355 75341 061575
INA
0356 75342 002004
0351 15343 010031 App5 STA APPS
AOA 0,1
121358 75344 140000
9359 75345 2150001
CPA 1
RBS
121360 '5346 002001
JMP APP5
121361 75347 027343
0362*
CCA
0363 75350 003400
121364 75351 040037
ADA APPS
LDA 0,1
0365 75352 160000
0366 75353 003001
CMA,RSS
0367 75354 003400 APP2 ceA
0368*
121369* SEQUENCE NUMBER CHECK
0370*

0371
0372

121373

SET 8 TO POINT AT LENGTH OF
FIRST NEW PROGRAM,
IF EQUAL, PROGRAM 11 NULL, SO
IT'S OK.
IS SPROGJtPBPTR7
NO

YES, RESET SPROG

RESTORE
CA)
SAVE LOCN 0' THIS STATE. LENGTH.
l.INK TO NEXT ONE
IF SAVE AS 8, AP~81.LAST SlATE.
OTH£RWISf, LOOP.
GET SEQUENCE , OF LAST STATE.
MENT.

MAKE NEGATIVE AND SU8TRACT
ONE.
SET TO .1 (SEQNO •• ' IF NO PROG.

75355 140056
75356 002021
75357 021432

ADA PBPTR,I
SSA,RSS
JHP APP3

CHECK THAT FIRST SEQUENCE • 18

75360 060272

LOA MLINK+l

SET MAIN TO SAY PROGRAM IN

0374*

0375

A .> L.ENGTH OF
FIRST STATEMENT.

GREATER THAN LAST ONE OF OLD
PROGRAM,



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                     : 2003:07:18 15:16:28-07:00
Modify Date                     : 2009:08:17 13:59-07:00
Metadata Date                   : 2009:08:17 13:59-07:00
Producer                        : Adobe Acrobat 9.13 Paper Capture Plug-in
Format                          : application/pdf
Document ID                     : uuid:f7f0ed2f-4f7f-4fcf-9c7d-2bcafd9b7c1e
Instance ID                     : uuid:41fcc2d4-c411-4d4c-8959-73d93305972b
Page Layout                     : SinglePage
Page Mode                       : UseOutlines
Page Count                      : 416
EXIF Metadata provided by EXIF.tools

Navigation menu