*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 = 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 = 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+TSBHDRL,TSBADDR); # MOVE DATA # GIVETSB(P); # RETURN OLD TSB # END TERM # EXINCSZ #