.SYSID < .TITLE QFILE > /EAG:100 /EAG:100 /EAG:100 /EAG:100 /EAG:100 / /EAG:100 / COPYRIGHT (C) 1975 /EAG:100 / DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. /EAG:100 / /EAG:100 / THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY /EAG:100 / ON A SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH /EAG:100 / THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS /EAG:100 / SOFTWARE, OR ANY OTHER COPIES THEREOF, MAY NOT BE PRO- /EAG:100 / VIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON /EAG:100 / EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO /EAG:100 / THESE LICENSE TERMS. TITLE TO AND OWNERSHIP OF THE /EAG:100 / SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC. /EAG:100 / /EAG:100 / THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE /EAG:100 / WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED AS A COM- /EAG:100 / MITMENT BY DIGITAL EQUIPMENT CORPORATION. /EAG:100 / /EAG:100 / DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY /EAG:100 / OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC. /EAG:100 / /EAG:100 .TITLE EDIT NUMBERS AND HISTORY /EAG:100 /EAG:100 /EAG:100 /EAG:100 / /EAG:100 / 100 14-SEP-75 EAG INITIAL VERSION FOR XVM/DOS /EAG:100 / RESIDENT MONITOR. ESSENTIALLY /EAG:100 / EQUIVALENT TO PRIOR VERSIONS, /EAG:100 / BUT WITH MORE GENERALITY AND /EAG:100 / ERROR CHECKING. /EAG:100 / /EAG:100 / 101 10-OCT-75 EAG REVISE ERROR MESSAGES SO THAT /EAG:101 / THEY WON'T RUN OFF THE END /EAG:101 / OF LINES. EXPAND INPUT BUFFER /EAG:101 / TO COMPENSATE FOR BUG IN TTA. /EAG:101 / WHICH WON'T BE FIXED. /EAG:101 / /EAG:101 / 102 14-OCT-75 EAG FIX A COUPLE OF BUGS AND SPEED /EAG:102 / UP OPERATION OF ^Q'S. THE NOP /EAG:102 / VARIATION OF QFILE (BOTH SC.QNF /EAG:102 / AND SC.QNRM SET IN SC.CQF) IS /EAG:102 / NOW CHECKED FOR AND NOTHING /EAG:102 / READ FROM THE ^QAREA. /EAG:102 / /EAG:102 .TITLE DESCRIPTION OF OPERATION /EAG:100 /EAG:100 /EAG:100 /EAG:100 / /EAG:100 / QFILE IS USED BY XVM/DOS TO IMPLEMENT THE .GET AND .PUT /EAG:100 / CAL FUNCTIONS. THE NON-RESIDENT MONITOR'S GET AND PUT /EAG:100 / COMMANDS PLUS THE RESIDENT MONITOR'S ^Q FEATURE ARE ALL /EAG:100 / TRANSLATED INTO A .GET OR .PUT, SO QFILE ALSO IMPLEMENTS /EAG:100 / THESE FEATURES. THE READER IS REFERRED TO THE XVM/DOS /EAG:100 / SYSTEM MANUAL FOR INFORMATION NOT INCLUDED IN THE DISCUSSION /EAG:100 / BELOW. /EAG:100 / /EAG:100 / QFILE IS CALLED VIA A .OVRLA FROM THE RESIDENT MONITOR. /EAG:100 / IT IS CALLED WITH AN OPTIONAL FILE NAME IN SC.FNM AND A /EAG:100 / FUNCTION CODE IN SC.CQF. A FLAG IN SC.CQF INDICATES WHETHER /EAG:100 / OR NOT THE FILE NAME IS PRESENT. QFILE PERFORMS THE /EAG:100 / OPERATION REQUESTED BY THE FUNCTION CODE AND THEN EXITS. /EAG:100 / IT TAKES ONE OF TWO EXITS, DEPENDING UPON THE FUNCION /EAG:100 / CODE. /EAG:100 / /EAG:100 / THE OPERATION PERFORMED BY QFILE IS A FILE TRANSFER BETWEEN /EAG:100 / THE QAREA AND THE FILE WHOSE NAME IS IN SC.FNM. THE FILE /EAG:100 / IS ACCESSED VIA .DAT SLOT -14, WHICH .DAT SLOT DETERMINES /EAG:100 / THE DEVICE AND UIC. THE TRANSFER OPERATION PROCEEDS /EAG:100 / AS FOLLOWS: /EAG:100 / /EAG:100 / 1. IF BIT SC.QNF OF SC.CQF IS SET, NO FILE TRANSFER /EAG:100 / WILL OCCUR AND THUS THE FILE NAME (IF PRESENT) IS /EAG:100 / IGNORED. QFILE PROCEEDS TO THE EXIT PROCESSING /EAG:100 / DESCRIBED BELOW. /EAG:100 / /EAG:100 / 2. IF BIT SC.QNF OF SC.CQF IS CLEAR AND BIT SC.QPUT /EAG:100 / IS SET, THE QAREA IS COPIED INTO THE NAMED FILE. /EAG:100 / /EAG:100 / 3. IF BOTH BITS SC.QNF AND SC.QPUT ARE CLEAR, THE /EAG:100 / NAMED FILE IS COPIED INTO THE QAREA. /EAG:100 / /EAG:100 / FOLLOWING THE FILE TRANSFER OPERATION QFILE EXITS. WHICH /EAG:100 / EXIT IT TAKES IS DETERMINED AS FOLLOWS: /EAG:100 / /EAG:100 / 1. IF BIT SC.QNRM OF SC.CQF IS SET, QFILE MERELY EXITS /EAG:100 / TO THE NON-RESIDENT MONITOR (I.E. IT DOES A .EXIT). /EAG:100 / /EAG:100 / 2. IF BIT SC.QNRM IS CLEAR, QFILE EXITS TO THE CORE /EAG:100 / IMAGE IN THE QAREA. FIRST IT UPDATES THE CONTENTS /EAG:100 / OF SC.CQF IN THE SAVED IMAGE SO THAT THE PROPER /EAG:100 / EXIT WILL BE TAKEN FROM THE .PUT CAL WHICH CREATED /EAG:100 / THE IMAGE. IT ALSO UPDATES SEVERAL OTHER .SCOM /EAG:100 / REGISTERS AS NEEDED TO PRESERVE SYSTEM INTEGRITY. /EAG:100 / THEN IT OVERLAYS MEMORY WITH THE QAREA BY USING /EAG:100 / THE MONITOR TRAN ROUTINE -- I.E. THE SYSTEM /EAG:100 / BOOTSTRAP. THIS IMPLICITLY UPDATES THE BOOTSTRAP /EAG:100 / RETURN ADDRESS SO THAT EXECUTION WILL PROCEED /EAG:100 / "NORMALLY" IN THE RESTORED CORE IMAGE. /EAG:100 / /EAG:100 / QFILE PERFORMS NUMEROUS ERROR CHECKS TO ENSURE THAT PROPER /EAG:100 / OPERATION AND SYSTEM INTEGRITY ARE PRESERVED. IF AN ERROR /EAG:100 / CHECK FAILS, QFILE EXITS TO THE NON-RESIDENT MONITOR (VIA /EAG:100 / A .EXIT). SOME ERRORS ARE OPTIONALLY RECOVERABLE -- A /EAG:100 / WARNING MESSAGE IS PRINTED AND THE USER IS GIVEN THE OPTION /EAG:100 / OF CONTINUEING OR ABORTING. THE BULK OF THE ERROR CHECKS /EAG:100 / ARE PERFORMED JUST PRIOR TO OVERLAYING CORE WITH THE /EAG:100 / CONTENTS OF THE QAREA. THESE CHECKS EXAMINE THE IMAGE'S /EAG:100 / .SCOM AND MASS STORAGE BUSY TABLE. FOR THIS PURPOSE THE /EAG:100 / FILE TRANSFER OPERATIONS GO TO SOME COMPLICATION TO /EAG:100 / PRESERVE THESE AREAS IN CORE SO THAT ADDITIONAL TRANSFERS /EAG:100 / WON'T BE NEEDED AT THE LATER TIME. /EAG:100 / /EAG:100 / THE INITIAL VERSION OF QFILE (EDIT #100) HAS BEEN WRITTEN /EAG:100 / TO WORK WITH ANY AMOUNT OF FREE CORE (IT GIVES AN ERROR IF /EAG:100 / THE AMOUNT IS INSUFFICIENT). THE CORE IMAGE MAY ALSO START /EAG:100 / AT ANY LOCATION (INDICATED BY SC.CQB+1) SO LONG AS THE IMAGE /EAG:100 / INCLUDES ALL OF .SCOM. ALSO, THE VALUE MUST BE THE SAME IN /EAG:100 / BOTH THE IMAGE BEING RESTORED AND THE CURRENT IMAGE IN CORE. /EAG:100 / /EAG:100 .TITLE DEFINE CONSTANTS AND .SCOM /EAG:100 /EAG:100 /EAG:100 /EAG:100 / /EAG:100 / DEFINE AUTO-INCREMENT REGISTERS: /EAG:100 / /EAG:100 /EAG:100 X10=10 /EAG:100 X11=11 /EAG:100 /EAG:100 /EAG:100 /EAG:100 /EAG:100 / /EAG:100 / DEFINE .SCOM BASE AND LENGTH: /EAG:100 / /EAG:100 /EAG:100 SC.BAS=100 /EAG:100 SC.LEN=112 /EAG:100 /EAG:100 /EAG:100 /EAG:100 /EAG:100 / /EAG:100 / DEFINE LOCATIONS WITHIN .SCOM: /EAG:100 / /EAG:100 /EAG:100 SC.COD=SC.BAS+0 /EAG:100 SC.FRL=SC.BAS+2 /EAG:100 SC.MOD=SC.BAS+4 /EAG:100 SC.FNM=SC.BAS+7 /EAG:100 SC.MSZ=SC.BAS+20 /EAG:100 SC.AMS=SC.BAS+22 /EAG:100 SC.SLT=SC.BAS+24 /EAG:100 SC.BNM=SC.BAS+26 /EAG:100 SC.BTB=SC.BAS+30 /EAG:100 SC.VTF=SC.BAS+33 /EAG:100 SC.ACT=SC.BAS+36 /EAG:100 SC.NMF=SC.BAS+42 /EAG:100 SC.BOS=SC.BAS+52 /EAG:100 SC.SDV=SC.BAS+57 /EAG:100 SC.BTA=SC.BAS+62 /EAG:100 SC.BTL=SC.BAS+63 /EAG:100 SC.CQF=SC.BAS+65 /EAG:100 SC.CQB=SC.BAS+66 /EAG:100 /EAG:100 /EAG:100 /EAG:100 /EAG:100 / /EAG:100 / DEFINE BITS IN SC.MOD: /EAG:100 / /EAG:100 /EAG:100 SC.API=400000 /EAG:100 SC.PLR=4 /EAG:100 SC.UC15=2 /EAG:100 SC.XVM=1 /EAG:100 /EAG:100 /EAG:100 /EAG:100 /EAG:100 / /EAG:100 / DEFINE BITS IN SC.VTF: /EAG:100 / /EAG:100 /EAG:100 SC.VTN=100000 /EAG:100 /EAG:100 /EAG:100 /EAG:100 /EAG:100 / /EAG:100 / DEFINE BITS IN SC.NMF /EAG:100 / /EAG:100 /EAG:100 SC.PVT=1000 /EAG:100 SC.PCLK=400 /EAG:100 SC.PAPI=200 /EAG:100 SC.PUC15=100 /EAG:100 SC.PXVM=40 /EAG:100 SC.BCH=1 /EAG:100 /EAG:100 /EAG:100 /EAG:100 /EAG:100 / /EAG:100 / DEFINE BITS IN SC.BOS /EAG:100 / /EAG:100 /EAG:100 SC.BMD=400000 /EAG:100 SC.BAB=1 /EAG:100 /EAG:100 /EAG:100 /EAG:100 /EAG:100 / /EAG:100 / DEFINE BITS IN SC.CQF /EAG:100 / /EAG:100 /EAG:100 SC.QNF=2000 /EAG:100 SC.QNRM=1000 /EAG:100 SC.QPUT=400 /EAG:100 SC.QRTN=7 /EAG:100 .TITLE DEFINE .TEXT MACRO /EAG:100 /EAG:100 /EAG:100 /EAG:100 / /EAG:100 / FOLLOWING MACRO ACCEPTS A MESSAGE AND CREATES AN IOPS /EAG:100 / ASCII LOGICAL RECORD CONTAINING THAT MESSAGE. THE MESSAGE /EAG:100 / SHOULD BE IN A FORM ACCEPTABLE TO .ASCII. /EAG:100 / /EAG:100 /EAG:100 .DEFIN .TEXT MESSAG,?LABEL /EAG:100 LABEL-.*400 /EAG:100 0 /EAG:100 .ASCII MESSAG /EAG:100 LABEL=. /EAG:100 .ENDM /EAG:100 .TITLE INITIALIZATION AND BUFFER SETUP /EAG:100 /EAG:100 /EAG:100 /EAG:100 / /EAG:100 / ALLOCATE MAXIMUM POSSIBLE BUFFER FROM REGION DEFINED /EAG:100 / BY SC.FRL, AND VERIFY THAT IT IS SUFFICIENT. /EAG:100 / /EAG:100 /EAG:100 IN LAC* (SC.FRL) / INITIALIZE BUFFER BASE /EAG:100 DAC BUFBAS / ADDRESS /EAG:100 LAC* (SC.FRL+1) / CALCULATE LENGTH OF /EAG:100 CMA!STL / FREE AREA /EAG:100 TAD BUFBAS /EAG:100 SNL /EAG:100 JMP NOCORE / JMP IF (SC.FRL) > (SC.FRL+1) /EAG:100 AAC 377 / TRUNCATE TO MULTIPLE OF 400 /EAG:100 AND (777400) /EAG:100 DAC BUFLEN / AND REMEBER TWO'S COMPLE. OF /EAG:100 TCA!STL / LENGTH FOR WORD COUNT /EAG:100 TAD (-SC.BAS-SC.LEN) / VERIFY THERE IS ROOM FOR /EAG:100 SZL / .SCOM /EAG:100 JMP NOCORE / THERE ISN'T /EAG:100 LAC* (SC.CQB+2) / PICK UP LENGTH OF QAREA /EAG:100 SNA!TCA!STL / AND VERIFY ONE EXISTS /EAG:100 JMP NOQAREA /EAG:100 TAD (-SC.BAS-SC.LEN) / VERIFY IT IS LONG ENOUGH /EAG:100 SZL / TO INCLUDE .SCOM /EAG:100 JMP TOOSML /EAG:100 LAC* (SC.CQB) / COPY INITIAL BLOCK NUMBER, /EAG:100 DAC TRNBLK / CORE ADDRESS, AND IMAGE /EAG:100 LAC* (SC.CQB+1) / LENGTH FROM .SCOM /EAG:100 IAC /EAG:100 DAC CORADR /EAG:100 LAC* (SC.CQB+2) /EAG:100 DAC LENLFT /EAG:100 LAC* (SC.CQF) / WHAT DO WE WANT TO DO? /EAG:100 AND (SC.QNF) / CHECK FOR FILE REQUEST /EAG:100 SZA /EAG:100 JMP NOFILE / SKIP FILE TRANSFER OPERATION /EAG:100 JMP DOFILE / GO DO FILE TRANSFER /EAG:100 /EAG:100 /EAG:100 /EAG:100 / COME HERE IF THERE IS INSUFFICIENT CORE TO HOLD THE /EAG:100 / NECESSARY BUFFERS. /EAG:100 /EAG:100 NOCORE JMS ERROR /EAG:100 .TEXT <"INSUFFICIENT MEMORY."<015>> /EAG:101 /EAG:100 /EAG:100 / COME HERE IF A QAREA DOESN'T EXIST. /EAG:100 /EAG:100 NOQAREA JMS ERROR /EAG:100 .TEXT <"NO ^QAREA."<015>> /EAG:101 /EAG:100 /EAG:100 / COME HERE IF A QAREA EXISTS BUT ISN'T LONG ENOUGH TO HOLD /EAG:100 / .SCOM. /EAG:100 /EAG:100 TOOSML JMS ERROR /EAG:100 .TEXT <"^QAREA TOO SMALL."<015>> /EAG:101 .TITLE PERFORM FILE TRANSFER OPERATION /EAG:100 /EAG:100 /EAG:100 /EAG:100 / /EAG:100 / THE CODE BELOW TRANSFERS A CORE IMAGE BETWEEN THE QAREA /EAG:100 / AND THE FILE NAMED IN SC.FNM. THE DIRECTION OF TRANSFER /EAG:100 / IS INDICATED BY BIT SC.QPUT OF SC.CQF. /EAG:100 / /EAG:100 /EAG:100 DOFILE JMS SETUP / SET UP WORD COUNTS, ETC. /EAG:100 LAC* (SC.CQF) / CHECK TRANSFER DIRECTION /EAG:100 AND (SC.QPUT) / AND THEN GO OPEN THE FILE /EAG:100 SNA / AND DO THE FIRST TRANSFER. /EAG:100 JMP GETFL1 /EAG:100 .INIT -14,1,0 / SET UP DEVICE FOR OUTPUT /EAG:100 .ENTER -14,SC.FNM,0 / CREATE A NEW FILE /EAG:100 CLL / READ FIRST CHUNK OFF OF QAREA /EAG:100 JMS TRAN /EAG:100 JMS SCMCHK / VERIFY .SCOM IS REASONABLE /EAG:100 / AND UPDATE LENLFT /EAG:100 JMS SETUP / UPDATE WORD COUNTS /EAG:100 .WRITE -14,4,-1,0 / WRITE IT OUT /EAG:100 PUTLN1=.-1 /EAG:100 PUTBF1=.-2 /EAG:100 .WAIT -14 /EAG:100 JMP COMFIL / JOIN COMMON CODE /EAG:100 /EAG:100 GETFL1 .INIT -14,0,0 / SET UP DEVICE FOR INPUT /EAG:100 .SEEK -14,SC.FNM / OPEN EXISTING FILE /EAG:100 .READ -14,4,-1,0 / READ IN FIRST CHUNK /EAG:100 GETLN1=.-1 /EAG:100 GETBF1=.-2 /EAG:100 .WAIT -14 /EAG:100 JMS SCMCHK / VERIFY .SCOM IS REASONABLE /EAG:100 / AND UPDATE LENLFT. /EAG:100 JMS SETUP / UPDATE WORD COUNTS /EAG:100 STL / WRITE IT OUT /EAG:100 JMS TRAN /EAG:100 COMFIL JMS SCMSAV / REMEMBER .SCOM FOR LATER /EAG:100 / ERROR CHECKING /EAG:100 FILLUP JMS MSBTSV / CHECK FOR MASS STORAGE /EAG:100 / BUSY TABLE AND REMEMBER /EAG:100 / IT IF ITS IN CORE. /EAG:100 LAC TRNLEN / UPDATE EVERYTHING BY LENGTH /EAG:100 TCA / OF LAST TRANSFER /EAG:100 LMQ /EAG:100 TAD CORADR / INCLUDING CURRENT CORE ADDR. /EAG:100 DAC CORADR /EAG:100 LACQ /EAG:100 TAD LENLFT / AND REMAINING LENGTH TO XFER /EAG:100 SNA / CHECK IF TRANSFER COMPLETE /EAG:100 JMP CLSFIL / JMP IF IT IS /EAG:100 DAC LENLFT /EAG:100 CLA!CLL /EAG:100 LLS+12 /EAG:100 TAD TRNBLK / UPDATE DISK BLOCK # WITHIN /EAG:100 DAC TRNBLK / QAREA /EAG:100 JMS SETUP / SET UP FOR NEXT TRANSFER /EAG:100 LAC* (SC.CQF) / CHECK DIRECTION /EAG:100 AND (SC.QPUT) / AND THEN GO TRANSFER THE /EAG:100 SNA / NEXT CHUNK /EAG:100 JMP GETFL2 /EAG:100 CLL / READ IN FROM QAREA /EAG:100 JMS TRAN /EAG:100 .WRITE -14,4,-1,0 / WRITE OUT TO FILE /EAG:100 PUTLN2=.-1 /EAG:100 PUTBF2=.-2 /EAG:100 .WAIT -14 /EAG:100 JMP FILLUP / AND LOOP /EAG:100 /EAG:100 GETFL2 .READ -14,4,-1,0 / READ IN FROM FILE /EAG:100 GETLN2=.-1 /EAG:100 GETBF2=.-2 /EAG:100 .WAIT -14 /EAG:100 STL / WRITE OUT TO QAREA /EAG:100 JMS TRAN /EAG:100 JMP FILLUP / AND LOOP /EAG:100 /EAG:100 /EAG:100 / COME HERE WHEN FILE TRANSFER IS COMPLETE TO CLOSE /EAG:100 / THE FILE. THEN PROCEED TO EXIT PROCESSING. /EAG:100 /EAG:100 CLSFIL .CLOSE -14 / CLOSE THE FILE /EAG:100 JMP CKEXIT / JOIN EXIT PROCESSING /EAG:100 .TITLE READ IN .SCOM, MSBT FOR NON-FILE REQUEST /EAG:100 /EAG:100 /EAG:100 /EAG:100 / /EAG:100 / WE COME HERE FOLLOWING BUFFER SETUP AND INITIALIZATION /EAG:100 / ON ALL QFILE OPERATIONS WHICH DO NOT PERFORM A FILE /EAG:100 / TRANSFER OPERATION. HERE WE SCAN THROUGH THE IMAGE /EAG:100 / IN THE QAREA UNTIL WE'VE READ IN .SCOM AND THE MSBT, /EAG:100 / SO THAT LATER ERROR CHECKS WHICH WANT THEM IN CORE /EAG:100 / WILL FIND THEM THERE. /EAG:100 / /EAG:100 /EAG:100 NOFILE LAC* (SC.CQF) / CHECK IF WE ARE JUST GOING TO /EAG:102 AND (SC.QNRM) / EXIT TO THE NON-RESIDENT /EAG:102 SZA / MONITOR. IF SO, SKIP THIS, /EAG:102 JMP CKEXIT / AS WON'T NEED .SCOM, ETC. /EAG:102 JMS SETUP / SET UP TRANSFER /EAG:100 CLL / AND BRING IN FIRST CHUNK /EAG:100 JMS TRAN /EAG:100 JMS SCMCHK / CHECK .SCOM AND LENGTH /EAG:100 JMS SETUP /EAG:100 JMS SCMSAV / PRESERVE .SCOM /EAG:100 NFLLUP JMS MSBTSV / CHECK FOR AND PRESERVE MSBT /EAG:100 LAC MSBTAD / CHECK IF MSBT AND BUFFER /EAG:100 SNA / HAVE BEEN PRESERVED YET. /EAG:100 JMP NFLNXT / IF THEY HAVE, EXIT TO CKEXIT. /EAG:100 LAC BFTBAD / OTHERWISE CONTINUE AT NFLNXT. /EAG:100 SZA /EAG:100 JMP CKEXIT /EAG:100 NFLNXT LAC TRNLEN / UPDATE FOR NEXT TRANSFER /EAG:100 TCA /EAG:100 LMQ /EAG:100 TAD CORADR / IMAGE CORE ADDRESS OF BASE /EAG:100 DAC CORADR / OF CHUNK. /EAG:100 LACQ /EAG:102 TAD LENLFT / AND LENGTH REMAINING TO /EAG:102 SNA / TRANSFER. /EAG:102 JMP CKEXIT / IF WE REACH END, THEN QUIT /EAG:102 DAC LENLFT /EAG:102 CLA!CLL /EAG:102 LLS+12 / AND DISK BLOCK NUMBER /EAG:100 TAD TRNBLK /EAG:100 DAC TRNBLK /EAG:100 JMS SETUP / READ IN NEXT CHUNK /EAG:102 CLL /EAG:102 JMS TRAN /EAG:102 JMP NFLLUP / AND PROCESS IT /EAG:102 .TITLE EXIT PROCESSING /EAG:100 /EAG:100 /EAG:100 /EAG:100 / /EAG:100 / COME HERE AFTER ANY FILE TRANSFER OPERATIONS HAVE BEEN /EAG:100 / COMPLETED. CHECK FOR DESIRED TYPE OF EXIT AND DO IT. /EAG:100 / /EAG:100 /EAG:100 CKEXIT LAC* (SC.CQF) / CHECK IF EXIT TO NON-RES. /EAG:100 AND (SC.QNRM) / MONITOR HAS BEEN REQUESTED. /EAG:100 SNA / SKIP IF IT HAS. /EAG:100 JMP CHKIMG / GO CHECK AND BRING IN IMAGE. /EAG:100 .EXIT / EXIT TO N.R.M. /EAG:100 /EAG:100 /EAG:100 / COME HERE TO VERIFY THAT AN IMAGE CAN BE BROUGHT INTO CORE. /EAG:100 / IF IT CAN, THEN BRING IT IN. /EAG:100 /EAG:100 CHKIMG LAC SCMADR / VERIFY THAT .SCOM HAS BEEN /EAG:100 SNA / PRESERVED IN CORE. ELSE /EAG:100 JMP BADIMG / SOMETHING FUNNY GOING ON. /EAG:100 AAC SC.COD / SET UP POINTERS TO .SCOM /EAG:100 DAC ISCCOD / LOCATIONS WITHIN PRESERVED /EAG:100 AAC SC.MOD-SC.COD / .SCOM IMAGE. /EAG:100 DAC ISCMOD /EAG:100 AAC SC.MSZ-SC.MOD /EAG:100 DAC ISCMSZ /EAG:100 AAC SC.AMS-SC.MSZ /EAG:100 DAC ISCAMS /EAG:100 AAC SC.SLT-SC.AMS /EAG:100 DAC ISCSLT /EAG:100 AAC SC.VTF-SC.SLT /EAG:100 DAC ISCVTF /EAG:100 AAC SC.NMF-SC.VTF /EAG:100 DAC ISCNMF /EAG:100 AAC SC.SDV-SC.NMF /EAG:100 DAC ISCSDV /EAG:100 AAC SC.CQF-SC.SDV /EAG:100 DAC ISCCQF /EAG:100 AAC SC.CQB-SC.CQF /EAG:100 DAC ISCCQB /EAG:100 AAC 1 /EAG:100 DAC ISCCQB+1 /EAG:100 AAC 1 /EAG:100 DAC ISCCQB+2 /EAG:100 LAC* ISCCQB+1 / VERIFY THAT IMAGE INCLUDES /EAG:100 IAC / EVERYTHING BELOW BOOTSTRAP. /EAG:100 CLL!TCA /EAG:100 TAD* ISCCQB+2 /EAG:100 TAD* ISCCOD /EAG:100 SNL /EAG:100 JMP NOBOOT /EAG:100 LAC* ISCCOD / VERIFY THAT BOOTSTRAP IS IN /EAG:100 SAD* (SC.COD) / SAME PLACE IN BOTH THE IMAGE /EAG:100 SKP / AND THE CURRENT CORE LOAD. /EAG:100 JMP DFBOOT /EAG:100 LAC* ISCMSZ / VERIFY THAT IMAGE'S MEMSIZ IS /EAG:100 CLL!TCA / NO BIGGER THAN THE CURRENT /EAG:100 TAD* (SC.MSZ) / CORE LOAD'S. /EAG:100 SNL /EAG:100 JMP MSZERR /EAG:100 LAC* ISCMOD / VERIFY THAT API IS PRESENT /EAG:100 AND (SC.API) / IF IT'S IN USE. /EAG:100 SNA /EAG:100 JMP CKIM.0 /EAG:100 LAC* (SC.NMF) /EAG:100 AND (SC.PAPI) /EAG:100 SNA /EAG:100 JMP NOAPI /EAG:100 CKIM.0 LAC* ISCMOD / VERIFY THAT XVM HARDWARE /EAG:100 AND (SC.XVM) / IS PRESENT IF IT'S IN USE. /EAG:100 SNA /EAG:100 JMP CKIM.1 /EAG:100 LAC* (SC.NMF) /EAG:100 AND (SC.PXVM) /EAG:100 SNA /EAG:100 JMP NOXVM /EAG:100 CKIM.1 LAC* ISCMOD / VERIFY THAT UC15 HARDWARE /EAG:100 AND (SC.UC15) / IS PRESENT IF IT'S IN USE. /EAG:100 SNA /EAG:100 JMP CKIM.2 /EAG:100 LAC* (SC.NMF) /EAG:100 AND (SC.PUC15) /EAG:100 SNA /EAG:100 JMP NOUC15 /EAG:100 LAC* ISCMOD / ALSO CHECK THAT A REAL /EAG:100 AND (SC.PLR) / TIME CLOCK IS PRESENT IF /EAG:100 SNA / THE POLLER IS RUNNING. /EAG:100 JMP CKIM.2 /EAG:100 LAC* (SC.NMF) /EAG:100 AND (SC.PCLK) /EAG:100 SNA /EAG:100 JMP NOCLK /EAG:100 CKIM.2 LAC* ISCVTF / VERIFY THAT A VT15 IS /EAG:100 AND (SC.VTN) / PRESENT IF VT ON. /EAG:100 SNA /EAG:100 JMP CKIM.3 /EAG:100 LAC* (SC.NMF) /EAG:100 AND (SC.PVT) /EAG:100 SNA /EAG:100 JMP NOVT /EAG:100 CKIM.3 LAC* ISCSDV / VERIFY THAT SYSTEM DEVICE /EAG:100 SAD* (SC.SDV) / CODES ARE THE SAME /EAG:100 SKP /EAG:100 JMP DFSDV /EAG:100 LAC* ISCSLT / AND THAT .DAT TABLES ARE /EAG:100 SAD* (SC.SLT) / THE SAME LENGTH /EAG:100 SKP /EAG:100 JMP DFDAT /EAG:100 / WHEN WE GET HERE .SCOM HAS SUCCESSFULLY PASSED ALL TESTS. /EAG:100 / NOW WE UPDATE THE IMAGE'S .SCOM TO WHAT IT WANTS TO /EAG:100 / BE WHEN BROUGHT INTO CORE. /EAG:100 LAC* (SC.NMF) / REPLACE THE IMAGE'S /EAG:100 XOR* ISCNMF / HARDWARE PRESENCE BITS /EAG:100 .X=SC.PAPI!SC.PUC15!SC.PXVM / WITH OUR OWN. /EAG:100 .X=.X!SC.PCLK!SC.PVT /EAG:100 AND (.X) /EAG:100 XOR* ISCNMF /EAG:100 SAD* ISCNMF / CHECK IF WE'RE MODIFYING /EAG:100 SKP / IMAGE'S .SCOM, AND CLEAR /EAG:100 DZM SCMSW / FLAG IF SO. /EAG:100 DAC* ISCNMF /EAG:100 LAC* (SC.AMS) / ALSO REPLACE ITS ACTUAL /EAG:100 SAD* ISCAMS / MEMORY SIZE. /EAG:100 SKP /EAG:100 DZM SCMSW /EAG:100 DAC* ISCAMS /EAG:100 LAC* (SC.CQF) / UPDATE ITS SC.CQF SO THAT /EAG:100 AND (SC.QRTN) / THE PROPER EXIT FROM THE /EAG:100 SAD (4) / .PUT CAL WILL BE TAKEN. /EAG:100 LAC* ISCCQF /EAG:100 AND (SC.QRTN) /EAG:100 SAD* ISCCQF /EAG:100 SKP /EAG:100 DZM SCMSW /EAG:100 DAC* ISCCQF /EAG:100 LAC* (SC.CQB) / UPDATE SC.CQB TO POINT /EAG:100 SAD* ISCCQB / TO WHERE QAREA IS NOW, /EAG:100 SKP / RATHER THAN WHERE IT WAS. /EAG:100 DZM SCMSW /EAG:100 DAC* ISCCQB /EAG:100 LAC* ISCCQB+1 / UPDATE SC.CQB+2 IN CASE THIS /EAG:100 CMA / QAREA IS LONGER THAN THE /EAG:100 TAD* (SC.CQB+2) / PREVIOUS ONE, AND THE MEMSIZ /EAG:100 STL / IS BIG ENOUGH TO WANT TO /EAG:100 TAD* ISCMSZ / TAKE ADVANTAGE OF IT. /EAG:100 SZL!CMA /EAG:102 CLA /EAG:102 TAD* ISCMSZ /EAG:100 TCA /EAG:100 TAD* ISCCQB+1 /EAG:100 SAD* ISCCQB+2 /EAG:100 SKP /EAG:100 DZM SCMSW /EAG:100 DAC* ISCCQB+2 /EAG:100 JMP CKMSBT / GO CHECK OUT MSBT /EAG:100 /EAG:100 /EAG:100 /EAG:100 / COME HERE IF THE IMAGE IS GARBAGE -- I.E. A SERIOUS /EAG:100 / INCONSISTENCY WHICH PREVENTS US FROM PROCESSING IT. /EAG:100 /EAG:100 BADIMG JMS ERROR /EAG:100 .TEXT <"INVALID CORE IMAGE."<015>> /EAG:101 /EAG:100 /EAG:100 / COME HERE IF THE IMAGE LENGTH IS LESS THAN THE BOOTSTRAP /EAG:100 / ADDRESS (SC.COD). /EAG:100 /EAG:100 NOBOOT JMS ERROR /EAG:100 .TEXT <"IMAGE DOESN'T CONTAIN BOOTSTRAP."<015>> /EAG:101 /EAG:100 /EAG:100 / COME HERE IF THE BOOTSTRAP IN THE SAVED IMAGE IS AT A /EAG:100 / LOCATION THAN THE BOOTSTRAP WE ARE CURRENTLY RUNNING WITH. /EAG:100 /EAG:100 DFBOOT JMS ERROR /EAG:100 .TEXT <"DIFFERENT BOOTSTRAP LOCATIONS."<015>> /EAG:101 /EAG:100 /EAG:100 / COME HERE IF THE MEMSIZ (SC.MSZ) OF THE SAVED IMAGE IS /EAG:100 / GREATER THAN THE CURRENT MEMSIZ /EAG:100 /EAG:100 MSZERR JMS ERROR /EAG:100 .TEXT <"IMAGE'S MEMORY SIZE TOO LARGE."<015>> /EAG:101 /EAG:100 /EAG:100 / COME HERE IF SAVED IMAGE USES API, BUT API ISN'T PRESENT. /EAG:101 /EAG:101 NOAPI JMS ERROR /EAG:101 .TEXT <"IMAGE REQUIRES API."<015>> /EAG:101 /EAG:101 /EAG:101 / COME HERE IF SAVED IMAGE USES XVM, BUT XVM ISN'T PRESENT. /EAG:101 /EAG:101 NOXVM JMS ERROR /EAG:101 .TEXT <"IMAGE REQUIRES XVM."<015>> /EAG:101 /EAG:101 /EAG:101 / COME HERE IF SAVED IMAGE USES UC15, BUT UC15 ISN'T PRESENT. /EAG:101 /EAG:101 NOUC15 JMS ERROR /EAG:101 .TEXT <"IMAGE REQUIRES UC15."<015>> /EAG:101 /EAG:101 /EAG:101 / COME HERE IF SAVED IMAGE USES THE POLLER, BUT A CLOCK /EAG:101 / ISN'T PRESENT. /EAG:101 /EAG:101 NOCLK JMS ERROR /EAG:101 .TEXT <"IMAGE REQUIRES KW15 CLOCK."<015>> /EAG:101 /EAG:101 /EAG:101 / COME HERE IF SAVED IMAGE HAS VT ON ENABLED, BUT A VT15 /EAG:101 / ISN'T PRESENT. /EAG:101 /EAG:101 NOVT JMS ERROR /EAG:101 .TEXT <"IMAGE REQUIRES VT15."<015>> /EAG:101 /EAG:100 /EAG:100 / COME HERE IF THE SYSTEM CONFIGURATION IF DIFFERENT FROM /EAG:100 / WHAT IT WAS WHEN THE SAVED IMAGE WAS CREATED. THE SPECIFIC /EAG:100 / DIFFERENCES CHECKED FOR ARE: /EAG:100 / /EAG:100 / 1. DIFFERENT SYSTEM DEVICE CODES. THIS CAN BE DUE /EAG:100 / TO A DIFFERENT SYSTEM DEVICE OR A RECONFIGURATION /EAG:100 / OF I/O HANDLERS. THIS IS CHECKED BY COMPARING /EAG:100 / SC.SDV IN THE CURRENT .SCOM AND THE IMAGE'S .SCOM /EAG:100 / FOR EQUALITY. IF THEY ARE DIFFERENT WE COME TO /EAG:100 / DFSDV. /EAG:100 / /EAG:100 / 2. DIFFERENT NUMBER OF .DAT SLOTS, DETECTED BY /EAG:100 / COMPARING LOCATION SC.SLT OF THE .SCOM'S FOR /EAG:100 / EQUALITY. IF THEY ARE DIFFERENT WE COME TO DFDAT. /EAG:100 / /EAG:100 /EAG:100 DFSDV=. /EAG:100 DFDAT JMS ERROR /EAG:100 .TEXT <"DIFFERENT SYSTEM CONFIGURATIONS."<015>> /EAG:101 .TITLE CHECK MSBT FOR OPEN FILES /EAG:100 /EAG:100 /EAG:100 /EAG:100 / /EAG:100 / COME HERE AFTER WE'VE FINISHED CHECKING AND UPDATING /EAG:100 / THE IMAGE'S .SCOM. HERE WE SCAN THE IMAGE'S MASS /EAG:100 / STORAGE BUSY TABLE (MSBT) TO CHECK FOR ANY OPEN FILES. /EAG:100 / IF WE FIND ANY WE GIVE AN APPROPRIATE WARNING. /EAG:100 / /EAG:100 /EAG:100 CKMSBT LAC MSBTAD / VERIFY THAT MSBT WAS /EAG:100 SNA / PRESERVED BY SCAN. /EAG:100 JMP BADIMG / ELSE SOMETHING IS WRONG /EAG:100 LAC MSBTNM / TAKE TWO'S COMPLEMENT /EAG:100 SNA!TCA / OF NUMBER OF ENTRIES FOR /EAG:100 JMP MSBTOK / LOOP COUNTER. IF ZERO, /EAG:100 DAC MSBTNM / SKIP THIS. /EAG:100 LPMSBT LAC* MSBTAD / CHECK OUT NEXT MSBT ENTRY. /EAG:100 AND (777) / EXTRACT .DAT SLOT # AND /EAG:100 DAC LPMS.A / SAVE IT. /EAG:100 SNA!CLA / IF ZERO THEN THIS ENTRY IS /EAG:100 JMP NXMSBT / EMPTY, SO SKIP IT. /EAG:100 ISZ MSBTAD / BUMP POINTER TO BUFFER ENTRY. /EAG:100 LAC* MSBTAD / FETCH BUFFER TRANSFER VECTOR. /EAG:100 SNA!CLA!CMA / IF ZERO, ALL OK. ELSE A /EAG:100 JMP NXMSBT / BUFFER IS ALLOCATED SO THE /EAG:100 LAW 777400 / FILE IS OPEN. /EAG:100 AND LPMS.A / CHECK FOR NEGATIVE .DAT /EAG:100 SNA!CLL / SLOT NUMBERS, AND PERFORM /EAG:100 JMP LPMS.0 / MAGIC TO CONVERT .DAT SLOT /EAG:100 LAC LPMS.A / NUMBER TO 5/7 ASCII TO BE /EAG:100 CLL!TCA / INSERTED INTO WARNING /EAG:100 AND (100777) / MESSAGE. /EAG:100 DAC LPMS.A /EAG:100 LPMS.0 LAC LPMS.A /EAG:100 ALS+4 /EAG:100 XOR LPMS.A /EAG:100 CLL!RAL /EAG:100 AND (703416) / MASK OUT CRUFT /EAG:100 TAD (330140) / AND SET HIGH BITS IN /EAG:100 / DIGITS AND SIGN. /EAG:100 DAC LPMS.1 / SAVE INTO MESSAGE. /EAG:100 JMS WARN / ISSUE WARNING /EAG:100 LPMS.2-.*400 / (LINE BUFFER HEADER) /EAG:100 0 /EAG:100 .ASCII "OPEN FILE ON .DA" /EAG:101 .ASCII "T +NN" /EAG:100 LPMS.1=.-1 /EAG:100 .ASCII "."<015> /EAG:101 LPMS.2 .TEXT <<011>"CLOSE IT"<175>> /EAG:101 LAW -1 / BACK UP POINTER TO /EAG:100 TAD MSBTAD / .DAT SLOT ENTRY. /EAG:100 DAC LPMS.A /EAG:100 DZM* LPMS.A / CLEAR IT. /EAG:100 LAC BFTBAD / SET UP TO SCAN BUFFER /EAG:100 DAC LPMS.A / TABLE FOR IN USE FILE /EAG:100 LAC BFTBNM / BUFFER. /EAG:100 SNA!TCA / IF NO ENTRIES GO TO NOT /EAG:100 JMP LPMS.4 / FOUND EXIT. /EAG:100 DAC LPMS.B /EAG:100 LPMS.3 LAC* LPMS.A / PICK UP BUFFER TABLE ENTRY, /EAG:100 CMA / ASSUME IT'S IN USE, /EAG:100 SAD* MSBTAD / AND SEE IT IT'S THE ONE /EAG:100 JMP LPMS.5 / WE'RE LOOKING FOR. /EAG:100 ISZ LPMS.A / IT ISN'T -- ADVANCE TO NEXT /EAG:100 ISZ LPMS.B / ENTRY IN TABLE. /EAG:100 JMP LPMS.3 /EAG:100 LPMS.4 JMS WARN / ENTRY NOT FOUND IN TABLE. /EAG:100 .TEXT <"BUFFER ILLEGAL OR NOT IN USE."<015>> /EAG:101 .TEXT <<011>"IGNORE IT"<175>> /EAG:101 SKP /EAG:100 LPMS.5 DAC* LPMS.A / FLAG BUFFER NOT IN USE /EAG:100 DZM* MSBTAD / CLEAR BUFFER ENTRY IN /EAG:100 DZM MSBTSW / MSBT, AND FLAG BOTH MSBT /EAG:100 DZM BFTBSW / AND BUFFER TABLE TO /EAG:100 / BE WRITTEN OUT. /EAG:100 CLA!CMA / COMPENSATE FOR HOW WE'VE /EAG:100 / BUMPED MSBT POINTER (MSBTAD) /EAG:100 NXMSBT TAD MSBTAD / ADVANCE MSBT POINTER TO /EAG:100 TAD MSBTEN / NEXT ENTRY /EAG:100 DAC MSBTAD /EAG:100 ISZ MSBTNM / DONE YET? /EAG:100 JMP LPMSBT /EAG:100 MSBTOK JMP BRNGIN / YES -- GO BRING IN IMAGE /EAG:100 /EAG:100 /EAG:100 /EAG:100 LPMS.A 0 / TEMPORARY USED ABOVE /EAG:100 /EAG:100 LPMS.B 0 / TEMPORARY USED ABOVE /EAG:100 .TITLE WRITE OUT .SCOM AND MSBT AND BRING IN IMAGE /EAG:100 /EAG:100 /EAG:100 /EAG:100 / /EAG:100 / COME HERE AFTER ALL ERROR CHECKS HAVE BEEN PASSED. /EAG:100 / FIRST WE WRITE OUT THE UPDATED .SCOM, MSBT, AND BUFFER /EAG:100 / TABLES (IF APPROPRIATE). THEN WE BRING IN THE IMAGE /EAG:100 / FROM THE QAREA. WHEN BRINGING IN THE IMAGE WE TAKE /EAG:100 / CARE NOT TO OVERWRITE THE BOOTSTRAP. /EAG:100 / /EAG:100 /EAG:100 BRNGIN LAC SCMBUF / WRITE OUT .SCOM /EAG:100 AAC -1 /EAG:100 DAC TRNBUF /EAG:100 LAC SCMLEN /EAG:100 DAC TRNLEN /EAG:100 LAC SCMBLK /EAG:100 DAC TRNBLK /EAG:100 STL /EAG:100 ISZ SCMSW /EAG:100 JMS TRAN /EAG:100 LAC MSBTBF / WRITE OUT MSBT /EAG:100 AAC -1 /EAG:100 DAC TRNBUF /EAG:100 LAC MSBTLN /EAG:100 DAC TRNLEN /EAG:100 LAC MSBTBK /EAG:100 DAC TRNBLK /EAG:100 STL /EAG:100 ISZ MSBTSW /EAG:100 JMS TRAN /EAG:100 LAC BFTBBF / WRITE OUT BUFFER TABLE /EAG:100 AAC -1 /EAG:100 DAC TRNBUF /EAG:100 LAC BFTBLN /EAG:100 DAC TRNLEN /EAG:100 LAC BFTBBK /EAG:100 DAC TRNBLK /EAG:100 STL /EAG:100 ISZ BFTBSW /EAG:100 JMS TRAN /EAG:100 LAW 770000 / CALCULATE ADDRESS ABOVE /EAG:100 AND* (SC.COD) / BOOTSTRAP /EAG:100 TAD (10000) /EAG:100 TCA / CONVERT TO RELATIVE OFFSET /EAG:100 TAD* (SC.CQB+1) / INTO IMAGE /EAG:100 CMA!STL /EAG:100 DAC BRIN.A / REMEMBER IT /EAG:100 TAD* (SC.CQB+2) / CHECK IF IMAGE EXTENDS ABOVE /EAG:100 SNL / BOOTSTRAP. IF IT DOESN'T, /EAG:100 JMP BRIN.2 / JMP PAST ALL THE FUNNY CODE. /EAG:100 LAC BUFBAS / SET UP TO READ INTO BUFFER. /EAG:100 AAC -1 /EAG:100 DAC TRNBUF /EAG:100 LAW -400 / A SINGLE BLOCK. /EAG:100 DAC TRNLEN /EAG:100 LAC BRIN.A / SPECIFICALLY, THE BLOCK /EAG:100 CLL / CONTAINING THE FIRST WORD /EAG:100 LRS+10 / ABOVE THE BOOTSTRAP. /EAG:100 TAD* (SC.CQB) /EAG:100 DAC TRNBLK /EAG:100 LAC BRIN.A / POINT X11 TO JUST ABOVE /EAG:100 TAD* (SC.CQB+1) / BOOTSTRAP. /EAG:100 DAC* (X11) /EAG:100 LAC BRIN.A / CHECK IF BOOTSTRAP ENDS /EAG:100 AND (377) / ON A WORD BOUNDARY. /EAG:100 SNA / IF IT DOES, THEN JMP /EAG:100 JMP BRIN.1 / PAST THE COPY LOOP. /EAG:100 TAD TRNBUF / ELSE POINT X10 TO WORD /EAG:100 DAC* (X10) / JUST ABOVE BOOTSTRAP /EAG:100 / WITHIN THE IMAGE WHERE /EAG:100 / IT WILL BE IN THE BUFFER. /EAG:100 LAC BRIN.A / CALCULATE ADDRESS OF LAST /EAG:100 AAC 377 / WORD WITHIN THE BLOCK /EAG:100 AND (777400) / CONTAINING THE FIRST WORD /EAG:100 TAD* (SC.CQB+1) / ABOVE THE BOOTSTRAP. /EAG:100 CLL!TCA / COMPARE AGAINST MEMSIZ, /EAG:100 TAD* (SC.MSZ) / AND USE WHICHEVER IS SMALLER. /EAG:100 SNL!TCA /EAG:100 CLA /EAG:100 TAD* (SC.MSZ) /EAG:100 CLL!TCA / USE TO CALCULATE NUMBER OF /EAG:100 TAD* (X11) / WORDS TO COPY. /EAG:100 SNA!SZL / IF ZERO OR NEGATIVE WORDS TO /EAG:100 JMP BRIN.2 / COPY, JMP PAST THIS. /EAG:100 DAC BRIN.A / SAVE FOR LOOP COUNTER. /EAG:100 CLL / READ IN BLOCK. /EAG:100 JMS TRAN /EAG:100 BRIN.0 LAC* X10 / COPY SEGMENT WHICH GOES ABOVE /EAG:100 DAC* X11 / BOOTSTRAP FROM BUFFER TO /EAG:100 ISZ BRIN.A / ABOVE BOOTSTRAP. /EAG:100 JMP BRIN.0 /EAG:100 ISZ TRNBLK / CONTINUE WITH NEXT BLOCK. /EAG:100 BRIN.1 LAC* (X11) / X11 POINTS TO FIRST BLOCK /EAG:100 DAC TRNBUF / BOUNDARY ABOVE BOOTSTRAP -- /EAG:100 LAC* (SC.CQB+1) / SET UP TO READ INTO THERE. /EAG:100 TCA / GET RELATIVE OFFSET WITHIN /EAG:100 TAD TRNBUF / IMAGE FOR THIS POINT /EAG:100 CLL / AND CALCULATE LENGTH OF /EAG:100 TAD* (SC.CQB+2) / REMAINING IMAGE. /EAG:100 SZL!SNA / IF THERE ISN'T ANY THEN JMP /EAG:100 JMP BRIN.2 / PAST THE READ. /EAG:100 DAC TRNLEN /EAG:100 CLL / READ IN STUFF ABOVE BOOTSTRAP /EAG:100 JMS TRAN /EAG:100 / AT THIS POINT EVERYTHING ABOVE THE BOOTSTRAP HAS BEEN BROUGHT /EAG:100 / IN, AND ALL WE NEED DO IS READ IN THE STUFF BELOW. /EAG:100 BRIN.2 LAC* (SC.COD) / CALCULATE LENGTH /EAG:100 TCA /EAG:100 TAD* (SC.CQB+1) /EAG:100 DAC* (SC.CQB+2) / USE PARAMETER BLOCK WITHIN /EAG:100 LAC (SC.CQB) / .SCOM, SINCE IT WILL BE /EAG:100 CLL / OVERLAYED. THIS .MTRAN /EAG:100 .MTRAN / "RETURNS" TO THE NEW CORE /EAG:100 / IMAGE. /EAG:100 /EAG:100 /EAG:100 /EAG:100 BRIN.A 0 / TEMPORARY USED ABOVE /EAG:100 .TITLE SCMCHK -- CHECK .SCOM AND UPDATE LENLFT /EAG:100 /EAG:100 /EAG:100 /EAG:100 / /EAG:100 / THIS ROUTINE SHOULD ONLY BE CALLED WHEN THE FIRST CHUNK /EAG:100 / OF THE IMAGE HAS BEEN BROUGHT INTO CORE -- I.E. WHEN /EAG:100 / THE IMAGE'S .SCOM IS IN CORE. IT CHECKS THE IMAGES'S /EAG:100 / .SCOM AGAINST CERTAIN CRITERIA OF REASONABLENESS. /EAG:100 / THESE ARE ESSENTIALLY THE CHECKS WHICH MUST BE PASSED /EAG:100 / FOR A FILE TRANSFER OPERATION TO BE DOABLE, AND SHOULD /EAG:100 / BE PASSED BY ALL CORE IMAGES WHICH ARE REALLY CORE IMAGES, /EAG:100 / AND NOT JUST SOME GARBAGE FILE. IF THE .SCOM CHECKS /EAG:100 / SUCCEED THE LENGTH OF THE IMAGE (IN THE IMAGE'S SC.CQB+2) /EAG:100 / IS CHECKED FOR VALIDITY AND LENLFT IS UPDATED TO REFLECT /EAG:100 / THIS LENGTH. BEFORE CALLING THIS ROUTINE LENLFT SHOULD /EAG:100 / BE INITIALIZED FROM THE CURRENT SC.CQB+2. /EAG:100 / /EAG:100 / NOTE THAT WE VERIFY THE IMAGE'S SC.CQB+2 BY VERIFYING THAT /EAG:100 / IT IS LESS THAN OR EQUAL IN MAGNITUDE (REMEMBERING THAT /EAG:100 / THEY ARE BOTH NEGATIVE NUMBERS) TO THE CURRENT SC.CQB+2. /EAG:100 / IF THERE WERE A CONVENIENT WAY OF OBTAINING THE CURRENT /EAG:100 / QAREA LENGTH (STORED IN SYSBLK) WE WOULD RATHER COMPARE /EAG:100 / AGAINST THIS. THIS WOULD ALLOW US TO LOAD A FILE INTO /EAG:100 / THE QAREA IF IT WOULD FIT THERE, EVEN IF IT WOULD NOT /EAG:100 / FIT INTO CORE. IF ANYONE EVER MAKES THIS CHANGE NOTE THAT /EAG:100 / THE LOGIC OF UPDATING LENLFT MUST BE CHANGED. /EAG:100 / /EAG:100 /EAG:100 SCMCHK 0 /EAG:100 LAC CORADR / COMPENSATE FOR IMAGE OFFSET /EAG:100 TCA /EAG:100 TAD TRNBUF / AND CALCULATE LOCATION OF /EAG:100 AAC 1+SC.CQB+1 / THE IMAGE'S SC.CQB+1 WITHIN /EAG:100 DAC SCCK.A / THE CURRENT CHUNK (BUFFER). /EAG:100 LAC* SCCK.A / VERIFY THAT THE IMAGE'S /EAG:100 SAD* (SC.CQB+1) / OFFSET (SC.CQB+1) IS THE /EAG:100 SKP / SAME AS WHAT WE EXPECTED. /EAG:100 JMP BADIMG / ELSE THE IMAGE IS GARBAGE. /EAG:100 ISZ SCCK.A / BUMP TO IMAGE LENGTH. /EAG:100 LAC* SCCK.A / VERIFY THAT IMAGE INCLUDES /EAG:100 TCA!STL / .SCOM /EAG:100 TAD (-SC.BAS-SC.LEN) /EAG:100 SZL /EAG:100 JMP BADIMG /EAG:100 LAC* (SC.CQB+2) / VERIFY THAT IMAGE ISN'T TOO /EAG:100 TCA!STL / LARGE -- I.E. THAT ITS LENGTH /EAG:100 TAD* SCCK.A / IS NO BIGGER THAT SC.CQB+2. /EAG:100 SZL /EAG:100 JMP BIGIMG / IT'S TOO BIG. /EAG:100 TAD LENLFT / ADJUST LENLFT TO REFLECT /EAG:100 DAC LENLFT / ACTUAL SIZE OF IMAGE, RATHER /EAG:100 / THAN SIZE IN SC.CQB+2. /EAG:100 JMP* SCMCHK / AND RETURN /EAG:100 /EAG:100 /EAG:100 / COME HERE IF IMAGE IS TOO BIG. GIVE WARNING AND, IF /EAG:100 / RECEIVE APPROPRIATE OVERRIDE, TRUNCATE IMAGE. /EAG:100 /EAG:100 BIGIMG JMS WARN / ISSUE WARNING MESSAGE /EAG:100 .TEXT <"IMAGE TOO LONG."<015>> /EAG:101 .TEXT <<011>"TRUNCATE IT"<175>> /EAG:101 LAC* (SC.CQB+2) / TRUNCATE IMAGE -- SUBSTITUTE /EAG:100 DAC* SCCK.A / SC.CQB+2 FOR IMAGE LENGTH. /EAG:100 DZM SCMSW / FORCE UPDATE IN QAREA /EAG:102 JMP* SCMCHK / AND RETURN /EAG:100 /EAG:100 /EAG:100 SCCK.A -1 / POINTER TO IMAGE'S SC.CQB+2 /EAG:100 .TITLE SCMSAV -- PRESERVE IMAGE'S .SCOM FOR LATER /EAG:100 /EAG:100 /EAG:100 /EAG:100 / /EAG:100 / THIS ROUTINE IS CALLED TO PRESERVE THE IMAGE'S .SCOM /EAG:100 / IN CORE SO THAT ERROR CHECKS AGAINST IT CAN BE DONE AT /EAG:100 / A LATER TIME. THIS ROUTINE SHOULD ONLY BE CALLED WHEN /EAG:100 / THE FIRST CHUNK OF THE IMAGE (WHICH WILL ALWAYS CONTAIN /EAG:100 / .SCOM) IS IN CORE. ALL FILE TRANSFER PROCESSING MUST BE /EAG:100 / COMPLETE BEFORE CALLING THIS ROUTINE. THIS ROUTINE SETS /EAG:100 / UP THE VARIOUS WORDS DEFINING HOW WE'VE PRESERVED .SCOM /EAG:100 / AND SUBTRACTS SPACE FROM THE FILE TRANSFER BUFFER TO /EAG:100 / PROVIDE ROOM TO PRESERVE .SCOM. SEE THE COMMENTS ABOUT /EAG:100 / THE .SCOM DEFINITION WORDS (SCMBUF, SCMLEN, SCMBLK, /EAG:100 / SCMADR, ETC.) FOR MORE INFORMATION. /EAG:100 / /EAG:100 /EAG:100 SCMSAV 0 /EAG:100 LAC BUFBAS / REMEMBER ADDRESS .SCOM BUFFER /EAG:100 DAC SCMBUF / USE FACT .SCOM IS ALWAYS AT /EAG:100 / BEGINNING OF TRANSFER BUFFER. /EAG:100 LAC CORADR / DETERMINE LENGTH OF /EAG:100 AAC -SC.BAS-SC.LEN / .SCOM BUFFER. /EAG:100 AND (777400) / ROUNDED UP TO 400 MULTIPLE /EAG:100 DAC SCMLEN / REMEMBER TWO'S COMPLEMENT /EAG:100 TCA /EAG:100 TAD BUFBAS / ADJUST TRANSFER BUFFER FOR /EAG:100 DAC BUFBAS / SPACE WE JUST STOLE. /EAG:100 LAC SCMLEN /EAG:100 CLL!TCA /EAG:100 TAD BUFLEN / VERIFY THAT SOME SPACE IS /EAG:100 SZL / LEFT OVER. /EAG:100 JMP NOCORE / IF NOT, ERROR /EAG:100 DAC BUFLEN /EAG:100 LAC TRNBLK / REMEMBER BLOCK WHERE .SCOM /EAG:100 DAC SCMBLK / LIVES /EAG:100 LAC CORADR / AND CALCULATE REL. ADDR. /EAG:100 TCA / OF ZERO FOR CONVENIENT /EAG:100 TAD SCMBUF / ACCESS TO IMAGE'S .SCOM. /EAG:100 DAC SCMADR /EAG:100 JMP* SCMSAV / DONE -- RETURN /EAG:100 .TITLE MSTBSV -- PRESERVE IMAGE'S MASS STORAGE BSY TBL /EAG:100 /EAG:100 /EAG:100 /EAG:100 / /EAG:100 / THIS ROUTINE PRESERVES THE IMAGE'S MASS STORAGE BUSY TABLE /EAG:100 / AND FILE BUFFER TRANSFER VECTOR TABLE IN CORE. THIS IS /EAG:100 / SO THAT WE CAN VERIFY THAT THE IMAGE HAS NO OPEN FILES. /EAG:100 / THIS ROUTINE SHOULD BE CALLED FOR EACH CHUNK OF THE IMAGE /EAG:100 / WHEN THAT CHUNK IS STILL IN THE TRANSFER BUFFER, BUT AFTER /EAG:100 / THE CHUNK IS NO LONGER NEEDED FOR ANYTHING ELSE (I.E., AFTER /EAG:100 / THE CHUNK HAS BEEN TRANSFERRED). THIS ROUTINE CHECKS IF /EAG:100 / ANY PIECE OF THE TABLES IS IN THE CHUNK AND REMEMBERS THEM /EAG:100 / IF SO. IN THE PROCESS THIS ROUTINE SETS UP MSBTAD, MSBTNM, /EAG:100 / MSBTBF, BFTBAD, ETC. /EAG:100 / /EAG:100 / IT SHOULD BE NOTED THAT ALL THE REAL WORK IS DONE BY THE /EAG:100 / HAIRY ROUTINE MSSV.A. /EAG:100 / /EAG:100 /EAG:100 MSBTSV 0 /EAG:100 LAC MSBTAD / CHECK IF MSBT IS ALREADY /EAG:100 SNA / PRESERVED -- SKIP IF IT IS. /EAG:100 JMP MSSV.0 /EAG:100 LAC BFTBAD / AND DO THE SAME FOR BUFFER /EAG:100 SZA / TABLE. /EAG:100 JMP* MSBTSV / BOTH ALREADY PRESERVED -- /EAG:100 / SO RETURN /EAG:100 MSSV.0 LAC SCMADR / SOMETHING REMAINS TO BE /EAG:100 SNA / PRESERVED. VERIFY .SCOM IN /EAG:100 JMP* MSBTSV / CORE, RETURN IF IT ISN'T. /EAG:100 AAC SC.ACT / CALCULATE ADDRESS OF ALL THE /EAG:100 DAC MSBTNM / .SCOM REGISTERS WE CARE /EAG:100 AAC SC.BTA-SC.ACT / ABOUT. /EAG:100 DAC MSSV.8 /EAG:100 AAC SC.BTL-SC.BTA /EAG:100 DAC MSBTEN /EAG:100 AAC SC.BNM-SC.BTL /EAG:100 DAC BFTBNM /EAG:100 AAC SC.BTB-SC.BNM /EAG:100 DAC MSSV.9 /EAG:100 LAC* MSBTNM / FETCH ACTUAL .SCOM REGISTER /EAG:100 DAC MSBTNM / CONTENTS FOR .SCOM REGISTERS /EAG:100 LAC* MSSV.8 / WHICH WE CARE ABOUT. /EAG:100 DAC MSSV.8 /EAG:100 LAC* MSBTEN /EAG:100 DAC MSBTEN /EAG:100 LAC* BFTBNM /EAG:100 DAC BFTBNM /EAG:100 LAC* MSSV.9 /EAG:100 DAC MSSV.9 /EAG:100 LAC MSSV.8 / DETERMINE WHICH COMES FIRST /EAG:100 CLL!TCA / THE MSBT OR THE BUFFER TBL. /EAG:100 TAD MSSV.9 /EAG:100 SNL / SKIP IF MSBT FIRST. /EAG:100 JMP MSSV.4 / BUFFER TABLE FIRST /EAG:100 MSSV.1 LAC MSBTNM / PROCESS MSBT. FIRST CHECK /EAG:100 SZA / TO SEE IF IT DOESN'T EXIST -- /EAG:100 JMP MSSV.2 / JMP IF IT DOES EXIST. /EAG:100 LAW -1 / NUMBER OF ENTRIES IS ZERO. /EAG:100 DAC MSBTAD / PUT -1 IN MSBTAD TO INDICATE /EAG:100 JMP MSSV.4 / MSBT DOESN'T EXIST, AND GO /EAG:100 / CHECK BUFFER TABLE. /EAG:100 /EAG:100 MSSV.2 DAC MSSV.3 / PUT NUMBER OF ENTRIES INTO /EAG:100 / MULTIPLY INSTRUCTION. /EAG:100 LAC MSBTEN / GET LENGTH OF ENTRY /EAG:100 SNA!CLL / AND VERIFY ITS LEGIT. /EAG:100 JMP BADIMG /EAG:100 MUL / DETERMINE TOTAL LENGTH /EAG:100 MSSV.3 -1 / OF MSBT. /EAG:100 SZA / MAKE SURE IT'S REASONABLE /EAG:100 JMP BADIMG /EAG:100 LACQ /EAG:100 DAC MSBTSZ / AND STORE IT AWAY /EAG:100 LAC MSBTAD / CHECK IF WE'VE ALREADY /EAG:100 SZA / PRESERVED MSBT. /EAG:100 JMP MSSV.4 / YES -- GO CHECK BUFFER TBL. /EAG:100 JMS MSSV.A / NO -- CALL ROUTINE TO DO /EAG:100 TAD MSSV.8 / THE RIGHT THING. IF ANY OF /EAG:100 TAD MSSV.9 / MSBT IS IN CURRENT CHUNK, /EAG:100 TAD BFTBAD / THIS WILL PRESERVE IT. /EAG:100 TAD BFTBBF / THIS ROUTINE DOESN'T ALWAYS /EAG:100 TAD BFTBLN / RETURN! /EAG:100 TAD MSBTSZ /EAG:100 DAC MSBTAD /EAG:100 DAC MSBTBF /EAG:100 DAC MSBTLN /EAG:100 DAC MSBTBK /EAG:100 MSSV.4 LAC BFTBNM / PROCESS BUFFER TABLE. /EAG:100 SNA!CLA!CMA / FIRST CHECK IF ZERO LENGTH. /EAG:100 DAC BFTBAD / ZERO LENGTH -- FLAG BFTBAD /EAG:100 / WITH -1 TO INDICATE BUFFER /EAG:100 / TABLE DOESN'T EXIST. /EAG:100 LAC BFTBAD / CHECK IF BUFFER TABLE ALREADY /EAG:100 SZA / PRESERVED. SKIP IF IT ISN'T. /EAG:100 JMP MSSV.5 / IT HAS BEEN -- DON'T REPEAT. /EAG:100 JMS MSSV.A / CALL MAGIC HAIRY ROUTINE TO /EAG:100 TAD MSSV.9 / PRESERVE IT. /EAG:100 TAD MSSV.8 / THIS ROUTINE DOESN'T ALWAYS /EAG:100 TAD MSBTAD / RETURN! /EAG:100 TAD MSBTBF /EAG:100 TAD MSBTLN /EAG:100 TAD BFTBNM /EAG:100 DAC BFTBAD /EAG:100 DAC BFTBBF /EAG:100 DAC BFTBLN /EAG:100 DAC BFTBBK /EAG:100 MSSV.5 LAC MSBTAD / CHECK IF MSBT PRESERVED /EAG:100 SNA / YET. IF IT ISN'T, LOOP /EAG:100 JMP MSSV.1 / BACK TO CHECK FOR IT. /EAG:100 JMP* MSBTSV / ELSE RETURN /EAG:100 /EAG:100 /EAG:100 MSSV.8 -1 / TEMP TO SAVE ADDRESS (WITHIN /EAG:100 / IMAGE) OF MSBT. /EAG:100 /EAG:100 MSSV.9 -1 / TEMP TO SAVE ADDRESS (WITHIN /EAG:100 / IMAGE) OF BUFFER TABLE. /EAG:100 /EAG:100 .EJECT /EAG:100 / /EAG:100 / THIS SUBROUTINE DOES MOST OF THE REAL WORK OF MSBTSV. /EAG:100 / THIS IS A VERY HAIRY SUBROUTINE. BASICALLY IT CHECKS /EAG:100 / TO SEE IF ANY PART OF THE TABLE WHICH WANTS TO BE /EAG:100 / PRESERVED (EITHER THE MSBT OR THE BUFFER TABLE) IS IN THE /EAG:100 / CURRENT CHUNK. IF SO IT PRESERVES IT. WHAT MAKES IT HAIRY /EAG:100 / IS THE FACT THAT THERE ARE LOTS OF BOUNDARIES WHICH MIGHT /EAG:100 / BE CROSSED. THIS ROUTINE HANDLES ALL OF THEM CORRECTLY. /EAG:100 / /EAG:100 / THIS ROUTINE DOES NOT ALWAYS RETURN IN THE NORMAL SENSE. /EAG:100 / IF IT DETECTS THAT A CHUNK IS ALL USED UP -- I.E. THE /EAG:100 / THING IT'S LOOKING TO PRESERVE EITHER COMES AFTER THIS /EAG:100 / CHUNK OR RUNS OFF THE END OF THIS CHUNK -- THEN IT /EAG:100 / RETURNS FROM MSBTSV WITHOUT RETURNING TO MSBTSV. /EAG:100 / /EAG:100 / THIS ROUTINE MAKES MANY ASSUMPTIONS. IT ASSUMES THAT /EAG:100 / IT IS CALLED TO PRESERVE THE TABLE WITH THE LOWER ADDRESS /EAG:100 / FIRST. THUS IT ASSUMES THAT EVERYTHING OF INTEREST /EAG:100 / BEFORE THE START OF THE CURRENT CHUNK HAS ALREADY BEEN /EAG:100 / PRESERVED. ALL ADDRESSES ARE ASSUMED TO BE 18 BITS WIDE. /EAG:100 / IT ASSUMES THAT A TABLE'S DEFINING REGISTERS (????AD, /EAG:100 / ????BF, ????LN, AND ????BK) ARE ZERO BEFORE IT IS PRESERVED. /EAG:100 / IF THE TABLE IS NONEXISTENT THEN THEY MUST ALL BE ZERO /EAG:100 / EXCEPT FOR ????AD, WHICH SHOULD CONTAIN -1. /EAG:100 / /EAG:100 / NOTE: I HAVE INFORMALLY PROVED THIS ROUTINE TO BE CORRECT. /EAG:100 / I WOULD GREATLY APPRECIATE HEARING OF ANY BUGS WHICH /EAG:100 / ANYONE CLAIMS TO HAVE FOUND IN THIS ROUTINE. THANX. /EAG:100 / ED GARDNER /EAG:100 / /EAG:100 / CALLING SEQUENCE: /EAG:100 / /EAG:100 / IN THE CALLING SEQUENCE DESCRIPTION BELOW THE PHRASE /EAG:100 / "THIS TABLE" REFERS TO THAT TABLE (MSBT OR BUFFER TABLE) /EAG:100 / WHICH IS BEING PRESERVED, AND THE PHRASE "OTHER TABLE" /EAG:100 / REFERS TO THE OTHER TABLE. THE READER IS ENCOURAGED /EAG:100 / TO CHECK THE CALLING SEQUENCE EXAMPLES GIVEN IN MSBTSV /EAG:100 / ABOVE. NOTE THAT ALL ARGUEMENTS ARE ACTUALLY INSTRUCIONS /EAG:100 / TO FETCH (TAD) OR STORE (DAC) THE VALUE DESIRED. /EAG:100 / /EAG:100 / JMS MSSV.A /EAG:100 / TAD
/EAG:100 / TAD /EAG:100 / TAD ???AD DEFINING REGISTER FOR OTHER TABLE> /EAG:100 / TAD ???BF DEFINING REGISTER FOR OTHER TABLE> /EAG:100 / TAD ???LN DEFINING REGISTER FOR OTHER TABLE> /EAG:100 / TAD