User Tools

Site Tools


cdc:nos2.source:nam5871:exincsz

EXINCSZ

Table Of Contents

  • [00006] INCREASE TSB SIZE.

Source Code

EXINCSZ.txt
  1. *DECK EXINCSZ
  2. PROC EXINCSZ( (ADDSIZE), TSBADDR, TSBN );
  3. BEGIN
  4. *IF DEF,IMS
  5. #
  6. ** EXINCSZ - INCREASE TSB SIZE.
  7. *
  8. * M. E. VATCHER 81/03/13
  9. *
  10. * EXINCSZ INCREASES THE SIZE OF AN ASSIGNED TSB.
  11. *
  12. * PROC EXINCSZ( (ADDSIZE), TSBADDR, TSBN )
  13. *
  14. * ENTRY ADDSIZE NUMBER OF ADDITIONAL WORDS REQUESTED
  15. * TSBN TSB NUMBER
  16. *
  17. * EXIT TSBADDR ADDRESS OF NON-MOVABLE TSB WITH INCREASED
  18. * SIZE
  19. *
  20. * METHOD
  21. *
  22. * IF ANYTHING IS WRONG WITH THE ENTRY PARAMETERS, RETURN WITH
  23. * TSBADDR = -1. OTHERWISE GET A NEW BIGGER TSB AND MOVE THE DATA
  24. * FROM THE OLD TSB TO THE LOWER ADDRESS PORTION OF THE NEW TSB.
  25. * THEN MAKE THE OLD TSB A FREE TSB.
  26. *
  27. #
  28. *ENDIF
  29. CONTROL NOLIST; # TSBDEFS, TSBDATA, TSBBASE #
  30. *CALL CYBERDEFS
  31. *CALL TSBDEFS
  32. *CALL TSBDATA
  33. *CALL TSBBASE
  34. CONTROL LIST;
  35.  
  36. XREF
  37. BEGIN
  38. PROC ABORT;
  39. PROC GETTSB;
  40. PROC GIVETSB;
  41. PROC MOVEI;
  42. END
  43.  
  44. ITEM ADDSIZE U; #ADDITIONAL SIZE REQUESTED #
  45. ITEM TSBADDR U; # ADDRESS OF USER AREA OF TSB RETURNED #
  46. ITEM TSBN U; # TSB NUMBER OF TSB WHOSE SIZE IS TO BE #
  47. # INCREASED #
  48. ITEM TSBSIZE U; # INCREASED TSB SIZE #
  49.  
  50. IF ( NOT TBUSY[TSBN] ) OR ( TSBN GR LENGTH[0] ) OR
  51. ( TSBN LQ 0 )
  52. THEN # TSBN IS ILLEGAL #
  53. BEGIN
  54. $BEGIN
  55. ABORT;
  56. $END
  57. TSBADDR = -1; # NEGATIVE ADDRESS INDICATES REJECT #
  58. TSBN = BADTSBN + TSBN; # BAD TSBN AS PARAMETER #
  59. RETURN; # ***** EXIT ***** #
  60.  
  61. END
  62. P<BTSBHDR> = TTSBFWA[TSBN]; #SET TSB HEADER TO OLD TSB #
  63. TSBSIZE = BTSBL[0] + ADDSIZE; # SET INCREASED TSB SIZE #
  64. IF ( TSBSIZE LQ BTSBL[0] ) OR ( TSBSIZE GR MAXTSBL )
  65. THEN # SIZE IS ILLEGAL #
  66. BEGIN
  67. $BEGIN
  68. ABORT;
  69. $END
  70. TSBADDR = -1; # NEGATIVE ADDRESS INDICATES REJECT #
  71. TSBN = BADSIZE; # BAD REQUEST SIZE ERROR CODE #
  72. RETURN; # ***** EXIT ***** #
  73.  
  74. END
  75. BNOTMOV[0] = TRUE; # SET SO IT CANT BE MOVED #
  76. GETTSB(TSBSIZE,TSBN,TSBADDR); # GET A NEW TSB #
  77. P<BTSBHDR> = TTSBFWA[TSBN]; # RESET HEADER ON OLD TSB #
  78. TTSBFWA[TSBN] = TSBADDR; # SET NEW TSB FWA IN TSBIT #
  79. TSBADDR = TSBADDR + TSBHDRL; # ADDRESS OF USER AREA TO USER #
  80. MOVEI(BTSBL[0]-TSBHDRL,P<BTSBHDR>+TSBHDRL,TSBADDR); # MOVE DATA #
  81. GIVETSB(P<BTSBHDR>); # RETURN OLD TSB #
  82. END TERM # EXINCSZ #
cdc/nos2.source/nam5871/exincsz.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator