User Tools

Site Tools


cdc:nos2.source:opl871:6dx

Table of Contents

6DX

Table Of Contents

  • [00005] 6DX - UEM DRIVER.
  • [00055] EMS - END MASS STORAGE OPERATION.
  • [00067] RDS - READ SECTOR.
  • [00080] WDS - WRITE SECTOR.
  • [00094] UEM - UEM TRANSFER.
  • [00192] PRS - PRESET.
  • [00244] MSE - MASS STORAGE ERROR PROCESSOR.

Source Code

6DX.txt
  1. IDENT 6DX,MSFW
  2. PERIPH
  3. BASE MIXED
  4. SST
  5. TITLE 6DX - UEM DRIVER.
  6. *COMMENT 6DX - UEM DRIVER.
  7. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  8. SPACE 4,10
  9. ***** 6DX - UEM DRIVER.
  10. * C. B. LOSCHEIDER. 81/03/04.
  11. SPACE 4,10
  12. *** 6DX PROVIDES THE CAPABILITY TO ACCESS UEM.
  13. SPACE 4,10
  14. *** ORGANIZATION OF UEM.
  15. * UEM IS TREATED AS A SINGLE DEVICE.
  16. *
  17. * EQUIPMENT TYPE IS *DE*.
  18. *
  19. * SECTORS/TRACK = SLDE (20B, 40B, 100B, OR 200B).
  20. *
  21. * WORDS/TRACK = 101B*SLDE.
  22. SPACE 4,10
  23. ** ENTRY CONDITIONS.
  24. *
  25. *
  26. * (T5) = EST ORDINAL.
  27. * (T6) = TRACK.
  28. * (T7) = SECTOR.
  29. SPACE 4,10
  30. *CALL COMPMAC
  31. *CALL COMSDFS
  32. *CALL COMSMSP
  33. *CALL COMSPIM
  34. SPACE 4,10
  35. * ASSEMBLY CONSTANTS.
  36.  
  37.  
  38. DEC MICRO 1,, 6DX DECK NAME
  39. EJECT
  40. ** ENTRY POINT TRANSFERS.
  41.  
  42.  
  43. ORG MSFW
  44.  
  45. CON PRS PRESET ADDRESS
  46.  
  47.  
  48. RDS CON 0 ENTRY
  49. UJN RDS. ENTER DRIVER
  50.  
  51.  
  52. WDS CON 0 ENTRY
  53. UJN WDS. ENTER DRIVER
  54. EMS SPACE 4,10
  55. ** EMS - END MASS STORAGE OPERATION.
  56. *
  57. * EXIT (A) = 0.
  58. * (UEMG) = EM SHIFT FOR CALCULATING HEADER ADDRESS.
  59. * (UEMH) = EM SHIFT FOR CALCULATING EM ADDRESS.
  60.  
  61.  
  62. .EMS SUBR ENTRY/EXIT
  63. LDN 0
  64. STM CHRV
  65. UJN .EMSX RETURN
  66. RDS SPACE 4,10
  67. ** RDS - READ SECTOR.
  68. *
  69. * ENTRY (A) = BUFFER ADDRESS FOR SECTOR.
  70. *
  71. * EXIT (A) = 0 IF TRANSFER COMPLETE.
  72. * = ERROR CODE IF ERROR OCCURRED.
  73. *
  74. * CALLS UEM.
  75.  
  76.  
  77. RDS. LPC 7777
  78. UJN UEM SET BUFFER ADDRESSES
  79. WDS SPACE 4,10
  80. ** WDS - WRITE SECTOR.
  81. *
  82. * ENTRY (A) = BUFFER ADDRESS FOR SECTOR.
  83. *
  84. * EXIT (A) = 0 IF TRANSFER COMPLETE.
  85. * = ERROR CODE IF ERROR OCCURRED.
  86. *
  87. * CALLS UEM.
  88.  
  89.  
  90. WDS. LPC 7777
  91. LMC 1S15
  92. * UJN UEM SET BUFFER ADDRESSES
  93. UEM SPACE 4,15
  94. ** UEM - UEM TRANSFER.
  95. *
  96. * ENTRY (A) = 3/ O,3/,12/ BUFFER ADDRESS.
  97. * O = 0 FOR READ REQUEST.
  98. * = 1 FOR WRITE REQUEST.
  99. * (UEMG) = EM SHIFT FOR CALCULATING HEADER ADDRESS.
  100. * (UEMH) = EM SHIFT FOR CALCULATING EM ADDRESS.
  101. *
  102. * EXIT (A) .LT. 0, IF UNRECOVERED ERROR.
  103. *
  104. * MACROS MSERR.
  105.  
  106.  
  107. UEM STM UEMD SET BUFFER ADDRESS FOR HEADER
  108. ADN 2
  109. STM UEME
  110. SHN -17 SAVE READ/WRITE FLAG FOR *7DX*
  111. STI D1
  112. SHN 1 SET RETURN INDEX
  113. STD CM
  114. ERRNZ RDS+2-WDS CODE DEPENDS ON VALUE
  115. SHN 7-1 SET READ / WRITE INSTRUCTIONS
  116. LMC CRMI+ON
  117. STM UEMD-1
  118. LMN HN&ON
  119. STM UEME-1
  120. LDM RDS,CM SET RETURN ADDRESS
  121. STM UEMF
  122. LDC ** LARGEST TRACK VALUE
  123. UEMA EQU *-1
  124. SBD T6
  125. MJN UEM1 IF TRACK TOO LARGE
  126. LDD T7
  127. SBM SLM
  128. MJN UEM2 IF SECTOR OKAY
  129.  
  130. * INVALID MASS STORAGE ADDRESS.
  131.  
  132. UEM1 LDN ADDE SET ADDRESS ERROR
  133. STM ERRA
  134. MSERR 7DX CALL *7DX* ERROR PROCESSOR
  135.  
  136. * VALID MASS STORAGE ADDRESS.
  137.  
  138. UEM2 LDD T6 HEADER ADDRESS = TRACK*101B*SLDE+SECTOR
  139. LPC 3777
  140. SHN 1
  141. STD CM+1
  142. SHN 6
  143. RAD CM+1
  144. SHN -14
  145. UEMG SHN 4-1
  146. * SHN 4-1+EMTS (EMTS = TRACK SHIFT)
  147. STD CM
  148. LDD CM+1
  149. UEMH SHN 4-1
  150. * SHN 4-1+EMTS (EMTS = TRACK SHIFT)
  151. LMD T7 ADD SECTOR NUMBER
  152. STD CM+1
  153. SHN -14
  154. RAD CM
  155. LDC 0 CM ADDR = HEADER ADDR + UEM BASE ADDR
  156. UEMB EQU *-1
  157. RAD CM+1
  158. SHN -14
  159. ADC 0
  160. UEMC EQU *-1
  161. RAD CM
  162. SRD CM+2 SAVE R-REGISTER
  163. LDD CM+1 PUT UPPER 18 ADDR BITS IN R-REGISTER
  164. SCN 77
  165. SHN 6
  166. LMD CM
  167. SHN 6
  168. STD T2
  169. SHN -14
  170. STD T1
  171. LRD T1
  172. LDD CM+1 PUT LOWER 6 ADDR BITS IN A-REGISTER
  173. LPN 77
  174. STD CM+1
  175. LMC 400000
  176. CRM *,ON READ/WRITE HEADER
  177. UEMD EQU *-1
  178. LDD T7 DATA ADDRESS = HEADER + SLDE +77 * SECTOR
  179. SHN 6
  180. SBD T7
  181. ADM SLM
  182. ADD CM+1
  183. LMC 400000
  184. CRM *,HN READ/WRITE DATA
  185. UEME EQU *-1
  186. LRD CM+2 RESTORE R-REGISTER
  187. LDN 0 INDICATE NO ERRORS
  188. STM CHRV
  189. UEM3 LJM * RETURN
  190. UEMF EQU *-1
  191. PRS SPACE 4,10
  192. ** PRS - PRESET.
  193. *
  194. * ENTRY (CM - CM+4) = EST ENTRY.
  195.  
  196.  
  197. PRS LDK MEFL SET EM SHIFT
  198. CRM PRSA,ON
  199. LDM PRSA+2
  200. SHN -5
  201. LPN 3
  202. ADC SHNI+4-1
  203. STM UEMG UPDATE SHIFT INSTRUCTIONS
  204. STM UEMH
  205. LDC UEML GET UEM BASE ADDRESS
  206. CRM PRSA,ON
  207. LDM PRSA
  208. SHN 21-2
  209. STM UEMC
  210. SHN 13-21
  211. SCN 77
  212. STM UEMB
  213. LDD CM+4 SET LARGEST TRACK
  214. SHN 3
  215. ADK TDGL
  216. CRM PRSA,ON
  217. SOM PRSA
  218. ADC 4000
  219. STM UEMA
  220. LJM SMSX RETURN
  221.  
  222. PRSA BSS 0 FIVE BYTES FOR READING LARGEST TRACK
  223. .1 SET *+5+4-MSFW CHECK FOR OVERFLOW
  224. .1 SET .1/5
  225. .1 SET MSFW+.1*5
  226. .2 SET PPFW-5-*-5 BYTES AVAILABLE BEFORE OVERFLOW
  227. ERRNG PPFW-5-.1 DRIVER OVERFLOWS INTO *PPFW*-5
  228. 7DX MSOVL 7702,T2,EPFW-1,(UEM ERROR PROCESSOR.)
  229. SPACE 4,10
  230. ***** 7DX - UEM ERROR PROCESSOR.
  231. * C. B. LOSCHEIDER. 81/03/04.
  232. SPACE 4,10
  233. *** *7DX* IS CALLED WHEN AN UNRECOVERABLE UEM ABORT
  234. * HAS OCCURRED. THE ONLY ERROR WHICH MAY OCCUR
  235. * IS AN ADDRESSING ERROR.
  236. SPACE 4,10
  237. QUAL
  238. BEGIN BSSN PRS
  239. ERRA BSSN 1 ERROR FLAG WORD
  240. ERRNG DEFW-* *7DX*/COMMON ERROR PROCESSOR CONFLICT
  241. END BSSN
  242. QUAL *
  243. MSE SPACE 4,25
  244. ** MSE - MASS STORAGE ERROR PROCESSOR.
  245. *
  246. * ENTRY ((D1)) = 0 IF READ, 1 IF WRITE.
  247. * (UEMD) = PP BUFFER ADDRESS OF HEADER.
  248. * (ERRA) = ERROR CODE AS DEFINED IN *COMSMSP*.
  249. * (T1) = UEMD.
  250. * (T2) = ERRA.
  251. * (T5) = EQUIPMENT.
  252. * (T6) = LOGICAL TRACK.
  253. * (T7) = LOGICAL SECTOR.
  254. *
  255. * EXIT (T2) = READ BUFFER ADDRESS FOR *7EK*.
  256. * (DEDT) = 8/0, 4/*6DX* DRIVER TYPE.
  257. * (DEEC) = ERROR CODE.
  258. * (DENR) = 0.
  259. * (DERC) = 0.
  260. * (DERW) = 1 IF WRITE REQUEST, 0 IF READ REQUEST.
  261. * (DEST) = 0.
  262. * (DEWR) = 0.
  263. * (RDCT) = 5/0, 1/1, 6/0.
  264. * (MB+2) = DRIVER DEPENDENT PART OF BML MESSAGE.
  265. * 24/0, 12/W, 24/A.
  266. * W = WORD COUNT.
  267. * A = EXTENDED MEMORY ERROR ADDRESS.
  268. *
  269. * USES T2, CM - CM+4.
  270. *
  271. * MACROS MSERR.
  272.  
  273.  
  274. DDX ENTRY *7DX* ENTRY
  275.  
  276. LDI D1 SET READ/WRITE FLAG
  277. STM DERW
  278. LDK /COMSDFS/D6DX SAVE DRIVER TYPE
  279. STM DEDT
  280. LDD HN SET RECOVERY IN PROGRESS FLAG
  281. STM RDCT
  282. LDI T2 SET ERROR CODE
  283. STM DEEC
  284. LDK MEFL
  285. CRD CM
  286. LDD CM+2
  287. SHN -5
  288. LPN 3
  289. RAM DDXA
  290. LDD T6 HEADER ADDRESS = TRACK*101B*SLDE+SECTOR
  291. LPC 3777
  292. DDXA SHN 4
  293. * SHN 4+EMTS (EMTS = TRACK SHIFT)
  294. STD CM+4
  295. SHN -6
  296. STD CM+3
  297. SHN -6
  298. RAD CM+3
  299. LDD CM+4
  300. LPN 77
  301. SHN 6
  302. ADD T7
  303. RAD CM+4
  304. SHN -14
  305. RAD CM+3
  306. LDN 1 SAVE WORD COUNT FOR BML MESSAGE
  307. STD CM+2
  308. LDN 0 CLEAR UNUSED FIELDS IN BML MESSAGE
  309. STD CM+1
  310. STD CM
  311. STM DENR INITIALIZE *NON-RECOVERABLE ERROR* FLAG
  312. STM DERC INITIALIZE RETRY COUNT
  313. STM DEST INITIALIZE ERROR PROCESSING CONTROL WORD
  314. ERRNZ RTC.AD *7DX* ASSUMES NO RETRY WILL BE ATTEMPTED
  315. STM DEWR INITIALIZE *DATA WRITTEN/READ* FLAG
  316. LDI T1 SET ADDRESS OF BUFFER HEADER
  317. STD T2
  318. LDD MA SAVE DEPENDENT PART OF BML MESSAGE
  319. ADN 2
  320. CWD CM
  321. MSERR 7EK EXECUTE *7EK*
  322.  
  323.  
  324. ERRNG 10000-* *7DX* HAS OVERFLOWED
  325. BSS 10000-* SPARES (ADJUST ORIGIN BY 5 AS REQUIRED)
  326. CON DDX-1 (T0) = ENTRY ADDRESS - 1
  327. CON UEMD (T1) = BUFFER HEADER ADDRESS
  328. CON ERRA (T2) = ADDRESS OF WORD CONTAINING
  329. ERROR FLAG
  330. ERRNZ LN-* ILLEGAL PROGRAM LENGTH
  331. QUAL *
  332. END
cdc/nos2.source/opl871/6dx.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator