Trailing-Edge
-
PDP-10 Archives
-
bb-bt99e-bb
-
fmlany.f05
There are 11 other files named fmlany.f05 in the archive. Click here to see a list.
;VERSION 5A COMMENT
;
; THIS EDIT WAS EDITS 433 AND 452 IN VERSION 5.
;
;SYMPTOM
;
; WHEN USING FORDML IN /UNFLAGGED MODE, LOWER-CASE STRINGS
; ARE REPLACED BY UPPER-CASE STRINGS EVEN IN FORMAT AND DATA
; STATEMENTS.
;
;DIAGNOSIS
;
; WITH UNFLAGGED MODE, FORDML MUST CHECK EVERY LINE OF THE
; INPUT TEXT TO SEE IF IT TERMINATES WITH A PERIOD (.), AND
; IS THUS A DML STATEMENT. WHEN DOING SO, IT ALTERS
; LOWER-CASE INPUT ALPHABETICS TO UPPER-CASE BEFORE IT
; SCANS ITS TABLE OF LEXICAL ITEMS FOR A MATCH. AS A RESULT
; ALL LOWER-CASE ALPHABETICS ARE CHANGED TO UPPER-CASE
; BEFORE FORDML GOES ON TO BUILD ITS OUTPUT TEXTS.
;
;CURE
;
; INSTALL EDIT 542 TO GIVE FORDML AN EXTRA WORK AREA IN
; WHICH TO SAVE INPUT TEXT ASIDE AS IS WHEN IT IS WORKING IN
; UNFLAGGED MODE.
;
;WARNING
;
; IN UNFLAGGED MODE, WHEN A LINE OF DML IS SPLIT ACROSS TWO
; BUFFERS, PART OR ALL OF THE LINE MAY APPEAR IN LOWER-CASE
; IN THE OUTPUT TEXT. THIS IS BECAUSE A GREAT DEAL OF TEXT
; MAY BE INTERPOLATED IN ORDER TO CREATE THE EXTERNAL CALLS.
; AS A RESULT, THE INPUT AND OUTPUT BUFFERS ARE NOT IN SYNC
; AND TEXT WHICH WE MAY WISH TO CHANGE FROM LOWER-CASE TO
; UPPER-CASE IN THE OUTPUT BUFFER MAY HAVE ALREADY BEEN
; WRITTEN OUT TO DISK. SINCE THE ONLY TEXT IN THIS CATEGORY
; ERRONEOUSLY IS DML WHICH HAS BEEN COMMENTED OUT WITH AN
; ASTERISK (*) IN THE OUTPUT TEXT, WE FELT THAT THIS CONSTI-
; TUTED NO PROBLEM WHATEVER.
;
;
;NOTE ***** THIS EDIT APPLIES TO DBMS-10 V5A ONLY
;SEE EDIT NUMBER 541 FOR DBMS-20 V5A FIX.
;THE RECOMMENDED FILENAME FOR THIS EDIT IS 542.FIX. THE LINES
;.EDIT THRU .ENDE SHOULD BE TYPED INTO THAT FILE
;
; APPLY THIS EDIT TO FMLANY.REL
;
;THE EDIT CAN BE INSERTED USING THE FOLLOWING COMMANDS:
;
;
;FOR DBMS-10:
;
; .R MAKLIB
; *FMLANY.542=FMLANY.REL,542.FIX/FIX
;
; .R LINK
; *FORDML/MAP=DEC:SCAN,DEC:WILD,DEC:HELPER,-
; *DSK:GENME2,SCHIO2,FMLANY,FML20,STRHI/S/GO
;
; .SAVE FORDML
;
;THE PATCHED FILE SOULD BE RENAMED TO .REL TO BE USED AS THE
;BASE FOR ANY FUTURE EDITS.
;
;**********************************************************************
;
;
.EDIT 542
.NAME JSM
.MODULE DMLVER
;IN THE FOLLOWING CODE, 'RELBLK-320' IS THE EQUIVALENT
; OF 'STACK'. THIS IS NECESSARY BECAUSE THE SYMBOL 'STACK'
; IS NOT AVAILABLE TO ALL MODULES INVOLVED.
.INSERT FORDML,REPLACE:1,<MOVE P,EOF.NW+53>
MOVE P,[-STKSIZ+10,,RELBLK##-320+10] ;GRAB 10 WORDS OFF
; BOTTOM OF STACK
.ENDI
.INSERT PRGUNIT+6,AFTER,<SETZM WARNCNT>
SETZM RELBLK-320+5 ;INIT WORK AREA DUMP FLAG
.ENDI
.INSERT EOF.NW+107,REPLACE:2,<MOVEI AP,EOF.NW+103>
;COME THRU HERE WHEN GETLIN HAS FOUND A LINE WHICH IS NOT
; IMMEDIATELY IDENTIFIABLE AS DML. DUMP FLAG SET IN THIS
; CASE
;NOTE: $END IS DEFINED IN DMLTAB, WHICH IS NOT SEARCHED
; BY DMLVER
CAIE R0,6204 ;AT "END" STMT? (6204 = $END)
SETOM RELBLK-320+5 ;NO -- SET WORK AREA DUMP FLAG
MOVEI AP,EOF.NW+103 ; IN ORIG CODE
PUSHJ P,CWRITE ; IN ORIG CODE
SETZM RELBLK-320+5 ;RESET WORK AREA DUMP FLAG
.ENDI
.MODULE DMLOPN
STACK==1360
.INSERT COMND+33,AFTER,<MOVEM INCHAN##+7>
;COME HERE TO OPEN INPUT AND OUTPUT FILES AND CREATE TOPS-10
; STYLE BUFFER RINGS -- HAVE TO TELL FORDML HOW TO SET UP
; AND IDENTIFY OUR NEW WORK AREA
MOVEM R1,RELBLK-320+4 ;GET AN AC TO WORK WITH
MOVEM R0,R1 ;GET ADDR OF CURR (TOP) BUFF HDR WORD
HLRZ R0,0(R1) ;GET LENGTH OF BUFFER
MOVEM R0,RELBLK-320+1 ;SAVE LENGTH OF BUFFER
MOVE R1,RELBLK-320+4 ;RESTORE AC1
MOVE R0,.JBFF## ;GET ADDR OF FIRST FREE WORD IN CORE
MOVEM R0,RELBLK-320+2 ;SAVE ADDR OF OUR WORK AREA
ADD R0,RELBLK-320+1 ;ADD BUFFER LENGTH TO IT
ADDI R0,2 ;TWO MORE WORDS FOR BUFFER HEADER
MOVEM R0,.JBFF## ;TELL SYSTEM WE ARE GRABBING THIS MUCH
; CORE (TO USE FOR INPUT BUFFER WORK AREA)
SUBI R0,1 ;LET NEW BLT AT GETACT KNOW WHERE TO STOP
MOVEM R0,RELBLK-320+3 ;SAVE ADDR OF END OF WORK AREA
.ENDI
.MODULE DMLLEX
STACK==1360
.INSERT GETACT+7,BEFORE,<MOVEI R1,@1(AP)>
;AFTER "IN" UUO, MOVE DATA FROM CURRENT BUFFER TO WORK AREA
MOVEM R2,RELBLK##-320+4 ;GET AN AC TO WORK WITH
HRRZ R2,@1(AP) ;GET ADDR OF TOP OF CURR BUFFER (IN INHDR##)
HRLZ R1,R2 ;IS BLT START-FROM ADDR
HRR R1,RELBLK-320+2 ;ADDR OF TOP OF WORK AREA -- IS BLT
; START-TO ADDR
MOVE R2,RELBLK-320+3 ;ADDR OF END OF WORK AREA -- IS BLT
; END-TO ADDR
BLT R1,@R2 ;MOVE CURR BUFFER CONTENTS TO WORK AREA
MOVE R2,RELBLK-320+4 ;RESTORE AC2
.ENDI
.INSERT GETBUF+5,REPLACE:2,<MOVEI AP,GETBUF+53>
;WHEN A LINE IS SPLIT ACROSS TWO BUFFERS, COME HERE TO PUT
; FIRST CHUNK OF LINE INTO "LINAREA" BEFORE GOING TO
; ROUTINE "GETACT" TO GET NEXT BLOCK OF INPUT FILE DATA,
; WHICH WILL CONTAIN THE REMAINDER OF THE LINE. HERE WE
; WE HAVE TO TELL "APPSTR" TO TAKE FIRST CHUNK FROM OUR
; WORK AREA. NOTE: WE AREN'T GOING TO WORRY WHETHER IT
; IS DML OR NOT. THUS, SOME COMMENTED DML MAY BE OUTPUT
; IN LOWER CASE
MOVE AP,LINEBP ;GET CURR LINE BYTE PTR TO INPUT BUFFER
; (AP TO BE RE-FILLED FOR CALL BELOW)
MOVEM AP,RELBLK-320+4 ;SAVE IT ASIDE
SUB AP,INHDR## ;SUBTR ADDR OF CURR BUFFER HDR ADDR
ADD AP,RELBLK-320+2 ;ADD ADDR OF TOP OF WORK AREA
MOVEM AP,LINEBP ;SET IT UP FOR CALL TO APPSTR
MOVEI AP,GETBUF+53 ;IN ORIG CODE
PUSHJ P,APPSTR ;IN ORIG CODE
MOVE AP,RELBLK-320+4 ;GET IT BACK (AP TO BE RESET FOR CALLS
; BELOW)
MOVEM AP,LINEBP ;PUT BACK WHERE IT BELONGS
.ENDI
.INSERT GETBUF+147,REPLACE:2,<MOVEI AP,GETBUF+53>
;COME HERE TO MOVE LAST CHUNK OF NON-DML LINE TO OUTPUT
; BUFFER. IT HAS TO COME IN ITS ORIGINAL FORM, WHICH IS
; FOUND ONLY IN OUR WORK AREA AT THIS POINT
MOVE AP,LINEBP ;GET CURR LINE BYTE PTR TO INPUT BUFFER
; (AP TO BE RE-FILLED FOR CALL BELOW)
MOVEM AP,RELBLK-320+4 ;SAVE IT ASIDE
SUB AP,INHDR## ;SUBTR ADDR OF CURR BUFFER HDR ADDR
ADD AP,RELBLK-320+2 ;ADD ADDR OF TOP OF WORK AREA
MOVEM AP,LINEBP ;SET IT UP FOR CALL TO APPSTR
MOVEI AP,GETBUF+53 ;IN ORIG CODE
PUSHJ P,APPSTR ;IN ORIG CODE
MOVE R0,RELBLK-320+4 ;GET IT BACK (R0 TO BE RESET BELOW)
MOVEM R0,LINEBP ;PUT BACK WHERE IT BELONGS
.ENDI
.MODULE DMLIO
STACK==1360
.INSERT OUTSTR,AFTER,<MOVE R0,0(R1)>
;COME HERE TO PUT THE LINE INTO THE OUTPUT BUFFER. WE TAKE
; THE LINE FROM OUR WORK AREA ONLY IF IT IS A SPLIT LINE
; IN UNFLAGGED MODE AND IF OUR WORK AREA CONTAINS VALID
; INPUT DATA
;IN THE SAME MANNER AS 'RELBLK-320' IS TO 'STACK', 'RELBLK+1641'
; IS THE EQUIVALENT TO 'LBPLEN' IN THE FOLLOWING CODE.
SKIPE R0,RELBLK##+1641 ;SPLIT LINE IN EFFECT?
JRST OUTSTR+1 ; YES -- LIN1BP IS IT
SKIPLE R0,SW.UNFL## ;UNFLAGGED MODE NOT SET?
SKIPN R0,RELBLK-320+5 ;WORK AREA DUMP FLAG SET?
JRST OUTSTR+1 ;EITHER UNFLAGGED OR NO W.A. DUMP ---
SUB R0,INHDR## ;SUBTR ADDR OF CURR BUFFER FROM LIN1BP ADDR
ADD R0,RELBLK-320+2 ;ADD ADDR OF TOP OF WORK AREA
.ENDI
.ENDE
;SYMPTOM
;
; FORDML MAY NOT ACCEPT PRIVACY KEYS FOR INVOKE AND ACCESS
; STATEMENTS WHICH ARE LESS THAN FIVE CHARACTERS LONG.
;
;DIAGNOSIS
;
; THE CODE CHECKS THE ENTIRE SECOND WORD OF THE STRING ARGUMENT
; TO SEE IF THE LENGTH EXCEEDS FIVE AND SETS IT TO FIVE IF IT
; DOES. HOWEVER, THE LEFT HALF OF THE WORD IS USED TO KEEP TRACK
; OF OTHER ATTRIBUTES, SUCH AS WHETHER OR NOT THE STRING IS NUMERIC.
; THE LENGTH OF THE STRING IS STORED IN THE RIGHT HALF ONLY.
;
;CURE
;
; INSTALL EDIT 572 TO FORDML TO CAUSE ONLY THE RIGHT HALF TO BE USED.
;
;
;THE RECOMMENDED FILENAME FOR THIS EDIT IS 572.FIX. THE LINES
;.EDIT THRU .ENDE SHOULD BE TYPED INTO THAT FILE
;
; APPLY THIS EDIT TO FMLANY.REL
;
;THE EDIT CAN BE INSERTED USING THE FOLLOWING COMMANDS:
;
;
;FOR DBMS-10:
;
; .R MAKLIB
; *FMLANY.572=FMLANY.REL,572.FIX/FIX
;
; .R LINK
; *FORDML/MAP=DEC:SCAN,DEC:WILD,DEC:HELPER,-
; *DSK:GENME2,SCHIO2,FMLANY.572,FML10,STRHI/S/GO
;
; .SAVE FORDML
;
;FOR DBMS-20:
;
; @MAKLIB
; *FMLANY.572=FMLANY.REL,572.FIX/FIX
;
; @LINK
; *FORDML/MAP=DEC:SCAN,DEC:WILD,DEC:HELPER,-
; *DSK:GENME2,SCHIO2,FMLANY.572,FML20,STRHI/S/GO
;
; @SAVE FORDML
;
;THE PATCHED FILE SOULD BE RENAMED TO .REL TO BE USED AS THE
;BASE FOR ANY FUTURE EDITS.
;
;**********************************************************************
;
;
.EDIT 572
.NAME CLR
.MODULE DMLVOK
.INSERT DISPSI+222,REPLACE:2,<SKIPN R1,KEY.PT+1>
HRRZ R1,KEY.PT+1 ;[572] GET STRING LENGTH ONLY
JUMPE R1,INVPRI ;[572] IF NONE, ERROR
.ENDI
.ENDE