File CSA.PA (PAL assembler source file)

Directory of image this file is from
This file as a plain text file

/CASSETTE HANDLER FOR RTS-8
/
/
/
/
/
/
/
/
/
/COPYRIGHT  (C)  1974 BY DIGITAL EQUIPMENT CORPORATION
/
/
/
/
/
/
/
/
/
/
/THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT NOTICE
/AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
/CORPORATION.  DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY
/FOR ANY ERRORS THAT MAY APPEAR IN THIS DOCUMENT.
/
/THE SOFTWARE DESCRIBED IN THIS DOCUMENT IS FURNISHED TO THE PURCHASER
/UNDER A LICENSE FOR USE ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED
/(WITH INCLUSION OF DIGITAL'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH
/SYSTEM, EXCEPT AS MAY OTHERWISE BE PROVIDED IN WRITING BY DIGITAL.
/
/DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY FOR THE USE
/OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT THAT IS NOT SUPPLIED BY
/DIGITAL.
/
/
/
/
/
/
/
/
/
/

KCLR=6700 /CLEAR ALL /CLEAR STATUS A AND B REGISTERS KSDR=6701 /SKIP ON DATA FLAG KSEN=6702 /SKIP ON ERROR KSBF=6703 /SKIP ON READY FLAG KLSA=6704 /LOAD STATUS A FROM AC 4-11 /CLEAR AC, THEN /LOAD 8 BIT COMPLEMENT OF STATUS A /BACK INTO AC KSAF=6705 /SKIP ON ANY FLAG OR ERROR KGOA=6706 /ASSERT THE CONTENTS OF STATUS A, /TRANSFER DATA IF READ OR WRITE KRSB=6707 /READ STATUS B INTO AC 4-11 INT=1 INIWT=0 TASK=CSA CUR=10 FIELD CUR%10 /FORMAT OF MESSAGE IS: / /MSG, ZBLOCK 3 / WORD 1 = UNIT / BITS 9-11 = UNIT / BIT 0 = 0 = UTILITIES CALL / = 1 = HANDLER CALL / WORD 2 = FUNCTION / FOR HANDLER BIT 0 = 1 = WRITE, = 0 = READ / BITS 6-8 = FIELD OF BUFFER / BIT 11 = 1 = DO NOT STORE DATA (ON READ ONLY) / FOR UTILITY UTIL WORD / 10 = REWIND / 30 = BACKSPACE FILE GAP / 40 = WRITE FILE GAP / 50 = BACKSPACE BLOCK GAP / 70 = SKIP TO FILE GAP / WORD 3 / FOR UTILITY = STATUS RETURN / FOR HANDLER = BUFFER ADDRESS / WORD 4 / FOR HANDLER = RECORD SIZE / FOR UTIL UNUSED / WORD 5 / FOR HANDLER = STATUS RETURN / FOR UTIL UNUSED /STATUS B BITS: / 4=CRC/BLK ERROR / 5=TIMING / 6=EOT/BOT / 7=EOF / 8=DRIVE EMPTY / 9=RW / 10=WRITE LOCK OUT / 11=READY
*3200 FIXDVC, 0 RAR /MOVE UNIT TO LINK; DEVICE TO AC AND (3 /MASK OFF DEVICE CODE DCA DVC /SAVE DEVICE CODE SZL TAD (100 DCA ABUNIT /SET UNIT IN BIT 5 TAD DVC CLL RTL RAL DCA DVC /MOVE TO BITS 6-8 TAD (IOTBL DCA IOTPTR IOTLOOP,TAD I IOTPTR SNA /END OF TABLE? JMP CHECKR /YES DCA TMP TAD I TMP AND (7707 /MASK OUT OLD DVC TAD DVC /INSERT NEW ONE DCA I TMP /REPLACE ISZ IOTPTR /POINT TO NEXT ONE JMP IOTLOOP TMP, 0 DVC, 0 /DEVICE CODE IOTPTR, 0
CHECKR, JMS I (CLEAR TAD (200 JMS LOADA /SELECT DRIVE JMS I (CHECKB AND (7735 /IGNORE EOT/BOT FLAG + WLO TAD (-1 SZA CLA JMP I (SELERR /NOT READY JMP I FIXDVC READX, JMS I (CHK AND L374 SZA JMP ERRX IOT6C, KGOA /GET CHAR JUST READ DCA BYTE ISZ BKNT SKP JMP RWCRC TAD BYTE BFLD, HLT DMPFLG, DCA I BPTR /ZEROED IF BIT 11=1 ON READ CLA ISZ BPTR CDF CUR L374, 374 JMS I (IDISP JMP READX
LOADA, 0 TAD ABUNIT IOT4, KLSA CLA JMP I LOADA ABUNIT, 0 RWCRC, TAD (260+INT /ENABLE, ENABLE INTER, READ CRC JMS LOADA JMS I (GO JMS I (IDISP JMS I (CHK CRCMN, JMS I (GO JMS I (IDISP JMS I (CHECKB AND (7775 /IGNORE WLO TAD (-1 ERRX, SNA CLA /ERRORS? JMP ERRR+1 /NO - CLEAN BILL OF HEALTH E3, ISZ I (ERKNT /TRY 3 TIMES JMP I (ERRCOV /RETRY ERRR, STA /ERROR WHILE READING CRC JMS I (CLEAR JMP I (FINAL
WRITEX, JMP READX WRITEL, JMS I (CHK CLL RTR SZL JMP ERRR /WLO ON WRITE OP NOT WORTH RETRYING SZA CLA JMP E3 ISZ BKNT SKP JMP WCRC BFIELD, HLT ISZ BPTR 70 TAD I BPTR JMS I (GO JMS I (IDISP JMP WRITEL WCRC, TAD (260+INT JMS LOADA JMP CRCMN BKNT, 0 /NUMBER OF CHARS EXPECTED BPTR, 0 /NEXT LOCATION IN BUFFER TO STORE INTO BYTE, 0 /TEMPORARILY HOLDS BYTE FOUND PAGE
IOTBL, IOT0 IOT1 IOT4 IOT5 IOT6 IOT6C IOT7 ERRCOV 0 UTIL, RAR DCA I (UNIT DCA REWSW JMS I (GET /FUNCTION WORD TAD (-10 SNA ISZ REWSW TAD (210+INT DCA TEMPFN TAD I (UNIT IOF JMS I (FIXDVC /FIX DEVICE CODE TAD (UT DCA IDISP /SET RETURN ADDRESS TAD TEMPFN JMS I (LOADA JMS GO /INITIATE UTIL JMP I (COMDN UT, JMS CHECKB /LOOK AT STATUS B AND (50 /CHECK FOR CL, EMPTY, OR WLO /GIVE NO ERROR ON WLO ************ /BAD FOR WRGAP SNA JMP OK /NO ERRORS TAD (-40 SZA CLA JMP NOTOK /ERROR NOT CL TAD REWSW SNA CLA /CL OK IF DID REWIND NOTOK, STA OK, JMS CLEAR JMP FINAL TEMPFN, 0 REWSW, 0 /1 MEANS OPERATION IS REWIND
CHECKB, 0 IOT7, KRSB /READ STATUS B INTO AC 4-11 DCA BSTATE /SAVE STATUS B TAD BSTATE JMP I CHECKB CLEAR, 0 DCA ERRIND /-1 MEANS ERROR IOT0, KCLR /CLEAR STATUS A AND B JMP I CLEAR GO, 0 IOT6, KGOA /ASSERT CONTENTS OF STATUS A CLA JMP I GO CHK, 0 JMS CHECKB AND (376 IOT1, KSDR SKP /DATA FLAG NOT UP - JMP I CHK TAD (-20 SNA CLA /IS IT END OF FILE? JMP I (ERRR /YES, ERROR - BUT DON'T RETRY TAD BSTATE JMP I CHK BSTATE, 0 /STATUS OF REGISTER B ERRIND, 0
FINAL, TAD (DONEFG JMS IDISP /FINAL PDS SETS EVENT FLAG HLT /DEBUG ONLY. SHOULD NEVER GET HERE IDISP, HLT CIF 0 POSTDS CASINT, ZBLOCK 2 IOT5, KSAF JMP I CASINT CDF CIF CUR JMP I IDISP ERRCOV, KCLR TAD (250+INT JMS I (LOADA JMS GO /BACKSPACE BLOCK JMS I (IDISP /WAIT JMS CHECKB AND (374 /KILL WRITE-LOCK BIT SZA CLA JMP I (ERRR JMS I (SETUP /RE-SET UP OPERATION JMP IDISP+1 /FAKE A JMS PAGE
/ *ORG3 START, CAL DONEFG, SKPINS CASINT LOOP, CAL RECEIV ADDR, 0 DCA FLD DCA RW TAD DCASET DCA I (DMPFLG AC7775 TAD ADDR DCA MEVFLG ISZ DONEFG JMS GET ISZ ADDR CLL RAL SNL JMP I (UTIL RAR DCA UNIT JMS GET AND P70 /ISOLATE FIELD OF BUFFER TAD (CDF DCA WCDF JMS GET /RETRIEVE FUNCTION CONTROL WORD RAL /READ/WRITE BIT TO LINK SNL JMP READ11 /A READ OP CLA RAL RANDW, DCA RW /RW=1 IF WRITE ISZ ADDR JMS GET DCA BUFFER /SAVE IT ISZ ADDR JMS GET CDF CUR DCA BSIZE /RECORD SIZE TAD UNIT IOF JMS I (FIXDVC TAD WCDF DCA I (BFIELD TAD WCDF DCA I (BFLD STA CLL RTL /TAD (-3 DCA ERKNT JMS SETUP /SET UP READ OR WRITE COMDN, ION NOP CAL WAITE DONEFG RTNSTS, ISZ ADDR TAD I (ERRIND AND I (BSTATE JMS CDFMSG DCA I ADDR CDF CUR TAD FLD DCA PFLD TAD MEVFLG CAL POST PFLD, 0 JMP LOOP GET, 0 JMS CDFMSG TAD I ADDR CDF CUR JMP I GET CDFMSG, 0 FLD, 0 JMP I CDFMSG READ11, RTR /BIT 11 TO LINK SZL CLA DCA I (DMPFLG /DON'T STORE DATA JMP RANDW DCASET, BPTR&177+3600 /DCA I BPTR UNIT, 0 MEVFLG, 0 BUFFER, 0 RW, 0 /1 IF WRITE ERKNT, -3 P70, 70 BSIZE, 200 SELERR, STA JMP RTNSTS /RETURN ERROR
SETUP, 0 TAD RW TAD (WRITEX DCA I (IDISP /SET RETURN ADDRESS TAD BUFFER DCA I (BPTR TAD BSIZE CMA /WANT TO READ ONE MORE TAD RW DCA I (BKNT TAD RW CLL RTL RTL /WRITE FN CODE=0 TAD (200+INT /SELECT AND INTERRUPT ENABLE JMS I (LOADA WCDF, HLT TAD RW SZA CLA TAD I BUFFER /=BPTR (FOR 2 LEVELS OF INDIRECT) CDF CUR JMS I (GO JMP I SETUP $



Feel free to contact me, David Gesswein djg@pdp8online.com with any questions, comments on the web site, or if you have related equipment, documentation, software etc. you are willing to part with.  I am interested in anything PDP-8 related, computers, peripherals used with them, DEC or third party, or documentation. 

PDP-8 Home Page   PDP-8 Site Map   PDP-8 Site Search