Trailing-Edge
-
PDP-10 Archives
-
-
There are no other files named in the archive.
PMODE
EJECT
/
/ DIAL PHERIPERAL INTERCHANGE PROGRAM FOR THE PDP-12 COMPUTER.
/ COPYRIGHT 1969; DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.,01754
/ WRITTEN BY JACK BURNESS
/ RELEASED NOVEMBER, 1969.
/
/ PIP WILL RUN ON A PDP-12 B OR HIGHER.
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/ PPPPPPPPP IIIIIIIIIIII PPPPPPPPP
/ P PP II P PP
/ P PPP II P PPP
/ P PP II P PP
/ PPPPPPPPP II PPPPPPPPP
/ P II P
/ P II P
/ P II P
/ P II P
/ P IIIIIIIIIIII P
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
EJECT
/
/
/
/ LOAD THE SYMBOLS FROM PIP4.
/
/
/
LODSYM
/
/
EJECT
*0 /MAJOR PAGE 0 LOCATIONS.
/
/
/
/
0 /RESERVED FOR JMP S IN L MODE.
LOC1, 0 /USED BY DISPLAY ROUTINE.
TAPE=JMS I .
TTAPE
HPOP=JMS I .
HHPOP
HPUSH=JMS I .
HHPUSH
LEADER=JMS I .
LLEDER
FILEC=JMP I .
FFILEC
PUTL=JMS I .
TTYPUT
/
/
*10
AUTO1, 0 /AUTO REGISTER 1
AUTO2, 0
AUTO3, 0
AUTO4, 0
AUTO5, 0
AUTO6, 0
AUTO7, 0
AUTO8, 0
/
/
/
/
/
/
/
RF08=1 /SET THIS SWITCH TO 1 IF YOU WANT
/THE RF08 DISK HANDLER ASSEMBLED INTO PIP.
/ELSE SET THE SWITCH "RF08" TO 0.
/
/
DISKWORK=0001 /SET THIS SWITCH TO 0 IF YOU DO NOT WANT PIP TO
/AUTOMATICALLY USE THE RF08 DISK FOR
/THE BINARY AND SOURCE SCRATCH AREAS; IF AN RF08 DISK IS PRESENT.
/
/
/
/
/
/
/
CARD=1 /SET THE CARD=1 TO CARD READER AND LINE PRINTER.
/ ELSE SET CARD TO 0.
/
/
TERMC=00 /SET TO LOOK OR A 00 AS THE EOF CHAR.
/
REMAKE=0 /DO NOT LOAD IN THE SOURCE FILE CONVERTER.
/ REMAKE WAS ORIGINALLY 1 BUT THE CONVERT ROUTINES NO LONGER ARE NEEDED.
/
ECHO=1 /SET THIS SWITCH TO 0 TUPPRESS ECHOING.
/
/
/
STAR20=1 /SET TO 1 IF YOU WANT TO HAVE A "*20" AT THE BEGINNING OF EVERY FILE.
/ ELSE SET STAR20 TO 0000/
/
/
/
/
/
/
/
DIALBOOT=300 /WHERE TO REREAD IN DIAL FROM
DIALSYS=300 /START OF FIRST BLOCK OF SYSTEM ABOVE FREE BLOCKS.
SYSWT=467 /LAST BLOCK OF DIAA WORK AREA.
TINDEX=346 /TAPE INDEX BLOCK
TILEN=2 /NUMBER OF BLOCKS IN INDEX
TLOWER=0 /FIRST BLOCK TO USE
TUPPER=777 /LAST BLOCK TO USE
TSYSLOWER=270 /START OF SYSTEM
TSYSUPPER=467 /LAST BLOCK OF SYSTEM.
SYSBBLOCK=370 /START OF BINARY WORK AREA.
SYSBIN=0001 /BINARY SCRATCH UNIT.
ASMIFZ RF08&DISKWORK /WHAT IS SPECIAL DISK UNIT
SYSBSP=0001 /NO SPECIAL SCRATCH UNITS.
ASMIFN RF08&DISKWORK /HOW ABOUT NOW???
SYSBSP=0011 /DEFINE PRIMARY SCRATCH AS DISK (INIT WILL DECIDE REST OF STORY)
SYSSBLOCK=370 /START OF ASCII WORK AREA.
SYSHDR=447 /BINARY HEADER BLOCK FOR "SB"2 COMMAND"
/
/
/ SOME BASIC DEFINITIONS
ZERO=CLA
PONE=ZERO+1 /(AWWWW)
PTWO=PONE+4+100 /CLA CLL IAC RAL
PTHREE=PTWO+20 /CML
PFOUR=PTWO+2 /(AWWW)
PSIX=PTHREE+2 /RTL
MONE=CLA CMA
MTWO=CLA CLL CMA RAL
MTHREE=CLA CLL CMA RTL
LEFT=000 /POINTER TO STARTING LEFT OF SCREEN
TOP=340 /POINTER TO TOP OF SCREEN
BOTTOM=-400 /SCREEN BOTTOM
/
/
ASMIFZ CARD-1 /IF CARD READER IS IN
BUFFER=6400 /SET THE BUFFER TO 6400
ASMIFN CARD-1 /IF NO CARD READER
BUFFER=6000 /THEN SET TR TO 6000
/ IN ANY EVENT BUFFER MUST BE A MULTIPLE OF 400 OCTAL WORDS.
/
/
P20, 20
M10, -10
L7770=M10
M4, -4
M20, -20
L77, 77
L200, 200
M301, -301
M322, -322
L4000, 4000
L5000, 5000
L6000, 6000
L7000, 7000
L7757, 7757
L60, 60
L700, 700
M12, -12
L400, 400
L54, 54
M54, -54
M60, -60
M70, -70
M73, -73
M77, -77
L7777, 7777
M32, -32
L333, 333
M34, -34
L7700, 7700
L10, 10
L4, 4
L7740, 7740
M40=L7740
M5757, -5757
L7, 7
M314, -314
L30, 30
M43, -43
M6, -6
L7400, 7400
M400=L7400
/
/
TEMP, 0
TEMP1, 0
TEMP2, 0
TEMP3, 0
TEMP4, 0
/
KEYCHAR, 0
CNTRLZ, 0 /CONTAINS THE CONTROL Z SWITCH.
BNUM, 0
DFIRST, 0
PMORE, MORE
BWORD1, 0
BWORD2, 0
/
INBLOCK, 0
INUNIT, 0
OUTBLOCK, 0
OUTUNIT, 0
OUTNUM, 0
/
BFLAG1=INBLOCK
BFLAG2=OUTBLOCK
BOLDP=INUNIT
BCHAR=OUTUNIT
/
/
INDEX, TINDEX
ILEN, TILEN
ELOWER, TLOWER
EUPPER, TUPPER
CLOWER, TSYSLOWER
CUPPER, TSYSUPPER
/
L5757, 5757
FSIZE, 0
FUNIT, 0
FTYPE, 0
FBNUM, 0
FWHAT, 0
FNAME, 7777
7777
7777
7777
/
/
ORIGIN, 0
DATA, 0
BTEMP1, 0
BTEMP2, 0
BTEMP3, 0
BFIELD, 0
BOLDO, 0
BOFIELD, 0
BCOUNT, 0
/
/
COUNT, 0
L177, 177
M215, -215
M212, -212
M377, -377
M240, -240
M340, -340
/
/
/
DISPLAY=JMS I .
PPDIS
PIP=JMP I .
PIPPIP
DIAL=JMP I .
EXIT
COPY=JMS I .
CCOPY
SETA=JMS I .
ASET
GETA=TAD I AUTO8
CHECKIO=JMS I .
IOCHECK
ASMIFZ ECHO /ECHOING DESIRED?
ASMSKP 2 /NOPE. DON T ASSEMBLE CRLF PROCESS IN.
CRLF=JMS I .
TTYCR
GETL=JMS I .
TTYGET
LINE=JMS I .
GLINE
DECODE=JMS I .
DDCODE
SYSERR=HLT
DIRECTORY=JMS I .
DYRECT
MOVE=JMS I .
MMOVE
POP=JMS I .
PPOP
PUSH=JMS I .
PPUSH
NO=JMS I .
NODIS
REPLACE=JMS I .
REPDIS
READ=JMS I .
TREAD
WRITE=JMS I .
TWRITE
SEARCH=JMS I .
SSERCH
AUXIN=JMS I .
SEQIN
AUXOUT=JMS I .
SEQOUT
PUTWORD=JMS I .
BBOUT
ASMIFZ RF08 /DO WE WANT THE RF08 ROUTINES LOADED?
ASMSKP 2 /NO. SKIP PAST THE DEFINITIONS.
DISC=JMS I .
RFDISK
/
/
/
/
/
/
/
EJECT
/
/
/
/
/
/
/ P I P C E N T R A L L O O P
/
/
/
/
*200
/
/
/
/
/
LMODE /JUST INCASE SOME JACKASS STARTS IT OFF IN THE WRONG MODE.
PIPPIP, PDP /GET INTO 8 MODE.
PMODE
JMS RESTART /CLEAN UP SYSTEM.
ASMIFN ECHO /DO A CRLF ONLY IF ECHOING.
CRLF /GIVE INITIAL CARRIGE RETURN LINE FEED.
PIPL, DECODE /DISPLAY OPTIONS
MAINDIS /FROM MY LIST OF GOODIES.
SEARCH /LOOK FOR LEAGAL OPTIONS
PIPLST /LIST OF PIP OPTIONS
PIPGO /WHERE TO GO IF FOUND
JMP PIPL /NOT A LEGAL REQUEST.
/
/
/
PIPLST, 301 /A=ABSOLUTE MODE
302 /B=BINARY MODE
4323 /S=SOURCE MODE, 4000=END LIST
/
PIPGO, ABSOL /ABSOLUTE HANDLER.
BINARY /POINTER TO BINARY HANDLER
ASCII /SOURCE HANDLER
/
/
/
/
/
RESTART, 0
IOF /TURN OFF INTERUPTS(THO THEY SHOULDN T BE ON.
KCC /MAKE SURE THERE IS NOT A PREVIOUS CONTROL CHARACTER IN THEE WINGS.
MONE /SET UP COPIER FOR 1 COPY
DCA OUTNUM /-NUMBER OF OUTPUT TAPES FOR COPY
JMS I FCORE /GET NUMBER OF BUFFERS.
DCA .-1 /ZAP OUT. CAN ONLY BE USED ONCE.
TAD M40
DCA 0
DISPLAY /JUST WAIT A SECOND.
MAINDIS
ISZ 0
JMP .-3 /NOT DONE YET
DCA KEYCHAR /NO NEW CHAR.
LINC /ENTER LINC MODE
LMODE
ADD P20 /GET THE I/O PRESET BIT
ESF /AND DO AA I/O PRESET
CLR
PDP
PMODE
6026
TLS
6016
KCC
ASMIFZ CARD-1 /SHOULD WE INITIALIZE PRINTER???
LCB /YEP. CLEAR THE PRINTER BUFFER AND SET THE FLAG SO IT LL BE READY IF WE NEED IT.
MOVE /ZERO UPPER CORE BY A HIDEOUS MOVE.
BUFFER-1
BUFFER
ASMIFZ RF08 /IF NO RF08 ZERO ALL OF CORE
-BUFFER
ASMIFN RF08 /IF AN RF08 PRESENT ZERO ONLY BUFFER-7377
-BUFFER-400
JMP I RESTART
/
/
/
EXIT, JMS RESTART /RESTART DIAL
MOVE /PLACE DIAL RESTART INSTRUCTIONS
READIN
EXITLOC,4020-READEN+READIN /IN PROPER PLACE FOR REBOOTSTRAP.
READEN-READIN /BOOTSTRAP IS 4 WORDS LONG
JMP I EXITLOC /RETURN TO DIAL
/
/
FCORE, COREF
READIN, LINC /MAIN BOOTSTRAP.
LMODE /GET INTO LINC MODE FOR REBOOTSTRAP
LDF 3 /MAKE SURE DATA FIELD IS SET AT 3
RCG /READ GROUP
7\DIALBOOT /FROM 300.
PMODE /RESUME 8 MODE DEFINITIONS
READEN=.
/
/
/
/
/
/
/
MAINDIS, LEFT+200
TOP-200
TEXT "FPIP OPTIONS:
HA --- AUXILIARY MODE
HB --- BINARY MODE
HS --- SOURCE MODE\"
/
/
/
/
/
/
/
SSERCH, 0 /COMPARES "FTYPE" AGAINST GIVEN LIST.
CLA CLL /CLEAR AC TO BE SURE
TAD I SSERCH /GET POINTER TO USER LIST
DCA TEMP /AND STOORE AWAY
ISZ SSERCH /BOP PAST FIRST ARG.
TAD I SSERCH /GET JMP LIST
DCA TEMP1 /STORE POINTER N TEMP1
ISZ SSERCH /BOP PAST SECOND ARG FOR RETRUN.
/
SSLOOP, TAD I TEMP /GET NEXT WORD TO COAMPARE
SPA /IF POSIITIVE SKIP
TAD L4000 /NEGATIVE. LAST CHAR. MAKE POSIITIVE FOR CHECK.
CIA
TAD FTYPE /DOES IT EQUAL CONTENTS O F FTYPE
SZA CLA
JMP SSNO /NO. TEST FOR END
TAD I TEMP1 /YES. GET FOUND RETURN ADDRESS
DCA TEMP
JMP I TEMP /AND GO THERE
/
SSNO, ISZ TEMP1 /BOP UP JUMP TABLE POINTER
TAD I TEMP /WAS THIS LAST CHARACTER?
SPA CLA
JMP I SSERCH /YEP. IT S NEGATVIE
ISZ TEMP /NOP. BOP UP CHAR POINTER AND TRY AGAIN
JMP SSLOOP /BACK UP TO TRY NEXT.
/
/
/
/
/
/
/
/
/
/
ASMIFZ ECHO /DO WE WANT ECHOING???
ASMSKP 12 /NOPE. CR NEVER CALLED, SO DO NOT PUT IT IN.
/
TTYCR, 0
TAD M215 /GET A C.R. IN THE AC.
CIA
PUTL /AND AWAY IT GOES
TAD M212 /N THE L.F.
CIA
PUTL /AND AWAY IT GOES
JMP I TTYCR /AND RETURN TO CALLER.
/
/
/
/
/
/
/
/
/
/
/
EJECT
*400
/
/
/ DISPLAY ROUTINE
/
/ GENERAL CALL:
/
/ DISPLAY
/ PTEXT
/ WHERE PTEXT POINTS TO THE FOLLOWING:
/
/PTEXT, XCOOR.
/ YCOOR
/ TEXT "F THIS IS MY MESSAGE\"
/
/
PPDIS, 0 /MAIN ENTRY
PINST1, CLA CLL /CLEAR AC.
CHECKIO /CHECKIO FOR IO NOW AND AFTER EVERY C.R.
TAD I PPDIS /GET MAIN POINTER
DCA PDIS /AND PLACE IN TEMP POINTER.
ISZ PPDIS /PAST POINTER ON RETURN.
TAD I PDIS /GET POINTER
DCA PHOR /X POS
ISZ PDIS /BOP UP
TAD I PDIS /GET VERTICAL
PDCAVR, DCA PVER /AND STASH AWAY.
TAD PDIS /START OF TEXT
DCA PSTART /BOP DOWN BY 1
MONE /SET SWITHC TO LEFT OF NEXT WORD.
DCA PSWITCH
TAD PINST1 /GET A CLA FOR FIRST TIME THROUGH.
DCA PNOT1 /AND STORE SO NO VERTICAL BOP.
/
PPSTART, JMS PGETL /GET NEXT CHAR FROM TEXT.
MONE /SET CHAR SIZE TO HALFWORD
DCA PCSW /IN CASE OF NO F OR H.
TAD PCHAR /GET IN AC.
TAD M10 /IS IT AN "H"
SNA CLA /IF IT IS,SKIP PAST AND IGNORE.
JMP PPAST /ITS AN "H"
TAD PCHAR
TAD M6 /IS IT AN "F"
SZA CLA
JMP PDO /NOT AN "F" OR AN "H". USE IT AS A CHAR IN HALFWORD.
DCA PCSW /SET SIZE TO FULL.
PPAST, JMS PGETL /GET FIRST CHAR TO BE DISPLAYED.
PDO, TAD PCSW /GET SIZE.
SNA CLA /IS IT FULL SIZE.
TAD M4 /YES. SET BACK LEFT BY 8.
TAD M4 / IF HALF SET IT BACK BY 4.
TAD PHOR
DCA LOC1 /THIS IS A REAL LOC1(0001)
TAD PCSW /GET SIZE
SNA CLA /FULL?
TAD M20 /YES. BOP DOWN BY 40, NOT 20
TAD M20 /M20 IF HALF SIZE
TAD PVER
PNOT1, DCA PVER /MADE A CLA FOR THE FIRST TIME THROUGH
TAD PDCAVR /GET CORRECT INST.
DCA PNOT1 /SET UP FOR FUTURE CALLS.
TAD PCSW /CHAR SIZE.
CMA /COMPLEMENT BIT.
AND L200 /BIT4 OF ESF
LINC
LMODE /GET INTO LINC MODE
ESF /SET CHARS TO CORRECT SIZE
CLR
PDP /BACK OVER INTO 8 MODE
PMODE
/
PLOOP, TAD PCHAR /GET THE CHAR IN THE AC.
CLL RAL /MULTIPLY BY 2.
TAD PTABLE /POINTER TO DISPLAY TABLE.
DCA AUTO7 /AUTO FOR PICKING UP THE DISPLAY CHARS.
TAD PVER /GET THE VERTICAL IN THE AC.
LINC /GO OVER TO LMODE AND START TO DISPLAY.
LMODE
DSC I AUTO7 /FIRST PART OF CHAR
DSC I AUTO7 /SECOND PART OF CHAR.
PDP
PMODE /BACK INTO 8 MODE
PTWO /GET A +2 IN THE AC
TAD LOC1 /GET NEXT DISPLAY POINT.
DCA LOC1 /AND BOP BY 1/2 CHAR.
JMS PGETL /GET ANOTHER CHARACTER.
JMP PLOOP / AND DISPLAY IT.
/
PGETL, 0 /CHAR GETTER ROUTINE
ISZ PSWITCH /IS IT LEFT HALF?
JMP PRIGHT /GET CHARACTER
ISZ PSTART /GET NEXT WORD
TAD I PSTART /IN THE AC
RTR
RTR
RTR /MOVE TO RIGHT SIDE
JMP PCOM /GO DO THE AND.
PRIGHT, MONE /RESET SWITCH
DCA PSWITCH /FOR NEW WORD NEXT TIME.
TAD I PSTART /WORD IN AC
PCOM, AND L77 /JUST THE LOW ORDER BITS.
DCA PCHAR /SAVE FOR LATTER USE.
TAD PCHAR /BACK IN AC.
TAD M34 /IS IT "\"
SNA CLA
JMP I PPDIS /YES! E X I T.
TAD PCHAR /GET IT AGAIN
TAD M43 /IS IT A CR.
SZA CLA
JMP I PGETL /NO. RETURN.
CHECKIO /CHECK I/O FLAGS AND SERVICE.
JMP PPSTART /RESET TO START NEXT LINE.
/
/
PDIS, 0 /TEMPORARY POINTER
PHOR, 0 /HORIZONTAL COORDINATE
PVER, 0 /VERTICAL COORDINATE
PSTART, 0 /POINTS TO NEXT TEXT WORD.
PSWITCH, 0 /0=GET RIGHT HALF,-1=GET LEFT HALF OF NEXT WORD.
PCSW, 0 /0=FULL SIZE,-1=HALF SIZE.
PCHAR, 0 /CONTAINS NEXT TEXT CHARACTER.
PTABLE, TABLED-1 /POINTS TO DISPLAY TABLE -1 FOR INDEXING.
/
/
/
/
DDCOM, 0 /DECODE CALLS THIS ROUTINE TO GET A CHAR FROM PGETL
JMS PGETL /GET A CHAR.
TAD PCHAR /PLACE IN AC.
JMP I DDCOM /RETURN.
/
/
IOCHECK, 0 /CHECKS IO DEVICES.
CLA CLL
KSF /IS IT KEYBOARD?
JMP I IOCHECK /NOPE. RETURN.
KRS /READ IN THE FLAG BUT DON T TURN OFF THE FLAG.
TAD IOCD /IS IT A CONTROL D
SNA /????
DIAL /YEP. RESTART DIAL
TAD IOCP /HOW ABOUT A CONTROL P
SNA CLA /????
PIP /YEP. RESTART PIP.
TAD KEYCHAR /DO WE HAVE A CHARACTER IN BUFFER?????
SMA
KRB /READ IN NEW CHAR IF NONE THERE
RAL
CLL CML RAR /TURN ON SIGN BIT.
DCA KEYCHAR /STASH AWAY.
JMP I IOCHECK /ALL DONE. RETURN TO CALLER
/
/
/
IOCD, -204 /CONTROL D
IOCP, -220+204 /CONTROL P MINUS CONTROL D
/
/
/
/
/
/
/
/
/
/
RFDISK, 0 /THIS ROUTINE DOES THE SAME AS "TAPE" DOES,
TAPE / EXCEPT THAT IT ENSURES THAT THE DISK IS ALWAYS
TAD FUNIT /THE DESIRED UNIT(10-77). GET THE UNIT NOW
TAD L10 /ADD TEN TO UNIT TO INSURE 10-17
DCA FUNIT /AND STOE BACK
JMP I RFDISK /NOW RETURN TO CALLER.
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
EJECT
*600
/ DISPLAY CHARACTER TABLE.
/
TABLED=.
/
7777 /00=ILLEGAL
7777
4477 /01=A
7744
5177 /02=B
2651
4136 /03=C
2241
4177 /04=D
3641
4577 /05=E
4145
4477 /06=F
4044
4136 /07=G
2645
1077 /10=H
7710
7741 /11=I
0041
4142 /12=J
4076
1077 /13=K
4324
0177 /14=L
0301
3077 /15=M
7730
3077 /16=N
7706
4177 /17=O
7741
4477 /20=P
3044
4276 /21=Q
0376
4477 /22=R
3146
5121 /23=S
4651
4040 /24=T
4077
0177 /25=U
7701
0176 /26=V
7402
0677 /27=W
7701
1463 /30=X
6314
0770 /31=Y
7007
4543 /32=Z
6151
4177 /33=[
0000
7777 /34=ILLEGAL
7777
0000 /35=]
7741
2000 /36=^
2076
7777 /37=ILLEGAL
7777
0000 /40=SPACE
0000
7500 /41=!
0000
7000 /42="
0070
7777 /43=ILLEGAL
7777
5721 /44=DOLLAR SIGN
4671
6661 /45=PER CENT SIGN
4333
5166 /46=&
0526
0000 /47=TAB
0000
3600 /50=(
0041
4100 /51=)
0036
2050 /52=*
0050
0404 /53=+
0437
0500 /54=,
0006
0404 /55=-
0404
0001 /56=.
0000
0601 /57=/
4030
4536 /60=0
3651
2101 /61=1
0177
4523 /62=2
2151
4122 /63=3
2651
2414 /64=4
0477
5172 /65=5
0651
1506 /66=6
4225
4443 /67=7
6050
5126 /70=8
2651
5122 /71=9
3651
2200 /72=:
0000
4601 /73=;
0000
1000 /74=<
4224
1212 /75==
1212
2442 /76=>
0010
4020 /77=?
2055
/
/
/
EJECT
*1000
/
/
/ ROUTINE TO GET A LINE FROM TTY.
/
/ GENERAL CALL:
/
/ LINE
/ PDIS
/
/ WHERE PDIS POINTS TO THE STUFF TO BE DISPLAYED WHILE WAITING FOR A LINE OF INPUT.
/
/
/
/
GLINE, 0 /MAIN ENTRY FPR LINE GETTER ROUTINE.
CLA CLL /CLEAR AC.
TAD I GLINE /GET POINTER TO DISPLAY
DCA G1 /AND SAVE IT.
ISZ GLINE /SET UP RETURN.
TAD G1 /GET POINTER
DCA G2 /AND STASH IT IN THE SECOND LOOP.
GCLEAR, DCA I GGNUM /CLEAR NUMBER OF CHARS TO ZERO.
GMAIN, PONE /GET A +1 IN THE AC.
TAD I GGNUM /GNUM+1, NEXT SPOT IN BUFFER.
JMS GIN /STICKS NEXT CHARACTER INTO GNUM+1
0 /0=ILLEGAL=A SOLID BLOCK.
PTWO /GET A PTWO INTO THE AC.
TAD I GGNUM /NUMBER OF CHARS+2
JMS GIN /PUT A 34 AT END FOR DISPLAY ROUTINE.
34 / FORM.
TAD GCOUNT /AN OSCILLATING NUMBER.
DCA COUNT /GENERAL COUNT LOCATION.
/
GLOOP1, DISPLAY /DISPLAY CALLERS MESSAGE.
G1, 0 /HIS POINTER HERE
DISPLAY /NOW DO OUR LINE OF CRAP.
GTEXT /POINTER TO OUR BUFFER.
GETL /IS THERE A TTY CHAR?
SKP /NO!
JMS I GGINSERT /YES. PLACE IN BUFFER.
ISZ COUNT /BOP UP FLICKER COUNT.
JMP GLOOP1 /STILL GOOD. DISPLAY AGAIN.
TAD GCOUNT /GET FLICKER COUNTER
DCA COUNT /AND RESET TEMPORARY COUNTER.
PONE /+1
TAD I GGNUM /SET A "\" AT END WITH NO BLOCK FLICKER.
JMS GIN /PLACE IN BUFFER
34
GLOOP2, DISPLAY /NOW DISPLAY USERS MESSAGE.
G2, 0 /HIS POINTER.
DISPLAY /NOW OUR BUFFER
GTEXT /BUFFER POINTER.
GETL /TEST LOW READER.
SKP /NO CHAR THERE
JMS I GGINSERT /INSERT INTO BUFFER
ISZ COUNT /DONE YET???
JMP GLOOP2 /NO. DISPLAY AGAIN.
JMP GMAIN /RESET FLICKER POINTER.
/
/
/
GIN, 0 /PUTS A CHAR IN BUFFER
TAD GMLEN /BASIC MESSAGE BEFORE USER DOES ANYTHING.
DCA TEMP /SAVE CHARACTER NUMBER.
TAD TEMP /GET CHARACTER NUMBER.
CLL RAR /DIVIDE BY 2 TO GET WORD NUMBER.
TAD GGTEXT /POINTER TO ACTUAL TEXT.
DCA TEMP2 /AND STASH AWAY.
TAD TEMP /REGET CHAR NUMBER.
RAR /IS IT ODD OR EVEN.
SNL CLA
JMP GLEFT /EVEN. GET LEFT HALF.
TAD I TEMP2 /GET RIGHT HALF
AND L7700 /BLAH OUT RIGHT 6 BITS
TAD I GIN /GET DESIRED SAVE CHAR.
GINTO, ISZ GIN /BOP PAST CALLING CHAR.
DCA I TEMP2 /AND STASH AWAY.
JMP I GIN /RETURN.
GLEFT, TAD I TEMP2 /LEFT CHAR.
RTR
RTR
RTR /MOVE INTO RIGHT HALF
AND L7700 /BLAH OUT RIGHT BITS
TAD I GIN /STICK IN GOOD CHAR.
RTL
RTL
RTL /AND SHIFT BACK
JMP GINTO /NOW GO AND STASH AND RETURN.
/
GGNUM, GNUM
GMLEN, LBNUM-1 /LEN OF MESS ALREADY IN BUFF -1 TO COMPENSATE FOR 0 CHAR.
GGINSERT, GINSERT /POINTER TO INSERT ROUTINE.
GCOUNT, -10 /FLICKER COUNTER
GGTEXT, GTEXT+2 /ACTUAL TEXT POINTER.
/
/
/
/
TTYGET, 0 /ROOM FOR NON-OVERLAPPED TTY ROUTINE HERE
CHECKIO /CHECK IO DEVICES NOW.
TAD KEYCHAR /GET SAVED CHAR.
SNA /IS THERE REALLY ONE THERE???
JMP I TTYGET /NO. RETURN
ISZ TTYGET /YES. BOP UP RETURN ADDRESS.
TAD L4000 /CHOP OFF STUCK ON BIT.
DCA 0 /0 CAN BE USED RIGHT ONW.
DCA KEYCHAR /ZAP OUT OLD CHAR.
TAD 0 /RETRIEVE CHAR.
JMP I TTYGET /EXIT TO SECOND LOCATION WITH CHAR IN THE AC.
/
/
LINEB, LEFT /START AT BOTTOM LEFT FOR DISPLAY.
GTEXT=LINEB
BOTTOM /BOTTOM OF SCREEN.
TEXT "REPLY:\" /HALFWORD ASSUMED.
LBNUM=6 /NUMBER OF PREVIOUS CHARS IN BUFFER.
LBMAX=62-LBNUM /MAXIMUM NUMBER OF USER CHARACTERS.
/ FOUND BY GETTING MAX ON LINE(62) AND SUBTRACTING THOSE IN BUFFER(LBNUM).
/
/
/
EJECT
/
/
/
*1200
/ SECOND PAGE OF LINE GETTER ROUTINE.
/
/
/
/
GINSERT,0 /CHECKS CHAR AND STICKS IN BUFFER.
AND L177 /CHOP OFF THE PARITY BIT.
TAD L200 /AND FORCE 200 BIT ON FOR TESTS TO FOLLOW.
DCA FTYPE /NOW STASH AWAY IN FTYPE FOR SEARCH TO FOLLOW.
SEARCH /SEARCH LIST FOR FTYPE MATCH
GSPL1 /SPECIAL CHARS AND EXCEPTIONS.
GSPG1 /WHERE TO GO IF FOUND.
JMS GGLIMC /CHECK FOR BETWEEN 240 AND 340
GNXIT, JMP I GINSERT /NOPE. IT ISN T A 37. RETURN TO CALLER.
TAD GNUM /GET NUMBER OF CHARS.
IAC /TEST TO SEE IF IT LL FIT.
CIA
TAD GLIMIT /NUMBOER OF SPACES IN BUFFER.
SNA CLA
JMP I GGCLEAR /TOO MANY. RESTART.
ASMIFN ECHO /LOAD THE CHAR IN AC TO ECHO IF ECHOING CHARS!
TAD FTYPE /GET THE CHAR.
ASMIFN ECHO /ECHO CHAR ONLY IF SWITCH IS SET.
PUTL /ECHO ON TTY.
TAD FTYPE /GET CHAR.
AND L77 /MAKE INTO A SIXBITTER
DCA GPUT
ISZ GNUM /BOP UP COUNT
TAD GNUM /PLACE IN AC.
JMS I GGIN /PLACE CHAR IN BUFFER
GPUT, 0 /HERE IS CHAR.
JMP I GGMAIN /ALRIGHT, GO BACK AND DO NEXT
/
/
/
/
/
/
GNLF, ASMIFN ECHO /LINEFEED WAS TYPED. GIVE C.R.L.F.
CRLF /IF ECHOING IS DESIRED.
JMP I GGCLEAR /AND RESTART THE INPUT BUFFER.
/
/
/
/
GNRUB, MONE /RUBOUT TYPED. -1 TO AC.
TAD GNUM /SUBTRACT ONE FROM THE NUMBER OF CHARS IN THE BUFER.
SMA /HAVE WE BACKSPACED TOO FAR?
DCA GNUM /NOPE. STORE AWAY.
/
ASMIFZ ECHO /DO WE WANT ECHOING?
ASMSKP 4 /NO. DO NOT ASSEMBLE IN TTY ECHO CHAR.
SZA CLA /WAS BACKSPACE SUCCESFULL?
JMP GNRNO /NO. DO NOT PRINT "\".
TAD GNL334 /FORM CHAR.
PUTL /OUTPUT IT TO SHOW DELETE WAS SUCCESFULL.
/
GNRNO, ASMIFZ ECHO /DO WE HAVE ECHOING?
CLA /NO, WE DON T. AC MIGHT BE NON-ZERO. CLEAR TO E SURE.
JMP I GGMAIN /NOW GO BACK AND START DISPLAYING LINE AGAIN.
/
/
/
/
GALL, ASMIFN ECHO /DO A CRLF ONLY IF SWITCH IS SET.
CRLF /DO A CAR RET AND LIN FED.
PONE /+1 IN AC
TAD GNUM /NUMBER OF CHARS IN BUFFER.
JMS I GGIN /PLACE A "0" IN BUFFER.
0000 /0
TAD I GGLINE
DCA GINSERT
JMP I GINSERT
/
/
/
/
/
/
/
/
/
GGLIMC, 0 /THIS TESTS TO SEE IF TYPE IS BETWEEN 240 AND 337
TAD FTYPE
TAD M340 /CHECK UPPER LIMIT
CLL
TAD GGL100 /ADD 100
SNL CLA /GOOD?
JMP GGLBAD /NOT BETWEEN 240 AND 337
GGLGUD, ISZ GGLIMC /IT S GOOD. RETURN TO SECOND LOC
JMP I GGLIMC /EXIT
/
GGLBAD, TAD FTYPE
TAD M40
DCA FTYPE /NOW TEST TO SEE IF A LOWER CASE LETTER
TAD FTYPE
TAD GGM333 /<333???
CLL
TAD GGL100 /BUT >233
SZL CLA
JMP GGLGUD /YEP. ITS GOOD
JMP I GGLIMC /NOPE. IT S BAD
/
/
/
/
/
/
GGL100, 100
GGM333, -333
/
/
GNL334, 334
GGLINE, GLINE /COMMUNICATION.
GNUM, 0 /NUMBER OF CHARS IN BUFFER
GLIMIT, LBMAX /MAX NUM OF USER CHARS IN BUFFER.
GGIN, GIN
GGMAIN, GMAIN
GGCLEAR, GCLEAR /CROSS PAGE REFEREENCES.
/
/
/
/
/
GSPL1, 212
215
377
ASMIFZ TERMC-44 /EOF CHAR=DOLLAR SIGN?
244 /YEP. PLACE IT ON THE EXCEPTION TABLE
247
334
300
337
4243
/
/
/
GSPG1, GNLF /LINE FEED
GALL /C.R.
GNRUB /RUB OUT
ASMIFZ TERMC-44 /DO WE WANT DOLLAR SIGN IN LIST?
GNXIT /YEP. DOLLAR SIGN ILLEGAL
GNXIT
GNXIT
GNXIT
GNXIT
GNXIT
/
/
/
/
/
/
MMOVE, 0
MONE
TAD MMOVE
DCA AUTO3
MONE
TAD I AUTO3
DCA AUTO4
MONE
TAD I AUTO3
DCA AUTO5
TAD I AUTO3
CMA
DCA COUNT
JMP MMEXIT-2
TAD I AUTO4
DCA I AUTO5
ISZ COUNT
JMP .-3
MMEXIT, JMP I AUTO3
/
/
PPUSH, 0
MOVE
FSIZE
PPTEMP
FNAME+3-FSIZE+1
JMP I PPUSH
/
PPOP, 0
MOVE
PPTEMP
FSIZE
FNAME+3-FSIZE+1
JMP I PPOP
/
/
PPTEMP,0
*PPTEMP+FNAME+3-FSIZE
0000 /JUST TO SEE WHERE IT IS. NEXT LOCATION IS COMPLETELY FREE.
/
/
/
EJECT
/
/
/
/
/
/ SAVE THE SYMBOLS FOR P I P 2 ! ! ! ! !
/
/
/
/
/
/
/
/
SAVSYM 2
/
/
/
/
/
/
/
/
/
/
EJECT
PMODE
EJECT
/
/
/
/ THIS IS THE SECOND PART OF PIP. IT S CALLED P I P 2.
/
/
/
/
/
/
/ RECALL SAVED SYMBOLS FROM OTHER PIPS.
/
/
/
/
/
/
/
/
LODSYM
/
/
/
/
/
/
/
/
/
/
/
EJECT
*1400
/ GENERAL MASS STORAGE I/O ROUTINES.
/
/
/
/
/ CALLING SEQUENCE:
/
/
/ READ (OR WRITE)
/ UNIT NUMBER
/ FIRST CORE LOCATION OF TRANSFER
/ NUMBER OF BLOCKS TO BE TRANSFERRED.
/ FIRST BLOCK OF TRANSFER.
/
/
/ ROUTINE HAS THE ABILITY TO GO INTO EXTENED CORE.
/ IF HIS NUMBER OF BLOCKS MAKES THE LOCATION COUNTER "WRAP AROUND".
/
/
/
/
/
TREAD, 0 /MAIN READ ROUTINE
JMS TWHERE /GET CORRECT MASS DEVICE
TAPER /00-07 = TAPE READ
ASMIFN RF08 /DO WE WANT THE RF08 ROUTINES ASSEMBLED?
RF08R /YEP. ASS IT AS DEVICE 1 (10-17)
ASMIFZ RF08 /IF NOT DESIRED STICK IN A DUMMY POINTER.
NOSUCH /10-17 NOT YET ASSIGNED.
NOSUCH /UNITS 20-77 ARE FREE FOR NOW
NOSUCH /ABOVE 77 IS AN ERROR.
NOSUCH
NOSUCH
NOSUCH
NOSUCH
/
/
TWRITE, 0 /MAIN WRITEE.
JMS TWHERE /GET COORRECT MASS STORAGE DEVICE.
TAPEW /FIRST IS LINC TAPE.
ASMIFN RF08 /DO WE WANT THE RFO8 ROUTINES?
RF08W /YEP. ASSIGN AS 10-17
ASMIFZ RF08 /TEST AGAIN.
NOSUCH /UNITS 10-17 NOT YET ASSIGNED.
NOSUCH /UNITS 20-77 FREE FOR NOW.
NOSUCH
NOSUCH
NOSUCH
NOSUCH
NOSUCH
/
/
/
TWHERE, 0 /GETS CORRECT MASS STORAGE DEVICE.
MTWO /-2
TAD TWHERE /GET CALLING.
DCA TEMP /GET ORIGINAL CALLING.
TAD I TEMP
DCA TEMP /GET USER CALLING.
TAD I TEMP /GET USERS UNIT.
RTR
RAR /GET BITS 6-8
AND L7
TAD TWHERE /GET START OF LIST.
DCA TWHERE /AND STORE AWAY.
TAD I TEMP /GET UNIT AGAIN
AND L7700 /IS IT TOO BIG?
SZA
SYSERR /YEP. SYSTEM HAS BLOWN.
TAD I TWHERE /GET CALLING ADDRESS.
DCA TWHERE /AND STASH AWAY.
TAD TEMP /GET USERS CALLING ADDRESS.
DCA I TWHERE /AND SET UP PHONNEY CALL.
ISZ TWHERE /GO TO SECOND LOC.
JMP I TWHERE /PHONNEY CALL ALL DONE.
/
/
/
/
TAPER, 0 /MAIN LINC TAPE READ ROUTINE.
TAD TREAD /GET READ ADDRESS.
DCA TWRITE /AND SAVE FOR READ.
TAD TERENT /SET TO RETRY READ IF ERROR
DCA I TEERNT /SAVE IN RETRY LOCATION
DCA I TTSKP /DO A CHECK OF CHECKSUM.
JMS I TTBLAH /GO PERFORM FOLLOWING OPERATION.
LMODE /NEXT INSTRUCTION IS EXECUTED BY TBLAH IN LMODE
RDE I /READ AND LEAVE GOING.
PMODE /JUST FOR ASSEMBLER.
JMP TEXIT /AND EXIT
/
/
TAPEW, 0 /GENERAL LINC TAPE WRITE ROUTINE.
TAD TTTSKP /SET UP TO IGNORE BAD CHECKSUM.
DCA I TTSKP /AND STASH AWAY.
TAD TTAPEW /FOR WRITE ERROR REWRITE ENTIRE BLOCK
DCA I TEERNT
JMS I TTBLAH /DO WRITE NOW.
LMODE
WRI I
PMODE /BACK INTO PMODE
DCA I TTSKP /SET TO CHECK CHECKSUM.
JMS I TTBLAH /NOW DO CHECK OF WHAT WE JUST WROTE.
LMODE
CHK I
PMODE
/
TEXIT, PFOUR /GENERAL EXIT.
TAD TWRITE /GET WRITE
DCA TWRITE /GO PAST ARGUEMENTS.
JMP I TWRITE /PAST ARGUEMENTS.
/
/
ASET, 0 /INITIALIZES ARGUEMENT GETTER FOR AMSS STORAGE DEVICES.
MONE
TAD TWRITE /FIRST AGR.
DCA AUTO8 /ARG REGISTER.
JMP I ASET /EXIT
/
/
/
/
/
/
/
TTSKP, TSKP /CHECKSUM SKIP
TTTSKP, SKP /INSTRUCTION TO IGNORE CHECKSUM
TTBLAH, TBLAH /POINTER TO I/O DOER
TERENT, TREENT /RETRY LOCATION
TEERNT, TTRENT /RETRY SWITCH
TTAPEW, TWRITE+1 /RETRY ENTRIE WRITE ON ERROR
/
/
/
/
/
FFILEC, MONE /COPIES A NAMED FILE TO ANOTHER NAMED FILE.
DCA OUTNUM /ZET COUNTER TO 1
PTWO /SET UP SECOND DIRECTORY LOOKUP
DCA FWHAT /IT S AN OUTPUT FILE
TAD I FFTEMP /GET THE ORIGINAL SIZE
DCA FSIZE /PLACE IN THE SIZE NOW.
DIRECT /NOW ALLOCATE SPACE.
TAD FUNIT /GET THE NEW OUTPUT UNIT
DCA OUTUNIT /AND SET UP OUTPUT UNIT
TAD FBNUM /GET OUTPUT BLOCK
DCA OUTBLOCK /AND SET UP.
HPOP /POP IN UPPER SAVED FBLOCK
TAD FUNIT /SAVE THE INPUT UNIT
DCA INUNIT
TAD FBNUM /GET THE INPUT STARTING BLOCK
DCA INBLOCK /AND SET UP
COPY /NOW COPY THE FILE
PIP /AND RETURN TO PIP.
/
/
/
FFTEMP, HHTEMP
/
/
/
/
/
/
/
/
/
ASMIFZ RF08 /RF08 DESIRED?
ASMSKP 4 /NO. DON T PUT MESSAGE HERE.
/
TMESS2, TEXT "FLINC TAPE
FCHECKSUM ERROR
" /TAPE ERROR MESSAGE HERE TO LEAVE ROOM LATTER ON.
/
/
/
/
/
/
/
/
EJECT
*1600
/
/
/ MAIN GENERAL TAPE I/O LOOP.
/
/
/
TBLAH, 0 /PERFORMS A FUNCTION, THEN EXITS.
SETA /SET UP ARGUEMENT GETTER.
GETA /GET UNIT NUMBER
CLL RAR /MOVE INTO CORRECT PLACE
TAD L30/SET UP EXTENED UNITS BITS.
DCA TAXO /AND STORE AWAY. NO-PAUSE AND EXTENEDED ADDRESSING ALSO SET.
CLA RTL /NOW MOVE BACK TO BIT 8
RTL
TAD I TBLAH /ADD IN DESIRED FUNCTION.
DCA TOPR /AND STORE AWAY TO BE EXECUTED.
TAD TOPR /GET THE OPERATION AGAIN.
DCA TSTOPR /SET UP SELECT-WRITE LOCK CHECK.
ISZ TBLAH /SKIP PAST CRAP.
GETA /GET STARTING ADDRESS.
DCA TLOC1 /AND STORE AWAY.
GETA /GET WORD COUNT.
SNA /IS IT ZERO?
JMP I TBLAH /YEP. EXIT.
CIA /NOPE. COMPLEMETN IT.
DCA TCOUNT /STASH AWAY.
GETA /GET BLOCK NUMBER
IAC /FOR UPCOMING SUBRACTION ERROR.
DCA TBLOCK /AND OPLACE IN FIRST BLOCK.
/
/
/
TREENT, MONE /TO RETRY SAME BLCOK AFTER ERROR.
TAD TBLOCK /RESET BLOCK NUMBER TO CORRECT ONE.
DCA TBLOCK
TAD TLOC1 /GET THE FIRST LOC
SZA /IT S ZERO. CORRECT FOR FIELD CHANGE
JMP TDOWN /NOT ZERO OK.
TAD L7000 /BOP DOWN FIELD.
TAD TAXO /IN EXTENDED REGISTER
DCA TAXO
ASMIFZ RF08 /DISK ROUTINES THERE.
ASMSKP 4 /NO. DO NOT ASSEMBLE IN CODE TO PROTECT 7400-7777 OF FIELD 0.
TAD TAXO /REGET THE NEXT AXO REGISTER.
AND L7000
SNA CLA /ARE WE CROSSING BOUNDARY TO LOWER CORE?
TAD M400 /YES. BOP DOWN BY AN EXTRA 400 SO WE DON T BASH DATA BREAK
/AND THE READ ROUTINES THERE.
/
TDOWN, TAD M400 /400= LENGTH OF 1 RECORD.
DCA TLOC1 /LOC ALL SET TO GO.
/
TRENT2, TAD M215 /ENTERS HERE IF A SKIP OVER RECORD. M215=LENGTH OF TAPE+10 SECONDS.
DCA TERRC2 /SET UP WAIT COUNT.
TAD L5000 /SET MAINANCE MODE
6151 /FOR TESING WHETER OR NOT UNIT OK
/
/
/
TLOOP, PONE /MAIN LOOP TO DO NEXT RECORD. IS THIS LAST RECORD?
TAD TCOUNT /GET THE NUMBER OF RECORDS TO GO
SZA CLA
JMP .+4 /NO. STILL MORE TO GO.
TAD TOPR /LAST ONE. TURN OFF MOTION BIT.
AND L7757
DCA TOPR
ASMIFZ RF08 /RF08 DEISRED?
ASMSKP 14 /NOPE. DON T ASSEMBLE IN CODE TO PROTECT 7400.
TAD TLOC1 /GET THE LAST LOCATION.
TAD L400
TAD L400 /SEE IF NEXT IS GOING TO READ INTO 7400.
SZA CLA /??
JMP TLP1 /NO. IT ISN T.
TAD TAXO /GET THE TAXO TO SEE IF
AND L7000 /IT S 7400 OF FIELD 0
SZA CLA
JMP TLP1 /NOT FIELD 0
TAD L400 /WE RE GOING TO BASH 7400, SO SKIP PAST IT.
TAD TLOC1
DCA TLOC1
/
TLP1, CLA CLL /LINC MUST BE CLEAR
TAD L400 /BOP UP LOCATION
TAD TLOC1
DCA TLOC1
LINC /GO OVER INTO LMODE
LMODE
ROR I 3 /MOVE OVERFLOW BIT INTO CORRECT TAPE POSITION.
ADM I /UPDATE TAXO AND AXO ALL AT ONCE.
TAXO, 0
AXO /SEND TO CONTROLER
CLR /CLEAR AC FOR TEST TO FOLLOW DUMMY OPERTION.
TSTOPR, 0 /PERFORM USERS OPERATION ONCE. BLOCK NUMBER=0 INSURES SUCCESS.
0000 /BECAUSE BLOCK NUMBER IS ADDED TO SPECIAL REGISTER WHICH IS READ IN.
IOB /DO 8 IOT TO GET SPECIAL REGISTER.
6154 /IF TAPE OK(SELECT AND WRITE-LOCK OFKAY
STC TEMP4 /THEN BIT10=1; NOW DO REAL USER OPERATION.
LDA I /GET ADDRESS
TLOC1, 0
TMA /AND SEND IT TO CONTROLLER
TOPR, 0 /ACTUAL TAPE INSTRUCTION
TBLOCK, 0 /ACTUAL BLOCK NUMBER.
LDA /RECALL PAST SPECIAL FUCTION
TEMP4 /REGISTER AND CHECK WHETER UNIT OK
PDP /GET BACK INTO 8 MODE
PMODE
ISZ TBLOCK /BOP UP BLOCK NUMBER
RTR /PLACE BIT 10 IN LINC
SNL CLA /IS UNIT OK WITH WRITE LOCK OFF IF NECESSARY.
JMP TSELER /UNIT NOT OK. DISPLAY MESSAGE.
LMODE /TELL ASSEM WE LL BE IN LMODE.
TLOOP2, PDP /GET INTO 8 MODE. IF IN 8 MODE ITS JUST A NOP.
PMODE
CHECKIO /CHECKIO I/O DEVICES WHILE WAITING IN LOOP.
ISZ TERRC1 /BOP UP FIRST WAIT COUNT
JMP TNT2LG /DIDN T OVERFLOW YET. GO DOWN
ISZ TERRC2 /OUTER SKIP OK?
JMP TNT2LG /BIG COUNT STILL OK. GO DOWN.
/
JMS I TEMAIN /WE VE WAITED TOO LONG. GIVE MESSAGE.
TMESS1 /TO LONG MESSAGE
/
TNT2LG, LINC /GET INTO LINC MODE FOR FLAG TESTING.
LMODE /GET INTO L MODE TO TEST TAPE.
STD
JMP TLOOP2 /NOT YET DONE. GO BACK AND WAIT.
TAC /DONE. GET CHECKSUM INTO AC.
PDP
PMODE /AND GET BACK INTO 8 MODE
CMA /MAKE INTO ZERO IF 7777
SNA CLA /GOOD CHECKSUM
JMP TDOC /YEP. TRY NEXT RECORD.
TSKP, SKP /SWITCH FOR ERROR IF BAD CHECKSUM.
JMP TCHEKE /BAD CHECKSUM. GIVE MESSAGE
TDOC, ISZ TCOUNT /OK. IS ALL ODNE?
JMP TLOOP /NOPE. DO NEXT
TBEXIT, JMP I TBLAH /YEP. EXIT
/
/
/
/
TCHEKE, JMS I TEMAIN
TMESS2 /CHECKSUM ERROR
TSELER, JMS I TEMAIN
TMESS3 /BLOCK NUMBER OR TIMING ERROR
/
/
/
/
/
TCOUNT, 0
TERRC1, 0
TERRC2, 0
TEMAIN, TMAINE
/
/
/
/
/
/
/
/
/
ASMIFN RF08 /RF08 DEISRED?
ASMSKP 4 /YEP. DON T ASSEMBLE MESSAGE HERE
/
TMESS2, TEXT "FLINC TAPE
FCHECKSUM ERROR
"
/
TMESS3, TEXT "FSELECT OR
FWRITE-LOCK ERROR
"
/
/
/
/
/
EJECT
/
/
/
/
/ LOCATED AROUND 2000. PREVIOUS PAGE OVERLAPS A LITTLE BIT.
/
/
/
/ TAPE ROUTINES CONTINUED.
TMAINE, 0 /MAIN ERROR WAIT
CLA CLL CML RAR /4000+6152=TAPE PRESET.
6152 /STOP ANY STRAY TAPE OPERATIONS.
CLA CLL
TAD I TMAINE /GET ERROR MESSAGE
DCA .+2
MOVE /AND MOVE TO MAIN MESSAGE.
0
TMAIND
20 /40 CHARACTER NAME.
MONE
TAD I TBLOKK /GET COOREECT BLOCK NUMBER FOR DISPLAY OF ERROR MESSAGE.
JMS TTBC /CALL ERROR MESSAGE DISPLAYER
TTEG1 /WITH LIST OF WHERE TO GO ON REPLY.
/
/
/
/
/
TTEG1, TRENT3 /ACCEPT LOCATION
TERROT /RETRY LOCATION
TRENT3 /SKIP LOCATION (INTERNALLY SAME AS ACCEPT)
/
/
/
/
/
/
/
TRENT3, ISZ I TKOUNT /IS THIS LAST RECORD?
JMP I TTRNT2 /NOPE. GO BACK AND SKIP
JMP I TBLAHT /YEP. EXIT
/
/
/
/
/
TERROT, JMP I TTRENT
/
/
/
/
/
/
TTRENT, TREENT
TBLOKK, TBLOCK
TKOUNT, TCOUNT
TTRNT2, TRENT2
TBLAHT, TBEXIT
/
/
/
/
/
/
/
/
/
/
/
/
/
/
TTBC, 0 /ERROR MESSAGE DISPLAYER
LINC /GET OVER TO LINC SIDE
LMODE
TBREG=TMAINE&1777 /ASSIGN A BETA REGISTER
STC TTEBLK /SAVE THE BLOCK NUMBER
SET I TBREG /SET THE B REG TO POINT TO
TOUT1&1777-1+4000 /WHERE THE BLOCK NUMBER SHOULD GO.
/
TTBLP, DJR /DON T CLOBBER 0
LDA I
TTEBLK, 0 /GET THE B,OCK NUMBER
ROL 3 /ROTATE TO GET DIGIT
STA
TTEBLK /AND STORE BACK FOR NEXT TIME
BCL I
-7
BSE I
60 /CONVERT TO TRIMMED ASCII
STH I TBREG /AND STORE AWAY.
SRO I
3567 /ALL DONE WITH 4 DIGITS?
JMP TTBLP /NOPE. DISPLAY MORE.
PDP
PMODE /GET BACK INTO 8 MODE
CLA
TAD I TTBC /GET THE GO TO LIST
DCA TTS2 /AND SAVE IN SEARCH CALL
DECODE /DISPLAY MESSAGE AND GET REPLY
TMAIND-2
SEARCH /LOOK-UP REPLY
TTS1
TTS2, 0 /CALLERS LIST.
JMP .-5 /NOT A LEGAL REPLY.
/
/
/
TTS1, 301
322
4323
/
/
/
/
/
/
/
/
LEFT+140
TOP-100 /LOCATED ON TOP,LEFT OF SCREEN
TMAIND, 0 /OVERLAYED BY EXACT MESSGE
*TMAIND+20 /A 40 CHAR MESSAGE FROM CORRECT ERROR ROUTINE.
TEXT "FAT BLOCK NUMBER "
TOUT1, 0
TOUT2, 0
TEXT "
A --- ACCEPT AS IS
R --- TRY AGAIN
S --- TRY TO SKIP PAST FAULTY BLOCK\"
TMESS1, TEXT "FBLOCK NUMBER
FOR TIMING ERROR
"
/
/
/
/
EJECT
/ LOCATED AROUND 2200. PREVIOUS PAGE OVERLAPS A LITTLE BIT.
/
/
/ GENERAL CALL:
/
/ DECODE
/ YOUR DISPLAY
/
/
/
/ WILL DECODE A STRING AS FOLLOWS:
/
/ <SINGLE LETTER><OCTAL NUMBER>;<8 CHARACTER NAME>,<OCTAL NUMBER>
/
/ ANY PART MAY BE MISSING WITH THE EXCEPTION OF THE FIRST LETTER.
/
/ IT S BROKEN DOWN AS FOLLOWS. THE FIRST LETTER GOES INTO "FTYPE", THE NUMBER INTO "FUNIT",
/ THE 8 CHARACTER NAME INTO "FNAME" FOLLWED BY
/ "77" S TO FILL IT OUT, AND THE LAST NUMBER INTO
/ "FSIZE". ANY MISSING NUMBERS GO TO 0, A MISSING NAME GOES TO 7777777777777.
/
/
DDCODE, 0 /GETS AND DECODES A LINE FROM THE TTY WHILE DISPLAYING SOMETHING.
CLA CLL /CLEAR AC.
TAD I DDCODE /GET LOCATION OF DISPLAY.
DCA DDDIS /AND PLACE HERE.
ISZ DDCODE /SKIP PAST CALLING ARG.
DDAGIN, MONE /RESTART OF DISPLAY.
DCA FNAME /SET NAME TO 7777
MONE
DCA FNAME+1
MONE
DCA FNAME+2
MONE
DCA FNAME+3 /NAME NOW CONTAINS A 7777
DCA FUNIT /ZAP OUT UNIT NUMBER.
DCA FTYPE /ZAP OUT CHAR.
DCA FSIZE /AND SIZE.
LINE /GET A LINE FROM THE TTY.
DDDIS, 0 /WHILE DISPLAYING THE CALLERS CRAP.
TAD DDGTEXT /POINTER TO BUFFER-1
DCA I DPSTART /WE LL USE "PGETL" TO GET
MONE /THE CHARS SO I M SETTING IT UP NOW.
DCA I DPSWITCH /SET SWITCH TO LEFT CHAR.
TAD DSIZE /NUMBER OF CHARS ALREADY IN BUFFER.
DCA COUNT /PLACE IN TEMP COUNT.
JMS I DPGETL /GO GET A CHAR.
ISZ COUNT /BOP UP CONUT. IS THTA ALL?
JMP .-2 /NO. GET NEXT.
CLA /YES. CLEAR AC OF CHAR.
JMS I DPGETL /GET NEXT CHAR.
TAD L7777 /TEST TO SEE IF A LETTER
SPA /IS IT <"A"
JMP DDAGIN /YES. NOT A LET. TRY AGAIN.
TAD M32 /IS IT TOO BIG???
SMA
JMP DDAGIN /YEP. TOO BIG. TRY AGAIN.
TAD L333 /OK. MAKE INTO A GOOD LETTER.
DCA FTYPE /AND STASH AWAY.
JMS DGETNUM /GET A NUMBER NEXT.
TAD TEMP /GET THE VALUE.
DCA FUNIT /AND STASH AWAY.
TAD TEMP1 /GET CHARACTER WHICH WAS NON NUM.
SNA /IS IT TERMINATING 0000
JMP I DDCODE /YES. EXIT.
TAD M73 /IS IT A ";"
SZA CLA
JMP DDAGIN /NOT ANYONE. BAD CHAR. TRY AGAIN.
TAD DFNAME /POINTER TO "FNAME"
DCA TEMP3 /AND STORE AWAY
TAD M4 /4 *2 CHARS PER WORD=8
DCA COUNT
DLOOP, JMS DDCHEK /GET A CHAR AND CHECK IT.
RTL
RTL
RTL /ROTATE INTO LEFT SPOT.
AND L7700 /ZAP OUT RIGHT
TAD L77 /NAME TERMINATES WITH A 77
DCA I TEMP3 /PLACE IT AWAY.
JMS DDCHEK /GET ANOTHER
AND L77 /JUST RIGHT 6 BITS
TAD I TEMP3 /GET BACK OLD 1
TAD M77 /CHOP OFF L77 WE ADDED BEFORE.
DCA I TEMP3 /AND PLACE BACK IN THING.
ISZ TEMP3 /BOP UP NAME POINTER.
ISZ COUNT /4 WORDS FILLED UP YET?
JMP DLOOP /NO.
JMS DDCHEK /YES. GET NEXT JUST FOR HELL OF IT.
JMP DDAGIN /NAME TOO LOONG. RESTART/
/
DCOMMA, JMS DGETNUM /EVALUATE NUM AFTER COMMA.
TAD TEMP /GET VALUE
DCA FSIZE /AND STASH AWAY
TAD TEMP1 /GET TERMINATING CHAR.
SZA CLA /IS IT 0000
JMP DDAGIN /NO. RETRY AGAIN.
JMP I DDCODE /YEP. ALL DONE. E X I T !
/
DGETNUM, 0 /FORMS A NUMBER
DCA TEMP /ZERO SUM
JMS I DPGETL /GET A CHAR.
DCA TEMP1 /STASH IT AWAY.
TAD TEMP1 /GET IT BACK
TAD M60 /IS IT <60
SPA CLA
JMP I DGETNUM / <60. RETURN.
TAD TEMP1 /GET AGAIN
TAD M70 /IS IT TOOOOO BBBIIIGGGG??????
SMA CLA
JMP I DGETNUM /YEP. RETURN
TAD TEMP /GET OLD TOTAL
CLL RAL
CLL RAL
CLL RAL /MULTIPLY BY 8
TAD TEMP1 /ADD IN TEMP1
TAD M60 /GET RID OF ASCII BITS.
DCA TEMP /AND STASH AWAY.
JMP DGETNUM+2 /GO GET NEXT CHAR.
/
DDCHEK, 0 /CHECKS FOR 0 OR ,
JMS I DPGETL
SNA /IS GOTTEN CHAR 0?
JMP I DDCODE /YES. EX I T
TAD M54 /IS IT A ,
SNA
JMP DCOMMA /YES. END OF NAME.
TAD L54 /CORRECT FOR SUBTRACTION.
JMP I DDCHEK /RETURN IWTH CHAR IN AC.
/
/
/
DPGETL, DDCOM /POINTER TO UNPACK ROUTINE CHAR GETTER.
DFNAME, FNAME /POINTER TO FNAME
DDGTEXT, GTEXT+1 /POINTER TO START OF MESSAGE-1
DPSTART, PSTART /POINTER TO GETCHAR POINTER
DPSWITCH, PSWITCH /POINTER TO SWITCH (LEFT OR RIGHT CHAR)
DSIZE, -LBNUM /NUMBER OF SYSTEM CHARS ALREADY IN BUFFER.
/
/
/
/
/
/
/
EJECT
*2400
/
/ MAIN DIRECTORY SEARCHER.
/
/ GENREAL CALL:
/
/
/ DIRECT
/
/
/ NO ARGUEMENTS. ALL COMMUNICATION IS DONE THROUGH "FBLOCK AREA [FSIZE-FNAME+3]"
/
/
/
/
/
/
DYRECT, 0 /MAIN ENTRY
CLA CLL /CLEAR AC TO BE SURE.
TAD INDEX /GET START OF INDEX
DCA DINDEX /AND PLACE AWAY HERE
TAD ILEN /GET LENGTH OF INDEX
DCA DLEN /AND PLACE AWAY.
PUSH /SAVE FBLOCK. I/O MIGHT DESTROY IT.
TAD FUNIT /GET DESIRED UNIT.
DCA .+2 /AND FINISH SETTING UP READ.
READ /READ IN INDEX.
0 /UNIT
DPOINT, BUFFER /INTO START OF BUFFER AREA.
DLEN, 0 /LENGTH OF INDEX.
DINDEX, 0 /STARTING BLOCK OF INDEX.
POP /RESTORE FBLOCK
JMS I DDNAME /LOOKUP NAME.
JMP I DDFOUND /NAME EXISTS. GO ELSEWHERE.
JMS I DYGLEN /NO NAME. GET D LEN.
ISZ COUNT /BOP BY 1 TO OFFSET FOR FIRST ENTRY
TAD DPOINT /SET UP AUTO1
DCA AUTO1 /TO POOINT TO DIRECTORY.
DYLOOP, JMS I DYPAST /GO TO NEXT ENTRY.
TAD I AUTO1 /GET FIRST LETTERS OF NAME.
TAD M5757 /IS IT FREE
SNA CLA
JMP DYGOOD /YEP. PLACE IT HERE
ISZ COUNT /NO GOOD, ANY MORE TO CHACK?
JMP DYLOOP /YEP. GO BACK
NO /NO ROOM FOR NEW NAME.
DYGOOD, TAD AUTO1 /SET UP MOVE TO DIRECOTRY OF NAME
DCA .+3 /NAME PLACE IN DIRECTORY.
MOVE /MOVE NEW NAME INTO DIRECTORY.
FNAME
0
4
PFOUR /NOW FILL IN SPACES WITH 5757S
TAD AUTO1 /POINTER TO SOURCE BLOCKS
DCA .+3
MOVE /NOW MOVE IN 5757 S
DL5757
0
4
JMS I DYBACK /POINT TO START OF NAME
/
/
DREENT, TAD FWHAT /DFOUND ALSO COMES HERE. IS IT INPUT OR OUTPUT???
TAD L7777 /1=INPUT,2=OUTPUT
SNA /IS IT INPUT
NO /YES. NO NAME. DISPLAY "NO"
TAD L7777 /IS IT "2"
SZA
SYSERR /NO. INTERNAL PIP ERROR. FOR DEBUGGING ONLY.
TAD FTYPE /SOURCE=1,BINARY=2
TAD L7777 /IS IT A 1
SNA
JMP DSOURCE /YES. SOURCE
TAD L7777 /IS IT2. (BINARY)
SZA
SYSERR /NEITHER. SYSTEM ERROR
PTWO /BINARY. BOP PAST SOURCE.
DSOURCE, TAD L4 /GO PAST NAME.
TAD AUTO1 /SET AUTO2 TO BLOCK NUMBER POINTER.
DCA AUTO2
/
/
/
/ ROUTINE TO FIND VACANT SPACE IN THE DIRECTORY
/
DLOOK, TAD CLOWER /GET LOWER LIMIT OF SYSTEM.
DCA DFIRST /THATS WHERE WE LL START CHECKING.
DLOOP1, TAD DFIRST /GET START OF BLOCKS WE RE NOW CHECKING
TAD FSIZE /FIND OUT HOW BIG WE WANT THEM.
CLL CMA IAC /13 BIT NEGATE, EXCEPT FOR LINK.
TAD CLOWER /DO WE GO OVER INTO SYSTEM?
SZA SNL CLA /NOW REASON FOR NO CML ABOVE.
JMP DNO1 /YEP. GO DOWN AND TRY NEXT.
JMS I DDCHECK /CHECK TO SEE IF ANY OF THESE BLOCKS ARE OCCUPIED.
JMP DNO1 /YEP, THEY ARE. GO DOWN AND TRY NEXT.
TAD DFIRST /FOUND ROOM.
TAD FSIZE /GET DISTANCE FROM CENTER OF SYSTEM.
CIA
TAD CLOWER
IAC /1 MORE FOR ADDITION OVERSHOOT.
DCA DDIS1 /DISTANCE FOR SYSTEM.
JMP DDO2 /NOW CHECK OTHER SIDE.
DNO1, TAD DFIRST /BLOCKS WON T FIT.
CIA /CAN WE TRY FARTHER FROM SYSTEM.
TAD ELOWER /ADD LOWER LIMIT OF DEVICE.
SNA CLA /ARE WE AT BOTTOM NOW?
JMP DBAD1 /YEP. NO ROOM HERE IN THIS SIDE.
MONE /ROOM LEFT. BOP DOWN DFIRST AND TRY AGAIN.
TAD DFIRST
DCA DFIRST /A LITTLE FARTHER FROM SYSTEM THIS TIME.
JMP DLOOP1 /GO BACK AND TRY AGAIN.
/
DBAD1, MONE /NO ROOM ON BOTTOM . SET DISTANCE TO MAX.
DCA DDIS1
/
DDO2, CLA CLL /NOW EW LL CHECK TO UPPER TO SEE IF IT FITS.
TAD CUPPER /GET UPPER PART OF SYSTEM.
DCA DFIRST /FOR FIRST ISZ CORRECTION.
/
DLOOP2, ISZ DFIRST /WE LL TRY NEXT BLOCK.
SKP /WOW. QUITE A DEVICE HE S GOT THERE. 4 RF08 S IT MUST BE.
JMP DBAD2 /BUT STILL NO ROOM ON TOP.
TAD EUPPER /GET THE UPPER LIMIT OF THE DEVICE.
CLL CML CMA /13 BIT COMP , -1
TAD DFIRST /WILL WE OVERFLOW DEVICE LIMITS.
TAD FSIZE /WHEN WE ADD IN LENGTH.
SZA SNL CLA
JMP DBAD2 /NO ROOM LEFT ON TOP END.
JMS I DDCHECK /CHECK TO SEE IF BLOCKS ARE FREE.
JMP DLOOP2 /NOT FREE. GO BACK AND TRY AGAIN.
TAD CUPPER /FREE. GET DISTANCE.
CIA
TAD DFIRST
DCA DDIS2 /AND SAVE IT.
JMP I DDFIG /GO CALCULATE WHICH ONE IS CLOSER [LOWER HALF OR UPPER HALF]
/
/
DBAD2, MONE /NO ROOM ON UPPER HALF.
DCA DDIS2 /SET DISTANCE TO A MAXIMUM.
JMP I DDFIG /GO FIGURE OUT WHICH ONE IS CLOSER.
/
/
DDIS1, 0 /LOWER DEVICE DISTANCE
DDIS2, 0 /UPPER DEVICE DISTANCE FROM DESIRED FILE.
DDCHECK, DCHECK /POINTER
DDFIG, DFIG
DDNAME, DNAME
DDFOUND, DFOUND
DYGLEN, DGLEN
DYPAST, DPAST
DYBACK, DBACK
DL5757, 5757
5757
5757
5757
/
/
/
/
/
/
/
/
/
EJECT
*2600
/
/ MORE OF THE DIRECTORY LOOKUP ROUTINES.
/
/
/
/
/
/
DFIG, TAD I DDDIS1
IAC /IS LOWER HALF OK??
SNA CLA
JMP D1NOG /NO ROOM IN LOWER HALF.
TAD I DDDIS2 /HOW ABOUT THE UPPER HALF?
IAC
SNA CLA
JMP D1CLOSE /LOWER HALF IS CLOSER BECAUSE NO UPPER HALF.
TAD I DDDIS1 /BOTH THERE. GET LOWER DISTANCE.
CLL CML CMA IAC /13 BIT NEGATE
TAD I DDDIS2 /GET UPPER DISTANCE.
SZL CLA /WHICH IS CLOSER.
JMP D2CLOSE /UPPER IS CLOSER.
/
D1CLOSE, MONE /-1 FOR ADDITION ERROR
TAD FSIZE /RECREATE ORIGINAL BLOCK NUMBER
TAD I DDDIS1
CIA
TAD CLOWER /WE VE GOT THE ORGINAL BLOCK NUMBER NOW.
DCOM, DCA FBNUM /TELL CALLING PROGRAM ABOUT IT.
TAD FBNUM /NOW PLACE IT IN DIRECTORY.
DCA I AUTO2
TAD FSIZE /ALSO THE SIZE IN THE DIRECOTRY.
DCA I AUTO2
MOVE /NOW SET UP THE WRITING OF THE DIRECTORY.
DPOINT-1
DWRITE+1
4
PUSH /PUSH DOWN F BLOCK
DWRITE, WRITE /WRITE DIRECTORY, WITH MOVED IN ARGUEMENTS.
0
0
0
0
POP /POP UP FBLOCK
DDEXIT, TAD I DDYRECT /GET CALLING ADDRESS
DCA TEMP /STORE IT
JMP I TEMP /EXIT TO USER.
/
D1NOG, TAD I DDDIS2 //CHECK IF ROOM ON TOP HALF.
IAC
SNA CLA /ROOM?
NO /NO ROOM ON DEVICE FOR FILE.
D2CLOSE, TAD DFIRST /GET THE LAST BLOCK CHECKED.
JMP DCOM /AND THATS IT. PLACE IN DIRECTORY.
/
/
/
/
DCHECK, 0 /CHECKS TO SEE IF BLOCKS OCCUPIED BY DFIRSR ARE FREE
MONE
TAD I DDPOINT /SET AUTO1 TO POINT TO START OF DIRECTORY
DCA AUTO1 /IN CORE.
JMS I DDGLEN /GET LEN OF DIRECTORY
DLOOP3, TAD I AUTO1 /GET FIRST WORD OF A NAME IN THE DIRECTORY.
TAD M5757 /IS IT A GOOD NAME???
SNA CLA
JMP DBLANK /NO. SKIP PAST IT.
ISZ AUTO1
ISZ AUTO1
ISZ AUTO1 /SKIP PAST REST OF NAME.
ISZ AUTO1 /AND ALSO STARTING BLOCK OF SOURCE
TAD I AUTO1 /IS THERE ANY SOURCE(LENGTH=POSITIVE)
SPA CLA
JMP DNOS /NO SOURCE
JMS I DDTHERE /YEP. CHECK IT OUT.
DNOS, ISZ AUTO1 /SKIP PAST BINARY BLOCK
TAD I AUTO1 /GET BINARY LENGTH
SPA CLA /BINARY THERE?
JMP DBLANK /NO BINARY
JMS I DDTHERE /BINARY THERE. CHECK FOR INTERFERENCE.
/
DBLANK, JMS I DDPAST /SKIP TO NEXT DIRECTORY ENTRY
ISZ COUNT /ARE WE ALL DONE WITH THE DIRECTORY?
JMP DLOOP3 /NO. GET NEXT ENTRY
ISZ DCHECK /YES. SKIP PAST NEXT CALLING STATEMENT AND EXIT.
JMP I DCHECK /GOODBYE. AND GOOD LUCK.
/
/
/
/
/
DGLEN, 0 /ROUTINE GETS LENGTH OF DIRECTORY AND STORES IT IN -COUNT.
TAD ILEN /GET INDEX LENGTH.
RTL
RTL
RAL /MULTIPLY BY 32 (32 ENTRIES PER BLOCK.
AND L7740 /CHOP AWAY CRAP.
CIA
DCA COUNT /AND STORE NEGATED IN COUNT.
JMP I DGLEN /RETURN TO CALLER.
/
DPAST, 0 /ROUTINE SETS AUTO1 TO POINT TO NEXT NAME IN DIRECTORY.
TAD AUTO1
AND L7770 /LOGICAL OPERATION---- AUTO1.OR.7
TAD L7
DCA AUTO1 /AND PUT BACK.
JMP I DPAST
/
DBACK, 0 /ROUTINE BACKSPACES 1 DIRECTORY ENTRY.
JMS DPAST /MOVE TO END OF THIS NAME
TAD AUTO1
TAD M10
DCA AUTO1 /AND DOP DOWN BY 10 (1 DIRECTORY ENTRY)
JMP I DBACK
/
/
/
DTHERE, 0 /CHECKS JUST ONE DIRECTORY ENTRY FOR BEING WITHIN THE SPECIFIED LIMITS.
MONE
TAD AUTO1 /BOP BACK THE AUTO REG.
DCA TEMP3 /AND PLACE IT AWAY
TAD I TEMP3 /RETRIEVE STARTING BLOCK NUMBER
CLL CML CMA IAC /13 BIT NEGATE.
TAD DFIRST /ADD IN DESIRED STARTING BLOCK.
SNA
JMP I DCHECK /SAME. BLOCK IS TAKEN. EXIT.
SNL CLA /ARE WE PAST DFIRST.
JMP DFBIGR /NO. DFIRST IS BIGGER.
TAD I TEMP3 /YEP. LETS SEE IF WE MISS IT.
CLL CML CMA
TAD DFIRST /DOES DFIRST+FSIZE INCROACH ON OUR TERRITORY.
TAD FSIZE
SNL CLA /????
JMP I DCHECK /YEP. CAN T PUT IT HERE.
JMP I DTHERE /IT FITS.
/
DFBIGR, TAD I TEMP3 /WE RE BEFORE DFIRST.
ISZ TEMP3 /POINT TO FILE LENGTH NOW.
TAD I TEMP3 /ADD OUR LENGTH IN
CLL CMA IAC
TAD DFIRST /DO WE OVERFLOW INTO DFIRST???
SZA SNL CLA
JMP I DCHECK /WE CERTAINLY DO.
JMP I DTHERE / NOPE. WE RE CLEAR. RETURN TO CHECK AGAIN.
/
/
/
DDDIS1, DDIS1 /POINTER TO LOWER DISTANCE FROM SYSTEM
DDDIS2, DDIS2 /POINTER TO UPPER DISTANCE FROM SYSTEM
DDYRECT, DYRECT /POINTER TO ENTRY
DDPOINT, DPOINT /POINTER TO BUFFERS
DDGLEN, DGLEN /POINTER TO GET NUMBER OF DIRECTORY ENTRIES ROUTINE.
DDTHERE, DTHERE /POINTER TO BLOCK CHECKER
DDPAST, DPAST /POINTER TO ROUTINE TO GO TO NEXT ENTRY.
/
/
/
/
/
/
/
/
/
EJECT
*3000
/
/ SOME MORE OF THE DIRECTORY LOOKUP ROUTINES.
/
/
/
/
/
DFOUND, TAD FWHAT /NAME ALREADY IN DIRECTORY. GET WHETHER INPUT OR OUTPUT FILE.
TAD L7777 /1=INPUT,2=OUTPUT
SNA
JMP DDIN /IT S INPUT.
TAD L7777 /IS IT OUTPUT?
SZA
SYSERR /NOT 1 OR 2. SOMETHING HAS BLOWN.
TAD FTYPE /1=SOURCE,2=BINARY
TAD L7777 /IS IT SOURCE
SNA
JMP DZAP /YEP. ZAP OUT BLOCKS FROM DIRECTORY.
TAD L7777 /BINARY???
SZA
SYSERR
PTWO /BINARY FILE. ADD TWO TO BYPASS SOURCE
DZAP, TAD L4 /BOP PAST NAME
TAD AUTO1 /GET POINTER NOW
DCA AUTO1
TAD L5757 /BLANK OUT THE BLOCK NUMBER
DCA I AUTO1 / (EITHER TO POINTER TO SOURCE OR BINARY)
PUSH /PUSH DOWN FBLOCK SO "REPLACE" WONT BLOW IT.
TAD AUTO1 /NOW GET THE AUTO LENGTH POINTER.
DCA AUTO3 /AND PLACE IN A TEMPORARY AUTO.
TAD I AUTO3 /IF SIGN BIT OF LENGTH ON THEN NO SOURCE OR BINARY.
SMA CLA /DO WE WANT TO REPLACE????
REPLACE /YEP. DISPLAY REPLACE MESSAGE.
POP /HE S ANSWERED AN "R". NOW REPLACE FBLOCK.
TAD L5757 /NOW ZAP OUT THE LENGTH.
DCA I AUTO1 /BY PLACING IN SOME 5757 S.
PUSH /NOW PUSH DOWN SO THAT WE WILL REMEMBER IT.
JMS I DDBACK /BACKSPACE TO BEGINNING OF NAME.
JMP I .+1 /WE WANTS IT REPLACED.
DREENT /REENTRY FOR REPLACING THE FILE
/
/
DDIN, TAD FTYPE /IT AN INPUT FILE. GET THE MODE.
TAD L7777 /1=SOURCE,2=BINARY
SNA
JMP DDT /IT SOURCE
TAD L7777 /MAYBE IT S BINARY
SZA
SYSERR /UGH. PIP HAS BLOWN.
PTWO /IT S BINARY. MOVE PAST SOURCE.
DDT, TAD L4 /PUSH PAST NAME.
TAD AUTO1 /RESET POINTER
DCA AUTO1
TAD I AUTO1 /GET BLOCK NUMBER
DCA FBNUM /AND STORE AWAY.
TAD I AUTO1 /GET SIZE OF FILE
SPA /IS IT OK?
NO /NO. DISPLAY "NO" MESSAGE.
DCA FSIZE /YEP. ITS THERE. STASH AWAY.
JMP I .+1 /NOW EXIT FROM DYRECT.
DDEXIT
/
/
/
/
DNAME, 0 /LOOKS UP NAME IN THE DIRECTORY.
TAD I DNPOINT /GET STARTING ADDRESS FOR THE NAME LOOKUP.
TAD L7777 /AC MAY NOT CONTAIN ZERO FOR SOME SPECIAL CALLS.
DCA AUTO1 /PLACE IN AUTO1
JMS I DNGLEN /GET LENGTH
TAD I DNPOINT /GET STARTING ADDRESS OF DIRECTORY
DCA TEMP4 /STORE AWAY.
TAD I TEMP4 /GET FIRST WORD. IS IT "5757"
TAD M5757
SNA CLA
JMP DOK /IT S THERE. ALL IS WELL
ISZ DNAME /DESIRED NAME NOT THERE BECAUSE NO DIRECTORY.
TAD COUNT /MULTIPLY COUNT BY 8
RTL
RAL /BECAUSE THERE ARE 8 WORDS PER
AND L7770 /DIRECTORY ENTRY
DCA COUNT
TAD L5757 /MAKE IT A GOOD DIRECOTORY.
DCA I AUTO1 /FILL IT UP
ISZ COUNT /ALL DONE?
JMP .-3 /NOPE
JMP I DNAME /YEP. ALL DONE.
/
/
/
DOK, JMS I DNPAST /PUSH PAST PRESENT NAME.
TAD I AUTO1 /GET FIRST WORD OF NEW NAME.
CIA
TAD FNAME /A MATCH?
SZA CLA
JMP DNOT /NO. TRY NEXT
TAD I AUTO1 /AND SO ON DOWN UNTIL IT FAILS OR A MATCH IS MADE.
CIA
TAD FNAME+1
SZA CLA
JMP DNOT
TAD I AUTO1
CIA
TAD FNAME+2
SZA CLA
JMP DNOT
TAD I AUTO1
CIA
TAD FNAME+3
SZA CLA
JMP DNOT
JMS I DNBACK /A MATCH SET AUTO1 AND EXIT.
JMP I DNAME
/
/
DNOT, ISZ COUNT /FINISHED CHECKING ALL?
JMP DOK /NO. MORE TO GO.
ISZ DNAME /NOT THERE. PUSH BACK EXIT LOCATION
JMP I DNAME /AND EXIT.
/
/
/
/
/
DDBACK, DBACK /POINTER TO BACKSPACE ROUTINE
DNBACK=DDBACK /A SLIGHT OVERSIGHT.
DNPOINT, DPOINT /POINTER TO BUFFERS
DNGLEN, DGLEN /GET NUMBER OF ENTRIES ROUTINE
DNPAST, DPAST /ADVANCE POINTER TO NEXT NAME ROUTINE
/
/
/
/
/
NODIS, 0 /THIS ROUTINE DISPLAYS A "NO"
DISPLAY /ISSUE DISPLAY COMMAND
NONODI /MY OUTPUT CRAP
JMP .-2 /HANG AROUND UNTIL A ^D OR ^P IS TYPED.
/
NONODI, LEFT+340 /ABOUT CENTER OF THE SCREEN
BOTTOM+340
TEXT "FNO\" /A SIMPLE MESSAGE.
/
/
/
REPDIS, 0
PUSH /STORE AWAY FBLOCK
DECODE /GET A LINE
DISREP /REPLACE MESSAGE
TAD FTYPE /GET REPLY
TAD M322 /IS IT AN "R"
SZA CLA
JMP REPDIS+2 /NOPE. TRY AGAIN.
POP /RESTORE FBLOCK
JMP I REPDIS /AND RETURN.
/
/
DISREP, LEFT+200 /ABOUT THE CENTER
TOP-200 /GOOD ENOUGH
TEXT "FREPLACE?
HR --- REPLACE\"
/
/
/
/
/
/
/
/
/
/
/
/
EJECT
/
/
/
/
/ COPY ROUTINE:
/ OVERLAPS IN 3200 FROM PREVIOUS PAGE.
/
/
/
/
/
/ GENERAL CALL:
/
/
/ COPY
/
/
/
/ COPIES FSIZE BLOCKS FROM INUNIT,INBLOCK
/ TO OUTUNIT,OUTBLOCK
/ AND TO MORE UNITS DEPENDING ON THE VALUE OF "OUTNUM".
/ OUTNUM SHOULD BE 7777 FOR 1 TAPE COPY.
/
/
/
/
/
CCOPY, 0 /MAIN ENTRY
TAD INUNIT /GET INPUT UNIT
DCA CINU /AND PLACE IN READ CALL
TAD INBLOCK /GET INPUT STARTING BLOCK
DCA CINB /AND STORE IN READ BLCOK
TAD OUTBLOCK /GET THE OUTPUT STARTING BLOCK
DCA COUTB /AND LEAVE THAT IN WRITE
TAD FSIZE /GET THE NUMBER OF BLOCKS TO COPY
DCA CSIZE /AND STORE THAT AWAY.
/
CPLOOP, TAD OUTUNIT /GET THE ORIGINAL OUTPUT UNIT.
DCA COUTU /AND PLACE I N WIRTE OUT UNIT.
TAD OUTNUM /GET NUMBER OF UNITS ITS GOING TO
DCA CCOUNT /PLACE IN TEMPORARY COUNTER.
TAD CSIZE /GET NUMBER OF BLOCKS LEFT.
SNA /ALL DONE???
JMP I CCOPY /YES
CLL CML CMA IAC /13 BIT NEGATE.
TAD BNUM /NUMBER OF BUFFERS AVAILABLE.
SNL SZA CLA /MORE TO GO THEN BUFFERS ALOLOW?
JMP CSMALL /NO. BUFFERS BIGGER.
TAD BNUM /GET BUFFER SIZE.
DCA CINS /STASH IN READ.
TAD BNUM
DCA COUTS /STASH IN WRITE.
JMP CCOM /GO DO READ-WRITE
/
CSMALL, TAD CSIZE /GET NUMBER LEFT.
DCA CINS /STASH IN INPUT SIZE.
TAD CSIZE
DCA COUTS /AND OUTPUT SIZE.
/
CCOM, READ /READ IN CORECT NUMBER OF BLOCKS.
CINU, 0 /INPUT UNIT.
BUFFER /POINTER TO BUFFERS.
CINS, 0 /NUMBER OF RECORDS TO BE READ IN.
CINB, 0 /STARTING BLOCK NOW OF READ.
CCMORE, WRITE /NOW WRITE IT OUT.
COUTU, 0 /OUTPUT UNIT
BUFFER /BUFFER POINTER
COUTS, 0 /NUMBER OF RECORDS.
COUTB, 0 /0STARTING RECORD NUMBER.
ISZ COUTU /BOP UP TO NEXT OUTPUT UNIT
ISZ CCOUNT /MORE UNITS TO WRITE ON??
JMP CCMORE /YEP. GO BACK AND WRITE ON NEXT.
/
/
/
TAD CINS /GET THE INPUT SIZE
TAD CINB /ADD THE BLOCK NUMBER
DCA CINB /AND UPDATE BLOCK NUMBER.
TAD COUTS /GET THE OUTPUT SIZE.
TAD COUTB /ADD THE COUTPUT SIZE.
DCA COUTB /AND UPDATE IT.
TAD CINS /GET THE NUMBER OF RECORDS JUST TRANSFERRED.
CIA /AND SUBTRACT IT FROM
TAD CSIZE /THE TOTAL TRANSFERR
DCA CSIZE /AND STORE AWAY.
JMP CPLOOP /GO BACK AND DO SOME MORE.
/
/
/
/
CSIZE, 0 /CURENT NUMBER OF BLOCKS GOING.
CCOUNT, 0 /TEMPORAY COUNTER FOR THE UNITS.
/
/
/
LLEDER, 0 /GENERATES LEADER OR TRAILER
TAD M212 /ABOUT 130 CHARACTERS OF LEADER
DCA COUNT
TAD L200
AUXOUT /PUT OUT LEADER
ISZ COUNT /ALL DONE?
JMP .-3 /NOPE, DO MORE.
JMP I LLEDER /ALL DONE. EXIT
/
/
/
HHPUSH, 0 /HIGH FBLOCK SAVE.
MOVE /MOVE FBLOCK TO A SAFE PLACE
FSIZE
HHTEMP
FNAME+3-FSIZE+1
JMP I HHPUSH
/
/
HHPOP, 0 /RESTORES FBLOCK FROM HIGH PLACE
MOVE
HHTEMP
FSIZE
FNAME+3-FSIZE+1
JMP I HHPOP
/
/
HHTEMP, 0/HIGH SAVE AREA
*HHTEMP+FNAME+3-FSIZE /KEAVE ROOM FOR FBLOCK
0000 /LAST WORD OF SAVE AREA.
/
/
/
/
TTAPE, 0 /SETS UP TO USE TAPE LIMITS FOR DIRECTORY LOOKUP.
MOVE /MOVE IN CORRECT POINTERS
TTTSET
INDEX
CUPPER-INDEX+1
TAD FUNIT /GET THE UNIT
AND L7 /SET UP FOR LINC TAPE
DCA FUNIT
MONE /SET FOR 1 COPY
DCA OUTNUM
JMP I TTAPE /AND RETURN
/
/
TTTSET, TINDEX /START OF TAPE INDEX BLOCK
TILEN /LENGTH OF TAPE INDEX
TLOWER /LOWEST BLOCK NUBMER ON DEVICE
TUPPER /HIGHEST BLOCK NUMBER ON THE DEVICE
TSYSLOWER /LOWER LIMIT OF SYSTEM
TSYSUPPER /LAST BLOCK USED BY SYSTEM
/
/
/
/
TTYPUT, 0 /TTY OUTPUT ROUTINE
DCA TTAPE /STASH AWAY WHILE DOING CHECK.
CHECKIO /TEST FOR MAYBE A CONTROL Z
6041 /IS IT FREE?
JMP .-2 /NOPE. CHECK AGAIN.
TAD TTAPE /GET IT AGAIN.
6046 /YEP. GOOD BYE.
CLA
JMP I TTYPUT /THATS ALL
/
/
/
/
/
/
/
/
EJECT
/
/
/
/
/
/ END OF P I P 2.
/
/
/
/
/ SAVE THE SYMBOLS FOR P I P 3.
/
/
/
/
/
/
/
/
SAVSYM 2
/
/
/
/
/
/
EJECT
PMODE
EJECT
/
/
/
/
/
/
/ THIS IS THE THIRD PART OF PIP. IT S CALLED:
/
/
/
/
/ P I P 3
/
/
/
/
/
/
LODSYM /RECALL SYMBOLS FROM OTHER PIPS.
/
/
/
/
/
EJECT
*3400
/
/
/ B I N A R Y H A N D L E R
/
/
/
BINARY, DECODE /GET THE CORRECT INPUT DEVICE.
BININP /WHILE DISPLAYING INPUT MESSAGE.
MTWO /SET BFIELD TO DO A NEW ONE.
DCA BOFIELD
DCA ORIGIN /SET ORIGIN TO ZERO
DCA BOLDP /SET BASE TO ZERO
DCA BFIELD /SET FIELD TO ZERO
DCA BOLDO /SET OLD ORIGIN TO ZERO
DCA BCOUNT /SET SIZE TO ZERO
DCA BFLAG1 /CLEAR THE INPUT AND OUTPUT DEVICE FLAGS.
DCA BFLAG2
SEARCH /CHECK IF A LEGAL OPTION WAS GIVEN
BINLST
BINGO /AND IF IT WAS, GO TO CORRECT PLACE.
JMP BINARY /NOT A LEGAL DEVICE.
/
/
/
/
BHIGH, ISZ BFLAG1 /SET FLAG TOREADER
BTTY, ISZ BFLAG1 /SET FLAG TO LOW READER. MORE DEVICE MAY COME
/ BEFORE THE HIGH READER/
TAD FNAME /TEST TO SEE IF MODE GIVEN
CMA
SNA CLA
JMP BPART2 /NO LETTERS. NOO AUTO START.
TAD FNAME /GET LEFT CHARACTER OF NAME.
AND L7700 /ONLY P OR L NEEDED
DCA FTYPE /AND STASH AWAY
SEARCH /CHECK FOR P OR L
BGOLST
BSTGO
JMP BINARY /ILLEGAL
/
/
BPODE, TAD FSIZE /GET STARTING ADDRESS
SNA /ONE GIVEN?
TAD L200 /NOPE. SET IT TO 200.
DCA FSIZE /AND STASH AWAY.
PTWO /GET A "PDP" INSTRUCTION INTHE AC
JMP BSCOMM /AND STORE AWAY.
/
BLODE, TAD FSIZE /GET THE STARTING ADDRESS.
SNA /ONE GIVEN?
TAD L4020 /NO. ASSUME 4020
DCA FSIZE /SAVE BACK STARTING ADDRESS.
TAD L6000 /GET .NOT. 10 BIT MASK IN AC.
CMA /MKAE IT A GOOD 10 BIT AN D MASK
AND FSIZE /JUST 10 BITS.
TAD L6000 /NOW MAKE IT A GOOD JMP IN LMODE INSTRUCTION.
/ I NEEDED A PAGE 0 LOCATION, SO I DID IT THAT WAY
/
BSCOMM, DCA I BBOOT+1
TAD FSIZE /GET STARTING ADDRESS
DCA I BBOOT+3 /PLACE AWAY IN HEADER.
MONE /GET A JMP I 7777 IN AC.
TAD L6000 /OR 5777 AS THE WORLD KNOWS AND LOVES IT.
DCA I BBOOT+2 /AND PLACE AWAY.
TAD FUNIT /GET THE FIELD
AND L7 /MAKE IT REASONABLE
CLL RTL /SHIFT TO CORRECT PLACES.
TAD L200
TAD L400 /SAVE A PAGE 0 LITTERAL
DCA FUNIT /PLACE BACK
TAD FSIZE /GET STARTING ADDRESS.
AND L6000 /JUST LMODE FIELD BITS.
CLL RTL
RAL /INTO CORRECT POSITION.
TAD FUNIT /ADD BACK IN CORRECT "LIF"
DCA I BBOOT /AND SAVE AWAY.
JMP BPART2 /GO TO COMMON.
/
/
/
ASMIFZ RF08 /DISK THERE?
ASMSKP 2 /NOPE. DON T ASSEMBLE THE FOLLOWING IN.
BLRF8, DISC /SET UP DISK INPUT
SKP /SKP OVER TAPE SETUP.
BLT, TAPE /SET UP TAPE OPERATION.
PTWO /TELL DIRECTORY LOOKUP ITS BIANRY
DCA FTYPE /FTYPE=2 MEANS A BINARY FILE.
PONE
DCA FWHAT /SET INPUT SWITCH
DIRECT /GO DO IT.
/
BPART2, HPUSH /PUSH DOWN THE FBLOCK REGION.
DECODE /GET THE OUTPUT DEVICE
BINOUT /BINARY OUTPUT DISPLAY CMESSAGE
SEARCH /CHECK NAEM FOR LEGAL OPTION
BINLST /SAME INPUT AS OUTPUT FORR NOW
BINGO2 /JMP LIST
JMP BPART2+1 /NOT A LEGAL REQUEST.
/
/
BHIGH2, ISZ BFLAG2 /SET THE OUTPUT FLAG
BTTY2, ISZ BFLAG2 /FOR THE CORRECT DEVICE
ASMIFZ RF08 /DISK THERE????
ASMSKP 2 /NOPE. NO DISK CODE NOW.
BLRF82, DISC /SET FOR DISC NOW
SKP
BLT2, TAPE /SET FOR LINC TAPE, NOT DISC
PUSH /SAVE FBLOCK IN LOW SAVE AREA.
PTWO /SET BINARY MODE AGAIN.
DCA FTYPE /IN CASE OF COPY
MONE /IS IT A MASS STORAGE DEVICE OPERATION
TAD BFLAG1
TAD BFLAG2 /IF NEGATIVE IT IS.
SPA CLA /THE TEST!
FILEC /YEP. COPY CHOSEN FILES.
TAD BFLAG2 /GET OUTPUT FLAG
SZA CLA /TAPE OUTPUT?
LEADER /NO. PUNCH LEADER.
TAD BFLAG1 /IS IT LINC TAPE INPUT???
SNA CLA
JMP I BBTAPE /YEP. GO TO LINC TAPE ROUTINE
JMP I BLODYR /NOPE. USE STANDARD BINARY LOADER.
/
/
/
/
BBTAPE, BINTAP
BLODYR, BNFILE
L4020, 4020 /NORMAL STARTING ADDRESS IN LINC MODE.
/
BBOOT, BUFFER+400 /HEADER BLOCK SELF STARTING POINTERS.
BUFFER+401
BUFFER+402
BUFFER+403
/
BGOLST, 1400 /L*100
6000 /P*100+4000
/
BSTGO, BLODE
BPODE
/
/
/
/
/
/
/
/
ASMIFN CARD-1 /DO WE WANT CARD READER CRAP LOADERED????
ASMSKP 30 /GUESS NOT. DON T ASSEMBLE THEM.
/
/
CRDLTT, 0 /CARD READER CHECKER AND INITIALIZER.
TAD FTYPE /GET THE REPLY .
TAD CRM303 /IS IT A "C"
SZA CLA /?
JMP I CRDLTT /NOPE. RETURN TO CHECK MORE.
TAD FUNIT /YEP. GET THE STARTING COLUMN
DCA BOLDO /AND STASH AWAY.
TAD FSIZE /AND GET THE LAST COLUMN
DCA DATA /AND STORE IT AWAY.
JMS I CRINIT /ITIALIZE CARD READER.
ISZ BFLAG1 /PREPARE TO SET THE INPUT FLAG TO 3
JMP I .+1 /NOW ADD TWO TO THE INPUT FLAG
ASCH1 /HIGH SPEED READER=2
/
CRM303, -303 /A - "C"
CRINIT, CDINIT /POINTE TO CARD READER INITIALIZE ROUTINE.
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
EJECT
/
*3600
/ MORE BINARY LOADER ROUTINES AND CRAP.
/
/
/
/
BNFILE, 6016 /NON FILE ORIENTED ROUUTINES.
6032 /INITIATE AND CLEAR ALL POSSIBLE DEVICES.
DCA BFIELD /SET FIELD TO ZERO.
DCA BFEILD /AND SET NEXT FIELD TO ZERO ALSO.
JMS BEGG /GET A CHARACTER
JMP .-1 /LEADER-TRAILER. IGNORE IT.
/
BGO, DCA BCHECK /UPDATE CHECKSUM
TAD BCHAR /GET THE CHARACTER
DCA BWORD1 /STORE AWAY
AUXIN /LOOKUP FOR NEXT CHAR
DCA BWORD2 /AND SAVE
JMS BEGG /LOOK AHEAD ONE NOW.
JMP BEND /TRAILER FOUND. CHECK CHECKSUM.
JMS BASSEM /ASSEMBLE A WORD
SNL /ORIGIN?
JMP BBBPUT /NO. PLACE IN DATA WORD
DCA ORIGIN /YES. STORE IN ORIGIN.
BCHEX, TAD BFEILD /GET THE NEXT FIELD
DCA BFIELD /AND STORE IT IN THE PRESENT FIELD FOR NEXT TIME
TAD BWORD1
TAD BWORD2
TAD BCHECK /UPDATE CHECKSUM
JMP BGO /AND GO GET NEXT WORD.
/
BBBPUT, DCA DATA /PLACE IN DATA FOR OUTPUT ROUTINE TO USE.
PUTWORD /GO OUTPUT IT.
ISZ ORIGIN /GO TO NEXT LOC.
M200, -200 /NOP IN CASE OF SKIP
JMP BCHEX /AND UPDATE CHECKSUM
/
BASSEM, 0
TAD BWORD1 /GET THE FIRST WORD
CLL RTL
RTL
RTL /NOW PLACE IN SECOND PART
TAD BWORD2
JMP I BASSEM /NOW EXIT
/
BEGG, 0 /GETS AND CHECKS A CHARACTER FROM GIVEN SEQUENTIAL DEVICE.
DCA TEMP4 /SET SWITCH
AUXIN /GET A CHARACTER.
TAD M377 /CHECK FOR RUBOUT
SZA CLA /?
JMP .+4 /NO RUBOUT
ISZ TEMP4 /YES. COMPLEMENT SWITCH
CMA
JMP BEGG+1 /GO BACK AGAIN.
TAD TEMP4 /SWITCH SET?
SZA CLA
JMP BEGG+2 /YEP. STILL IN RUBOUTS
TAD BCHAR /GET THE CHAR
AND L700 /HIGH ORDER BITS ON?
TAD M200 /GET TYPE
SPA /IS IT JUST LEADER
ISZ BEGG /NO HIGH ORDER BITS ON.
SPA SNA CLA /TEST NOW FOR ORIGIN AN D LEADER-TRAILER
JMP I BEGG /DATA,ORIGIN, OR LEADER TRAILER
TAD BCHAR /FIELD CHARACTER
AND L70 /JUST GET FIELD
DCA BFEILD /SAVE IN NEXT FIELD
TAD BFEILD /GET BACK
TAD M20 /MORE TEHN 8 K?
SMA CLA
NO /YEP. TOOOO BBBIIGGG!!!
JMP BEGG+2
/
/
BEND, JMS BASSEM
CIA
TAD BCHECK /CHECK CHECKSUM
SZA CLA /GOOD?
JMP I BCERR /GIVE CHECKSUM MESSAGE. IT BAD
JMS I PMORE /ASK IF ANY MORE TAPES?
JMP BNFILE
MONE /CLOSE THE OUTPUT FILE
DCA BFIELD
PUTWORD /SEND T O BLAHS.
PIP /RETURN TO PIP
/
/
/
/
/
SEQIN, 0 /SEQ INPUT UNIT.
CHECKIO /CHECKIO AND LEAVE AC 0
DCA CNTRLZ /CLEAR THE CONTROLZ FLAG
TAD BFLAG1 /GET INPUT FLAG.
TAD L7777 /SUBTRACT1
SNA CLA
JMP SEQTTY
SEQTST, GETL /TEST LOW READER FOR A CHAR
JMP SEQN1
TAD M232
SNA
ISZ CNTRLZ
SNA CLA
JMP I SEQIN /EXIT
/
SEQN1, ASMIFN CARD-1 /DO WE WANT CARD READER CHECK LOADED?????
ASMSKP 5 /NOPE. DONT ASSEMBLE THEM IN
/
JMS I SEQCIN /CHECK FOR CARD READER AND GET CHAR.
JMP SEQTST /CHAR NOT READY YET.
JMP SEQCOM /CHAR READY.
/
/
6011 /DEVICE IS HIGH SPEED READER. FLAG READY???
JMP SEQTST /GO INTO BIG WAIT LOOP
6016
JMP SEQCOM
SEQTTY,GETL /GET A CHARACTER
JMP .-1 /WAIT FOR IT
SEQCOM, DCA BCHAR /STASH AWAY
TAD BCHAR
TAD M232
SNA CLA
ISZ CNTRLZ
TAD BCHAR
JMP I SEQIN
/
/
/
SEQOUT, 0 /SEQUNETIAL OUTPUT BLOP.
DCA SEQIN /SAVE THE CHAR
CHECKIO /CHECKIO
TAD BFLAG2 /GET THE OTPUT FLAG
TAD L7777
SZA CLA
JMP SEQO2 /HIGH PUNCH OUTPUT
TAD SEQIN
PUTL
JMP I SEQOUT /OUT IT GOES.
/
SEQO2, ASMIFZ CARD-1 /DO WE CHECK FOR LINE PRINTER???
JMS I SEQLP /YEP. GO CHECK
/
CHECKIO /LINE PRINTER ISN T THE ONE.
6021 /WAIT FOR OK.
JMP .-2 /WAIT TILL DONE.
TAD SEQIN /GET THE CHAR.
6026 /SEND IT OUT
SEQEXT, CLA /CLEAR THE AC.
JMP I SEQOUT /ALL DONE.
/
/
/
/
BCHECK, 0
BFEILD, 0
M232, -232
L70, 70
BCERR, CERR
/
/
/
/
ASMIFN CARD-1 /CARD READER AND LINE PRINTER THERE????
ASMSKP 3 /NOPE. DONT ASSEMBLE IN POINTERS.
/
SEQCIN, CDREAD /POINTER TO CARD READER ROUTINE.
SEQLP, LPTEST /POINTER TO LINE PRINTER ROUTINE.
/
/
/
/
/
/
EJECT
/
/
*4000
/
/
/ MORE OF THE BINARY ROUTINES.
/
/
/
/
0000 /FIRST 3 LOCATION ARE RESERVED FOR A REGISTESR IN LMODE
0000
0000
/
/
/
/
BINTAP, HPOP /INPUT FROM LINC TAPE.
TAD FUNIT /GET THE UNIT
DCA .+4 /SET UP CONTROL BLOCK READ
TAD FBNUM /GET THE STARTING BLOCK NUMBER
DCA .+5 /GET BLOCK NUMBER
READ /READ IN HEADER BLOCK
0 /PLACED IN UNIT
BUFFER+400 /READ HEADER BLOCK IN SECOND BLOCK OF BUFFER.
1 /1 RECOOD
0 /CORECT BLOCK NUMBER
HPOP /ZAP IN FBLOCK AGAIN
ISZ FBNUM /MOVE PAST HEADER BLOCK
JMS I BSETI /SET UP WORD GETTER.
TAD M40 /SET UP NUMBER OF 400 WORD BLOCKS TO CHECK
DCA BTEMP1 /AND STASH AWAY.
TAD BMTAB /GET START OF MEMORY MAP CONFIG.
DCA BTEMP2 /AND PLACE AWAY.
/
BEILOP, TAD M400 /400 WORDS PER RECORD
DCA BTEMP3 /SET UP COUNT
TAD BTEMP1 /GET THE BLOCK NUMBER
TAD L40 /GET BETWEEN 0-37
CLL RTR
RTR
RAR /MOVE INTO 7400 POSITION
DCA ORIGIN /SET UP INITIAL ORIGIN.
RTL
RTL /MOVE LINC TO FIELD POSITION.
DCA BFIELD /AND PLACE IN BFIELD.
BETLP2, TAD I BTEMP2 /IS THIS BLOCK USED.
SNA CLA /?
JMP BEOUT /NOPE. WANDER DOWN.
JMS I BGETI /GET A WORD FROM TAPE/
DCA DATA /PLACE IN DATA WORD.
PUTWORD /SEND IT DOWN THE LINE.
BEOUT, ISZ ORIGIN /BOP UP ORIGIN.
NOP
ISZ BTEMP3 /BOP UP 400 COUNTER
JMP BETLP2 /NOT YET DONE. DO ANOTHER.
ISZ BTEMP2 /BOP UP MAP POINTER
NOP /IT REALLY CAN SKIP(I FOUND OUT THE HARD WAY)
ISZ BTEMP1 /BOP UP BIGCOUNT POINTER
JMP BEILOP /GO BACK AND GET NEXT FIELD AND ORIGIN.
MONE /ALL DONE.
DCA BFIELD /PLACE AN "EOF" ON BFIELD
PUTWORD /END OF FILE CODE WORD.
PIP /RETURN TO PIP
/
/
/
/
BTAPE, 0 /MAIN TAPE OUTPUTER.
TAD BFIELD /LAST TIME THROUGH?
IAC
SNA CLA /?
JMP I BTEND /YEP. CLOSE FILE.
TAD BFIELD /GET THE FIELD
CIA
TAD BOFIELD /SAME AS LAST ONE?
SZA CLA
JMP BIDIFF /NOPE. SET TO CHANGE BANKS.
TAD ORIGIN /GET THE ORIGIN
AND L7400 /JUST HIGH BITS.
CIA /
TAD BOLDO /ADD IN LAST ORIGIN
SZA CLA /SAME 400 WORD BANK??
JMP BIDIFF /NOPE.. CHANGE BANKS.
/
BINTRY, TAD ORIGIN /GET THE ORIGIN
AND L377 /GET IN 400 WORD BANK POSIITION
TAD BPOINT /GET START OF BUFFER LOCATION.
DCA TEMP /STORE AWAY
TAD DATA /GET THE DATA WORD
DCA I TEMP /NOW PLACE IN BUFFER
TAD ORIGIN /GET ORIGIN
AND L7400 /GET JUST BANK NUMBER
DCA BOLDO /STASH AWAY.
TAD BFIELD /RESET THE FIELD TOO
DCA BOFIELD /AND AWAY IT GOES.
JMP I BTAPE /GO BACK AND GET ANOTHER WORD.
/
/
BIDIFF, TAD ORIGIN /GET THE ORIGIN
RTL
RTL
AND L7 /MUST MAKE IT BITS 8-11
TAD BFIELD /PUT IN FIELD BIT NOW!
RAL /AND ROTATE IN REST OF CRAP.
SPA /IS IT FIRST TIME THRU?
JMP BINTRY /YEP. DON T DUMP BUFFERS.
DCA BTEMP1 /STASH AWAY/
JMS BIDUMP /DUMP PRESENT BUFFERS.
TAD BTEMP1 /REGET NEW POSITION
DCA BOLDP /AND PLACE I N OLD PLACE
TAD BTEMP1 /GET PLACE AGAIN
TAD BMTAB /START OF POSITION THING
DCA BTEMP2 /CORE MAP
TAD I BTEMP2 /GET REFERNCE WORD
SNA CLA /IS IT TAKEN?
ISZ BCOUNT /NOPE. ANOTHER RECORD TO WRITE OUT LATTER ON.
MONE /MEANWHILE....
DCA I BTEMP2 /TELL SYSTEM IT S TAKEN NOW.
TAD BTEMP1 /REGET BASE POINTER
TAD BMBASE /ADD IN STARTING BLOCK NUMBE
DCA .+5 /READ IN NEW CORE IMAGE FOR OVERLAYING.
READ /READ IT IN
DSYS1, SYSBIN /FROM SYSTEM BINARY UNIT.
BUFFER /THIS IS THE GENERAL CORE WORKING AREA FOR THE BINARY.
1
0 /RECORD NUMBER GOES HERE.
JMP BINTRY /RETURN TO MAIN PUTTER.
/
/
/
BIDUMP, 0 /DUMPS THE PRESENT BUFFER INTO THE CORRECT POSITION.
TAD BOLDP /GET OLD POINTER
TAD BMBASE /ADD IN THE RECORD NUMBER BASE.
DCA .+5 /SAVE AWAY.
WRITE /WRITE IT OUT.
DSYS2, SYSBIN
BUFFER
1
0
JMP I BIDUMP /RETURN
/
/
/
/
/
BMBASE, SYSBBLOCK
L377, 377
BPOINT, BUFFER /BINARY CORE WORKING AREA
BMTAB, BUFFER+740 /LOADING MAP.
BTEND, BTENT
L40, 40
BSETI, SETI
BGETI, GETI
/
/
/
/
/
/
/
/
EJECT
*4200
/
/
/ MORE BINARY LOADER ROUTINES.
/
/
/
BTENT, JMS I BBDUMP /DUMP THE BUFFER
TAD BCOUNT /NUMBER OF RECORDS SAVED.
SNA /ANY AT ALL?
NO /NOPE.
DCA I BBOINT-1 /STASH IN HEADER BLOCK.
WRITE /WRITE OUT HEADER BLOCK NOW.
BSYS, SYSBIN
BUFFER+400
1
BBBHDR, SYSHDR /POSITION OF HEADER BLOCK ON SYSTEM.
/
DSYS3=BSYS
/
POP /BRING BACK FBLOCK FROM LOWER AREA NOW.
TAD BCOUNT /REGET THE LENGTH.
IAC /ADD 1 FOR HEADER BLOCK
DCA FSIZE /SAVE IN CORRECT PLACE.
PTWO /SET FOR OUTPUT FILE.
DCA FWHAT
PTWO /SET FOR BINARY FILE
DCA FTYPE
DIRECT /LOOKUP UP NAME AND ROOM.
HPUSH /STASH AWAY.
TAD FBNUM /GET THE STARTING BLOCK
DCA OUTBLOCK
TAD FUNIT /STASH IN UNIT TOO.
DCA OUTUNIT /SET UP OUTPUT UNIT.
TAD BSYS /GET INPUT UNIT
DCA INUNIT /SET UP INPUT UNIT
TAD BBBHDR /POINTER TO HEADER BLOCK
DCA INBLOCK /STASH IN INPUT BLOCK NUMBER
PONE /SET THE SIZE TO 1 BLOCK
DCA FSIZE
COPY /COPY THE HEADER BLOCK TO THE CORRECT LOCATION ON TAPE.
TAD BBBASE /GET THE BINARY WORK AREA POINTER.
DCA INBLOCK /SET THE INPUT UP AGAIN.
MOVE /NOW MOVE THE HEADER BLOCK WHICH
BUFFER /WE JUST READ INTO BUFFER BY COPY
BUFFER+400 /BACK UP TO BUFFER+400 SO WE CAN USE THE HEADER
400 /BLOCK INFORMATION FOR THE COPYING OF THE BLOCKS.
TAD BBOINT /START OF MEMORY BLOCK CONFIG.
DCA BTEMP1 /SET UP OUTCHECKER
TAD M40 /SET UP TO LOOK AT 40 BLOCKS
DCA BTEMP3 /BTEMP3 IS OUR COUNTER NOW.
ISZ OUTBLOCK /SKIP PAST HEADER BLOCK
/
BELOOP, TAD I BTEMP1 /GET THE MOMORY USAGE WORD
SNA CLA /BLOCK USED?
JMP BEEND /NOPE. GO DOWN
PONE /SET TO MAKE A 1 BLOCK COPY
DCA FSIZE /BY PLACING A "1" IN FSIZE
COPY /YEP. COPY A BLOCK
ISZ OUTBLOCK /GO TO NEXT OUTBLOCK.
BEEND, ISZ INBLOCK /GO TO NEXT INPUT BLOCK
ISZ BTEMP1 /BOP MEMORY POINTER
NOP /THIS CAN SKIP IF BUFFER WAS SET TO 7000
ISZ BTEMP3 /HAVE WE FINISHED THE HEADER BLOCK?
JMP BELOOP /NOT .YET DONE.
PIP /ALL DOOE. RETURN TO PIP.
/
/
/
BBDUMP, BIDUMP
BBBASE, SYSBBLOCK
BUFFER+737 /POINTER TO HEADER BLOCK LENGTH. MUST BE AT BBOINT-1
BBOINT, BUFFER+740 /POINTS TO START OF CORE MAP IN HEADER BLOCK
/
/
/
/
/
BBOUT, 0
TAD BFLAG2 /MASS STORAGE OUTPUT???
SZA CLA
JMP .+3 /NO.
JMS I BBLT /YEP. GO DO IT.
JMP I BBOUT /AND RETURN.
PONE /IS THIS END OF INPUT???
TAD BFIELD /(BFIELD=7777?
SZA CLA
JMP BBBBBJ /NOT END. CHECK ORIGIN AND FIELD SETTINGS.%
TAD BCOUNT
RTR
RTR
RTR
AND L77
AUXOUT
TAD BCOUNT
AND L77
AUXOUT /OUTPUT CHECKSUM
LEADER
PIP /GIVE TRAILER AND RETURN TO PIP
/
BBBBBJ, TAD BFIELD /SEE IF IN SAME DATA FIELD AS BEFORE.
CIA
TAD BOFIELD /?
SNA CLA /?
JMP BBN1 /YEP. DON T OD A NEW FIELD
TAD BFIELD /GET THE FIELD
TAD L700 /PLACE ON TWO HIGH ORDER BITS.
AUXOUT /AND OUTPUT IT.
JMP BBNEWO /AND GO OUTPUT ORIGIN.
/
BBN1, TAD BOLDO /IS IS LOCATION+1?
CMA
TAD ORIGIN /SO THTA IT WOULD LOAD HERE ANYWAY.
SNA CLA
JMP BBN2 /NEXT LOC. DON T DO A NEW ORIGIN
BBNEWO, TAD ORIGIN /NEW ORG. OUTPUT IT ON SEQ. DEVICE
RTR
RTR
RTR /ROTATE RIGHT
AND L77 /JUST 6 BITS
TAD L100 /PLACE ON ORIGIN BIT
JMS BOADD /AND PUT OUT WITH A CHECKSUM
TAD ORIGIN /GET THE ORIGIN
AND L77 /JUST 6 BITS
JMS BOADD /AND OUTPUT IT TOO
/
BBN2, TAD ORIGIN /GET THE ORGIN
DCA BOLDO /AND SAVE IT AWAY.
TAD BFIELD /NOW RESET THE FILED TOO
DCA BOFIELD /AND STAS AWAY
TAD DATA /GET THE DATA
RTR
RTR
RTR
AND L77
JMS BOADD /AND PUT IT OUT
TAD DATA
AND L77 /NOW PUT IT OUT TOO
JMS BOADD
JMP I BBOUT /NOW EXIT
/
/
/
BOADD, 0
DCA TEMP3
TAD TEMP3
TAD BCOUNT
DCA BCOUNT /UPDATE BCOUNT
TAD TEMP3
AUXOUT /SEND IT ALONG
JMP I BOADD
/
L100, 100
BBLT, BTAPE
/
/
/
/
/
/
/
/
EJECT
/
/ COMMON ROUTINES USED BY BINARY AND ASCII HANDLERS.
/
/ THIS PAGE MAY OVERLAP OR UNDERLAP A LITTLE FROM THE PREVIOU PAGE.
/
/
/
/
/
/
/
/
/
/
/
BINLST, 310 /BINARY INPUT DEVICE LIST. "H"
314 /"L"
ASMIFN RF08 /DO WE WANT THE RF08 PRESENT
322 /YES. "R"
4324 /"T"
/
/
/
BINGO, BHIGH /HIGH SPEED READER
BLT /LINC TAPE
ASMIFN RF08 /DISK?
BLRF8 /YES. RF08
BTTY /TELETYPE.
/
/
/
BINGO2, BHIGH2
BLT2
ASMIFN RF08
BLRF82
BTTY2
/
/
/
/
/
/
/
/
/
/
MORE, 0 /DISPLAYS A "MORE" MESSAGE.
DECODE /DECODE A LINE
MMORE /THATS OUR MESSAGE
SEARCH /LLOK UP THE ANSWER
MAORN
MGOTO /JUMP TABLE
JMP MORE+1 /BAD REPLY.
MANDM1, ISZ MORE /NO MORE TAPES
MANDM2, JMP I MORE /EXIT.
/
/
MAORN, 301
316
4322
/
MGOTO, MANDM2
MANDM1
MANDM2
/
/
MMORE, LEFT+200
TOP-300
/
/
/
/
ASMIFN CARD /CARD MESSAGE
ASMSKP 10 /THERE. GIVE CARD MESSAGE
/
/
TEXT "FMORE TAPES?
HN --- NO MORE TAPES
HR --- READ ANOTHER TAPE\"
/
/
/
/
/
/
ASMIFZ CARD /CARD READER NOT THERE?
ASKSKP 10 /SKIP OVER MESSAGE
/
/
TEXT "FMORE INPUT?
HN --- NO MORE INPUT
HR --- READ MORE CARDS OR TAPES\"
/
/
/
/
/
/
/
/
/
/
/
/
/
CERR, DISPLAY /CHECKSUM ERROR DISPLAY.
CCERR /DISPLAY MESSAGE
JMP .-2 /HANG AROUND UNTIL A ^D OR ^P IS TYPED.
/
/
/
CCERR, LEFT+200
TOP-340
TEXT "FCHECKSUM ERROR\"
/
/
/
/
/
/
SETI, 0 /SETS UP GETI
MONE /BOP DOWN BY 1
TAD FBNUM /GET FIRST BLCOK NUMBER
DCA GEENUM /AND PLACE IN READ CALL.
TAD FUNIT /GET THE UNIT
DCA GUNIT /PLACE AWAY UNIT
MONE /SET THE SWITCH
DCA GCUNT /TO OVERFLOW FIRST TIME THROUGH
JMP I SETI /RETURN
/
/
/
/
/
GETI, 0 /GETS A CHARACTER FROM THE SYSTEM BUFFER.
CLA
ISZ GCUNT /IS BUFFER EXHAUSED?
JMP GOK /NOPE. GET NEXT.
TAD M400 /YEP. RESET COUNRTE FOR A NEW BLOCK.
DCA GCUNT /COUNTER RESET.
TAD GPLACE /GET START OF BUFFER
DCA GPLCE2 /STORE AWAY.
ISZ GEENUM /BOP UP TO NEXT REOCRD.
READ
GUNIT, 0 /AND READ IT IN.
GPLACE, BUFFER
1
GEENUM, 0
GOK, TAD I GPLCE2 /GET WORD FROM BUFFER
ISZ GPLCE2 /BOP UP POINTER
JMP I GETI /EXIT
/
GPLCE2, 0
GCUNT, 0 /GCOUNT ALREADY USED ELSEWHERE
/
/
/
/
/
/
/
/
/
/
/
/
/
ASMIFZ RF08 /RF08 THERE?
ASMSKP 15 /NOPE. DON'T ASSEMLE THIS CRAP.
/
/
ASUGO1, ASULP1 /TRANSFER TABLES FOR SYS AND UNIT COPIES
ASUTT1
ASUDD1
ASULP1
/
/
/
ASUGO2, ASULP2
ASUTT2
ASUDD2
ASULP2
/
/
/
/
/
/
/
/
/
/
/
NOSUCH, 0 /THIS ROUTINE DISPLAYS A DEVICE OVERFLOW MESSAGE
DISPLAY /DISPLAY THE "TOO MANY" MESSAGE
NOSMES /POINTER TO THE MESSAGE
JMP .-2 /HANG AROUND UNTIL A ^D OR ^P IS TYPED.
/
/
/
/
NOSMES, LEFT
TOP-340 /ABOUT THE CENTER OF THE SCREEN
TEXT "FTOO MANY UNITS SPECIFIED\"
/
/
/
/
/
/
/
/
/
/
/
/
BININP, LEFT+240
TOP-200
/
/
ASMIFN RF08!CARD /DO WE WANT STANDARD MESSAGE???
ASMSKP 12 /NOPE. DONT ASSEMBLE I.T IN...
/
/
TEXT "FINPUT DEVICE:
HH --- HIGH SPEED READER
HL --- LINC TAPE
HT --- TELETYPE\"
/
/
/
/
ASMIFZ RF08+1&CARD /DO WE WANT THE CARD READER BUT NO DISK?
ASMSKP 13 /YES. DONT ASSEMBLE THAT IN.
/
/
TEXT "FINPUT DEVICE:
C --- CARD READER
HH --- HIGH SPEED READER
L --- LINC TAPE
T --- TELETYPE\"
/
/
/
/
/
/
/
ASMIFZ CARD+1&RF08 /ASSEMBLE FOLLOWING MESSAGE IF DISK BUT NO CARD READER.
ASMSKP 13 /SKIP OVER IT.
/
/
TEXT "FINPUT DEVICE:
HH --- HIGH SPEED READER
L --- LINC TAPE
R --- RF08,RK08 DISK
T --- TELETYPE\"
/
/
/
/
/
/
/
ASMIFZ RF08&CARD /DO WE WANT BOTH DISK AND CARD?
ASMSKP 14 /NOPE. NOT THIS MESSAGE.
/
/
TEXT "FINPUT DEVICE:
C --- CARD READER
HH --- HIGH SPEED READER
L --- LINC TAPE
R --- RF08,RK08 DISK
T --- TELETYPE\"
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
BINOUT, LEFT+240
TOP-200
/
/
/
ASMIFN CARD!RF08 /DO WE WANT STANDARD OUTPUT DEVICES.
ASMSKP 12 /NOPE. DONT ASSEMBLE THEM IN.
/
/
TEXT "FOUTPUT DEVICE:
HH --- HIGH SPEED PUNCH
HL --- LINC TAPE
HT --- TELETYPE\"
/
/
/
/
ASMIFZ RF08+1&CARD /DO WE WANT THE LINE PRINTER ROUTINES LOADED??
ASMSKP 13 /DO NOT DISPLAY LINE PRINTER MESSAGES.
/
/
TEXT "FOUTPUT DEVICE:
HH --- HIGH SPEED PUNCH
L --- LINC TAPE
P --- LINE PRINTER
T --- TELETYPE\"
/
/
/
/
/
/
/
/
ASMIFZ CARD+1&RF08 /DO WE WANT DISK BUT NOT PRINTER?
ASMSKP 13 /NOPE. SKIP OVER MESSAGE.
/
/
TEXT "FOUTPUT DEVICE:
HH --- HIGH SPEED PUNCH
L --- LINC TAPE
R --- RF08,RK08 DISK
T --- TELETYPE\"
/
/
/
/
/
/
ASMIFZ CARD&RF08 /DO WE WANT BOTH PRINTER AND DISK?
ASKSKP 14 /NOPE. DONT ASSEMBLE IN THIS MESSAGE
/
/
TEXT "FOUTPUT DEVICE:
HH --- HIGH SPEED PUNCH
L --- LINC TAPE
P --- LINE PRINTER
R --- RF08,RK08 DISK
T --- TELETYPE\"
/
/
/
/
/
/
/
/
/
/
/
/
EJECT
/
/
/ THIS IS THE CONVERTER ROUTINE.
/ IT CONVERTS A SOURCE FILE FROM THE OLD TYPE(DOLLAR SIGN IS FILE TERMINATOR)
/ TO THE NEW FORMAT(00 IS THE FILE TERMINATOR).
/ IT IS CONDITIONAL ASSEMBLED IN BY SETTING THE
/ SWITCH "REMAKE" TO 1.
/ SINCE IN FUTURE VERSIONS THIS WON T BE NECESSARY, YOU WILL SET REMAKE TO 0.
/
/
/
/
/
/
/
/
/
/
ASMIFZ REMAKE /DO WE WANT TO ASSEMBLE CONVERTER??
ASMSKP 114 /NOPE. SKIP PAST THE CODE
/
/
/
/
/
KONVRT, DECODE /GET THE INPUT FILE.
ASCINP /DISPLAY SOURCE MESSAGE.
TAD FTYPE /GET THE REPLY
TAD M314 /IS IT AN L
SZA CLA
JMP KONVRT /NOPE. ASK AGAIN.
PONE /SET THE TYPE TO SOURCE
DCA FTYPE
PONE /AND THE SWITCH FOR "INPUT"
DCA FWHAT
DIRECT /AND LOOKUP UP NAME IN DIRECTORY.
TAD FSIZE /GET THE NUMBER OF BLOCKS.
DCA BTEMP3 /AND STASH AWAY.
TAD FBNUM /GET THE FIRST BLOCK
DCA KINB /SET UP THE READ.
TAD FBNUM
DCA KOUTB /AND ALSO THE REWRITE.
TAD FUNIT /GET THE UNIT
DCA KINU /AND SET UP THE
TAD FUNIT /READ AND WRITE UNITS
DCA KOUTU
MONE /SET THE SWITCH SO NO DOLLAR SIGN FOOND.
DCA BTEMP2 /AND STASH AWAY.
SKP /SKIP PAST DECEREMENTER.
KLOOP, MONE /SUBRACT ONE FROM NUMBER OF BLOCKS TO GO.
TAD BTEMP3 /THE NUMBER TO GO.
DCA BTEMP3
TAD BTEMP3 /NUM TO GO
AND BTEMP2 /ARE WE ALL DONE???
SNA CLA
PIP /YEP. RETURN TO PIP.
READ /NOPE. READ IN NEXT BLOCK.
KINU, 0 /INPUT UNIT
BUFFER
1 /1 RECORD
KINB, 0 /BLOCK NUMBER
ISZ KINB /FOR NEXT READ.
LINC
LMODE /GET OVER INTO A NICE MODE
LDF 3 /INTO BUFFER REGION
SET I 1 /SET 1 TO START OF INPUT
PMODE /GET OVER INTO 8 MODE FOR COMPARISONS.
ASMIFZ BUFFER-6000 /BUFFEE AT 6000?
BUFFER+1777 /YEP. DO FOLOLOWING TO GET COREECT ADDRESS
ASMIFN BUFFER-6000 /IS ITTNOT AT 6000??
BUFFER-1 /YEP. SET UP CORRECT POINTER NOW. LMODE
LMODE /GET BACK INTO LMODE ASSEMLBY.
SET I 2 /SET UP CHAR COUNT
-1000
KLOOP2, LDH I 1 /GET A CAR
SHD I /IS IT A
4444 /DOLLAR SIGN
CLR /YEP. CONVERT TO A 00
STH 1 /AND PLACE BACK IN BUFFER.
AZE I /YAS IT A DLOLAR SIGN???
STC BTEMP2 /YEP. END OF FILE NOW.
XSK I 2 /ALL DONE WITH THIS BUFFER?????
JMP KLOOP2 /NOPE. GET NEXT CHAR.
PDP /GET BACK INTO 8 MODE
PMODE
CLA /CLEAR HTE AC TO BE SURE.
WRITE /WRITE OUT CONVERTED BLOCK
KOUTU, 0
BUFFER
1
KOUTB, 0
ISZ KOUTB /BOP UP BUFFER POOINTER.
JMP KLOOP /AND GO BACK AND TRY NEXT ONE.
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
EJECT
/ SAVE THE SYMBOLS FOR P I P 4
/
/
/
/
/
/
SAVSYM 2
/
/
/
/
/
/
/
/
/
EJECT
PMODE
EJECT
/
/
/
/
/
/ P I P 4
/
/
/
/
/ THIS IS THE FOURTH PART OF PIP
/
/
/
/
/
/
/
/
/
/
LODSYM /RECALL OLD SAVED SYMBOLS.
/
/
/
/
/
/
/
/
/
/
/
/
/
EJECT
/
/
*5000
/
/
/
/
/
/ S O U R C E H A N D L E R
/
/
/
/
/
/
ASCINP=BININP /SAME DEFINITIONS AS BINARY(FOR NOW , ANYWAY)
ASCOUT=BINOUT
ASCLST=BINLST
ASCLTO=ASCLST
/
/
/
/
/
/
ASCII, DECODE /GET THE INPUT REQUEST NOW
ASCINP /DISPLAY THE POSSIBLE INPUT DEVICES.
DCA BFLAG1
DCA BFLAG2
DCA BCOUNT
DCA ORIGIN
DCA BFIELD
DCA BOLDP
DCA CNTRLZ /INITIALIE VARIOUS POINTERS AND COUNTS.
ASMIFZ CARD-1 /ASSEMBLE NEXT CHECK IF CARD READER DEISRED.
JMS I ACRCHK /SEE IF ITS A "C" FOR THE CARD READER
SEARCH /SEARCH THE LIST FOR A GOOD OPTION
ASCLST /LIST OF GOOD CHARS
ASCGO /WHERE TO GO FOR THEM
JMP ASCII /NO LEGAL REQUEST THERE.
/
/
ASMIFZ CARD-1 /ASSEMBLE IN CARD POINTER IF CARD READER DESIRED.
ACRCHK, CRDLTT /CARD READER POINTER.
/
/
ASCH1, ISZ BFLAG1 //SET FOR HIGH SPPEED READER
ASCT1, ISZ BFLAG1 /SET FO R TTY
JMP APART2 /GO AND GET OUTPUT
/
/
ASMIFZ RF08 /DO WE HAVE THE DISK?
ASMSKP 2 /NOPE. SKIP OVER DISK INSTRUCTIONS
ASRF8, DISC /SET UP FOR DISK OPERATION
SKP
ASCT, TAPE /SET FOR TAPE OPERATION
PONE /SET TO INPUT AND SOURCE
DCA FWHAT
PONE
DCA FTYPE
DIRECT /LOOKUP UP NAME NOW.
HPUSH /AND SAVE IT AWAY
/
APART2, DECODE /GET THE OUTPUT DEVICE
ASCOUT
SEARCH /LOOKUP UP REPLY
ASCLTO
ASCGO2 /GO TO WHERE IT POINTS
ASMIFZ CARD-1 /IS LINE PRINTER THERE????
JMS I ASCLPT /CHECK IF "P" TYPED AND INITIALIZE LINEPRINTER.
JMP APART2 /N OT A GOOD REPLY
/
/
ASMIFZ CARD-1 /ASSEMBLE IN PRINTER POINTER?
ASCLPT, LPT2 /POINTER TO CHECKER AND INITIALIZER.
/
/
ASCH2, ISZ BFLAG2 /SET TO HIGH OUTPUT
ASCT2, ISZ BFLAG2 /SET TO TTY OUTPUT
/
ASMIFZ RF08 /DO WE HAVE THE DISK ROUTINES?
ASMSKP 2 /NOPE. SKIP NEXT TWO INSTRUCTIONS.
ASRF82, DISC /SET UP FOR DISK OPERATION
SKP
ASCTT, TAPE /SET FOR A TAPE OPERATION, SHOULD THERE BE ONE.
PONE
DCA FTYPE /SET FOR SOURCE MODD.
MONE
TAD BFLAG1
TAD BFLAG2 /IS IT MASS STORAGE TO MASS STORAGE.
SPA CLA /????
FILEC /YEP. DO TRANSFER NOW.
6016 /INITIALIZE HIGH READER.
6032 /CLEAR TTY AND AC. ALSO ANY OTHER DEVICES RIGH NOW.
PUSH /SAVE OUTPUT FILE INFORMATION
HPOP /BRING IN INPUT FILE INFORMATION
JMS I ASETI /SET UP SEQUENTIAL TAPE INPUT
TAD BFLAG2 /ARE WE GOING TO TAPE
SZA CLA
LEADER /NO. WE BETTER GENERATE SOME LEADER NOW.
/
/
/
/
ALOOP, TAD BFLAG1 /GET THE INPUT DEVICE POINTER.
SZA CLA /FROM A FILE?
JMP .+3 /NOPE.
JMS I AAGET /YEP. GET A CHAR NOW
SKP /SKP OVER BELOW GET.
AUXIN /IF NOT FROM A FILE, GET THE CHAR NOW. AND L177
AND L177 /MAKE INTO A GOOD ASCII CHARACTER.
TAD L200 /WITH PARITY BIT ON.
DCA FTYPE /AND STORE AWAY.
TAD CNTRLZ /WAS A CONTROL Z TYPED?
SZA CLA
JMP AEND /YEP. DO END
SEARCH /SEARCH FOR POSIBLE SPECIAL CHARACTERS.
AC1
AG1
JMS I AALIMC /CHECK TO SEE IF IT S IN 240-337 LIMITS.
JMP ABAD / IT ISN.T IGNORE IT.
/
AOK, JMS APUTIT /CHAR OK AS IS. OUTPUTTIT.
JMP ALOOP /GO BACK AND GET ANOTHER ONE.
/
/
ABAD, JMP ALOOP /BAD CHAR. GET NEXT ONE
/
/
/
AEND, TAD BFLAG1 /IS IT MASS INPUT?
SNA CLA
JMP AEND2 /YEP. IGNORE STANDARD PAPER TAPE CRAP.
JMS I PMORE /ASK FOR MORE TAPES??
JMP ALOOP /HE S GOT ANOTHER TAPE.
AEND2, JMS ACRR /PLACE A CR IN THE BUFFER.
TAD AABLAH /GETE THE EOT-Z CHAR
DCA FTYPE /AND PLACE IN THE BUFFER JMS APUTIT
JMS APUTIT /PLACE IT OUT THERE
MONE /IF LASS STOREAGE IT NEVER RETURNS TO HERE
DCA FTYPE /PLACE A RUBOUT ON BUS
JMS APUTIT /AND SEND IT OUT
JMS ACRR /DO ANOTHER CARRIGE RETURN.
LEADER /THEN GENERATE TRAILER
PIP /AND FINALLY GO BACK TO PIP
/
/
/
/
ACR, JMS ACRR /COMES HERE IF A CR ENCOUNTERED. JMP ALOOP
JMP ALOOP /GET NEXT CHAR
/
/
ACRR, 0 /GENERATES A CR,LF,RUBOUT
TAD AC1 /215
DCA FTYPE
JMS APUTIT /OUT GOES THE C R
TAD M212
CIA
DCA FTYPE
JMS APUTIT /OUT GOES THE L F
MONE
DCA FTYPE
JMS APUTIT /OUT GOES THE RUBOUT
JMP I ACRR /RETURN
/
/
/
APUTIT, 0 /SENDS A CHAR ALONG CORRECTLY
TAD BFLAG2 /WHERES IT GOING?
SZA CLA
JMP .+3 /TO THE SEQUENTIAL DEVICE
JMS I AAAPUT /PLACE IN MASS BUFFER.
JMP I APUTIT /AND RETURN
TAD FTYPE /GET THE CHAR
AUXOUT /GOOD BYE
JMP I APUTIT /AND RETURN.
/
/
AAAPUT, AAPUT
ASETI, SETI
AAGET, AAAGET
AALIMC, GGLIMC /LIMIT CHECKER
/
/
/
/
AC1, 215
300
337
243
ASMIFZ TERMC-44 /IS 44 A LEGAL CHAR???
244 /NO. ASSEMBLE INTO THE EXCEPTION TABLE.
247
AABLAH, 232
4211 /END OF THE LIST
/
/
/
/
/
ASCGO, ASCH1
ASCT
ASMIFN RF08 /DO WE HAVE DISK?
ASRF8 /YEP. ASSEMBLE IN BRANCH
ASCT1
/
/
/
/
/
/
/
/
/
/
/
EJECT
/ THIS PAGE OVERLAPS A LITTLE FROM PREVIOUS PAGE.
/
/
/
/ MORE OF THE ASCII HANDLER.
/
/
/
/
/
AAPUT, 0
SEARCH /CHECK FOR A SPECIAL CONTROL CHAR.
AC1 /SAME LIST IS OK.
AG2
TAD FTYPE /GET THE CHAR
TAD M240
SPA CLA
JMP AP /TOO SMALL. NOG A REGULAR CHAR.
TAD FTYPE
TAD M340
SMA CLA
JMP AP /TOO BIG. IT S NO GOOD.
TAD FTYPE /GET THE CHAR AGAIN
AND L77 /JUST THE LOW ORDER BITS.
AAA1, JMS AAAAAA /PLACE THE CHAR IN THE BUFFER.
JMP I AAPUT /AND EXIT/
/
/
/
AP, JMP I AAPUT /BAD CHAR.
/
APCR, TAD AL43 /CR FOUND. PLACE A "43" IN THE BUFFER
JMP AAA1 /STICK IN BUFFER
/
AATAB, TAD L7
TAD AL40 /CONVERT TAB TO A 47
JMP AAA1
/
/
/
AAEND, ASMIFN TERMC-44 /IS 44 THE END OF FILE CHARACTER?
ASMSKP 2 /NO. ZERO IS. IGNORE NEXT TWO STATEMENTS.
PFOUR /DOLLAR SIGN IS THE END OF BUFFER CRAP
TAD AL40 /MAKE IT INTO A DOLLAR SIGN
JMS AAAAAA /AND PLACE EOF CHAR IN THE BUFFER.
TAD AAAORG /SEE IF BUFFER IS WRITTEN OUT.
CMA
AND BOLDP /BY CHECKING ENDING ADDRESS
SNA CLA
JMP .+3 /BUFFER IS CLEAR AND WRITTEN OUT.
JMS AAAAAA /BUFFER STILL IN USE. ADD 1 CHAR AND SEE IF DUMPED.
JMP .-6 /NOT DUMPED. WAIT.
TAD AAUNIT /GET THE UNIT
DCA FUNIT /AND FLACE AWAY
TAD AABLOCK /GET THE FIRST BLOCK
DCA FBNUM /AND STASH AWAY.
TAD AABLOCK /GET THE FIRST BLOCK
CIA
TAD AAOUTB /ADD IN NEXT BLOCK TO GET SIZE.
DCA FSIZE /AND STASH AWAY.
PONE /SET FOR SEOURCE
DCA FTYPE
HPUSH /NOW STASH THIS AWAY FOR FILEC TO USE.
POP /REGET THE OUTPUT UNIT CONFIGUARTATION.
FILEC /AND DO A DIRCTORY TYPE COPY.
/
/
/
/
/
AAAAAA, 0 /PLACES HALF A CHAR IN THE BUFFER.
DCA BTEMP1
TAD BFIELD /FIRST TIME THROUGH?
SZA CLA
JMP AAA /NOPE. IGNORE SETUP
ISZ BFIELD /SET SWITCH
TAD AABLOCK /GET START OF BINARY CRAP.
DCA AAOUTB /AND SET UP WRITE BLOCK.
TAD AAAORG /GET THE LOCATION OF START
DCA BOLDP /AND SAVE IN THE ADDRESS
MONE /SET THE SWITCH TO PLACE IN LEFT HALF OF WORD.
DCA ORIGIN
TAD M400 /SET THE WORD COUNTER
DCA BTEMP3 /TO 400 WORDS TO GO IN BUFFER.
/
/
ASMIFN STAR20-1 /DO WE WANT TO STICK IN A "*20" AT BEGINNING OF FILE???
ASMSKP 13 /NOPE. DONT ASSEMBLETHEM IN.
/
TAD A5262 /GET A "*20" AND PLACE IT
DCA I BOLDP
ISZ BOLDP /IN FIRST TWO WORDS OF FILE.
TAD A6043
DCA I BOLDP
ISZ BOLDP /BOP UP THE IN POINTER.
ISZ BTEMP3
ISZ BTEMP3 /INCREMENT THE BUFFER COUNTER BY 2.
/
TAD AL43 /TELL BUFFERS WE JUST PUT A "43" IN IT.
DCA ALASTC /BY PLACING IT IN LAST CAR INSERTED.
/
AAA, TAD BTEMP1 /GET THE CAR
CIA
TAD AL43 /IS IT A 43
SZA CLA
JMP .+6 /NOPE. INSERT IT
TAD ALASTC /GET PREVIOUS CHAR
CIA
TAD AL43 /WAS IT ALSO A 43
SNA CLA
JMP I AAAAAA /YEP. IGNORE IT.
TAD BTEMP1 /UPDATE OLD CHAR
DCA ALASTC
ISZ ORIGIN /TEST LEFT OR RIGHT SWITCH
JMP AAA2 /RIGHT HALF
TAD BTEMP1 /LEFT HALF
RTL
RTL
RTL
AND L7700 /PLACE IN LEFT HALF OF WORD
DCA I BOLDP /AND STASH AWAY.
JMP I AAAAAA /AND EXIT NOW.
/
AAA2, MONE
DCA ORIGIN /RESET HALF SWITCI.
TAD BTEMP1 /PLACE IN RIGHT HALF OF WORD.
AND L77
TAD I BOLDP
DCA I BOLDP /AND PLACE IT AWAY.
ISZ BOLDP /THAT ALL>
NOP /THIS CAN SKIP IF BUFFER=7400
ISZ BTEMP3 /INCREMENT THE COUNTER. ALL DONE WITH THIS BUFFER?
JMP I AAAAAA /NOPE. BUFFER STILL GOOD.
TAD AAAORG /BUFFER FULL. RESET POINTER.
DCA BOLDP
TAD M400
DCA BTEMP3 /RESET COUNTER.
TAD AAOUTB /GET THE OUTPUT BLOCK
TAD AALIM /WILL IT EXCEED WORKING AREA?
SNA CLA
NO /YEP, IT WILL. GIVE ERROR MESSAGE.
WRITE /WRITE OUT FULL BUFFER.
AAUNIT, SYSBIN
AAAORG, BUFFER
1
AAOUTB, 0
ISZ AAOUTB /BOP UP BLOCK
JMP I AAAAAA /AND EXIT
/
DSYS4=AAUNIT
/
/
ASMIFN STAR20-1 /DO WE WANT THE "*20" LITERALS IN???
ASMSKP 3 /NOPE. DON T PUT THEM IN.
/
A5262, 5262
A6043, 6043
/
AABLOCK, SYSBBLOCK
AL40, 40
AL43, 43
ALASTC, 0
AALIM, -SYSWT-1 /MAXIMUM SIZE OF THE WORKSPACE.
/
/
/
/
/
/
/
/
/
/
/
/
AG1, ACR
ABAD
ABAD
ABAD
ASMIFZ TERMC-44 /SHOULD WE IGNORE DOLLAR SIGNS?
ABAD /YEP. ASSEMBLE IN THE POINTER
ABAD
AEND
AOK
/
/
/
/
/
/
/
ASCGO2, ASCH2
ASCTT
ASMIFN RF08 /DISK THERE?
ASRF82 /YEP.
ASCT2
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
EJECT
/ MORE ASCII HANDLERS
/
/ WHICH OVERLAP SOME MORE FROM THE PREVIOUS PAGE.
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
AAAGET, 0 /MAIN BUFFER GETTER ROUTINE
CLA
TAD BFIELD
SZA CLA /ARE WE ACTIVE?
JMP AAGET2 /YEP. IGNORE NEXT.
ISZ BFIELD /SET STATUS SWITCH
/
ASMIFN STAR20-1 /DO WE WANT TO SKIP PAST A "*20"
ASMSKP 3 /NOPE. NO *20 SKIP.
/
JMS I AGETI /GET A WORD
JMS I AGETI /GET TWO WORDS (BYPASS "*20")
/
MONE
DCA ORIGIN / LEFT HALF OF WORD CHAR.
/
AAGET2, ISZ ORIGIN /WHICH HALF?
JMP AAGET3 /RIGHT HALF .
JMS I AGETI /GET A WORD.
DCA BOLDP /AND STASH AWAY
TAD BOLDP /RETURN WITH ITS VALUE.
RTR
RTR
RTR /SHIFT TO CORRECT POSITION.
JMP AAGET4 /GO DOWN AND GET REST.
/
AAGET3, MONE
DCA ORIGIN /RESET RIGHT-LEFT SWITHC.
TAD BOLDP /GET THE RIGHT CHAR
AAGET4, AND L77 /JUST GET 6 BITS
DCA FTYPE /STORE AWAY.
SEARCH /CHECK FOR A NO NO.
AAGL1
AAGO1
TAD FTYPE
TAD M40 /FIGURE OUT CORRECT BIT 4
SPA />40. A 20 0 TYPE CHARACTER
TAD A100 /<40 A 300 TXPE CHAR.
TAD AAGET3 /ADD IN 240 (ACTUALLY 7240)
AND A377 /JUST MAKE IT8 BITS
JMP I AAAGET /AND EXIT.
/
/
A100, 100
A377, 377
AGETI, GETI
/
/
AACR, TAD M215 /CARRIGE RETURN
CIA
JMP I AAAGET
/
AAATAB, PONE
TAD L10
TAD L200
JMP I AAAGET
/
AAAEND, PTWO
TAD L30
TAD L200
JMP I AAAGET /EXIT WITH A CONTROL Z IN THE AC.
/
/
/
/
/
AAGL1, 0
ASMIFZ TERMC-44 /IS 44 THE END OF FILE CHAR?
44 /YEP. ON 44 GO TO THE CONTROL Z GENERATOR.
43
47
4037 /END OF LIST
/
AAGO1, ASMIFN TERMC-44
AAAEND /00 IS THE END OF FILE CHARQACTER.
ASMIFZ TERMC-44
AAAGET+1 /44 (DOLLAR SIGN) IS THE TERMINATOR.
ASMIFZ TERMC-44 /IS DOLLAR SIGN LEGAL?
AAAEND /NOPE. IT S THE END OF FILE CHAR.
AACR
AAATAB
AAAGET+1
/
AG2, APCR
AP
AP
ASMIFZ TERMC-44 /ASMEBLE IGNORE CHARACTER IF DOLLA.R IS THE END OF FILE CAHR...
AP
AP
AP
AAEND
AATAB
/
/
/
/
/
/
/
/
/
/
/
/
ABDIS, LEFT+200
TOP-240
ASMIFN REMAKE!RF08 /DO WE WANT REMAKE OPTION OR THE DISK?
ASMSKP 5 /YEP. SKIP NEXT MESSAGE.
TEXT "FAUXILIARY OPTIONS:
HC --- COPY SPECIFED BLOCKS
HD --- DUPLICATE TAPE 0 ONTO 1\"
/
/
/
/
/
ASMIFZ REMAKE /DO WE WANT REMAKE MESSAGE?
ASMSKP 6 /YEP. PUT IN MESSAGE.
TEXT "FAUXILIARY OPTIONS:
HC --- COPY SPECIFIED BLOCKS
HD --- DUPLICATE TAPE 0 ONTO 1
HR --- REFORMAT FILE\"
/
/
/
/
/
/
/
/
/
/
ASMIFZ RF08 /DO WE WANT THE RF08 OPTIONS.
ASKSKP 6 /NOPE. DON T PUT IN THE MESSAGE.
/
/
TEXT "FAUXILIARY OPTIONS:
C --- COPY SPECIFIED BLOCKS
D --- DUPLICATE TAPE 0 ONTO 1
S --- COPY SYSTEM
U --- COPY UNIT\"
/
/
/
/
/
/
/
/
/
/
/
/
/
/
EJECT
/
/
/
/
/
*5600
/
/
/
/
/ THIS IS THE ABSOLUTE BLOCK HANDLER
/
/
/
/
/
/
/
/
/
CINPUT=ASCINP /SAME AS SOURCE INPUT(FOR NOW)
COUTPUT=ASCOUT /SAME AS SOURCE FOR NOW.
/
/
/
ABSOL, DECODE /GIVE THE MESSAGE AND WAIT FOR A REPLY.
ABDIS /ABSOLUTE DISPLAY CRAP.
TAD FUNIT /GET THE NUMBER OF ADDITION AL UNITS.
AND L7 /ONLY 3 GOOD BITS ALWLOED.
SNA /WAS IT ZERO?
PONE /YEP. MAKE IT INTO A ONE.
CIA /COMP TO SET UP COUNT
DCA ABSTMP /AND STORE AWAY IN COUNTER SET.
SEARCH /LOOKUP THE RELYP.
ABL1
ABG1
JMP ABSOL /ILLEGAL REPLY.
/
/
/
/
DUP, DCA INUNIT /COPIES 0 TO 1 OR MORE TAPES.
DCA INBLOCK /SET UP INPUT UNIT AND BLOCK TO 0, OUTPUT BLOCK TO 0.
DCA OUTBLOCK
PONE
DCA OUTUNIT /SET THE OUTPUT UNIT TO 1
CLA CLL CML RTR /2000
RAR /1000. A 1000 BLOCK COPY.
DCA FSIZE /SET UP SIZE.
COPY /THEN GO DO OCPY.
PIP /RETURN TO PIP WHEN DONE
/
/
/
ACOPY, DECODE /GET THE INPUT DEVICE AND BLOCK NUMBER.
CINPUT /FROM THE COPY INPUT CRAP.
SEARCH /LOOK-UP REPLY.
ACPL1 /INPUT LIST
ACPG1 /GO TO LIST
JMP ACOPY /NO GOOD REPLY FOUND
/
/
/
/
/
/
ASMIFZ RF08 /DISK?
ASKSKP 2 /NO DISK HANDLERS THERE.
ACOPR, DISC /SET UP FOR DISK
SKP
ACOPT, TAPE /SET UP FOR TAPE
TAD FUNIT
DCA INUNIT /SET UP THE INPUT UNIT NOW.
PUSH /SAV THE SIZE BECUASE DECODE MIGH ZAP IT.
JMS AGETN /GET THE STARTING BLOCK NUMBER.
JMP ACOPY /NOT ALL LEGAL NUMBERS.
TAD AGNUM /GET THE BLOCK NUMBER
DCA INBLOCK /AND SAVE AWAY.
ACOPY2, DECODE /GET THE OUTPUT DEVICE
COUTPUT /DISPLAY CHOICES
SEARCH /LOOK UP THE REPLY
ACPL1
ACPG2
JMP ACOPY2 /NOT A LEGAL REPLY
/
/
/
/
/
ASMIFZ RF08 /DISK?
ASMSKP 2 /NOPE.
ACOPR2, DISC /SET UP FOR DISK
SKP
ACOPT2, TAPE /SET UP FOR TAPE
TAD FUNIT /GET THE CORRECT OUTPUT UNIT
DCA OUTUNIT /AND STASH AWAY.
JMS AGETN /GET THE BLOCK NUMBER.
JMP ACOPY2 /NOT A LEBGAL NUMBER
TAD AGNUM /GET THE STARTING BLOCK
DCA OUTBLOCK /AND STASH AWAY.
POP /RESTORE THE SIZE OF THE COPY.
TAD ABSTMP /RECALL THE NUMBER OF COPIES TO MAKE
DCA OUTNUM /AND SAVE IN THE COPY PARAMETER
COPY /AND DO IT.
PIP /RETURN TO PIP WHEN DONE.
/
/
/
/
/
ABSTMP, 0
/
/
/
ACPL1=BINLST
/
ACPG1, ACOPY /ILLEGAL REPLY
ACOPT /LINC TAPE
ASMIFN RF08 /DISK?
ACOPR /YES. DISK
ACOPY /ILLEGAL
/
/
/
ACPG2, ACOPY2 /ILLEGAL
ACOPT2 /LINC TAPE
ASMIFN RF08 /DISK?
ACOPR2 /YES.
ACOPY2 /ILLEGAL
/
/
AGETN, 0 /CONVERTS FNAME INTO A NUMBER(IF NOT THERE RETURNS TO .+1, OTHERWSIE TO .+2)
LINC /GO OVELMODE
LMODE
SET I 1 /SET 1 TO POINT TO FNAME BLOCK.
FNAME+6000-1
LDF 0 /IN DF 0
STC AGNUM /ZAP OUT PRESENT NUMBER.
SET I 2 /SET 2 TO A COUNT.
-5
AALOOP, LDH I 1 /GET THE NEXT CHAR FROM FNAME.
SHD I /IS IT A 77
7777 /WHICH IS END OF NUMBER?
JMP ALD /YEP. EXIT.
ADA I /IS IT TOO SMALL?
-57 /(BELOW 60)
APO
JMP AALL /YEP. BAD CHAR.
ADA I /IS IT TOO LARGE
-11 /(ABOVE 70)
APO I
JMP AALL /YEP. BAD CHAR.
LDA I /GET OLD TOTAL
AGNUM, 0
ROL 3 /MULTIPLY BY 10
BCL I
7
STC AGNUM /MULTIPLY DONE
LDH 1 /REGET THE NUMBER
ADA I
-60 /CHOP OFF CHAR BITS
ADD AGNUM /ADD IN OLD TOTAL.
AZE I /IF NOT ZERO THEN SKP
CLR /IF ZERO , ZERO AC TO 0000, IN CASE IT WAS 7777, WHICH IS EVIL IN 8 MODE.
STC AGNUM /STASH AWAY SOMEPLACE O OTHER.
XSK I 2 /BOP UP COUNT
JMP AALOOP /MORE TO GO.
JMP AALL /TOO MANY DIGITS. NUM TOO LARGE.
/
/
/
/
ALD, PDP /GET INTO PMODE
PMODE
ISZ AGETN /GO TO GOOD RETURN
/
LMODE
/
AALL, PDP /GET INTO 8 MODE
PMODE /WE RE BACK IN PMODE NOW.
CLA /CLEAR THE AC
JMP I AGETN /AND EXIT.
/
/
/
/
/
/
/
/
/
/
/
/
ABL1, 303
ASMIFN REMAKE /REMAKE OPTION INCLUDED???
322 /YEP. PLACE CHECK CHAR IN LIST.
ASMIFZ RF08 /DISK THERE
ASMSKP 2 /NOPE. DO NTT OUT IN S AND U
323
325
4304
/
ABG1, ACOPY
ASMIFN REMAKE /REMAKE OPTION???
KONVRT /YEP. PLACE IN POINTER OPTION.
ASMIFZ RF08 /HOW ABOUT THE POINTERS?
ASKSKP 2 /NOT THERE
AASYSC
AAUNTC
DUP
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
ASMIFN CARD-1 /DO WE WANT LINE PRINTRTER.???
ASMSKP 30 /NOPE. DONT ASEEMBLE IT N.
/
/
/
LPT2, 0 /LINE PRINTER CHECKER AND INITIALIZER.
TAD FTYPE /GET THE OUTPUT DEVICE
TAD LPM320 /IS IT A "P"
SZA CLA /?
JMP I LPT2 /NOPE. RETURN TO CHECK SOME MORE.
JMS I LLPEJ2 /YEP. GIVE TWO EJECTS TO GET THINGS GOING.
ISZ BFLAG2 /PREPARE TO SET OUTPUT FLAG TO 3
JMP I .+1 /RETURN AND ADD TWO MORE TO BFLGA2
ASCH2 /HIGH SPPEED PUNCH SETTER
/
LPM320, -320 /"P"
LLPEJ2, LPEJ2 /POINTER TO EJECTOR ROUTINE.
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
EJECT
/
/
/
/
ASMIFN CARD-1 /DO WE WANT THE WARD READER ROUTINE IN THERE??????
ASMSKP 2237-1415 /NOPE. SKIP PAST THE MESS.
/
/
/
/
*6000
/
/
/
/
/ CARD READER AND LINE PRINTER ROUTINES.
/
/
/
0000 /FOR JMPS IN LMODE
/
/
/
LMODE /DEFINE SYMBOLS IN LMODE IN CASE OF ADDRESSING ERRORS WHILE ASSEMBLING
/
CDCUNT, 0000
CPOINT, 0000
CDSWT, 0000
CDCONT, 0000
/
/
/
/
/
PMODE /TELL IT WE RE BACK IN PMODE NOW.
/
/
/
/
RCSF=6631 /SKIP IF COLUMN READY.
RCRA=6632 /READ IN AN ALPHA CHAR
RCRB=6634 /READ IN A BINARY CHAR.
RCSD=6671 /SKIP IF END OF CARD.
RCSE=6672 /START A NEW CARD MOVING AND SKIP IF OK.
RCRD=6674 /TURN OFF THE CARD DONE FLAG.
/
/
/
/
/
/
/
CDINIT, 0 /INITIALIZE THE CARD READER.
DCA BTEMP3 /CLEAR THE CARD MOVING FLAG.
DCA BTEMP2 /CLEAR THE CARD IN BUFFER FLAG.
TAD BOLDO /GET THE FIRST COLUMN TO BE LOOKED AT.
TAD DATA /GET THE LAST COLUMN TO DE DONE.
SNA CLA /OBTH ZERO?
TAD CDL110 /GET A 72 IN THE AC.
SZA /IS IT ZERO???
DCA DATA /NOPE. STORE THE 72 IN THE LAST COLUMN SCAN.
TAD DATA /GET THE LAST COLUMN AGAIN
CMA /NEGATE IT
TAD BOLDO /IS THE FIRST > LAST???
CDL100, SMA CLA /TEST AND ALSO LITTERAL
NO /IT ISN. T GIVE ERROR MESSAGE.
JMP I CDINIT /INITIALIZATION FINISHED.
/
/
CDL110, 110 /72 DECMIL
/
/
/
CDREAD, 0 /READS A CHAR FROM THE CARD READER.
MTHREE /DO WE WANT CARD READER INPUT????
TAD BFLAG1 /CHECK THE INPUT FLAG.
SNA CLA
JMP .+3 /YEP. WE CWANT CARD READER INPUT
ISZ CDREAD /NOPE. JMP THRIRD RETURN ADDRESS.
JMP CDISZ /ISZ CDREAD AGAIN BEFORE EXITING.
TAD BTEMP2 /IS THE CARD ALREADY IN THE BUFFER???
SZA CLA
JMP CDNEXT /YEP. IT IS. FETCH A CHAR FROM IT.
TAD BTEMP3 /IS THE CARD MOVING????
CDL240, SZA CLA /TESTA ND LITTERAL
JMP CDGONG /ITS MOVING. CHECK TO SEE IF COLUMN IS READY.
RCSE /START THE CARD GOING NOW...
JMP CNOTR /ITS NOT READY. WAIT AWILE BY RETURN TO USER.
ISZ BTEMP3 /SET THE SWITCH TO SHOW THE CARD MOVING.
MOVE /ZERO OUT THE CARD BUFFER.
CDBUF-1 /CONTAINS A 0000
CDBUF
50 /80=120=50*2
TAD CDPONT /SET CPOINT TO POINT TO FIRST CHAR OF CARD BUFFER
DCA CPOINT
DCA BCOUNT /ZERO OUT THE CURRENT COLUMN COUNTER.
/
CDGONG, RCSF /IS THERE A CHAR THERE???
JMP CNOTR /NOPE. WAIT.
RCRA /READ IT IN ALPHA NUMERIC TYPE
DCA TEMP /STORE IN TEMP
ISZ BCOUNT /BOP UP COLUMN COUNTER BY 1.
TAD BCOUNT /GET CURRENT POSITIION.
CLL CML CMA IAC /13 BIT NEGATE
TAD BOLDO /IS IT BELOW THE STARTING COLUMN???
SNL SZA CLA
JMP CNOTR /YEP. IGNORE IT.
TAD DATA /GET THE UPPER LIMIT
CLL CML CMA IAC /13 BIT NEGATE.
TAD BCOUNT /HAVE WE GONE TOO FAR???
SNL SZA CLA
JMP CNOTR /YEP. IGNORE THE CHAR.
TAD TEMP /ALL IS WELL. RETRIEVE THE HCARACTER.
LINC /NOW GO OVER TO THE LINC SIDE.
LMODE
STH I CPOINT /SAVE THE HALFWORD IN THE BUFFER.
PDP
PMODE /AND BACK INTO 8 MODE.
/
CNOTR, CLA /CLEAR THEAC TO BE SURE.
RCSD /END OF CARD REACHED???
JMP I CDREAD /NOPE. RETURN TO USER TO WAIT AWHILE.
JMP CDDONE /GO CONVERT STORED CARD.
/
/
/
CDNEXT, LINC /CARD IN BUFFER AND CONVERTED.
LMODE /LETS GET A CHAR.
LDH I CPOINT /GET A CHAR.
PDP /GET OVER INTO A DECENT MODE
PMODE
SNA /IS IT THROUGH(00=CR)
JMP CDEOC /YEP. END OF CARD.
TAD M40 /NOT DONE. SEE WHICIH WAY TO ADD.
SPA
TAD CDL100 /01-37=301-337
TAD CDL240 /40-77=240-277
/
CDISZ, ISZ CDREAD /AND EXIT TO SECOND LOCATION
JMP I CDREAD /(OR THIRD IF CARD READER NOT CHOSEN DEVICE.
/
/
/
CDEOC, DCA BTEMP2 /TURN OF THE CARD IN FLAG
TAD CDL215 /GET A CR IN THE AC
JMP CDISZ /AND EXIT.
/
/
/
/
/
CDDONE, DCA BTEMP3 /TURN OFF THE CARD MOVING SWITCH.
ISZ BTEMP2 /AND TURN ON THE CARD IN BUFFER SWITCH.
RCRD /TURN OFF THE CARD DONE FLAG.
LINC /AND GO OVER TO LMODE
LMODE
SET I CDCUNT /SET COUNTER TO 80 COLUMNS
-120
SET I CPOINT /SET POINTER TO POINT TO LAST COLUMN+1
CDBUF+50
STC CDSWT /TELL THE BLANK SCANNER TO DELETE BLANKS.
/
CDLOOP, LDA I
-4000 /BACKSPACE 1 CHAR IN CARD BUFFEER.
ADM
CPOINT
LDH CPOINT /GET THE CHAR
XSK CDSWT /TEST THE BLANKS SCAN SWITCH.
AZE /STILL SCANNING. CHECK FOR BLANK.
SKP /NOT BLANK OR NOT SCANNING.
JMP CDFUNT /IT BLANK. IGNORE IT.
ROR 1 /ROTATE RIGHT TO PUT BIT 11 IN BIT 0
ADA I /NOW ADD IN BASIC TABLA ADDRESS POINTER.
CDTAB
STC CDCONT /GET TRANSITION CHAR ADDRESS.
LDH CDCONT /NOW GET THE TRANSITION CHARACTER.
SET I CDSWT /AND TELL IT WE RE NOT SCANNING BLANKS ANYMORE
-0
CDFUNT, STH CPOINT /NOW STASH AWAY CONVERTED CHAR.
XSK I CDCUNT /HAVE WE DONE 80 COLUMNS??
JMP CDLOOP /NOPE. GO BACK AND DO ANOTHER.
SET I CPOINT /YEP. WE VE DONE 80 COLUMNS.
CDPONT, CDBUF-1+4000 /SET THE POINTER SO CDNEXT CAN GET THE CHARS.
JMP CDNEXT+1 /AND EXIT AND GET A CHAR TO SEND B
/
/
/
/
/
/
/
LP1, 211 /TAB
CDL215, 215 /CR
4232 / END-OF-TAPE
/
/
/
/
/
/
/
/
/
EJECT
/
/
/
0000 /USED FOR ZEROING OUT THE CARD BUFFER.
/
CDBUF, 0000 /80 COLUMN BUFFER
/
*CDBUF+50
/
0000 /USED AS END OF CHAR CHARACTER INCASE OF 80 CHARACTER SCAN.
/
/
/
/
/
/
/
/ THIS IS THE CONVERSION TABLE FOR THE CARD READER CHARS TO ASCII CHARS.
/
/
/
CDTAB, 4061 /BLANK 1
6263 /2 3
6465 /4 5
6667 /6 7
7071 /8 9
7243 /: NUMBER SIGN
4047 /AT SIGN APOSTROPHE
7542 /= "
6057 /0 /
2324 /S T
2526 /U V
2730 /W X
3132 /Y Z
3554 /] ,
4537 /% BACK ARROW.
7677 /> ?
5512 /- J
1314 /K L
1516 /M N
1720 /O P
2122 /Q R
4144 /! DOLLAR SIGN
5251 /* )
7334 /; \
4601 /& A
0203 /B C
0405 /D E
0607 /F G
1011 /H I
3356 /[ .
7450 /< (
5336 /+ ^
/
/
/
/
/
/
/
/
/
EJECT
/
/
PMODE
/
/
/
/ LINE PRINTER ROUTINE.
/
/
/
/
/
/
/ LINE PRINTER DEFINITIONS.
/
/
LSE=6651
LCF=6652
LLB=6654
LSD=6661
LCB=6662
LPR=6664
/
/
/
/
/
/
/
/
/
/
LPTEST, 0000 /MAIN LINE PRINT CHARACTER CABOSH.
MTHREE /IS IF LINE PRINTER IS THE CHOSEN ONE(DEVICE 3)
TAD BFLAG2
SZA CLA
JMP I LPTEST /NOT THE CHOSEN ONE.
TAD I LPSEQ /GET THE CHAR
DCA FTYPE /PLACE IN SEARCHER INPUT.
SEARCH
LP1
LP2
TAD FTYPE /GET THE CHAR
TAD M340 /SUBTRACT TOO BIG CHAR.
CLL /CLEAR LINC FOR NEW TEST.
TAD LPL100 /CHECK FOR LOWER LIMIT
SNL CLA /IS IT INBETWEEN 240-337???
JMP I LPEXIT /NOPE. IGNORE IT.
TAD FTYPE /GET THE CHAR
LPCOMM, JMS LPPUT /AND OUTPUT THE CHAR.
JMP I LPEXIT /AM D EXIT
/
/
/
LPEXIT, SEQEXT
LPSEQ, SEQIN
LPCOL, 0000
/
/
/
/
LPEJ2, 0 /GIVES TWO EJECTS ON THE PRINTER.
MONE /REALLY A 17
JMS LPPUT /EJECT 1
TAD LPM204 /RESET THE COLUMN COUNTER TO THE BEGINNING OF A LINE.
DCA LPCOL /STASH AWAY.
MONE
JMS LPPUT /EJECT 2
JMP I LPEJ2 /RETURN TO THE CLALER.
/
/
/
/
LPPUT, 0 /PRINTS A CHAR OR DOES A CONTROL CRAP.
DCA TEMP /SAVE THE CHAR.
ISZ LPCOL /END OF THE LINE??
JMP LPWFIT /NOPE. PRINT IT.
LPCR, TAD LPM204 /RESET THE COLUMN COUNTER
DCA LPCOL /STASH AWAY.
TAD L7770 /SPACE 1 PRINTER LINE
JMP LPCOMM /COMMON PUTTER ROUTINE
LPWFIT, CHECKIO /CHECK FOR A CONTROL Z OR SOMETHING.
LSD /LINE PRINTER CLEAR????
JMP .-2 /NOPE. WAIT.
LCF /CLEAR THE FLAG
TAD TEMP /GET THE FUNCTION.
SMA /IS IT A CONTROL.
LLB /NOPE. MUST BE CHAR. STICK IN BUFFER.R.
SPA /IS IT POSITIVE?
LPR /NOPE. MUST BE CONTROL. ZAP IT
CLA /NOW CLEAR THE AC TO BE SURE.
JMP I LPPUT /AND RETURN TO THE CALLER.
/
/
/
/
/
/
/
/
LP2, LPTAB
LPCR
LPEND
/
/
/
/
LPTAB, TAD LP40 /BLANK
JMS LPPUT /SEND TO PUTTER ROUTINE.
PTHREE /TO COMPENSTATE FOR THE -204 [204-1]
TAD LPCOL /GET THE COLUMN.
AND L7 /IS IT A MULTIPLE OF 8
SZA CLA /??
JMP LPTAB /NOPE. GIVE ANOTHER BLAKN.
JMP I LPEXIT /AND EXIT.
/
/
LPEND, JMS LPEJ2 /GIVE TWO EJECTS.
PIP
/
/
/
/
LP40, 40
LPL100, 100
LPM204, -204
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
EJECT
/ THIS ORIGIN INSURES THAT BUFFER-1 CONTAINS A ZERO FOR THE TRIVIAL CORE ZERO ROUTINE
/ WHICH IS LOCATED IN PAGE 1(200-377)
/
/
/
/
*BUFFER-1
/
0000
/
/
/
/
/
/
/
EJECT
*BUFFER
/
/
/
/ THIS ROUTINE IS CALLED ONLY ONCE AT INITIALIZATION TO FIGURE OUT HOW
/ MANY K OF CORE THE GUY HAS. THEN IT S USED IN THE
/ BUFFER AREA.
/
/
/
/
/
/
/
COREF, 0 /MAIN ENTRY.
CLA CLL
DCA TEMP /ZERO OUT
CLOOP, ISZ TEMP
TAD TEMP
CIA
DCA COUNT
DCA TEMP1
CLLOOP, ISZ TEMP1
JMS CSET
TAD TEMP1
DCA I CPBYTE
ISZ COUNT
JMP CLLOOP
TAD TEMP
CIA
DCA COUNT
DCA TEMP1
CCLOOP, ISZ TEMP1
JMS CSET
TAD I CPBYTE
CIA
TAD TEMP1
SZA CLA
JMP COUT
ISZ COUNT
JMP CCLOOP
JMP CLOOP
/
COUT, MTWO
TAD TEMP
CLL RTL
RTL
DCA TEMP1
TAD CBUFF
CIA
CLL RTL
RTL
RAL
TAD TEMP1
ASMIFN RF08 /DISK PRESENT???
TAD L7777 /YEP. BOP DOWN THE NUMBER OF BUFFERS BY 1 TO PROTECT 7400
DCA BNUM
CDF 0
TAD BNUM
CLL RAR
AND L7770
SZA CLA
JMP CDCDDC
TAD M40
DCA COUT
DISPLAY
INSULT
ISZ COUT
JMP .-3
CDCDDC, ASMIFZ RF08 /DO WE WANT A SCRATCH DISK SETUP????
ASMSKP 3 /NOPE. DO DISK CHECK NOW.
TAD COREF /RETURN ADDRESS
JMP I .+1 /DO TO CORE CHECKER
CDISKC /NOW CHECK FOR DISKSSSSS
ASMIFZ RF08 /CHECK FOR THIS RETURN.......
JMP I COREF /RETURN NOW
/
/
CSET, 0
TAD L7777
TAD TEMP1
AND L7
CLL RTL
RAL
TAD CCDF
DCA .+1
0
JMP I CSET
/
CCDF, CDF 0
CBUFF, BUFFER
CPBYTE, 7777 /SHOULD BE A FREE LOC NOW.
/
/
/
/
INSULT, LEFT+240 /ABOUT CENTER OF SCREEN
TOP
TEXT "
FI WOULD
F RUN
F FASTER
FIF YOU
F HAD
F 8K
FINSTEAD
FOF ONLY
F 4K\"
/
/
/
/
/
/
EJECT
/
/
/
/
/
/
/
/
ASMIFZ RF08 /DISK CHECKER OK???
ASMSKP 45 /SKIP FOLLOWING CODE
/
/
/
/
/
/
*BUFFER+200 /DISK CHECKER CRAP......
/
/
CDISK, 0 /PHOONEY RETURN
CDISKC, DCA CDISK /SAVE RETURN ADDRESS.
DCMA /BAM. CLEAR DISK
DCMA /ONE MORE TIME FOR GOOD MEASURE
TAD L77 /A DISK ADDRESS.
DXAL /SEND IT OUT
CLA /CLEAR THE AC TO BE SURE
DXAC /READ IT BACK???
CIA
TAD L77 /ALL WELL?
SNA CLA /???
JMS DSET /SET UP FOR THE DISKS NOW???
JMP I CDISK /RETURN
/
/
/
/
DSET, 0
TAD DTAB1 /GET THE FIRST TABLE LOCATIONS
DCA AUTO1 /SAVE AWAY
DCLOOP, TAD I AUTO1 /GET THE NEX ADDRESS
SNA /IS IT ZERO????
JMP I DSET /YEP. RETURN
DCA TEMP /SAVE THE ADDRESS
TAD DSYSBIN /GET THE CORRECT NEW UNIT
DCA I TEMP /AND SET IT UP.
JMP DCLOOP /GO BACK FOR NEXT.
/
/
/
/
DTAB1, . /POINTS TO NEXT -1
DSYS1
DSYS2
DSYS3
DSYS4
00000
/
/
DSYSBIN,SYSBSP /SPECIAL BINARY UNIT.
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
EJECT
/
/
/
/
/
/
/
/ THIS IS THE OPTIONAL RF08-RK08 ROUTINE. IT S DIVIDED INTO TWO PARTS.
/
/ THE SECOND PART IS THE ACTUAL LOW LEVEL DISK ROUTINE.
/
/ THE FIRST PART IS A LITTLE CALLING ROUTINE WHICH INTERPRETS THE CALLS FROM PIPS MASS STOREAGE ROUTINES.
/ AND PROTECTS LOCATIONS 7400-7777 FROM THE DISK ZAPPING THEM.
/
/
/
/
/
/
/
/
/
/
/
/
ASMIFZ RF08
ASMSKP 3721-2705+1
/
/
/
/
/
*7400
/
/
/
/
/
/
/
/
/
/
/
/
/
/ THE SYSTEM AND UNIT COPIER HANDLERS.
/
/
/
/
/
/
/
/
/
/
/
/
AASYSC, MOVE /SET UP TO COPY JUST THE SYSTEM (NO INDEX)
ASYSL /SYSTEM COPY INFORMATION
AASUC /COMMON INFORMATION
AASUCS /SIZE OF SYSTEM INFORMATION
JMP AASUCR /GO TO COMMON ROUTINES
/
/
/
/
AAUNTC, MOVE /SET UP TO COPY THE ENTIRE UNIT.
AUNTL /INFORMATION
AASUC /TO COMMON ROUTINES.
AASUCS /NUMBER OF WORDS TO MOVE
/
/
/
/
AASUCR, TAD FUNIT /GET THE NUMBER OF COPIES TO MAKE
AND L7 /CHOP OFF THE HIGH ORDER CRAP
SNA /ZERO???
IAC /YEP. MAKE 1 COPY ONLY
CIA
DCA AAMHOW /STASH AWAY NUMBER TO MAKE
/
/
/
/
/
ASULP1, DECODE /GET THE INPUT DEVICE
CINPUT /COPY INPUT IS GOOD ENOUGH FOR ME
SEARCH /LOOK UP THE REPLY
ACPL1 /TABLE OF CHARS
ASUGO1 /TRANSFER TABLE
JMP ASULP1 /NOT A LEGAL REPLY
/
/
/
/
/
ASUDD1, DISC /DISC IS CHOOSEN
SKP
ASUTT1, TAPE /TAPE IS CHOOSEN
TAD FUNIT
DCA INUNIT
/
ASULP2, DECODE /GET THE OUTPUT UNIT
COUTPUT /OUTPUT OPTIONS
SEARCH /LOOKUP REPLY
ACPL1 /REPLY LIST
ASUGO2 /WHERE TO GO WHEN FOUND
JMP ASULP2 /NOT A LEGAL OUTPUT DEVICE
/
/
/
ASUDD2, DISC /DISC IS THE CHOOSEN ONE.
SKP
ASUTT2, TAPE /TAPE IS THE CHOOSEN ONE
TAD FUNIT
DCA OUTUNIT /STASH AWAY
/
/
/
TAD AAMHOW /GET THE NUMBER OF COPIES TO MAKE
DCA OUTNUM /STASH AWAY NOW.
TAD AASIZ1 /GET THE SIZE OF THE FIRST COPY
DCA FSIZE /AND STASH IN THE SIZE PARAMETER
TAD AABL1 /GET THE FIRST BLOCK NUMBER
DCA INBLOCK /AND SET UP THE READ
TAD INBLOCK /AND THE
DCA OUTBLOCK /AND THE WRITE
COPY /COPY THE SELECTED BLOCKS.
TAD AASIZ2 /THE THE SECOND COPY
DCA FSIZE /STASH THAT AWAY
TAD AABL2 /THE THE SECOND STARTING BLOCK NUMBER
DCA INBLOCK
TAD INBLOCK
DCA OUTBLOCK /SET UP FINAL COPY
COPY /AND DO IT
PIP /FINALLY RESTART PIP.
/
/
/
/
/
/
/
/
/
/
/
AASIZ1, 0 /SIZE OF THE FIRST COPY
AABL1, 0 /BLOCK NUMBER OF THE FIRST COPY.
AASIZ2, 0 /SIZE OF THE SECOND COPY
AABL2, 0 /BLOCK NUMBER OF THE SECOND COPY.
/
/
/
/
AASUC=AASIZ1 /POINTER TO COMMON TABLE
AASUCS=.-AASUC /SIZE OF MOVE.
/
/
/
/
/
/
/
/
/
/
/
ASYSL, TINDEX-DIALSYS
DIALSYS
SYSSBLOCK-TINDEX-TILEN
TINDEX+TILEN
/
/
AUNTL, TUPPER-TLOWER+1
TLOWER
0
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
EJECT
/
/
/
/
/
/
/
/
/
/ DISK DEFINITIONS.......
/
/
/
/
DMAW=6605
DCMA=6601
DMAR=6603
DEAL=6615
DEAC=6616
DFSE=6621
DISK=6623
DCIM=6611
DSAC=6612
DIML=6615
DIMA=6616
DFSC=6622
DXAL=6643
DXAC=6645
DMAC=6626
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
EJECT
/
/
/
/
/
/
/
/
/
/
/
RF08R, 0 /DISK-READ SETUP ROUTINE
TAD I RRRT /ADDRESS OF TREAD
DCA I WWWT /MOVE TO TWRITE FOR THE ARGUEMENT GETTER.
JMP RRC /GO TO THE COMMON ARG GETTER.
/
RF08W, 0 /DISK-WRITE SET-UP ROUTINE
CLA CLL IAC RAL /+2 IN THE AC TO ADD THE READ ROUTINE ADDRESS
RRC, TAD RRR /POINTER TO THE READ ROUTINE
DCA RRT /SAVE IN THE GO- TO LOCATION.
SETA /INITIALIZE THE ARGUEMENT GETTER
GETA /GET THE FIRST ARGUEMENT
AND L7 /CHOP OFF RANDOM UNITS BITS.
DCA RUNIT /STASH AWAY NOW.
GETA /GET THE NEXT ARGUEMENT NOW.
DCA RLOC /SAVE AWAY IN THE LOCATION WORD
GETA /NOW GET THE NUMBER OF BLOCKS TO TRANSFER
DCA RNUM /AND STASH AWAY NOW.
GETA /NOW GET THE FIRST BLOCK TO BE TRANSFERRED
DCA RFIRST /AND STASH AWAY ALSO.
TAD BNUM /NOW GET THE NUMBER OF BUFFERS AVAILABLE
AND L7 /JUST GET HOW MUCH GOES INTO FIELD 0
DCA ROUT /AND STORE IN THE FIRST TIME THROUGH BIT.
/
/
/
/
ROK, TAD RNUM /GET THE NUMBER LEFT TO DO
SNA CLA /STILL SOME MORE???
JMP I RRRET /NOPE. EXIT NOW.
TAD ROUT /TEST TO SEE IF IT'LL FIT THIS TIME.
CIA /NEGATE.
TAD RNUM /NUMBER LEFT
SPA /TEST NOW
JMP RFIT /IT'LL FIT. GO AND READJUST COUNT NOT
DCA RNUM /STORE AWAY NUMBER TO GO NEXT TIME.
RRTRY, JMS I RRT /GO DO THE DISK OPERATION.
JMP I RRERR /DISK ERROR HAS OCCURED.
RRGOOD, DCA RLOC /CLEAR THE LOCATION TO 0000
TAD RUNIT /BOP UP TO THE NEXT MEMORY FIELD
TAD L10
DCA RUNIT /SO THE OVERLAP WORKS CORRECTLY.
TAD RFIRST /BOP UP THE BLOCK NUMBER BY THE NUMBER DONE
TAD ROUT
DCA RFIRST /SO THAT WE'LL PICK UP FROM WHERE WE LEFT OFF.
TAD L10 /SET THE NUMBER OF BLOCKS TO DO TO 20
CLL RAL /BY ADDING 10 AND MULTIPLYING BY 2
DCA ROUT /WHICH IS THE NUMBER IN 1 MEMORY FIELD
JMP ROK /AND GO BACK AND DO THE NEXT ONE.
/
/
/
/
/
/
REWERE, RRGOOD /IF ACCEPTED AS IS
RRTRY /TO RETRY THE OPERATION.
RRGOOD /TO TRY TO SKIP PAST THE ERROR
/
/
/
/
RFIT, CLA /IT'LL FIT THS TIME. SET TO CORRECT OUTPUT NUMBER
TAD RNUM
DCA ROUT /NUMBER TO DO IS THE EXACT NUMBER
JMP ROK /AND GO BACK AND TRY AGAIN
/
/
/
RUNIT, 0
RLOC, 0
RNUM, 0
RFIRST, 0
ROUT, 0
RRRT, TREAD /POINTS TO TREAD
WWWT, TWRITE /POINTS TO TWRITE
RRR, READSK /POINTS TO A READ DISK ROUTINE
RRT, 0 /FINAL POINTER
RRERR, RERR /POINTER TO THE ERROR RECOVERY ROUTINE
RRRET, TEXIT /MASS I-O EXIT LOCATION
/
/
/
/
AAMHOW=RF08R /DEFINE A TEMPORARY FOR THE SPECIAL COPIES
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
EJECT
/
/
/
/
/
/
/
/
/
/
/
/
RRBAD, TEXT "FA DISK ERROR
FHAS OCCURRED
"/
/
/
/
/
/
/
/
/
RERR, DCA LOC1 /STASH AWAY IN A PLACE I KNOW IS FREE
MOVE /MOVE IN THE DISK ERROR MESSAGE
RRBAD
TMAIND
20 /32CHARS=16 WORDS=20 WORDS
TAD LOC1 /RETRIEVE THE BLOCK NUMBER
JMS I RREREO /CALL THE ERROR MESSAGE DISPLAY ROUTINE
REWERE /LIST OF RETURN OPTIONS.
/
/
/
RREREO, TTBC /POINTER TO THE ERROR MESSAGE DISPLAY ROUTINE
/
/
/
/
READSK=. /THE DISK READ ROUTINE GOES HERE.
/
/
/
/
/
/
/
/
/
/
EJECT
/
/
/
/
/
RFREAD, 0 /RF08 READ-WRITE ROUTINES. READ ENTRY
JMP RFCOMM /GO TO COMMEN ENTRY
/
RFWRITE,0 /RF08 WRITE ENTRY
TAD RFWRITE /REPLACE THE READ ENTRY BY THE WRITE FOR
DCA RFREAD /THE RETURN
CLA CLL IAC RAL /+2 TO MAKE DMAR A DMAW
/
RFCOMM, TAD RFDMAR /ADD A READ INSTRUCTION TO THE AC.
DCA RFINST /NOW STORE AWAY THE CORRECT FUNCTION
DCMA /CLEAR THE DISK STATUS REGISTER
TAD I RRLOC /GET THE LOC TO WHERE WE'RE GOING TO
TAD L7777 /SUBTRACT 1 FOR GOOD MEASURE
DCA RFDBAD /STORE AWAY NOW
TAD I RROUT /GET THE NUMBER OF BLOCKS TO DO
CIA RTR /MOVE TO BITS 0-3 OF THE AC AND
RTR /NEGATE
RAR
AND L7400 /CHOP OFF ANY CRAP WE PICKED UP ON THE WAY.
DCA RFDBWC /STASH AWAY NOW
TAD I RRUNIT /GET THE FIELD BITS ON
AND L7770 /AND OUT UNIT BITS
DIML /AND SET THE FIELD BITS IN THE STATUS REG.
TAD I RRUNIT /NOW GET THE UNIT FOR REAL
AND L7 /JUST THE UNIT BITS
CLL RTL
RTL
RAL /SHIFT OVER TO EXTENED DISK BITS
DCA TEMP /SAVE FOR A SECOND
TAD I RRFIRST /GET THE FIRST BLOCK NUMBER
RTR
RTR /IGNORE 4 LOWER ORDER BITS
AND RFL37 /JUSTBLOCK BITS OF DISK
TAD TEMP /ADD IN DISK SELECTION BITS
DXAL /SET UP THE DISK ADDRESS.
TAD I RRFIRST /RECALL THE STARTING BLOCK NUMBER
RTR
RTR
RAR /ROTATE TO BITS 0-3 OF THE AC
AND L7400 /CHOP OFF STRAY CRAP
RFINST, 0 /CORRECT DISK INSTRUCTION GOES HERE
CHECKIO /CHECK KEYBOARD NOW
DISK /AND THE DISK FLAG
JMP .-2 /WAIT FOR SOMETHING TO HAPPEN
DFSE /WAS THERE AN ERROR?
JMP RFGXT /NOPE. GOOD RETURN
DIMA /AN. ERROR. WAS IT A MYTHICAL ONE
AND RF1003 /THIS CHECKS IMPORTANT BITS
CLL RTR
TAD RFDBWC /ALSO CHECK TO SEE IF OPERATION COMPLETED
SNA CLA /ALL WELL????
JMP RFGXT /ALL IS WELL. EXIT
DXAC /READ IN THE EXTENDED REGISTER
AND RFL37 /CHOP OFF CRAP
CLL RTL
RTL /ROTATE TO GOOD BLOCK NUMBER BITS
DCA TEMP /SAVE FOR A SECOND
DMAC /NOW PICK UP THE LOW ORDER BITS
AND L7400 /IGNORE RANDOM WORD STUFF
CLL RTL
RTL /SHIFT INTO CORRECT PLACE
TAD TEMP /ADD IN THE CORRECT FACTOR
JMP I RFREAD /AND RETURN TO THE CALLER
/
/
/
RFGXT, ISZ RFREAD /ALL IS WELL. SKIP PAST ERROR RETURN
JMP I RFREAD /AND EXIT TO THE USER
/
/
/
/
RRUNIT, RUNIT /POINTER TO PREVIOUS SECTION INFO
RRLOC, RLOC
RROUT, ROUT
RRFIRST,RFIRST
/
RFDMAR, DMAR /ACTUAL RF08 DISK READ IOT
RFL37, 37
RF1003, 1003
/
/
/
/
/
/
RFDBAD=7751 /DATA BREAK ADDRESS
RFDBWC=7750 /WORD COUNT LOCATION
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
EJECT
@