User Tools

Site Tools


cdc:nos2.source:nam5871:ndlovld

NDLOVLD

Table Of Contents

  • [00005] OVERLAY LOADER

Source Code

NDLOVLD.txt
  1. *DECK NDLOVLD
  2. IDENT NDLOVLD
  3. ENTRY NDLOVLD
  4. COMMENT OVERLAY LOADER
  5. TITLE OVERLAY LOADER
  6. *#
  7. *1D OVERLAY LOADER
  8. * D NDLOVLD
  9. *
  10. * 1. PROC NAME AUTHOR DATE
  11. * NDLOVLD J.E.JONES 78/07/07
  12. * A.T.GERMOND 79/07/03
  13. * D.K.ENDO 81/07/29
  14. *
  15. * 2. FUNCTIONAL DESCRIPTION
  16. * LOADS OVERLAYS.
  17. *
  18. * 3. METHOD
  19. *
  20. * DETERMINE IF PRIMARY OR SECONDARY OVERLAY IS REQUESTED. IF
  21. * THE OVERLAY HAS ALREADY BEEN LOADED JUST SET UP THE RJ AND
  22. * JUMP TO IT. OTHERWISE, LOAD IT. OVERLAY LOAD ERRORS CAUSE
  23. * PROC TO ABORT. CLEAR THE SECONDARY DATA WORDS TO ZERO
  24. * WHEN LOADING A NEW PRIMARY. ALSO SAVE THE PRIMARY RETURN
  25. * ADDRESS TO PRESERVE IT IF SECONDARIES ARE LATER LOADED.
  26. * UPON RETURN FROM THE OVERLAY, FOR PRIMARIES, RESTORE THE
  27. * RETURN ADDRESS IN CASE IT HAS BEEN CLOBBERED BY SECONDARY
  28. * OVERLAY LOADS. FOR SECONDARIES, RESTORE THE PRIMARY NAME
  29. * IN CUROVL. RETURN.
  30. *
  31. * 4. ENTRY PARAMETERS
  32. * OVL PARAM = 42/OVL NAME,6/0,6/PRI,6/SEC
  33. *
  34. * 5. EXIT PARAMETERS
  35. * CUROVL CURRENT OVERLAY SET IN EXTERNAL REF AREA
  36. *
  37. * 6. COMDECKS CALLED
  38. * NONE.
  39. *
  40. * 7. CALLED BY
  41. *
  42. * 8. ROUTINES CALLED
  43. * FOL.LOV LOADER
  44. * MESSAGE ISSUE DAYFILE MESSAGE
  45. *
  46. * 9. DAYFILE AND ERROR MESSAGES
  47. * XXXXXXX OVERLAY LOAD ERROR.
  48. *#
  49. NDLOVLD BSSZ 1
  50. SA0 A1+1 SAVE PARAMETER LIST
  51. SA1 X1 GET OVERLAY NAME
  52. BX6 X1
  53. SA6 CUROVL SAVE THE CURRENT OVERLAY
  54. SB1 1
  55. SB2 B0 INITIALIZE OVERLAY INDEX
  56. MX0 -6
  57. BX3 -X0*X1 REQUESTED OVERLAY LEVEL
  58. ZR X3,IDXOK
  59. SB2 B1 B2=0 - PRIMARY B2=1 - SECONDARY
  60.  
  61. IDXOK SA3 OVLLVL+B2 GET CURRENTLY LOADED OVL AT REQ LEVEL
  62. BX6 X1-X3
  63. NE B2,TESTLD JIF SECONDARY
  64. SA2 NDLOVLD
  65. BX7 X2
  66. SA7 PRIRET SAVE PRIMARY RTN ADDR
  67. TESTLD ZR X6,SETRJ OVERLAY ALREADY LOADED
  68. NE B2,LOADIT JIF SECONDARY
  69. SX6 B0
  70. SA6 OVLLVL+B1 CLEAR THE SECONDARY VALUES WHEN
  71. SA6 RJUMP+B1 LOADING A NEW PRIMARY
  72. LOADIT BX0 X1 SAVE X1 IN CASE OF ERRORS
  73. BX6 X1
  74. SA6 OVLLVL+B2 SAVE OVERLAY NAME
  75. RJ =XFOL.LOV
  76. NG B7,LDERR
  77. SX6 B7
  78. SA6 RJUMP+B2 SAVE B7 FOR REENTRY
  79. SETRJ BSS 0
  80. SA3 RJX
  81. MX0 6
  82. BX3 X3*X0 CLEAR OLD ADDRESS
  83. SA2 RJUMP+B2
  84. LX2 30
  85. BX6 X3+X2 PUT CALLEE ADDRESS IN RJ INSTRUCTION
  86. SA6 A3
  87. RJ CLEAR CLEAR INSTRUCTION STACK SO NEW RJ PICKED UP
  88. CLEAR BSSZ 1
  89. RJN SA1 A0
  90. RJX RJ 0 GOTO CALLEE ** CODE MODIFIED **
  91. SA2 CUROVL CHECK OVERLAY LEVEL
  92. MX0 -6
  93. BX2 -X0*X2 OVERLAY LEVEL
  94. NZ X2,RSOVL JIF SECONDARY
  95. SA2 PRIRET
  96. AX2 30
  97. SB3 X2
  98. JP B3
  99. RSOVL SA2 OVLLVL
  100. BX7 X2 RESTORE CUROVL TO PRIMARY
  101. SA7 CUROVL
  102. EQ NDLOVLD
  103. LDERR BSS
  104. BX1 X0 OVERLAY NAME
  105. MX0 42
  106. SA3 ERRMSG
  107. BX6 X0*X1
  108. BX3 -X0*X3 CLEAR OLD NAME
  109. BX6 X3+X6 OR IN OVERLAY NAME
  110. SA6 A3
  111. SX6 B7
  112. SA6 LDRERR
  113. MESSAGE ERRMSG,,RECALL
  114. ABORT
  115. ERRMSG DIS ,* OVERLAY LOAD ERROR.*
  116. LDRERR DATA 0
  117. * MAKE EXTERNAL SO CALLING PROC CAN USE IT
  118. ENTRY CUROVL
  119. CUROVL BSSZ 1
  120. PRIRET BSSZ 1 PRIMARY RETURN ADDRESS
  121. OVLLVL BSSZ 2 OVERLAY LEVEL
  122. RJUMP BSSZ 2 TRANSFER ADDRESSES (B7)
  123.  
  124. END
cdc/nos2.source/nam5871/ndlovld.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator