.TITLE TECOIO - DATA AREA FOR RSX-11 TECO I/O PACKAGE .IDENT "X0224" ; ; COPYRIGHT (C) 1976 BY DIGITAL EQUIPMENT CORPORATION, ; MAYNARD, MASSACHUSETTS ; ; THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A ; SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE IN- ; CLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE, OR ; ANY OTHER COPIES THEREOF, MAY NOT BE PROVIDED OR OTHERWISE ; MADE AVAILABLE TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH ; SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE TERMS. TITLE ; TO AND OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN ; IN DIGITAL. ; ; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITH- ; OUT NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY ; DIGITAL EQUIPMENT CORPORATION. ; ; DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY FOR ; THE USE OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT WHICH IS ; NOT SUPPLIED BY DIGITAL. ; ; ANDREW C. GOLDSTEIN 9-APR-79 20:15 ; MARK H. BRAMHALL 29-MAR-79 12:18 L$$IST = 1 ; LIST PREFIX FILE .MCALL FSRSZ$,FDBDF$,FDAT$A,FDRC$A,FDOP$A,NMBLK$ .MCALL WSIG$S,QIOW$,FCSBT$,CSI$,CSI$SW,CSI$ND FCSBT$ CSI$ .SBTTL IMPURE DATA AREA ; FCS I/O BUFFER ALLOCATION FOR FILE I/O FSRSZ$ 3 .PSECT IMPURE,D ; ASSORTED INTERNAL VARIABLES AND FLAGS ZBEGIN:: ; START OF AREA TO CLEAR ON INIT CSIBLK::.BLKB C.SIZE ; CSI CONTROL BLOCK DATSET == CSIBLK+C.DSDS ; DATASET POINTER BLOCK STACK:: .BLKW 1 ; STACK POINTER SAVE TABCNT::.BLKW 1 ; TAB COUNTER FOR TYPE OUT BUFPT:: .BLKW 1 ; POINTER INTO TYPE OUT BUFFER CCLFLG::.BLKW 1 ; LENGTH OF CCL COMMAND LINE SAVR5:: .BLKW 1 ; SAVED IMPURE AREA ADDRESS TTLNSZ::.BLKW 1 ; LINE SIZE OF TERMINAL ASSSOCIATED WITH TTYLUN CORSIZ::.BLKW 1 ; CURRENT MEMORY SIZE INFLG:: .BLKB 1 ; PRIMARY/SECONDARY INPUT FILE FLAG OUTFLG::.BLKB 1 ; PRIMARY/SECONDARY OUTPUT FILE FLAG ENFLAG::.BLKB 1 ; "EN" CONTEXT VALID FLAG CTZCNT::.BLKB 1 ; COUNT OF CONSECUTIVE CTRL Z TYPED IN CTOFLG::.BLKB 1 ; CANCEL CONTROL O FLAG CTCFLG::.BLKB 1 ; CONTROL C FLAG CTCXIT::.BLKB 1 ; CONTROL C EXIT FLAG CHRFLG::.BLKB 1 ; INPUT CHARACTER HANDLING FLAG INBP2:: .BLKB 1 ; INPUT IS BASIC-PLUS-2 MODE OUBP2:: .BLKB 1 ; OUTPUT IS BASIC-PLUS-2 MODE OPSYS:: .BLKB 1 ; OP-SYS CODE FROM GTSK$ .EVEN ZEND:: ; END OF AREA TO CLEAR ON INIT IOSTAT::.BLKW 2 ; I/O STATUS BLOCK FILPRO::.BLKW 1 ; PLACE TO READ FILE PROTECTION .EXSTS::.BLKW 1 ; EXIT STATUS, USED BY PIPUTL TTCHAR::.BYTE TC.SMR,0 ; ARG LIST TO READ LOWER CASE MODE TTSCOP::.BYTE TC.SCP,0 ; AND CRT RUBOUT MODE TYPAHD::.BYTE TC.TBF,0 ; # CHARS IN TYPE AHEAD STRING::.BLKB 68. ; STRING BUFFER FOR ERROR MESSAGES STRNGL == .-STRING . = STRING ; OVERLAP OTHER JUNK TIMBUF::.BLKW 8. ; BUFFER FOR GET TIME PARAMETERS . = STRING ; OVERLAP OTHER JUNK GTSKBF::.BLKW 16. ; BUFFER FOR GET TASK PARAMETERS . = STRING+STRNGL TYOBUF::.BLKB 80. ; TYPE OUT BUFFER TYOBL == 80. .EVEN CMDLIN::.BLKB 134. ; RECORD BUFFER FOR CMDFDB CMDSIZ == .-CMDLIN ; ; OFT USED DPB'S FOR ATTACHING AND DETACHING THE TTY ; NOTE THAT EITHER P1 OR P3 OF THE ATTACH QIO WILL BE ZAPPED TO 0 ; BY THE INIT CODE, DEPENDING ON THE OPERATING SYSTEM TYPE. ; ATTACH::QIOW$ IO.ATT!TF.AST,TTYLUN,ATTEFN,,,, ATTP1 == ATTACH+Q.IOPL ATTP3 == ATTACH+Q.IOPL+4 DETACH::QIOW$ IO.DET,TTYLUN,ATTEFN ; FILE DESCRIPTOR BLOCKS FOR INPUT AND OUTPUT FILES. ; ***** NOTE! THESE MUST BE ALLOCATED IN THIS ORDER (SEE CODE IN ; GETNAM ROUTINE IN GETFLS MODULE). INFDB:: FDBDF$ FDRC$A FDAT$A R.VAR,FD.CR FDOP$A INLUN,DATSET,DN .BLKB FILSIZ ; FILE STRING SAVE AREA OUTFDB::FDBDF$ FDAT$A R.VAR,FD.CR FDOP$A OUTLUN,DATSET,DN .BLKB FILSIZ ; FILE STRING SAVE AREA CMDFDB::FDBDF$ FDRC$A ,CMDLIN,CMDSIZ FDOP$A CMDLUN,DATSET,DN ENFDB:: FDBDF$ ; FDB FOR "EN" OPERATIONS FDOP$A ENLUN,ENDATS,DN NB.SFL == NB.SD1!NB.SD2!NB.SNM!NB.STP!NB.SVR NB.WLV == 10000 ; WILD CARD INPUT VERSION PRESENT FLAG S.WUIC == 16. N.WNM2 == 42 ENAFNB::.BLKB S.FNB+S.WUIC+64. ; AUX NAME BLOCK FOR WILD CARD DIRECTORIES ENDATS::.BLKW 6 ; DATASET DESCRIPTOR BLOCK FOR "EN" PROCESSING ENVER:: .BLKW 1 ; SPACE TO SAVE ORIGINAL VERSION NUMBER ; DEFAULT FILE NAME BLOCK TO MAKE SY0: DEFAULT DEVICE DN:: NMBLK$ ,,,SY,0 ; FILE NAME BLOCKS TO SAVE STATES OF INPUT AND OUTPUT FILES. INSAVE::.BLKB S.FNB+FILSIZ+<3*2>+1+1+1+1 ; INPUT FILE STATE SAVE AREA .EVEN OUSAVE::.BLKB S.FNB+FILSIZ+1 ; OUTPUT FILE STATE SAVE AREA .EVEN ; ; STATISTICS BLOCK FOR INPUT FILE ; STATBK::.BLKB 10. .SBTTL PURE DATA AREA ; ; DEFAULT AMOUNT OF MEMORY TO ASK FOR ; SIZERB == 1024. ; DEFAULT CORE SIZE TO ASK FOR .PSECT PURE,RO,D ; CSI SWITCH TABLE FOR FILE STRINGS SW.CR == FD.CR ; IMPLIED CARRIAGE CONTROL SW.FT == FD.FTN ; FORTRAN CARRIAGE CONTROL SW.RW == 400 ; MAGTAPE REWIND SWITCH SW.SH == 1000 ; SHARED FILE OPEN MODE (INPUT ONLY) SW.B2 == 2000 ; BASIC-PLUS-2 MODE SWTAB:: CSI$SW CR,SW.CR,,,NEG ; /CR - FORCE IMPLIED CARRIAGE CONTROL CSI$SW FT,SW.FT ; /FT - FORCE FORTRAN CARRIAGE CONTROL CSI$SW RW,SW.RW ; /RW - REWIND MAGTAPE CSI$SW SH,SW.SH ; /SH - SHARED OPEN CSI$SW B2,SW.B2 ; /B2 - BASIC-PLUS-2 MODE CSI$ND CMDR50 == <<'T-100>*50*50>+<<'E-100>*50>+<'C-100> ; .RAD50 /TEC/ ; ; INITIAL COMMAND STRING. IT GETS THE CCL PROCESSING MACRO FROM THE TEXT ; BUFFER AND STASHES IT IN QY, AND GETS THE CCL COMMAND LINE FROM THE FILENAME ; BUFFER AND STORES IT IN QZ. THEN IT STARTS UP THE USER'S SETUP FILE, IF ; IT EXISTS. ; INITC:: .ASCII "HXYHKG*HXZHK:EITECO" INITL == .-INITC ; ; CCL PROCESSING COMMAND LINE. THIS IS EXECUTED AFTER THE STARTUP FILE IS ; COMPLETED. IT EXECUTES THE CCL PROCESSING MACRO IN QY TO INTERPRET THE COMMAND ; LINE IN QZ. ; CCLPRC::.ASCII "-1U1MY" CCLPRL == .-CCLPRC .EVEN ; ; CHARACTER DISPATCH TABLE, ORDERED HIGHEST TO LOWEST (ENDING WITH 0) ; TYPTAB::.WORD AM!177600 .WORD RUB GETABL::.WORD AM .WORD CR .WORD FF .WORD VT .WORD LF .WORD TAB .WORD BS .WORD BELL .WORD 0 ; ; LOW AND HIGH LIMITS OF MEMORY USED BY THIS TASK ; LOHI:: .LIMIT ; ; STARTUP ENTRY POINT. THIS AUTO-LOADS THE INITIALIZATION OVERLAY. ; .PSECT CODE,RO,I TECOIO:: JMP TECINI ; ; ENTRY POINT FOR OVERLAY LOAD ERRORS ; $ALERR:: WSIG$S ; WAIT FOR SYSTEM TO RECOVER RETURN ; AND TRY AGAIN .SBTTL REGISTER SAVE ROUTINE ;+ ; ; *** - SAVREG SAVE REGISTERS ; ; THIS ROUTINE SAVES REGISTERS 0 THRU 4 ON THE STACK AND SETS UP TO ; HAVE THEM RESTORED WHEN THE CALLING ROUTINE EXITS. ; ; CALL: JSR R4,SAVREG ; ;- SAVREG:: CLRB CTCFLG ; PRE-CLEAR CTRL C FLAG MOV R3,-(SP) MOV R2,-(SP) MOV R1,-(SP) MOV R0,-(SP) MOV R4,-(SP) ; SAVE ALL REGISTERS MOV SR4(SP),R4 ; RESTORE R4 MOV SP,STACK ; SAVE STACK POINTER FOR ERROR UNWIND JSR PC,@(SP)+ ; RETURN TO CALLER ; CO-ROUTINE EXIT CAUSES CONTROL TO RETURN HERE WHEN CALLER EXITS. MOV (SP)+,R0 ; RESTORE REGISTERS MOV (SP)+,R1 MOV (SP)+,R2 MOV (SP)+,R3 MOV (SP)+,R4 RTS PC ; AND RETURN .END TECOIO