User Tools

Site Tools


cdc:nos2.source:nam5871:exgetbg

EXGETBG

Table Of Contents

Source Code

EXGETBG.txt
  1. *DECK EXGETBG
  2. IDENT GETBIG
  3. ENTRY GETBIG
  4. USE /TSBMDAT/
  5. CTSBLWA BSS 1
  6. TSBFWA BSS 1
  7. PTSBLWA BSS 1
  8. BIGFREE BSS 1
  9. FFFWA BSS 1
  10. USE /*/
  11. **
  12. * GETBIG
  13. *
  14. * GETBIG LOCATES THE LARGEST FREE TSB IN THE TSB AREA AND STORES
  15. * ITS SIZE IN CELL BIGFREE
  16. *
  17. *
  18. EJECT
  19. GETBIG BSS 1
  20. SA1 FFFWA START SEARCH WITH FIRST FREE TSB
  21. SA3 CTSBLWA STOP SEARCH AT END OF TSB AREA
  22. SA2 X1
  23. SB3 X3
  24. SB4 B0 START WITH SIZE ZERO
  25. GB1 SB5 A2 SAVE TSB ADDRESS
  26. SB2 X2 SAVE CURRENT TSB SIZE
  27. NG X2,GB2 TSB IS NOT FREE
  28. LT B2,B4,GB2 SIZE IS NOT LARGER THAN CURRENT LARGEST
  29. SB4 B2 SAVE NEW LARGEST SIZE
  30. GB2 GE B5,B3,FINISH ALL TSBS SEARCHED
  31. SA2 A2+B2 GET NEXT TSB HEADER
  32. EQ GB1
  33. *
  34. * ALL TSBS CHECKED, BIGGEST SIZE IS IN B4
  35. *
  36. FINISH SX6 B4
  37. SA6 BIGFREE SAVE LARGEST SIZE
  38. EQ GETBIG RETURN
  39. END
cdc/nos2.source/nam5871/exgetbg.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator