User Tools

Site Tools


cdc:nos2.source:opl871:getmst

GETMST

Table Of Contents

  • [00005] GET FIELDS FOR A DEVICE FROM THE *MST*.
  • [00160] RLC - READ LOW CORE.

Source Code

GETMST.txt
  1. IDENT GETMST
  2. ENTRY GETMST
  3. SST
  4. SPACE 4
  5. *** GETMST - GET FIELDS FOR A DEVICE FROM THE *MST*.
  6. *
  7. * GETMST(EO,STAT,TYPE,FAM,DN,NUM,TPRU,SECT,MSKP,MSKS).
  8. * (*SYMPL* CALL)
  9. *
  10. * ENTRY (EO) = *EST* ORDINAL.
  11. *
  12. * EXIT (STAT) = -2, INVALID ORDINAL.
  13. * -1, NO MORE DISK ENTRIES.
  14. * 1, EQUIPMENT (EO) IS NOT A DISK.
  15. * 0, EQUIPMENT (EO) IS A DISK.
  16. *
  17. * IF (STAT) = 0, THE FOLLOWING PARAMETERS
  18. * ARE MEANINGFUL.
  19. * (TYPE) = DEVICE TYPE, FROM *EST* ENTRY (12/DT,48/0).
  20. * (FAM) = FAMILY, FROM *MST* ENTRY (42/FAM,18/0).
  21. * (DN) = DEVICE NUMBER, FROM *MST* ENTRY.
  22. * (NUM) = NUMBER OF PHYSICAL DEVICES.
  23. * (TPRU) = TOTAL *PRU* ON THIS DEVICE.
  24. * (SECT) = NUMBER OF SECTORS PER TRACK.
  25. * (MSKP) = PRIMARY DEVICE MASK.
  26. * (MSKS) = SECONDARY DEVICE MASK.
  27. *
  28. * USES X - ALL.
  29. * A - 1,2,3,4,5,6.
  30. * B - 1.
  31. SPACE 2
  32. GETMST BSS 1
  33. SB1 1
  34. SX6 A1
  35. MX0 60-24
  36. SA6 PARM SAVE PARAMETER LIST ADDRESS.
  37.  
  38. * IF FIRST CALL, FETCH *EST* POINTER FROM LOW CORE.
  39.  
  40. SA2 ESTFWA
  41. NZ X2,GM1 IF NOT FIRST CALL
  42. SX3 ESTP
  43. SX4 ESTWORD
  44. SX5 B1
  45. RJ RLC READ POINTER TO *EST*
  46. SA2 ESTWORD
  47. LX2 24-0
  48. BX6 -X0*X2 EXTRACT FWA OF *EST*
  49. SA6 ESTFWA
  50. LX2 36-12
  51. MX4 60-12
  52. BX7 -X4*X2 EXTRACT ORDINAL OF LAST RMS
  53. SX7 X7-1
  54. SX3 ESTE GET *EST* ENTRY SIZE
  55. IX7 X3*X7
  56. IX7 X6+X7
  57. SX7 X7+B1 DETERMINE LWA OF *EST*
  58. SA7 LWARMS
  59. BX2 X6
  60.  
  61. * VERIFY DESIRED ORDINAL IS VALID AND READ ITS *EST* ENTRY.
  62.  
  63. GM1 BSS 0
  64. SA1 PARM
  65. SA1 X1
  66. SA1 X1 FETCH *EST* ORDINAL
  67. SX6 -2
  68. SB2 X1
  69. LT B2,B1,GM2
  70. SX3 ESTE
  71. IX4 X1*X3
  72. SB2 X4
  73. SA5 LWARMS
  74. SX3 X2+B2 ADDRESS OF DESIRED *EST* ENTRY
  75. IX5 X3-X5
  76. SX6 -B1
  77. PL X5,GM2 IF ORDINAL TOO BIG
  78. SX4 ESTENT
  79. SX5 B1
  80. RJ RLC READ *EST* ENTRY FOR SUPPLIED ORDINAL
  81. SA1 ESTENT
  82. SX6 B1
  83. PL X1,GM2 IF NOT A DISK
  84. SX6 B0
  85.  
  86. * X6 .NE. 0 IF ORDINAL IS NOT OK.
  87. * X1 = CONTENT OF *EST* ENTRY.
  88. * X0 = MASK FROM MX0 48.
  89.  
  90. GM2 BSS 0
  91. SA5 PARM
  92. SA2 X5+B1 FETCH ADD(STAT)
  93. SA6 X2 (STAT) = REQUEST STATUS
  94.  
  95. NZ X6,GETMST RETURN IF NOT A DISK
  96.  
  97. MX0 48
  98. BX3 -X0*X1
  99. LX1 60-12
  100. BX6 -X0*X1 EXTRACT DEVICE TYPE
  101. LX6 60-12
  102. SA2 A2+B1
  103. SA6 X2 (TYPE) = DEVICE TYPE
  104.  
  105. SX4 MST
  106. LX3 3 CONVERT TO *MST* ADDRESS
  107. SX5 ISGL
  108. SX3 X3+TDGL
  109. RJ RLC READ *MST* ENTRY
  110. SPACE 2
  111. * EXTRACT NEEDED DATA FROM THE *MST* ENTRY TO
  112. * PROVIDE THE REPLY PARAMETERS.
  113.  
  114. SA5 MST+PFGL-TDGL
  115. SA2 A2+B1
  116. MX7 42
  117. BX6 X7*X5
  118. SA6 X2 (FAM) = FAMILY
  119.  
  120. BX6 -X7*X5 DN*2**12
  121. AX6 12
  122. SA2 A2+B1
  123. SA6 X2 (DN) = DEVICE NUMBER
  124.  
  125. MX7 60-3
  126. BX6 -X7*X5 EXTRACT NUMBER OF DEVICES -1
  127. SX6 X6+B1
  128. SA2 A2+B1
  129. SA6 X2 (NUM) = NUMBER OF DEVICES
  130.  
  131. * CALCULATE TOTAL SECTORS.
  132.  
  133. * = NUMBER OF TRACKS ON EACH DEVICE.
  134. * * SECTORS PER TRACK (SECTOR LIMIT)
  135.  
  136. SA3 MST+TDGL-TDGL
  137. LX3 12
  138. BX4 -X0*X3 NUMBER OF TRACKS OF EACH PHYSICAL DEVICE
  139. SA3 MST+MDGL-TDGL
  140. BX3 -X0*X3
  141. IX6 X4*X3
  142. SA2 A2+B1
  143. BX7 X3
  144. SA6 X2 (TPRU) = TOTAL SECTORS
  145.  
  146. SA2 A2+B1
  147. SA7 X2 (SECT) = NUMBER OF SECTORS PER TRACK
  148. SPACE 2
  149. SA5 MST+PUGL-TDGL FETCH DEVICE MASKS
  150. MX7 60-8
  151. BX6 -X7*X5
  152. SA2 A2+B1
  153. SA6 X2 (MSKP) = PRIMARY DEVICE MASK
  154. LX5 60-8
  155. BX6 -X7*X5
  156. SA2 A2+B1
  157. SA6 X2 (MSKS) = SECONDARY DEVICE MASK
  158. EQ GETMST
  159. SPACE 4
  160. ** RLC - READ LOW CORE.
  161. *
  162. * ENTRY (X3) = ADDRESS TO BE READ FROM LOW CORE.
  163. * (X4) = ADDRESS OF BUFFER TO HOLD RESULTS OF READ.
  164. * (X5) = WORD COUNT.
  165. SPACE 2
  166. RLC BSS 1
  167. MX6 1
  168. SA6 X4
  169. LX5 36
  170. LX3 18
  171. BX6 X3+X4
  172. BX6 X6+X5
  173. SA6 RSBA
  174. SYSTEM RSB,R,RSBA
  175. EQ RLC
  176. SPACE 4
  177. PARM BSS 1
  178. ESTES BSS 1
  179. ESTFWA DATA 0
  180. ESTWORD BSS 1
  181. LWARMS BSS 1
  182. ESTENT BSS 1
  183. MST BSS ISGL
  184. RSBA BSS 1
  185.  
  186. END
cdc/nos2.source/opl871/getmst.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator