Trailing-Edge
-
PDP-10 Archives
-
DBMS-20_V6.0_bin_9-25-81
-
sources/f5amem.fix
There are 2 other files named f5amem.fix in the archive. Click here to see a list.
.EDIT 6777
.NAME HRB
.MODULE DBOTSI
; THIS PATCH ALLOWS DBMS-20 V6 TO FUNCTION WITH
; FORTRAN V5A.
; THIS PATCH SHOULD BE APPLIED AS FOLLOWS:
; @R MAKLIB
; *DBSANY.777=DBSANY.REL,6777.FIX/F
; *FORLIB.777=FORLIB.REL/M:DBOTSI,DBSANY.777/R:DBOTSI
; @
.INSERT ALC.P,REPLACE:1,<MOVEI 15>
MOVEI 6 ; GET OTS MEMORY
.ENDI
.INSERT ALC.P+2,AFTER,<MOVE @(16)>
ADDI 1000 ; REQUEST AN EXTRA PAGE
PUSH 17,0 ; SAVE AMOUNT
.ENDI
.INSERT ALC.P+10,REPLACE:1,<MOVE R0,151(15)>
PG777: POP 17,5 ; GET AMOUNT REQUESTED
ADD 5,151(15) ; ADD START ADDR TO FIND END
MOVE 4,5 ; STARTING AT THE END
TRZN 4,000777 ; FIND THE PRIOR PAGE BOUNDARY
SKIPA 5,[1000] ; RELEASE A PAGE IF AT BOUNDARY
TRZA 5,777000 ; OTHERWISE RELEASE AMOUNT PAST BNDRY
SUBI 4,1000 ; POINT AT PRIOR BNDRY IF EXTRA PAGE
PUSH 17,151(15) ; DON'T LOSE START POINT
MOVEI 16,[-2,,0 ; RELEASE ANY MEMORY
4 ; ...THAT WAS ALLOCATED AFTER THE
5]+1 ; ...LAST PAGE BOUNDARY
PUSHJ 17,FREE.M ; ..
MOVE 4,(17) ; GET BACK START POINT
MOVE 1,4 ; STARTING AT START POINT
TRZ 1,777000 ; DETERMINE WORDS PRIOR TO PAGE BNDRY
MOVEI 5,1000 ; BY SUBTRACTING FROM NUMBER OF WORDS
SUB 5,1 ; IN A PAGE
JUMPE 1,.+3 ; ANYTHING TO RELEASE?
MOVEI 16,[-2,,0 ; YES!
4
5]+1
PUSHJ 17,FREE.M ; FREE FRONT END
POP 17,1 ; GET BACK START ADDRESS
TRZE 1,000777 ; ELIMINATE FRONT END
ADDI 1,1000 ; POINT AT PAGE BOUNDARY
MOVE 0,1 ; RETURN IN BOTH FOR COMPATABILITY
POPJ 17, ; DONE, HAVE MEMORY
.ENDI
.INSERT ALC.PC,REPLACE:1,<MOVEI 15>
MOVEI 6 ; GET OTS MEMORY
.ENDI
.INSERT ALC.PC+2,AFTER,<MOVE @(16)>
ADDI 1000
PUSH 17,0
.ENDI
.INSERT ALC.PC+6,REPLACE:3,<SKIPE 150(15)>
SKIPE 150(15)
JRST [SETZM 151(X)
POP P,0
JRST .+2]
JRST PG777
.ENDI
.ENDE