.TITLE ARCIVE .IDENT /V0100B/ .SBTTL DOCUMENTATION .ENABL LC COMENT = 1 .LIST TTM .IF DF COMENT .nlist bin,loc ;+ ; ARCIVE ; A program by Ray Strackbein ; Chalfont Communications, a division of I. C. S. ; 73-680 Hwy 111 ; Palm Desert, Ca. 92260 ; (714) 346-1987 (office) ; (714) 346-4656 (home) ; ; 16-Apr-80 ; This program was written and documented for use in "RT-11/PDP-11 ASSEMBLY LANGUAGE TUTORIAL: USING RT-11 PROGRAMMED ; REQUESTS" -- a session of the Spring, 1980, DECUS (R), Chicago, Ill. This program has been debugged. ; ; ARCIVE is a program to copy an entire volume of any readable device onto a single file on any larger writeable ; device (such as mag-tape), and to copy that single packed file back again to the same type of original device. ; Copying in this manner allows many more discs to be put on a single reel of tape because the tape-marks, ; file headders, and inter-file gaps are not necessary. Instead, an exact block by block image is put onto mag tape. ; Another use of this program is to enable the user to 'take pictures' of up to 9 floppy disks and store them ; on an RK05. Such use makes this program a 'librarian'. At any rate, this program stores an exact image of any ; device as a single file on any other larger device. ; ; THE basic algorithm follows: ; ; BECAUSE OF THE FACT THAT WE DO COMPLETION I/O WE MUST DO A .QSET TO ALLOW SIMULTANEOUS TRANSFERS ; GET A .DSTATUS FOR THE SYSTEM DEVICE AND STORE INFO FOR LATER USE TO DETERMINE IF WE ARE GOING TO CAUSE PROBLEMS ; PRINT REQUEST FOR INPUT DEVICE (AND FILE) NAME ; ACCEPT THE INPUT WITH A .GTLINE ; SET UP CHANEL #3 ; CALL FILES ; PRINT REQUEST FOR OUTPUT DEVICE (AND FILE) ; ACCEPT THE INPUT WITH A .GTLINE ; SET UP CHANEL #0 ; CALL FILES ; START TRANSFER AND CONTINUE THROUGH COMPLETION ROUTINE ; EXIT WHEN DONE ; ; FILES: .CSISPC TO CHANGE THE DEVICE AND FILENAMES TO RAD50 ; PROCESS ANY SWITCHES ; .DSTATUS TO 1) SEE IF THE HANDLER IS RESIDENT AND 2) TO GET THE LENGTH OF THE HANDLER IN CASE WE HAVE TO LOAD IT ; IF THE HANDLER IS NOT RESIDENT ; .SETTOP TO ALLOW ROOM FOR HANDLER ; .FETCH THE HANDLER ; ENDIF ; IF CHAN =0 ; IF THERE IS A FILENAME THEN .ENTER THE FILE AND RETURN ; ELSE DO A NON-FILE-STRUCTURED .LOOKUP (THE ONLY WAY WE CAN OPEN A WHOLE DEVICE TO READ OR WRITE IT ALL) ; .SAVESTATUS TO GET UNIT OF DEVICE ; IF DEVICE = SY THEN EXIT WITH ERROR MESSAGE ; ELSE .REOPEN AND RETURN ; ELSE CHAN 3 ASSUMED ; .LOOKUP THE INPUT DEVICE (AND FILE) ; IF NON-FILE-STRUCTURED THEN MOVE THE NUMBER OF BLOCKS IN THE INPUT DEVICE TO THE BLOCK COUNTER ; ELSE MOVE THE NUMBER OF BLOCKS IN THE FILE TO THE BLOCK COUNTER ; RETURN ;- .list bin,loc .ENDC .SBTTL DECLARATIONS .MCALL .PRINT,.DSTATUS,.QSET,.CSISPC,.REOPEN,.SERR,.GVAL .MCALL .WAIT,.CLOSE,.ENTER,.LOOKUP,.FETCH,.WRITE,.CSTAT .MCALL .EXIT,.GTLIN,.READC,.SETTOP,.SAVESTATUS .IF DF COMENT .NLIST BIN,loc ;+ ; The macro ERRMSG is used after all system macro calls to determine if there was an error (carry bit set in PSW). ; If there was an error, then the macro prints an error message and indicates the severity of the problem. ; Actually the macro only sets up what is necessary for the subroutine ERROR to do its job. ERROR is a ; subroutine so that in using ODT to debug this mess, I can look at the stack and see where the call to ERROR ; came from (something you can't do with a JMP ERROR). This is also why I save the contents of R0 ... so I ; can use ODT and still look at what R0 had in it before the ERROR call. ; ; DO NOT put comments in the body of a macro definition because the comments are also expanded in each call to the macro ; and that wastes A LOT of room in core. I will do it here only for clarity. ;- .list bin,loc .ENDC .MACRO ERRMSG MESAGE,STATUS,?Y,?Z ; ?Y and ?Z are used for self-generating labels .ENABL LSB ; To make local symbols work around the .PSECTS BCC Y ; If no error, then skip it MOV R0,-(SP) ; Save R0 in case I need to see it in debugging .IIF DIF MOVB #''STATUS,ERRSTAT ; Status C is used to mark a completion .IIF IDN MOVB #'F,ERRSTAT ; routine error (you can't .EXIT from MOV #Z,ERRMSG ; Pass the message ; a completion routine) .PSECT MSGS ; Let's store these little critters at the end of the program .NLIST BEX ; Save space in the assembly listing Z: .ASCIZ /'MESAGE'/ ; The location of the stored message .EVEN ; Try to avoid odd address errors .LIST BEX ; Resume listing all memory contents .PSECT ; Back to the main program JSR PC,ERROR ; Now call the error subroutine MOV (SP)+,R0 ; Restore the stack in case we have to return from a subroutine .IF IDN ; If this is a completion routine then tell the main program DEC DUNFLG ; we had a bad error (are there ever any good ones?) RETURN ; 'Cause we can't .EXIT from a completion routine .IFF ; BUT if this isn't a completion routine CLR R0 ; Then we can abort the program (clear R0 to make it a hard .EXIT) .EXIT .ENDC Y: ; Label so we can branch around the above if no error .DSABL LSB ; Allow normal local symbol rules to apply .ENDM ERRMSG ; That's the end of that macro .SBTTL The main program START:: .SERR ; Causes errors to not abort program (for debugging) .QSET #QSPACE,#2 ; Because of the completion routines we want more than one I/O at a time .DSTATUS #SYSPACE,#SYNAME ; Discover the system device .IF DF COMENT .nlist bin,loc ;+ ; Now about these two .GTLIN's coming up ... they ask for an input and output device and file name. If we are packing ; a device onto another, then the operator must respond only with an input device name (never an input file ; name) and an output device and file name. However if we are unpacking a packed file and putting it on an RT-11 ; device, then the operator must specify the input device and file name and the output device name (since unpacking ; writes an entire device). Because unpacking writes an entire device (bootstraps, device identification block, ; directory, and files (in other words unpacking totally replaces all information on the output device), ; the unpacking operation tends to be quite destructive and appropriate precautionary procedures should be observed. ;- .list bin,loc .ENDC .GTLIN #INBUF,#INMSG ; Query the operator for an input device and file name MOV #3,CHAN ; We are following convention by assigning the input file to chan 3. CALL FILES ; Open the device and file obtained by the .GTLIN above on the channel above .GTLIN #INBUF,#OUTMSG ; Query the operator for an output device and file name CLR CHAN ; And use chan Zero CALL FILES ; Open the output device (and file) on chan zero .IF DF COMENT .nlist bin,loc ;+ ; The following section sets up the first data transfer and calls RDCOMP as a completion routine upon the completion ; of this first transfer. RDCOMP is a perpetual motion machine which simply initiates the next transfer and calls ; itself as a completion routine. More about this nonsence later. DUNFLG is a flag which is set to indicate that we ; are done and may now terminate this program. To prevent premature termination, DUNFLG is hereby cleared. ;- .list bin,loc .ENDC CLR WBLK CLR RBLK CLR DUNFLG ; A premature climax could be a source of major disappointment MOV #BUFF1,RBFPTR ; Put the data read into BUFF1 .READC #AREA,#3,RBFPTR,#256.,#RDCOMP,RBLK ; Let's get this show on the road! ERRMSG ,F ; Print a message on errors .IF DF COMENT .nlist bin,loc ;+ ; *** NOTICE *** ; The next two lines are the whole reason for writing this program the way I did. Completion routines are such a ; joy. They are the heart of multi-programming and multi-tasking. I have just invented a perpetual motion ; machine. The only thing to do now is to wait for the whole copy process to end. In fact, if I could OPEN or ; .CLOSE files in a completion routine, then this whole program could become a psuedo foreground job running entirely ; as a completion routine. But I can't so it's not. ; ; Anyway, please feel free to add anything else in the following two line loop. There is plenty of processor time ; available while we are waiting on I/O. ; ; Another *** NOTICE *** ; The following two line loop does make use of all available processor time and if this job were to be run as a ; foreground job (any RT-11 version) or as a system job (under Version Four) then this job will not allow any time ; for a background job or a lower priority system job to run and the system may appear to hang until this job .EXITs. ;- .list bin,loc .ENDC 1$: TST DUNFLG BEQ 1$ BPL BYE SEC ERRMSG ,F BYE: .WAIT #0 .CLOSE #0 .CLOSE #3 .EXIT .IF DF COMENT .nlist bin,loc ;+ ; FILES is a subroutine to do most of the file handling for this program and does most of the USR calls. No real reason ; for doing it all this way except I have to process two files so it seemed that a neat little subroutine might be ; appropos. ; ; Warning !!! ; That stupid .CSISPC (below) messes around with the stack!!! One can spend weeks (literally) trying to find out why a ; subroutine with a .CSICPC in it doesn't work. Notice that I save the stack position before I do the .CSISPC. Take ; heed! ;- .list bin,loc .ENDC FILES: MOV SP,R5 ; Save the stack pointer! .CSISPC #OUTSPC,#DEFEXT,#INBUF,#LINBUF ERRMSG <.CSISPC Error>,F ; Just checking (for errors) TST CHAN ; Be this chan Zero? BNE 20$ ; Branch if this be not zero MOV #OUTSEG,R4 ; Point R4 toward Chan Zero's segment # BR 21$ ; Skip the next line 20$: MOV #INSEG,R4 ; If not Chan 0 then Chan 3 assumed and point R4 to its segment # .IF DF COMENT .nlist bin,loc ;+ ; The little diddy below looks for and processes switches. At this time the only switch allowed is a /M:xxx on a ; line specifying magtape. This "/M" is processed according to the same instructions used by PIP. (In other words, ; read what the "/M" switch means to PIP and you will know what it means to this program.) ;- .list bin,loc .ENDC 21$: MOV SP,R0 ; Copy the stack pointer MOV (R0)+,OPTION ; Put the number of option switches in OPTION 22$: BLE OPTDUN ; If none, we done TST (R0) ; Does the option have a value? BPL 23$ ; The only allowed option must have a value -- br if no value CMPB (R0)+,#'M ; Is this option "M"? BNE 24$ ; If not "M" then branch to ignore MOVB (R0)+,OPTCHN ; Store the channel number the option is associated with (always 3) MOV (R0)+,(R4) ; Move the option value to the appropriate segment number DEC OPTION ; One less option to process BR 22$ ; Go see if there are more 23$: TST (R0)+ ; Skip over this option DEC OPTION ; And see if there is another BR 22$ ; 24$: TSTB (R0)+ ; If the option wasn't "M" then alter R0 to skip it TST (R0)+ ; DEC OPTION ; And see if there is another switch to process BR 22$ OPTDUN: MOV R5,SP ; *** Restore the stack pointer to its value before the .CSISPC ! .IF DF COMENT .nlist bin,loc ;+ ; Now that we have processed the device and file names with the .CSISPC, we must open the device and files. But ; (nothing is easy, is it?) before we can open any device or file we must make sure we have a handler in memory with ; a .DSTATUS. If the handler is not already in memory, we must .FETCH the handler. But before we can do that we ; must allot space in the program for the handler with a .SETTOP. But before we can expand the program, we have ; to know how much to expand the program, so we have to get the length of the handler with a .DSTATUS, and now you ; know two good reasons to do a .DSTATUS. ;- .list bin,loc .ENDC .DSTATUS #RETSPC,#OUTSPC+36 ERRMSG <.DSTATUS Error>,F MOV #RETSPC,R0 ; Point R0 to the device info MOV ENDSPC,R5 ; Must store location to put handler TST 4(R0) ; Now looking for the address of the handler BNE INCORE ; Skip to INCORE if there is a non-zero address MOV 2(R0),R0 ; Put the byte-length of the handler in R0 ADD R0,ENDSPC ; And add the length of the handler to the length of this program .SETTOP ENDSPC ; And request the program to end at the new length CMP R0,ENDSPC ; Did we get what we asked for? BEQ FETCH ; Goto FETCH if we got enuff memory SEC ; Abort the program if we don't have handler space ERRMSG ,F FETCH: .FETCH R5,#OUTSPC+36 ; Fetch the handler and put it at old ENDSPC ERRMSG ,F INCORE: TST CHAN ; We write to channel 0 and read from channel 3. BEQ 1$ ; If not channel zero then 3 is assumed and we will do a .LOOKUP JMP LOOK ; Too far to branch 1$: TST OUTSPC+40 ; Was a filename given to the .CSISPC? BEQ NOFILE ; Branch if no file name .ENTER #AREA,#0,#OUTSPC+36,OUTLNG,OUTSEG ; Open the file on the device ERRMSG ,F RETURN ; We are done ! (with this subroutine) .IF DF COMENT .nlist bin,loc ;+ ; We are really entering dangerous territory here. We are about to do a non-file-structured .LOOKUP. And we are ; going to write right over the bootstrap, device identification block, the directory, and all data and programs. ; This procedure is fatal to a system device. The system will crash. This program will try to be idiot ; proof and not allow us to blast the system device. At all. Ever. ; ; Furthermore, it has been known to happen that some fool has assigned a physical device to have another physical ; device's name. I do this all the time. If RK0: gets ill, I shove the disc pack into RK4: and then type ; "ASIGN RK4 RK0" and all of my programs run normally because they can find RK0: even thouth it is not there. We can ; even "ASSIGN DL0 RK4" if we want to ... the system doesn't care. And then, forgetting about the assignment ; we have made earlier in the day, we tell the system to "INIT RK4:" and we find that DL0: has been initialized. Damn! ; Forgot to back up DL0:, didn't I? ; ; Well, this here program can do the same type of distructive thing. So, in addition to not letting you write over ; the entire system device, this program will calculate the PHYSICAL DEVICE NAME and prompt you to make sure that you ; are getting what you really want. ; ; So, you ask, how do we do this? Well, it could be done by doing a .CSTATUS after the non-file-structured ; .LOOKUP and then doing a RAD50 to ASCII conversion on the sixth word returned by the .CSTATUS and then appending ; the ASCII representation of the bin,locary unit number (which is found in the fifth word returned by the .CSTATUS). ; The RAD50 to ASCII conversion is probably best handled as a call to R50ASC in SYSLIB. I'm sorry I didn't ; have the time to get this included and debugged before the convention. ; ; This program will do the non-file-structured .LOOKUP which is necessary, but then it immediately does a .SAVESTATUS ; which saves all pertinent information about the device and .CLOSEs the channel we just did the .LOOKUP on. The ; .SAVESTATUS has now given us the unit number of the device of the non-file-structured .LOOKUP. The .DSTATUS which ; was done earlier gives us a device type. By comparing this device type with the system device type (obtained ; by doing a .DSTATUS on SY: at the beginning of the program) and then by comparing the current unit number with the ; monitor offset to the system unit number, we can tell if we are trying to blast the system unit. If the instruction ; has been given to blast the system device, then we slap the operator's hands and send him/her/it home crying. And of ; course we abort the program to save the system device. ;- .list bin,loc .ENDC NOFILE: .LOOKUP #AREA,#0,#OUTSPC+36,OUTSEG ; Behold the non-file-structured .LOOKUP ERRMSG ,F .SAVESTATUS #AREA,#0,#CBLK ; Let's .CLOSE the chanel and store some information ERRMSG ,F MOV #SYSPAC,R0 ; Point to system information MOV #RETSPC,R1 ; Point to output file information (from .DSTATUS) CMP (R0),(R1) ; Compare the system device type to the output device type BNE NOSYS ; Go to NOSYS if devices are not the same type MOV #CBLK,R1 ; Let's compare the output unit # with the system unit # .GVAL #AREA,#^O274 ERRMSG ,F SWAB R0 ; I don't think I can .GVAL an odd address so I will do the even and SWAB CMPB R0,11(R1) BNE NOSYS SEC ERRMSG ,F NOSYS: .GTLIN #INBUF2,#RUSURE ; Announce the consequences BICB #40,INBUF2 ; Make a little 'y' a big one CMPB #'Y,INBUF2 ; Did the operator type a 'Y'? BEQ GO ; OK to proceed if he did SEC ; Force an error ERRMSG ,F GO: .REOPEN #AREA,#0,#CBLK ; Ok to .REOPEN the output file ... the device is safe ERRMSG ,F RETURN .IF DF COMENT .nlist bin,loc ;+ ; Because CHAN was not clear on entry to this subroutine, we have assumed thatwe were going to process channel 3, ; which brought us here. This part of the subroutine does a .LOOKUP for the input device (and file) and then ; a .CSTATUS which will return the length of the file just .LOOKUPed in the third word returned by the ; .CSTATUS. If that word is zero then we have done a non-file-structured .LOOKUP in order to read the whole ; device (bootstrap, ID block, directory, and all). At any rate, either the length of the file or the ; length of the device is put in VOLLNG and the subroutine returns. VOLLNG now contains the number of blocks ; to be read before the program ends. ;- .list bin,loc .ENDC LOOK: .LOOKUP #AREA,#3,#OUTSPC+36,INSEG ; .LOOKUP the input device (and file) ERRMSG ,F .CSTATUS #AREA,#3,#CHNINF ; Let's see how big it is ERRMSG ,F MOV CHNINF+4,VOLLNG ; Move the file size (in blocks) to VOLLNG BNE 1$ ; MOV RETSPC+6,VOLLNG ; Well, then, move the size of the whole device there BNE 1$ ; MOV #-1,VOLLNG ; If still zero, fake it! 1$: RETURN ; 'At's all, folks! .IF DF COMENT .nlist bin,loc ;+ ; RDCOMP is the afore-mentioned perpetual motion machine. RDCOMP is a completion routine called at the ; completion of the initial read from the input device. RDCOMP calculates the number of blocks which have been read so ; far and compares that number to the number of blocks originally required to have been read. If we have read enough ; blocks, RDCOMP increments DUNFLG which signals to itself and to the main program that we are through reading. Double ; bufferring is used so that while we are writing out already acquired data, we can also be reading new data into ; another buffer. It is because of this simultaneous transfer that we did the .QSET at the beginning of this program. ; ; Upon entry to RDCOMP (as with any completion routine) RT-11 has saved R0 and R1 and put information into them for us. ; R0 contains the Channel Status Word and R1 contains the Channel Number (always 3 in this program) ; ; There is an error in the algorithm in this section -- if a read error occurs in the final block to be read, I can not spot it ; because the final block skips around the error check. Sorry ... I'd correct it but I have no time to debug it and at least the ; program works the way it is. ;- .list bin,loc .ENDC RDCOMP: MOV RBLK,R1 ; How many blocks have now been read? INC R1 ; Bump it cause RBLK counts from 0 and VOLLNG counts from 1 SUB VOLLNG,R1 ; subtract 'total read' from 'read-so-far' BCS 2$ ; Maybe faked VOLLNG BPL ALLDUN ; 2$: BIT #20001,R0 ; Check for 'end-of-file' or 'hard error' BEQ AGAIN ; Keep going if OK CMP #-1,VOLLNG ; If it's a faked VOLLNG then look for EOF BNE 1$ BIT #20000,R0 BNE ALLDUN ; If it is really end-of-file then dun 1$: SEC ERRMSG ,C ALLDUN: INC DUNFLG AGAIN: INC RBLK ; Set up to read next block CMP #BUFF1,RBFPTR ; If we just read to BUFF1 then BUFF2 is next BEQ 1$ MOV #BUFF1,RBFPTR ; If we just read to BUFF2 then BUFF1 is next BR 2$ 1$: MOV #BUFF2,RBFPTR 2$: CMP #BUFF1,WBFPTR ; If we just wrote BUFF1 then BUFF2 is next BEQ 3$ MOV #BUFF1,WBFPTR ; If we just wrote BUFF2 then BUFF1 is next BR 4$ 3$: MOV #BUFF2,WBFPTR 4$: .WAIT #0 ; Make sure we've finished writing before we write again ERRMSG ,C TST DUNFLG ; Have we done enough reads? BNE NOREAD ; If so, then skip any more .IF DF COMENT .nlist bin,loc ;+ ; Notice that I am using AREA2 and AREA3 for the next two programmed requests. In the main-line I could get ; away with using the same AREA block over and over. However, the completion routines may interrupt a main-line ; program at any time and if the main line program were in the middle of setting up an area block when the ; completion routine decided that it, too wanted to use the same area block, the area block would be corrupted ; on return from the completion routine yielding phantom program crashes. ALWAYS set up interrupt and completion ; routines so that they either use different area blocks or they use the stack for area space and then this ; whole problem of main-line area blocks being corrupted by interrupt routines and completion routines can be ; avoided. REMEMBER that in the SINGLE JOB monitor that completion routines are not serialized and MAY INTERRUPT ; EACH OTHER, while they ARE serialized in the FB monitor and MAY NOT interrupt each other. Please turn to page ; 2-2 Section 2.0.3 and look at the second paragraph in the RT-11 Advanced Programmers Guide (this page came with ; Update Notice #2 Order # AD-5280B-T2). Read it 5 or 6 times. That one paragraph says a lot. But if you decide ; to pre-set your area blocks in your program and not fill in the blanks in the programmed requests, remember that ; doing so may make your program more dificult to read and understand later. ;- .list bin,loc .ENDC .READC #AREA2,#3,RBFPTR,#256.,#RDCOMP,RBLK ; .READ(C) the next block ERRMSG ,C NOREAD: .WRITE #AREA3,#0,WBFPTR,#256.,WBLK ; .WRITE the next block ERRMSG ,C INC WBLK ; Set up to .WRITE the next block RETURN .IF DF COMENT .nlist bin,loc ;+ ; ERROR is a subroutine to process all errors and to send some kind of message to the operator. The format ; for these messages is the DEC(r) standard '?ARCIVE-F-Boy, did you make a mistake!' That is followed by a ; line which prints out the contents of byte @#52. Notice that in the case of a negative number in byte @#52, ; the 'number' printed out will be a punctuation mark. ('0'=ASCII 60,'-1'=ASCII 57, etc). The error status ; is then translated to an appropriate bit in byte @#53 to tell the system that something went wrong in ; case this program was called from a command file. ;- .list bin,loc .ENDC ERROR: MOVB @#52,R0 ; Save the system error byte BIC #177400,R0 ; Clear any high order garbage ADD #'0,R0 ; And make it 'printable' (#'0 = ASCII 60) MOVB R0,ERRCODE ; And store it to be printed .PRINT #MSGA ; And print all of the error messages .PRINT ERRMSG .PRINT #MSGB CMPB #'F,ERRSTAT ; If it is a fatal error set the 'SEVERE ERROR' bit BNE 1$ BISB #10,@#53 BR 10$ 1$: CMPB #'E,ERRSTAT ; If it is a normal error set the 'ERROR' bit BNE 2$ BISB #4,@#53 BR 10$ 2$: CMPB #'W,ERRSTAT ; For a warning we set the 'WARNING' bit BNE 10$ BISB #2,@#53 10$: RETURN .IF DF COMENT .nlist bin,loc ;+ ; And that ends the program. ;- .list bin,loc .ENDC ERRMSG: .WORD 0 ; Location of the error message to be printed -- set by ERRMSG, used by ERROR CHAN: .WORD 0 ; Channel number set by main program and used by FILES OUTSEG: .WORD 0 ; The output channel segment (sequence) number for casette and mag-tape INSEG: .WORD 0 ; The input channel segment as above SYNAME: .RAD50 /SY / ; Name of the system device for .DSTATUS OUTLNG: .WORD 0 ; The length in blocks of the file on the output channel -- not used properly CBLK: .BLKW 5 ; Channel block for .SAVESTATUS and .REOPEN ENDSPC: .WORD END ; Points to end of program, error messages, and handlers in core QSPACE: .BLKW 7*2 ; Space used by .QSET INBUF2: .BLKB 84. ; Just to store the Y from NOSYS LINBUF: .BLKB 84. ; Echoed input to the .CSISPC OUTSPC: .BLKW 39. ; Output fron the .CSISPC (RAD50 device and file names) OPTION: .WORD 0 ; The number of switches used by FILES in processing the .CSISPC OPTCHN: .WORD 0 ; The number of the channel that the switch is assigned to (not used) RBLK: .WORD 0 ; Block number to be read on input channel WBLK: .WORD 0 ; Block number to be written on output channel RBFPTR: .WORD 0 ; Read Buffer Pointer WBFPTR: .WORD 0 ; Write Buffer Pointer RETSPC: .BLKW 4 ; Four words returned by .DSTATUS BUFF1: .BLKW 256. ; A buffer for reads and writes BUFF2: .BLKW 256. ; Another one AREA: .BLKW 10 ; Arguement block for main-line program programmed requests AREA2: .BLKW 10 ; Arguement block for completion routine .READC AREA3: .BLKW 10 ; Arguement block for completion routine .WRITE VOLLNG: .WORD 0 ; Total number of blocks to be read from input device DUNFLG: .WORD 0 ; Set by completion routine and watched by mainline, 0 loops, + exits, - aborts CHNINF: .BLKW 6 ; Six words set up by .CSTATUS DEFEXT: .BLKW 4 ; Four Zeroes for .CSISPC's default extensions .NLIST BIN RUSURE: .ASCII /I hope you know that you are about to lose everything on / INBUF: .BLKB 82. ; Used by .GTLIN to store information from operator ... passed to .CSISPC MSGA: .ASCII '?ARCIVE-' ERRSTA: .BYTE 0,'-,200 MSGB: .ASCII 'Error code @#52=' ERRCOD: .BYTE 0,0 ; Error byte in ASCII from ERROR, Zero to stop .PRINTing OUTMSG: .ASCII /OUTPUT SPEC ... DEV:FILNAM.EXT /<200> INMSG: .ASCII /ARCIVE V01.00B/<15><12> .ASCII /INPUT SPEC ... DEV:FILNAM.EXT /<200> .EVEN SYSPAC: .BLKW 4 ; Four words placed by system .DSTATUS .PSECT MSGS END: .NLIST TTM .END START