.ENABL LC .TITLE EXEC .IDENT /V7.6/ .NLIST BEX ; Version 7.6 11-May-83 ; Chuck Sadoian ; 821 Newton Drive ; Dinuba, Calif 93618 ; 209-591-2631 (work) ; 209-591-6849 (home) ;This program is based upon the program TSTE, submitted ;to DECUS by T.L. Star and L.T. Nieh, 31-Oct-78 ; **********ASSEMBLY INSTRUCTIONS*********** ; ;EXEC will operate under RT-11 V3 or later systems, and TSX+, V2.1 ;or later. It must be combined with MO.MAC, the modem device handler. ;To install EXEC on a RT-11 system, assemble and link EXEC in the ;normal fashion, i.e. ; MACRO EXEC ; LINK EXEC ;Then assemble and link MO in the same manner, except that you should ;assemble MO with the SYCND.MAC file that was used to generate your ;RT-11 system. Thus: ; MACRO/OBJ:MO SYCND+MO ; LINK MO ;Then you need to move a copy of the newly assembled MO handler to ;your system disk: ; COPY/SYS MO.SAV SY:MO.SYS ;Then INStall the handler under RT-11: ; INSTALL MO ;If you have assembled MO properly for your RT-11 system, the monitor ;should accept the installation of the device. You are then ready ;to run EXEC. See EXEC.DOC for more info on how to use the program. ;It should be noted that before assembling MO.MAC you should modify ;(if necessary) the device addresses listed in the source to agree with ;the addresses used by your serial I/O board that is connected to the ;modem. ;For TSX+ users, you follow the same proceedure as above, as TSX+ ;requires that RT-11 recognize any device you attempt to use under ;TSX+. This means you should complete the RT-11 installation, then ;do a second assembly of MO.MAC, except you have to change the symbol ;MMG$T so it is equal to 1 instead of 0. After you have linked the ;resulting .OBJ file, then you have to transfer it to your TSX+ system ;disk, as MO.TSX. You will then have to re-gen a new TSX+ system, ;after altering TSGEN to include the MO handler in it's list of ;authorized devices. ;A note for TSX+ users: You must allow for an additional 8 user ;defined activation characters in your TSX+ system. In the module ;TSGEN.MAC from your TSX+ system, the present value of MXSPAC must ;be increased by 8. If you do not allow enough activation characters, ;EXEC's keyboard interface will not operate properly. ;For HT-11 users, you will need to expand, assemble and link ;the file EXEC.MAC, using your HT-11 software tools. Assuming ;you have a fresh disk in DX1 that contains only EXEC.MAC and ;MO.HT, do the following: ; .R EXPAND ; *EXEC=EXEC ; ^C ; .R ASEMBL ; *EXEC=EXEC ; ^C ; R LINK ; EXEC=EXEC ; ^C ;After that is done, then you must assemble the HT-11 version ;of MO. This is the file MO.HT. Do the same as above, except ;substitute MO for the filename EXEC. After MO is assembled, ;transfer a copy of MO.SAV to SY: and name it MO.SYS. Then you ;have to patch the monitor so that it recognizes the MO handler. ;Make sure you have a backup copy of MONITR.SYS in case you ;screw up!! With your working system disk in SY:, run the program ;PATCH thus: ; .R PATCH ; ; PATCH Version XX ; FILENAME--- ; *SY:MONITR.SYS/M ; *17000;0R ; *16454/ 0 51630 ; *16474/ 0 6375 ; *13640/ 0 1542 ; *E ;What you have just done is tell the monitor about the MO ;handler. 51630 is the RAD50 name of the handler, 6375 is the ;device status, and 1542 is the size of the handler. These ;three values are need so that HT-11 'knows' about MO.SYS. After ;you have patched the system, re-boot HT-11 and you should be able ;to execute the program EXEC. Note: The locations given for patching ;MO into the monitor are for HT-11 Version H01A-5. Previous ;versions of HT-11 should be the same, but have not been tested. ;********************************************************* ;All EXEC commands begin with a LINE FEED, followed by ;any of the following keys (upper/lower case ok): ;B = Set baud rate ;C = Toggle upper/lower case conversion ;D = Close receiver file ;E = Toggle Half/Full Duplex ;H = Help with EXEC functions ;K = Break ;L = Toggle transmission of LFs to host ;O = Exit EXEC to RT-11 [disable interrupts only] ;P = Printer on code ;R = Open receiver file ;T = Transmit file ;W = Toggle receive file on and off ;Z = Printer off code ;1 = Auto logon sequence #1 ;2 = Auto logon sequence #2 ;3 = Auto logon sequence #3 ;DEL = Toggle conversion of DEL to BS ;ESC = Terminate EXEC program & drop modem line ;The following characters function only while in the file ;transmit mode - they are NOT preceded by a LINE FEED ;CNTRL-Y = Abort file transmission ;SPACE = Pause when transmitting file to remote ;******************************************************* ;The following are used for CSEXEC transfer SI = 17 ;Shift into protocol SO = 16 ;Shift out of protocol NAK = 25 ;Abort/end transfer DLE = 20 ;Transparancy flag CTRLC = 3 ;Control C SOH = 1 ;Start of text ETX = CTRLC ;End of text EOT = 4 ;End of transmission ESC = 33 ;Escape character ;CSEXEC Status word flags TFTYPE = 1 ;0=ASCII transfer, 1=Binary Transfer TRNSFR = 2 ;1=Data transfer in progress ESCFLG = 4 ;1=Escape sequence in progress EOTFLG = 10 ;1=EOT received MSKFLG = 20 ;0=Ok to mask, 1=do not mask EXEFLG = 40 ;1=Executive mode enabled ; Console terminal addresses/vector ; (not used for TSX-plus) KVEC = 340 ;Keyboard vector KSTAT = 176540;Keyboard status register KBUF = 176542;Keyboard buffer ; Misc definitions, I/O channel assignments ; CTRLS = 23 ;Control S (DC3 - XOFF) CTRLQ = 21 ;Control Q (DC1 - XON ) CTRLY = 31 ;Control Y DEL = 177 ;Delete CR = 15 ;Carriage return BS = 10 ;Backspace LF = 12 ;Line feed BELL = 7 ;Bell character SPACE = 40 ;Space RMON = 54 ;Resident monitor address ERRWD = 52 ;Error word JSW = 44 ;Job status word OUTCHN = 2 ;Transmit channel no. INCHN = 3 ;Receive channel no. LPCHN = 4 ;Line printer channel CSCHAN = 5 ;CSEXEC channel MOCHAN = 6 ;Modem channel ; Define the size of the modem ring buffer BUFSIZ = 4096. ;Define 4K ring buffer KBFSIZ = 120. ;Define 120 character keyboard input buffer ; Define special functions for modem handler ; RD$ON = 377 ;Turn read interrupt on, set DTR RD$OF = 376 ;Turn read interrupt off, clear DTR (drop phone line) IN$OFF = 375 ;Turn reader interrupt off, leave DTR untouched WRT$Q = 374 ;Write in program query BA$UD = 373 ;Set baud rate BR$K = 372 ;Send a break to the remote TST$CAR = 371 ;Test for modem carrier ; Baud rates ; B$LOW = 74000 ;1200 baud B$MED = 54000 ;300 baud B$FST = 124000 ;2400 baud ;***************************************************** .MCALL .REGDEF,.PRINT,.EXIT,.CSISPC .MCALL .ENTER,.LOOKUP,.FETCH,.READW .MCALL .TTYOUT,.WAIT,.WRITW,.CLOSE .MCALL .PURGE,.SERR,.TTINR,.SPFUN .REGDEF ;***************************************************** START: .SERR ;Let program handle fatal errors MOV #TSX,R0 ;Test for TSX EMT 375 BCS SETUP ;Branch if RT-11 COM TSXFLG ;Else set TSX flag MOV #LOCK,R0 ;Lock program in low memory EMT 375 ;For TSX+ only .PRINT #KBSET ;Make TSX+ pass all control characters SETUP: BIS #50100,@#JSW ;Put keyboard single character mode MOV #LIMIT,FREE ;Start of free area MOV #BUFSIZ,RSIZE ;Store size of ring buffer CLR BCOUNT ;Clear active character count MOV #BUFSIZ,CNT ;Initialize char count MOV #BUFA,ADDR2 ;Process adr pointer MOV #BUFSIZ,CNT2 ;Process char count TST TSXFLG ;RT-11? BNE SETMO ;No, skip this MOV #BUFE,KADDR ;Keyboard buffer adr pntr MOV #KBFSIZ,KCNT ;Keyboard buffer char count CLR KCOUNT ;Keyboard active char count MOV #BUFE,KADDR2 ;Keyboard process adr pntr MOV #KBFSIZ,KCNT2 ;Keyboard process char count MOV @#KVEC,SAVE1 ;Save address of rt-11 keyboard MOV #TTYINT,@#KVEC ;Put in our address BIS #100,@#KSTAT ;Enable keyboard interrupts SETMO: MOV FREE,R1 ;Get free area .FETCH R1,#MOSP ;Get modem handler BCC 2$ ;Branch if no error .PRINT #MSG1 ;Else we have a .FETCH error JMP FATAL ;Terminate program 2$: MOV R0,FREE ;Update free area .LOOKUP #MOAREA,#MOCHAN,#MOSP ;Lookup the modem handler BCC 4$ ;Skip if no error .PRINT #MSG13 ;Else inform user of error JMP FATAL ;and abort program 4$: TST TSXFLG ;TSX+ or RT-11? BEQ 8$ ;RT-11 doesn't check for carrier .SPFUN #MOFUN,#MOCHAN,#TST$CAR,#RSIZE ;Test to see if modem is in use BCC 6$ ;Error? .PRINT #MSG14 ;Yes, tell user function failed JMP EXIT1 ;and abort the program 6$: BIT #1,SPFLG ;Carrier detected? BEQ 8$ ;No, ok to use modem channel .PRINT #MSG11 ;Else tell user modem is busy JMP EXIT1 ;and end program 8$: .SPFUN #MOFUN,#MOCHAN,#RD$ON,#RSIZE ;Set modem to special mode BCC 10$ ;Branch if no error .PRINT #MSG14 ;Tell user the function failed JMP EXIT1 ;And abort the program 10$: MOV #B$LOW,RATE ;Get code for 1200 baud SWAB RATE ;Put it in the low byte .SPFUN #MOFUN,#MOCHAN,#BA$UD,#RATE ;Set to 1200 baud (only affects DLV11E) BCC 12$ ;Branch if no error .PRINT #MSG14 ;Tell user the function failed JMP EXIT1 ;And abort the program 12$: .PRINT #CLS ;Clear screen .PRINT #MSGA ;Sign on CLR DUPFLG ;Make sure we are in Full duplex CLR CMDFLG ;Clear command flag CLR CSSTAT ;Clear CSEXEC status word CLR PSFLG ;Clear pause flag ;***************************************************** ;MAIN PROGRAM LOOP READY: JSR PC,PRINT ;Check print buffer BIT #ESCFLG,CSSTAT ;Escape sequence in progress (CSEXEC)? BEQ 2$ ;No, continue JSR PC,CSEXEC ;Else go do protocol CLR CSSTAT ;Clear executive mode 2$: JSR PC,TTYIN ;Keyboard input ? BCS READY ;No, loop JSR PC,CKMND ;Check for EXEC commands BR READY ;And then do it again ;***************************************************** ;Check for EXEC commands CKMND: TST CMDFLG ;Command sequence in progress? BEQ 8$ ;No, try to send character CLR CMDFLG ;Else process command sequence JSR PC,LCCVT ;Make sure commands are UC MOV #DSPTBL,R1 ;Get address of dispatch table 2$: CMP (R1),#-1 ;End of table? BEQ 4$ ;Yes, invalid command CMP R0,(R1)+ ;Character in command table? BNE 6$ ;No, try next one MOV 2(R1),R2 ;Get routine argument JSR PC,@(R1) ;Go do it 4$: RTS PC ;Return 6$: CMP (R1)+,(R1)+ ;To next table entry BR 2$ ;Loop through table 8$: CMPB R0,#DEL ;Delete character? BNE 10$ ;No, skip TST DELFLG ;Convert the delete? BEQ 10$ ;No, leave it alone MOV #BS,R0 ;Else convert it to a backspace BR 12$ 10$: CMPB R0,#LF ;A line feed (command character)? BNE 12$ ;No, send everything else COM CMDFLG ;Set command flag RTS PC ;and return 12$: JSR PC,SEND ;Send everything else RTS PC ;***************************************************** ;Process CSEXEC escape sequences here CSEXEC: BIC #ESCFLG!TRNSFR,CSSTAT ;Clear escape & transfer bits CLR ERRFLG ;Clear error flag JSR PC,HOSTIN ;Get character from host BCS 4$ ;Abort? CMPB R0,#'I ;Send ID string? BNE 2$ ; JMP SNDID ;Send ID string to host 2$: CMPB R0,#'A ;Initialize for data transmission? BNE 4$ JMP MNTRAN ;Go to transfer routine 4$: JMP ABORT ;Else abort the sequence ;***************************************************** ;Initialize for CSEXEC data transfer MNTRAN: .PRINT #MSGO ;Tell user we are initializing MOV #'0,RECNBR ;Init record number JSR PC,GET1 ;Get a command line BCS 6$ ;Abort? CMPB 1(R3),#'A ;ASCII transfer? BEQ 2$ ;Yes, continue BIS #TFTYPE,CSSTAT ;Else set Binary transfer 2$: CMPB (R3),#'U ;Upload? BNE 4$ ;no JMP UPLOAD ;Else go do upload 4$: CMPB (R3),#'D ;Download? BNE 6$ ;No, abort JMP DNLOAD ;Else go do download 6$: JMP ABORT ;Abort ;***************************************************** ;Routine to parse filespec PARSE: BIS #TRNSFR,CSSTAT ;We are transferring now MOV #CSBUFF,R3 ;Point to buffer TST (R3)+ ;Point to filespec MOV #FBUFF,R1 ;Point to CSI buffer 2$: CMPB (R3),#CR ;End of filespec? BEQ 4$ MOVB (R3)+,(R1)+ ;Move byte into buffer BR 2$ 4$: MOVB #'=,(R1)+ ;Finish filespec CLRB (R1) MOV #FBUFF,R1 ;Reset to start of buffer MOV SP,R2 ;Save stack .CSISPC #OUTSP,#DEXT,R1 ;process filename MOV R2,SP ;Restore stack BCC 8$ ;Error? .PRINT #MSG9 ;Yes, tell user 6$: SEC ;Set abort flag RTS PC ;and return 8$: MOV FREE,R0 ;Get current free area .FETCH R0,#OUTSP ;Load handler BCC 10$ ;Error? .PRINT #MSG1 ;Yes, fetch error BR 6$ ;Abort transfer 10$: MOV R0,FREE ;Update free area .PURGE #CSCHAN ;Clear channel first TST TSXFLG ;TSX? BNE 12$ ;Skip if TSX MOV @#RMON,R0 ;Force directory read CLR 256(R0) ;So we can interchange disks 12$: CLC ;Clear abort flag RTS PC ;and return ;***************************************************** ;Routine to handle downloading DNLOAD: .PRINT #MSGL ;Download message JSR PC,PARSE ;Parse filespec BCC 2$ ;Error? JMP ABORT ;Yes, abort it 2$: .LOOKUP #CSAREA,#CSCHAN,#OUTSP ;See if file exists BCS 6$ ;No, you can open it ok .PRINT #MSGQ ;Else ask user what to do .PURGE #CSCHAN ;Purge channel first 4$: JSR PC,TTYIN ;Get input BCS 4$ JSR PC,LCCVT ;Upper case only .TTYOUT ;Echo the response JSR PC,CRLF ;CR/LF for formatting CMPB R0,#'S ;Supercede? BEQ 6$ ;Yes JMP ABORT ;Else abort transfer 6$: MOV OUTSP+8.,R1 ;Get filesize (if any) .ENTER #CSAREA,#CSCHAN,#OUTSP,R1 ;Open the file BCC 10$ ;Error? 8$: .PRINT #MSG2 ;File open error .PURGE #CSCHAN ;Dump channel JMP ABORT ;and abort transfer 10$: TST R0 ;No room for file [TSX only] BEQ 8$ ;Yes, open error MOV R0,CSMAX ;Save size of file MOV #BUFC,CSPNT ;Set up buffer pointer MOV #512.,CSCHR ;Character count CLR CSBLK ;Block count DOWN1: JSR PC,GETBLK ;Get a checksummed block of data BCC 2$ INC ERRFLG ;Set error flag BR 10$ ;And attempt to close file 2$: BIT #EOTFLG,CSSTAT ;End of transmission? BNE 10$ ;Yes, wrap it up MOVB (R3)+,@CSPNT ;Move character into buffer INC CSPNT ;Increment pointer DEC CSCHR ;Block full? BNE 8$ ;No, continue .WRITW #CSAREA,#CSCHAN,#BUFC,#256.,CSBLK BCC 4$ ;Error? .PRINT #MSG5 ;Write error .PURGE #CSCHAN ;Dump channel JMP ABORT 4$: INC CSBLK ;Next block CMP CSBLK,CSMAX ;Is this the last block? BLT 6$ ;No INC ERRFLG ;Set error flag .PRINT #MSGR ;Tell user BR 14$ 6$: MOV #512.,CSCHR ;Reset pointers MOV #BUFC,CSPNT 8$: DEC MSGLEN ;Message finished? BNE 2$ ;No, back for more BR DOWN1 ;Else get another line 10$: CMP CSPNT,#BUFC ;Starting new block? BEQ 14$ ;Yes, no need to pad 12$: CLRB @CSPNT ;Pad buffer with nulls INC CSPNT DEC CSCHR BNE 12$ .WRITW #CSAREA,#CSCHAN,#BUFC,#256.,CSBLK BCC 14$ .PRINT #MSG5 ;Error? 14$: .CLOSE #CSCHAN ;Close it TST ERRFLG ;Check if error in progress BEQ 16$ ;No error, continue JMP ABORT ;Else abort transmission 16$: MOVB #'.,R0 ;Tell host we got it JSR PC,SEND CLR CSSTAT ;Clear protocol mode RTS PC ;***************************************************** ;Routine to handle uploading UPLOAD: .PRINT #MSGM ;Beginning upload message JSR PC,PARSE ;Parse filespec BCC 2$ ;Error? JMP ABORT ;Yes, abort this 2$: .LOOKUP #CSAREA,#CSCHAN,#OUTSP ;Open file BCC 4$ ;File exists? .PRINT #MSG10 ;File not found message JMP ABORT ;No, abort transfer 4$: BIC #MSKFLG,CSSTAT ;Allow normal masking CLR UPBLK ;Block number to read MOVB #'.,R0 ;Tell host we are ready JSR PC,SEND JSR PC,HOSTIN ;Get character from host BCS 8$ ;Abort? CMPB R0,#'. ;Right prompt? BNE 8$ ;No, abort this 6$: .READW #CSAREA,#CSCHAN,#BUFC,#256.,UPBLK ;Read a block BCC 10$ ;error or EOF? TSTB @#ERRWD ;EOF? BEQ 16$ ;Yes, transfer finished 8$: .CLOSE #CSCHAN ;Else read error, close chan JMP ABORT 10$: MOV #CSBUFF,R3 ;Point to start of CS buffer MOV #BUFC,R2 ;Get address of input file buffer CLR MSGLEN ;Init message length 12$: MOVB (R2)+,(R3)+ ;Put data in buffer INC MSGLEN ;bump counter CMP MSGLEN,#256. ;Buffer full? BNE 12$ ;No, back for more JSR PC,SNDBLK ;Send a checksummed line BCS 8$ MOV #CSBUFF,R3 ;Point to start of CS buffer CLR MSGLEN ;Init message length 14$: MOVB (R2)+,(R3)+ ;put second half of block in INC MSGLEN CMP MSGLEN,#256. ;Buffer full? BNE 14$ ;No, back for more JSR PC,SNDBLK ;send a checksummed line BCS 8$ INC UPBLK ;next block BR 6$ ;back for another block 16$: .CLOSE #CSCHAN ;close input channel BIS #MSKFLG,CSSTAT ;Clear mask MOV #1,MSGLEN ;Message length MOV #EOT,@#CSBUFF ;send EOT JSR PC,SNDBLK ;send checksummed line BCS 8$ CLR CSSTAT ;Clear protocol mode RTS PC ;***************************************************** ;Send a checksummed block to remote SNDBLK: TST MSGLEN ;No message? BEQ 20$ INC RECNBR ;bump record number CMPB RECNBR,#'9 ;Roll over? BLOS 2$ ;No MOVB #'0,RECNBR ;Else reset record number 2$: MOV #CSBUFF,R3 ;point to buffer MOV MSGLEN,R1 ;message length CLR CKSUM ;Clear checksum MOVB #SOH,R0 ;Start the message JSR PC,SEND MOVB RECNBR,R0 ;send record number JSR PC,SEND JSR PC,UPDATE ;update checksum 4$: MOVB (R3)+,R0 ;Get data byte JSR PC,UPDATE ;Update checksum TSTB R0 ;Is this character a null? BEQ 6$ ;Yes, don't display it BIT #TFTYPE,CSSTAT ;ASCII transfer? BNE 6$ ;No, binary, don't display .TTYOUT ;Else display is ASCII 6$: BIT #MSKFLG,CSSTAT ;Ok to mask? BNE 12$ ;No, if flag set TSTB R0 ;Null byte? BEQ 12$ ;Yes, don't mask it CMPB R0,#4 ;ASCII 1-4? BHI 10$ ;no 8$: BISB #100,R0 ;Else mask it MOVB R0,R4 ;Save character MOVB #DLE,R0 JSR PC,SEND ;Send mask MOVB R4,R0 ;Restore character 10$: CMPB R0,#17 ;Mask ASCII 17-25 BLO 12$ CMPB R0,#25 BLOS 8$ 12$: JSR PC,SEND ;Send character DEC R1 ;Decrement counter BNE 4$ ;Message finished MOVB #ETX,R0 ;Send End of text JSR PC,SEND CMPB CKSUM,#40 ;Cksum <40? BHIS 14$ ;nope MOVB #DLE,R0 ;send it masked JSR PC,SEND BISB #100,CKSUM ;Mask it 14$: MOVB CKSUM,R0 ;send it JSR PC,SEND 16$: JSR PC,HOSTIN ;Get host's reply BCS 22$ ;Abort? BIT #TFTYPE,CSSTAT ;Binary transfer? BEQ 18$ ;No, no need to display reply .TTYOUT ;Else display the reply 18$: CMPB R0,#'. ;Transmission ok? BEQ 20$ ;Yes, return CMPB R0,#'/ ;Invalid transmission? BNE 16$ ;No, try to get another reply .PRINT #MSGP ;Tell user we are re-sending BR 2$ 20$: TST (PC)+ ;clear abort flag 22$: SEC ;Set abort flag RTS PC ;***************************************************** ;Routine to receive a checksummed block from remote GETBLK: MOVB #'.,R0 ;Prompt remote for next record JSR PC,SEND BIT #TFTYPE,CSSTAT ;Binary transfer? BEQ GET1 ;No, don't display prompt .TTYOUT ;Else display it (Binary) GET1: INC RECNBR ;bump record number CMPB RECNBR,#'9 ;Roll over? BLOS 2$ ;No MOVB #'0,RECNBR ;Else reset record number 2$: MOV #CSBUFF,R3 ;Get start of buffer JSR PC,HOSTIN ;Get a character from remote BCC 6$ ;Abort? 4$: RTS PC ;Yes, return 6$: CMPB R0,#SOH ;Start of heading? BEQ 8$ ;Yes, start receiving the record CMPB R0,#ETX ;ETX by itself is questionable BNE 2$ MOVB #'/,R0 ;Send a logical nak JSR PC,SEND BR 2$ 8$: CLR CKSUM ;Clear checksum BIC #EOTFLG,CSSTAT ;Clear EOT bit CLR MSGLEN ;and message length 10$: JSR PC,HOSTIN ;Get sender's record number BCS 4$ MOVB R0,RECHST ;Save host record number BR 24$ ;and update checksum 12$: JSR PC,HOSTIN ;Get a character BCS 4$ CMPB R0,#NAK ;A nak? BNE 14$ SEC ;Set for abort RTS PC 14$: CMPB R0,#ETX ;End of text? BEQ 26$ CMPB R0,#EOT ;End of transmission? BNE 16$ BIS #EOTFLG,CSSTAT ;set end of transmission flag 16$: CMPB R0,#DLE ;Masked character comming? BNE 20$ ;No 18$: JSR PC,HOSTIN ;Else get next character BCS 4$ BICB #340,R0 ;Make control character 20$: BIT #TRNSFR,CSSTAT ;Transfer in progress? BEQ 22$ ;No, don't display this BIT #TFTYPE,CSSTAT ;Binary transfer? BNE 22$ ;Yes, don't display this TSTB R0 ;Null byte? BEQ 22$ ;Then don't display it .TTYOUT ;Display byte 22$: MOVB R0,(R3)+ ;Move character into buffer INC MSGLEN ;Bump message length 24$: JSR PC,UPDATE ;Update checksum BR 12$ ;And back for more 26$: JSR PC,HOSTIN ;Get checksum BCS 4$ CMPB R0,#DLE ;Masked? BNE 30$ 28$: JSR PC,HOSTIN ;Get masked character BCS 4$ BICB #340,R0 ;Unmask character 30$: CMPB CKSUM,R0 ;Checksum match? BEQ 34$ ;Yes, continue 32$: .PRINT #MSGP ;No, tell user MOVB #'/,R0 ;and request retransmission JSR PC,SEND BR 2$ ;and start over 34$: CMPB RECNBR,RECHST ;Record numbers match? BEQ 36$ ;Yes BHI 4$ ;Abort if greater than expected MOVB #'.,R0 ;Else it must be a duplicate record JSR PC,SEND ;Accept it, and try again BIT #TFTYPE,CSSTAT ;Binary transfer? BEQ 2$ ;No, don't display it .TTYOUT ;Else display it BR 2$ 36$: MOV #CSBUFF,R3 ;Point to start of buffer RTS PC ;***************************************************** ;Routine to update checksum UPDATE: MOVB CKSUM,R4 ;Get checksum ASLB R4 ;Rotate 1 bit left ADC R4 ;Add carry (if any) MOVB R4,R4 ;Sign extend it ADD R0,R4 ;Add new checksum ADC R4 ;Add carry (if any) MOVB R4,CKSUM ;save new checksum RTS PC ;***************************************************** ;Send ID string to host SNDID: .PRINT #MSGK ;Tell user we are sending ID MOV #SYSID,R1 ;Get address of ID string JSR PC,SNDLIN ;Send it RTS PC ;***************************************************** ;Routine to get character from Remote HOSTIN: JSR PC,SCAN ;Check keyboard for abort BCC 2$ ;Abort this? RTS PC ;Yes 2$: JSR PC,REMOTE ;Check remote input BCS HOSTIN ;Loop if nothing 4$: CMPB R0,#NAK ;Abort this? BEQ 6$ ;Branch if yes TST (PC)+ ;Clear abort flag 6$: SEC ;Set abort flag RTS PC ;and return ;***************************************************** ;Abort CSEXEC mode here ABORT: .PRINT #MSGN ;Inform user CLR CSSTAT ;Clear status word MOVB #NAK,R0 ;Send a nak to host JSR PC,SEND ;to kill transfer RTS PC ;and return to terminal mode ;***************************************************** ;Scan keyboard for abort character SCAN: JSR PC,TTYIN ;Check keyboard BCS 2$ ;Nothing entered CMPB R0,#CTRLC ;Was character a CTRL-C? BEQ 4$ ;Yes, abort this JSR PC,SEND ;Else send character 2$: TST (PC)+ ;Clear carry flag 4$: SEC ;Set abort flag for abort RTS PC ;Return ;***************************************************** ;TRANSMIT FILE TO THE REMOTE COMPUTER TRANS: .PURGE #OUTCHN ;Make sure channel is free .PRINT #MSG8A ;Ask for filespec JSR PC,FILSPC ;Get filespec BCS RETRN ;Abort if error MOV FREE,R1 ;Fetch handler .FETCH R1,#OUTSP BCC 2$ ;Error? .PRINT #MSG1 ;Yes, inform user RTS PC ;And return 2$: MOV R0,FREE ;Update free memory TST TSXFLG ;TSX? BNE 4$ ;Skip if TSX MOV @#RMON,R0 ;Get RMON location CLR 256(R0) ;Force directory read 4$: .LOOKUP #TAREA,#OUTCHN,#OUTSP ;Open transmit file BCC 6$ ;Error? .PRINT #MSG10 ;Yes, file not found RTS PC ;And return 6$: .PRINT #MSGD CLR R2 ;Block no. 8$: .READW #TAREA,#OUTCHN,#BUFC,#256.,R2;Read a block BCS 20$ ;Read error or eof ? MOV #512.,R4 ;No, char count MOV #BUFC,R5 ;Point to buffer 10$: MOVB (R5)+,R0 ;Get char TSTB R0 ;Null ? BEQ 18$ ;Yes, skip TST PSFLG ;Ok to send to remote? BEQ 12$ ;Yes JSR PC,PAUSE ;Else wait for remote to clear 12$: JSR PC,SEND ;Send character JSR PC,PRINT ;Check echo JSR PC,TTYIN ;Check keyboard BCS 18$ ;Continue if nothing CMPB R0,#SPACE ;A space? BNE 16$ ;No, go on 14$: JSR PC,PRINT ;Check print JSR PC,TTYIN ;Else wait for a character BCS 14$ 16$: CMPB R0,#CTRLY ;Cntrl-Y? BNE 18$ ;No go on .PURGE #OUTCHN ;Dump channel .PRINT #MSGH ;Print message RTS PC 18$: DEC R4 ;Dec char count BNE 10$ ;Block done ? INC R2 ;Yes, next block BR 8$ ;Again 20$: TSTB @#ERRWD ;EOF ? BEQ 22$ ;Yes, done .PRINT #MSG3 ;No, read error 22$: .CLOSE #OUTCHN ;Close file JSR PC,PRINT ;Check print .PRINT #MSGC ;File transmitted RETRN: RTS PC ;***************************************************** ;OPEN RECEIVER FILE OPEN: .WAIT #INCHN ;Channel active ? BCS 2$ ;No, channel available .PRINT #OPNERR ;File already open, skip RTS PC 2$: .PURGE #INCHN ;Make sure channel is clear .PRINT #MSG8 ;Ask user for file name JSR PC,FILSPC ;Get file name BCC 4$ ;Skip if no error RTS PC ;Else abort 4$: MOV FREE,R1 .FETCH R1,#OUTSP ;Get handler BCC 6$ ;Error? .PRINT #MSG1 ;Fetch error RTS PC ;Return 6$: MOV R0,FREE ;Update free area TST TSXFLG ;TSX? BNE 8$ ;Skip if TSX MOV @#RMON,R0 ;Get RMON address CLR 256(R0) ;Force directory read 8$: .LOOKUP #RAREA,#INCHN,#OUTSP ;File exists? BCS 12$ ;No, create it .PRINT #MSGI ;Ask user for permission .PURGE #INCHN ;Clear I/O channel first 10$: JSR PC,TTYIN ;Keyboard BCS 10$ JSR PC,LCCVT ;Make sure only UC .TTYOUT ;Echo the character JSR PC,CRLF ;Send CR/LF for formatting CMPB R0,#'S ;Supercede? BEQ 12$ ;Yes CMPB R0,#'R ;Re-enter filespec? BEQ 2$ ;Yes .PRINT #MSGJ ;Else file is not superceded RTS PC 12$: MOV OUTSP+8.,R1 ;Get size of file (if any) .ENTER #RAREA,#INCHN,#OUTSP,R1 ;Open receiver file BCC 16$ ;Error ? 14$: .PRINT #MSG2 ;Yes, open error .PURGE #INCHN ;Dump channel RTS PC ;And return 16$: TST R0 ;No room for file [TSX only]? BEQ 14$ ;File error MOV #BUFB,INPNT ;Buffer pointer CLR INBLK ;Block count MOV #512.,INCHR ;Character count MOV R0,MAXBLK ;Save filesize just in case .PRINT #MSGE ;File open message CLR TGFLG ;Clear toggle flag INC RXFLG ;Set Receiver flag RTS PC ;***************************************************** FCLOSE: MOV #CTRLS,R0 ;Shut off remote JSR PC,SEND ;Send cntrl-s DEC INBLK ;Restore last block .PRINT #MSG12 ;Tell user the file is full .CLOSE #INCHN ;Close the file .PRINT #MSGB ;Tell user it is closed CLR RXFLG ;Clear receiver flag CLR TGFLG ;Clear toggle flag RTS PC ;***************************************************** CLOSE: TST RXFLG ;Channel active ? BNE 2$ ;Yes, can close .PRINT #CLSERR ;No, already closed BR 6$ 2$: CLRB @INPNT ;Pad buffer with nulls INC INPNT DEC INCHR BNE 2$ MOV #BUFB,R1 ;Write last block MOV INBLK,R3 .WRITW #RAREA,#INCHN,R1,#256.,R3 BCC 4$ ;Error ? .PRINT #MSG5 4$: .CLOSE #INCHN ;Close file .PRINT #MSGB ;File closed CLR RXFLG ;Clear receiver flag 6$: RTS PC ;***************************************************** BREAK: .SPFUN #MOFUN,#MOCHAN,#BR$K ;Send a break BCC 1$ ;Branch if no error .PRINT #MSG14 ;Tell user we failed JMP EXIT1 ;and abort program 1$: RTS PC ;***************************************************** ;TRANSMIT A CHARACTER TO REMOTE SEND: MOVB R0,CHRSAV ;Save character to be output 2$: .SPFUN #MOFUN,#MOCHAN,#WRT$Q,#WRTFLG,#1,,#0 ;Check to see if modem busy BCC 4$ ;Branch if no error .PRINT #MSG14 ;Tell user we failed JMP EXIT1 ;and abort the program 4$: TSTB WRTFLG ;Busy? BNE 2$ ;Non-zero if busy 6$: MOVB CHRSAV,R0 ;Restore character BIT #EXEFLG,CSSTAT ;Executive mode? BNE 10$ ;Yes, transfer byte untouched JSR PC,LCOPT ;Check if LC ok MOVB R0,CHRSAV ;Change our saved copy CMPB R0,#LF ;Is character a line feed? BNE 8$ ;No, continue TST LFFLG ;Ok to send LF's? BNE 12$ ;No, ignore the character 8$: TST DUPFLG ;Half duplex? BEQ 10$ ;No, must be full duplex .TTYOUT ;Else display character 10$: .WRITW #MAREA,#MOCHAN,#CHRSAV,#1 ;Send character BCC 12$ ;Branch if no error .PRINT #MSG15 ;Tell user we have write error JMP HANGUP ;and abort the program 12$: MOVB CHRSAV,R0 ;Resore character to R0 RTS PC ;***************************************************** ;PAUSE ROUTINE PAUSE: MOV R0,-(SP) ;Save R0 2$: TST PSFLG ;Ok to resume sending? BEQ 4$ ;Yes JSR PC,PRINT ;Check remote echo JSR PC,TTYIN ;Keyboard input BCS 2$ ;No, skip BICB #200,R0 ;Strip parity CMPB R0,#CTRLQ ;Control Q? BNE 2$ ;No, wait some more 4$: CLR PSFLG MOV (SP)+,R0 ;Restore R0 RTS PC ;***************************************************** ;PRINT REMOTE INPUTS AND TRANSMISSION ECHOS PRINT: JSR PC,REMOTE ;Character to print? BCC 2$ ;Yes, process RTS PC ;Else return 2$: BICB #200,R0 ;Strip parity JSR PC,LCOPT ;Check if LC ok BIT #EXEFLG,CSSTAT ;protocol mode enabled? BEQ PRINT1 ;no, skip this CMPB R0,#SO ;Shift out of protocol mode? BNE 4$ ;no CLR CSSTAT ;Else clear status word RTS PC 4$: CMPB R0,#ESC ;escape sequence starting? BNE PRINT1 ;No, continue processing BIS #ESCFLG,CSSTAT ;Set escape sequence flag RTS PC ;and return PRINT1: MOVB R0,CHRSAV ;Save character .TTYOUT ;Print it TST RXFLG ;Receiver file active ? BEQ 10$ ;No, skip CMPB R0,#DEL ;Delete ? BEQ 10$ ;Yes, skip CMPB R0,#LF ;Line feed? BNE 4$ ;No, skip TST TGFLG ;Is file toggle on or off? BEQ 2$ ;Toggle on MOVB #'*,R0 ;Tell user filesave is off .TTYOUT BR 10$ 2$: MOV #':,R0 ;Filesave is on .TTYOUT 4$: TST TGFLG ;Filesave on? BNE 10$ ;No, skip this MOVB CHRSAV,@INPNT ;Move char to in buffer INC INPNT ;Advance pointer DEC INCHR ;Block full? BNE 10$ ;No, skip MOV #BUFB,R1 ;Yes, write a block MOV INBLK,R3 .WRITW #RAREA,#INCHN,R1,#256.,R3 BCC 6$ ;Error? JMP RXFATL ;Yes, fatal error 6$: INC INBLK ;Reset pointers CMP INBLK,MAXBLK ;Is this the last block? BLT 8$ ;No keep going JSR PC,FCLOSE ;Yes, force file closed BR 10$ 8$: MOV #512.,INCHR MOV #BUFB,INPNT 10$: TST LPFLG ;Line printer active? BEQ 14$ ;No, skip MOVB CHRSAV,@LPPNT ;Move char into buffer INC LPPNT ;Bump pointer DEC LPCHR ;Block full? BNE 14$ ;No, skip MOV #BUFD,R1 ;Yes, write a block MOV LPBLK,R3 .WRITW #LPAREA,#LPCHN,R1,#256.,R3 BCC 12$ ;Error? JMP LPFATL ;Yes, fatal error 12$: INC LPBLK MOV #512.,LPCHR ;Reset pointers MOV #BUFD,LPPNT 14$: RTS PC ;Return ;***************************************************** ;PRINTER ENABLE LPOPN: .WAIT #LPCHN ;Channel active? BCS 2$ ;No, channel available .PRINT #MSG6 ;Already open, skip BR 8$ 2$: MOV FREE,R1 .FETCH R1,#LPNAME ;Get LP handler BCC 4$ .PRINT #MSG1 ;Error, tell user RTS PC ;And exit 4$: MOV R0,FREE ;Update free area .ENTER #LPAREA,#LPCHN,#LPNAME ;Open line printer channel BCC 6$ ;Error? .PRINT #MSG2 BR 8$ 6$: MOV #BUFD,LPPNT ;Buffer pointer CLR LPBLK ;Block count MOV #512.,LPCHR ;Character count INC LPFLG .PRINT #MSGF ;Tell user printer is now on 8$: RTS PC ;***************************************************** ;CLOSE LINE PRINTER CHANNEL LPCLS: TST LPFLG ;LP active? BNE 2$ ;Yes, can close .PRINT #MSG7 ;No, not active BR 6$ 2$: CLRB @LPPNT ;Pad with nulls INC LPPNT DEC LPCHR BNE 2$ MOV #BUFD,R1 ;Write last block MOV LPBLK,R3 .WRITW #LPAREA,#LPCHN,R1,#256.,R3 BCC 4$ .PRINT #MSG5 4$: .CLOSE #LPCHN .PRINT #MSGG ;Print message CLR LPFLG 6$: RTS PC ;***************************************************** ;ROUTINE TO GET FILESPEC FILSPC: MOV #FBUFF,R4 ;Set up buffer 2$: JSR PC,TTYIN ;Get keyboard input BCS 2$ CMPB R0,#DEL ;Delete character? BNE 4$ CMPB R4,#FBUFF ;No characters to delete? BEQ 2$ DEC R4 ;Else back up buffer MOV #BS,R0 ;Backspace cursor .TTYOUT MOV #40,R0 ;and delete character .TTYOUT MOV #BS,R0 .TTYOUT BR 2$ 4$: CMPB R0,#LF ;A line feed? BEQ 2$ ;Ignore it CMPB #BS,R0 ;Backspace? BEQ 2$ ;Ignore backspaces .TTYOUT ;Else echo it CMPB R0,#CR ;A CR? BEQ 6$ ;Yes, finish CMP R4,#FBUFF+80. ;End of buffer? BHI 2$ ;Yes, wait for lf MOVB R0,(R4)+ ;Else store character BR 2$ 6$: JSR PC,CRLF ;Send CR/LF for formatting CMPB R4,#FBUFF ;Nothing entered? BEQ 8$ ;Yes, error MOVB #'=,(R4)+ ;Finish filespec for CSI CLRB (R4) ; MOV #FBUFF,R4 ;Reset buffer address MOV SP,R5 ;Save stack pointer .CSISPC #OUTSP,#DEXT,R4 ;CSI in special mode MOV R5,SP ;Restore stack BCC 10$ ;Branch if no error 8$: .PRINT #MSG9 ;Yes, inform user BR 12$ 10$: TST (PC)+ ;Clear error flag 12$: SEC ;Set error flag RTS PC ;Return ;***************************************************** ;Routine to auto-log into network LOGIN: MOV R2,R1 ;Load R1 with address of ID string JSR PC,SNDLIN ;Send a line to remote 2$: JSR PC,GTCHAR ;Check for reply BCS 10$ ;Abort is error flag .TTYOUT ;Echo the character JSR PC,LCCVT ;Convert to UC CMPB R0,#': ;Prompt found? BEQ LOGIN ;Yes, try to send ID again CMPB R0,#'D ;Look for "D" in "User ID" BNE 2$ ;Not found 4$: JSR PC,GTCHAR ;Get next character BCS 4$ ;Loop if nothing CMPB R0,#': ;Prompt character? BNE 2$ ;No, must be error 6$: JSR PC,SNDLIN ;send next part of string 8$: JSR PC,GTCHAR ;Check response BCS 10$ ;Abort if flag set .TTYOUT ;Display it CMPB R0,#': ;Prompt character? BNE 8$ ;No, check again JSR PC,SNDLIN ;Send last part of message .PRINT #ALERT ;Tell operator we are on 10$: RTS PC ;And return ;***************************************************** ;Routine to get a character and check for CNTRL-C abort GTCHAR: JSR PC,TTYIN ;Check keyboard first BCS 2$ ;Character is available CMPB R0,#CTRLC ;A CNTRL-C? BEQ 4$ ;Yes, set abort flag 2$: JSR PC,REMOTE ;Anything from remote? BCS GTCHAR ;No, keep looping BICB #200,R0 ;Clear parity TST (PC)+ ;Else clear carry 4$: SEC ;Set carry flag (abort) RTS PC ;And return ;***************************************************** ;Routine to send a line to the remote SNDLIN: TSTB (R1) ;End of message? BEQ 2$ ;Yes, terminate MOVB (R1)+,R0 JSR PC,SEND ;Send the message BR SNDLIN 2$: TSTB (R1)+ ;bump R1 MOVB #CR,R0 ;Send a CR JSR PC,SEND RTS PC ;***************************************************** ;Routine to get a character from remote REMOTE: TST BCOUNT ;Anything in ring buffer? BEQ 6$ ;No, return with carry set 2$: MOVB @ADDR2,R0 ;Else get character INC ADDR2 ;Advance proc adr pointer DEC BCOUNT ;Dec active character count DEC CNT2 ;Dec proc character count BNE 4$ ;End of buffer? MOV #BUFA,ADDR2 ;Yes, reset pointers MOV #BUFSIZ,CNT2 4$: TST (PC)+ ;Clear carry 6$: SEC ;Else set carry RTS PC ;***************************************************** ;GET A KEYBOARD CHARACTER TTYIN: TST TSXFLG ;Check for TSX system BNE 4$ ;Skip if TSX TST KCOUNT ;Check on buffer for RT-11 BNE 2$ ;Yes, go get it SEC ;Set carry flag RTS PC ;And return 2$: MOVB @KADDR2,R0 ;Get the character INC KADDR2 ;Advance character adr pntr DEC KCOUNT ;Dec active character count DEC KCNT2 ;Dec proc character count BNE 6$ ;End of buffer? MOV #BUFE,KADDR2 ;Yes, reset pointers MOV #KBFSIZ,KCNT2 ; BR 6$ ;and return 4$: .TTINR ;Get a character for TSX+ 6$: RTS PC ;***************************************************** ;Toggle flags TOGFIL: TST RXFLG ;Is file open now? BEQ 10$ ;No, skip TOGGLE=. COM (R2) ;Toggle the flag 10$: RTS PC ;And return ;***************************************************** HELP: .PRINT #HLPMSG ;Print the help message RTS PC ;and return ;***************************************************** ;Lower case/upper case conversion LCOPT: TST LCFLG ;Option enabled? BEQ LCRET ;No, leave alone LCCVT: CMPB R0,#140 ;Check to see if these are LC BLOS LCRET CMPB R0,#173 BHIS LCRET SUB #40,R0 ;Convert LC to UC LCRET: RTS PC ;and return ;***************************************************** ;Routine to send CR/LF to console terminal CRLF: MOV R0,-(SP) ;Save register 0 MOVB #CR,R0 ;Send CR .TTYOUT MOVB #LF,R0 ;Send LF .TTYOUT MOV (SP)+,R0 ;Restore register 0 RTS PC ;***************************************************** ;CONSOLE INTERRUPT SERVICE ROUTINE TTYINT: MOVB @#KBUF,@KADDR ;Mov char into ring buffer BICB #200,@KADDR ;Get rid of parity INC KCOUNT ;Inc char count INC KADDR ;Advance keyboard address ptr DEC KCNT ;Dec ring buffer char cnt BNE 2$ ;End of buffer? MOV #BUFE,KADDR ;Yes, reset pointers MOV #KBFSIZ,KCNT 2$: RTI ;****************************************************** ;Receiver file Fatal I/O RXFATL: .PURGE #INCHN ;Dump receiver channel .PRINT #MSG5 ;Tell user CLR RXFLG ;Clear RX file flag CLR TGFLG ;Clear toggle RTS PC ;****************************************************** ;Line printer fatal I/O LPFATL: .PURGE #LPCHN ;Dump LP channel .PRINT #MSG5 ;Tell user CLR LPFLG ;Clear LP flag RTS PC ;****************************************************** ;TERMINATE PROGRAM HERE HANGUP: .SPFUN #MOFUN,#MOCHAN,#TST$CAR,#RSIZE ;See if modem carrier is still there BCC 2$ ;Error? .PRINT #MSG14 ;Yes, tell user BR 6$ ;and attempt to shut down program 2$: BIT #1,SPFLG ;Is carrier off or on? BEQ 6$ ;It's off, proceed with shutdown .PRINT #MSG16 ;Else it's on, give user a choice 4$: JSR PC,TTYIN ;Get user response BCS 4$ JSR PC,CRLF ;Send a CR/LF JSR PC,LCCVT ;Make it upper case CMPB R0,#'Y ;Confirm hangup? BEQ 6$ ;Yes JMP READY ;Else go back to program 6$: .SPFUN #MOFUN,#MOCHAN,#RD$OF ;Turn reader off and drop DTR BCC EXIT1 ;Branch if no error .PRINT #MSG14 ;Tell the user we failed BR EXIT1 ;and try to close the channel EXIT: TST TSXFLG ;TSX system? BEQ 2$ ;No, RT-11...this command OK .PRINT #MSG17 ;Under TSX+ this command is illegal JMP READY 2$: .SPFUN #MOFUN,#MOCHAN,#IN$OFF ;Turn off interrupts only BCC EXIT1 ;Branch if no error .PRINT #MSG14 ;Tell user we failed EXIT1: .CLOSE #MOCHAN ;and close modem channel TST RXFLG ;Receiver file active? BEQ 2$ ;No, skip JSR PC,CLOSE ;Else force it closed 2$: TST LPFLG ;LP active? BEQ FATAL ;No, skip JSR PC,LPCLS ;Yes, force it closed FATAL: TST TSXFLG ;TSX system? BNE 2$ ;Yes, skip this MOV SAVE1,@#KVEC ;Restore RT-11 vectors 2$: .EXIT ;and exit to monitor ;***************************************************** STBAUD: .PRINT #PROMPT ;Ask user for baud rate 2$: JSR PC,TTYIN ;Get response BCS 2$ .TTYOUT ;Echo character JSR PC,CRLF ;Send CR/LF for formatting CMPB R0,#'0 ;1200 Baud? BEQ SLOW ;Yes, set for 1200 CMPB R0,#'1 ;300 Baud? BEQ MEDIUM ;Yes, set for 300 CMPB R0,#'2 ;2400 Baud? BEQ FAST ;Yes, set up for 2400 MOV #7,R0 ;Error, ring bell .TTYOUT BR STBAUD SLOW: MOV #B$LOW,RATE BR SET MEDIUM: MOV #B$MED,RATE BR SET FAST: MOV #B$FST,RATE SET: SWAB RATE ;Put baud code in low byte .SPFUN #MOFUN,#MOCHAN,#BA$UD,#RATE ;Set baud rate RTS PC ;***************************************************** ;Dispatch table for EXEC commands DSPTBL: .WORD 'B,STBAUD,0 ;B - Set baud rate .WORD 'C,TOGGLE,LCFLG ;C - Upper/lower case toggle .WORD 'D,CLOSE,0 ;D - Close receiver file .WORD 'E,TOGGLE,DUPFLG ;E - Toggle full/half duplex .WORD 'H,HELP,0 ;H - Print help message .WORD 'K,BREAK,0 ;K - Transmit a break to remote .WORD '1,LOGIN,LOG1 ;1 - 1st login to network .WORD '2,LOGIN,LOG2 ;2 - 2nd login to network .WORD '3,LOGIN,LOG3 ;3 - 3rd login to network .WORD 'O,EXIT,0 ;O - Exit without disconnect .WORD 'P,LPOPN,0 ;P - Open line printer channel .WORD 'R,OPEN,0 ;R - Open receiver file .WORD 'T,TRANS,0 ;T - Transmit a file .WORD 'W,TOGFIL,TGFLG ;W - Toggle receiver file capture .WORD 'Z,LPCLS,0 ;Z - Close line printer channel .WORD ESC,HANGUP,0 ;ESC-Exit and disconnect .WORD DEL,TOGGLE,DELFLG ;DEL-Delete conversion toggle .WORD 'L,TOGGLE,LFFLG ;Toggle transmission of LF to remote .WORD LF,SEND,0 ;Send a LF .WORD -1 ;End of table ;***************************************************** TSX: .BYTE 0,110 ;EMT to check if TSX is running LOCK: .BYTE 7,140 ;TSX+ EMT to lock program in memory SAVE1: .BLKW 1 ;Area to save RT-11 KB addr RATE: .WORD 0 ;Baud rate storage KADDR: .WORD 0 ;Keyboard ring buffer adr ptr KCOUNT: .WORD 0 ;Keyboard active char count KCNT: .WORD 0 ;Keyboard ring buffer char count KADDR2: .WORD 0 ;Keyboard process adr ptr KCNT2: .WORD 0 ;Keyboard process char count MOAREA: .BLKW 3 ;EMT area for MO .LOOKUP MOFUN: .BLKW 6 ;EMT area for .SPFUN MAREA: .BLKW 5 ;EMT area for MO .WRITW MOSP: .RAD50 /MO / ;Modem handler device name TGFLG: .WORD 0 ;Receiver file toggle RXFLG: .WORD 0 ;Receiver file status LPFLG: .WORD 0 ;Line printer file status LCFLG: .WORD 0 ;Lower case toggle flag DELFLG: .WORD -1 ;Delete toggle flag (set on) DUPFLG: .WORD 0 ;Half/full duplex flag LFFLG: .WORD -1 ;LF toggle (set on, do not transmit) WRTFLG: .BLKW 1 ;Write status flag TSXFLG: .WORD 0 ;TSX flag (assume RT-11) ERRFLG: .WORD 0 ;Error flag CMDFLG: .WORD 0 ;Command sequence flag MAX: .WORD 0 ;Maximum # of bytes to transfer UPBLK: .WORD 0 ;Block number RECHST: .WORD 0 ;Record number from host CKSUM: .WORD 0 ;Checksum RECNBR: .WORD 0 ;Record number MSGLEN: .WORD 0 ;Message length CSMAX: .WORD 0 ;Maximum # blocks for download file LPNAME: .RAD50 "LP " ;Line printer LPAREA: .BLKW 5 ;EMT area for LP LPPNT: .WORD 0 ;Pointer LPBLK: .WORD 0 ;Block count LPCHR: .WORD 0 ;Character count CSAREA: .BLKW 5 ;EMT area for CSEXEC transfers CSPNT: .WORD 0 ;pointer CSBLK: .WORD 0 ;Block count CSCHR: .WORD 0 ;Character count TAREA: .BLKW 5 ;EMT area for file transmit RAREA: .BLKW 5 ;EMT area for receiver channel INPNT: .WORD 0 ;Receive buffer pointer INBLK: .WORD 0 ;Receive block count INCHR: .WORD 0 ;Receive char count CHRSAV: .WORD 0 ;Temporary character storage MAXBLK: .WORD 0 ;Receiver file size DEXT: .WORD 0 ;Default file types for .CSIGEN .RAD50 "LST" ;Use .LST for default .WORD 0,0 OUTSP: .BLKW 39. ;CSI file descriptors MSGA: .ASCII "EXEC - Version 7.6 11-May-83" .ASCII " (1200 Baud)" .ASCIZ "Use H for help" MSGB: .ASCIZ "EXEC-I-Receiver file closed" MSGD: .ASCIZ "EXEC-I-Transmitting file" MSGC: .ASCIZ "EXEC-I-File transmitted" MSGE: .ASCIZ "EXEC-I-Receiver file opened" MSGF: .ASCIZ "EXEC-I-Printer on" MSGG: .ASCIZ "EXEC-I-Printer off" MSGH: .ASCIZ "EXEC-I-Transmission aborted" MSGI: .ASCII "File exists - upercede, e-enter, bort:" .BYTE 200 MSGJ: .ASCIZ "EXEC-I-File not opened" MSGK: .ASCIZ "EXEC-I-Sending CSEXEC System ID to host" MSGL: .ASCIZ "EXEC-I-Beginning download" MSGM: .ASCIZ "EXEC-I-Beginning upload" MSGN: .ASCIZ "?EXEC-E-Aborting transfer" MSGO: .ASCIZ "EXEC-I-Initializing file transfer" MSGP: .ASCIZ "?EXEC-E-Invalid data block/re-transmitting" MSGQ: .ASCII "File exists - upercede or bort:" .BYTE 200 MSGR: .ASCIZ "?EXEC-E-Receiver file is full" MSG1: .ASCIZ "?EXEC-E-Fetch error" MSG2: .ASCIZ "?EXEC-E-File open error" MSG3: .ASCIZ "?EXEC-E-Read error" MSG5: .ASCIZ "?EXEC-E-Write error" MSG6: .ASCIZ "EXEC-I-Printer already on" MSG7: .ASCIZ "EXEC-I-Printer already closed" MSG8: .ASCII "Enter receiver filespec: " .BYTE 200 MSG8A: .ASCII "Enter transmit filespec: " .BYTE 200 MSG9: .ASCIZ "?EXEC-E-Illegal filename" MSG10: .ASCIZ "?EXEC-E-File not found" MSG11: .ASCIZ "?EXEC-F-Modem line in use, cannot connect" MSG12: .ASCIZ "?EXEC-E-Receiver file full; ^S sent to remote" MSG13: .ASCIZ "?EXEC-F-Lookup failed on device MO:" MSG14: .ASCIZ "?EXEC-F-Modem special function failed" MSG15: .ASCIZ "?EXEC-F-Modem write error" MSG16: .ASCII "?EXEC-W-Modem carrier detected - Are you sure (Y/N): " .BYTE 200 MSG17: .ASCII "EXEC-E-Illegal command under TSX+" .ASCIZ "Use ESC to disconnect" PROMPT: .ASCII "0=1200 1=300 2=2400" .ASCII "Enter baud code: "<200> KBSET: .BYTE 35,123,35,125,35,104,25,35,104,17,35,104,23,35,104,21 .BYTE 35,104,22,35,104,3,35,104,15,35,104,32 .BYTE 200 OPNERR: .ASCIZ "EXEC-E-Receiver file already open" CLSERR: .ASCIZ "EXEC-E-File already closed" CLS: .ASCII <33><133><62><112><33><133><110>;Clears screen on VT100 HLPMSG: .ASCII " EXEC Commands" .ASCII "T - Transmit file K - Send 'BREAK' to remote" .ASCII "R - Open receiver file W - Toggle receiver file ON/OFF" .ASCII "D - Close receiver file O - Exit EXEC to RT-11" .ASCII "P - Open printer channel H - Help; prints this list" .ASCII "Z - Close printer channel B - Alter baud rate" .ASCII "C - Case toggle (UC/LC) ESC-Exit EXEC and hang up" .ASCII "DEL-Toggle Delete conversion E - Toggle Half/Full Duplex" .ASCII "L - LF transmission on/off 1 - Auto logon seq #1" .ASCII "2 - Auto logon seq #2 3 - Auto logon seq #3" .ASCIZ "Precede all commands with the key" SYSID: .ASCIZ "#DEC H11/LSI-11,CC,HC,PA,PL" LOG1: .ASCIZ "CPS;WELCOME" .ASCIZ "70055,1101" .ASCIZ "FOGGY/WORKER" LOG2: .ASCIZ "CPS;WELCOME" .ASCIZ "70000,1" .ASCIZ "SECRET" LOG3: .ASCIZ "CPS;WELCOME" .ASCIZ "70000,1" .ASCIZ "SECRET" ALERT: .ASCII <200> .EVEN ; Do not change the sequence of the following 9 symbols ADDR2: .WORD 0 ;Process adr ptr CNT2: .WORD 0 ;Process char count RSIZE: .WORD 0 ;Storage of input ring buffer size BCOUNT: .WORD 0 ;Active char count CNT: .WORD 0 ;Ring buffer character count CSSTAT: .WORD 0 ;Executive status word PSFLG: .WORD 0 ;Pause flag SPFLG: .WORD 0 ;Special function flag BUFA: .BLKB BUFSIZ ;Modem input ring buffer BUFB: .BLKW 256. ;Receive buffer BUFC: .BLKW 256. ;Transmit buffer BUFD: .BLKW 256. ;LP buffer MBUFF: .BLKB 256. ;Buffer for MODEM read CSBUFF: .BLKB 256. ;256 byte buffer for CSEXEC BUFE: .BLKB KBFSIZ ;Keyboard input buffer FBUFF: .BLKB 80. ;80 character file name buffer .EVEN FREE: .WORD 0 LIMIT: .+2 ;Limit of program .END START