cdc:nos2.source:nam5871:exincsz
Table of Contents
EXINCSZ
Table Of Contents
- [00006] INCREASE TSB SIZE.
Source Code
- EXINCSZ.txt
- *DECK EXINCSZ
- PROC EXINCSZ( (ADDSIZE), TSBADDR, TSBN );
- BEGIN
- *IF DEF,IMS
- #
- ** EXINCSZ - INCREASE TSB SIZE.
- *
- * M. E. VATCHER 81/03/13
- *
- * EXINCSZ INCREASES THE SIZE OF AN ASSIGNED TSB.
- *
- * PROC EXINCSZ( (ADDSIZE), TSBADDR, TSBN )
- *
- * ENTRY ADDSIZE NUMBER OF ADDITIONAL WORDS REQUESTED
- * TSBN TSB NUMBER
- *
- * EXIT TSBADDR ADDRESS OF NON-MOVABLE TSB WITH INCREASED
- * SIZE
- *
- * METHOD
- *
- * IF ANYTHING IS WRONG WITH THE ENTRY PARAMETERS, RETURN WITH
- * TSBADDR = -1. OTHERWISE GET A NEW BIGGER TSB AND MOVE THE DATA
- * FROM THE OLD TSB TO THE LOWER ADDRESS PORTION OF THE NEW TSB.
- * THEN MAKE THE OLD TSB A FREE TSB.
- *
- #
- *ENDIF
- CONTROL NOLIST; # TSBDEFS, TSBDATA, TSBBASE #
- *CALL CYBERDEFS
- *CALL TSBDEFS
- *CALL TSBDATA
- *CALL TSBBASE
- CONTROL LIST;
- XREF
- BEGIN
- PROC ABORT;
- PROC GETTSB;
- PROC GIVETSB;
- PROC MOVEI;
- END
- ITEM ADDSIZE U; #ADDITIONAL SIZE REQUESTED #
- ITEM TSBADDR U; # ADDRESS OF USER AREA OF TSB RETURNED #
- ITEM TSBN U; # TSB NUMBER OF TSB WHOSE SIZE IS TO BE #
- # INCREASED #
- ITEM TSBSIZE U; # INCREASED TSB SIZE #
- IF ( NOT TBUSY[TSBN] ) OR ( TSBN GR LENGTH[0] ) OR
- ( TSBN LQ 0 )
- THEN # TSBN IS ILLEGAL #
- BEGIN
- $BEGIN
- ABORT;
- $END
- TSBADDR = -1; # NEGATIVE ADDRESS INDICATES REJECT #
- TSBN = BADTSBN + TSBN; # BAD TSBN AS PARAMETER #
- RETURN; # ***** EXIT ***** #
- END
- P<BTSBHDR> = TTSBFWA[TSBN]; #SET TSB HEADER TO OLD TSB #
- TSBSIZE = BTSBL[0] + ADDSIZE; # SET INCREASED TSB SIZE #
- IF ( TSBSIZE LQ BTSBL[0] ) OR ( TSBSIZE GR MAXTSBL )
- THEN # SIZE IS ILLEGAL #
- BEGIN
- $BEGIN
- ABORT;
- $END
- TSBADDR = -1; # NEGATIVE ADDRESS INDICATES REJECT #
- TSBN = BADSIZE; # BAD REQUEST SIZE ERROR CODE #
- RETURN; # ***** EXIT ***** #
- END
- BNOTMOV[0] = TRUE; # SET SO IT CANT BE MOVED #
- GETTSB(TSBSIZE,TSBN,TSBADDR); # GET A NEW TSB #
- P<BTSBHDR> = TTSBFWA[TSBN]; # RESET HEADER ON OLD TSB #
- TTSBFWA[TSBN] = TSBADDR; # SET NEW TSB FWA IN TSBIT #
- TSBADDR = TSBADDR + TSBHDRL; # ADDRESS OF USER AREA TO USER #
- MOVEI(BTSBL[0]-TSBHDRL,P<BTSBHDR>+TSBHDRL,TSBADDR); # MOVE DATA #
- GIVETSB(P<BTSBHDR>); # RETURN OLD TSB #
- END TERM # EXINCSZ #
cdc/nos2.source/nam5871/exincsz.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator