User Tools

Site Tools


cdc:nos2.source:opl871:gmsg

Table of Contents

GMSG

Table Of Contents

  • [00002] GET M860 MESSAGE AND ASSOCIATED DATA.
  • [00010] GET M860 MESSAGE AND ASSOCIATED DATA.
  • [00037] LOCAL MACROS.
  • [00038] UPACK - UNPACK ONE MESSAGE WORD.
  • [00058] MAIN ROUTINES.
  • [00122] GDATA - GET ASSOCIATED DATA FROM BUFFER.
  • [00143] SUBROUTINES.
  • [00145] RDW - READ WORDS TO WORKING BUFFER.
  • [00329] WORKING STORAGE.

Source Code

GMSG.txt
  1. IDENT GMSG
  2. TITLE GET M860 MESSAGE AND ASSOCIATED DATA.
  3. ENTRY GMSG
  4. ENTRY GDATA
  5. SST
  6. *COMMENT GET M860 MESSAGE AND ASSOC. DATA.
  7. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  8. SYSCOM B1
  9. GMSG SPACE 4
  10. *** GMSG - GET M860 MESSAGE AND ASSOCIATED DATA.
  11. *
  12. * W. J. STURGIS. 82/09/14.
  13. *
  14. * GMSG GETS A M860 MESSAGE AND VERIFIES THE CHECKSUM.
  15. * THE MESSAGE UNPACKED AND RETURNED TO THE CALLER ALONG
  16. * WITH A STATUS. ENTRY GDATA RETURNS AN ASSOCIATED DATA
  17. * BLOCK TO THE CALLER ALONG WITH A STATUS.
  18. *
  19. * SYMPL CALLS
  20. * GMSG(FET,MSG,STS);
  21. * GDATA(FET,DATA,LEN,STS);
  22. *
  23. * WHERE
  24. * FET = FET ASSRESS.
  25. * MSG = MESSAGE BUFFER(UPPER 48 BITS OF 11 WORDS)
  26. * DATA = ASSOCIATED DATA BUFFER.
  27. * LEN = LENGTH OF ASSOCIATED DATA.
  28. * STS = RETURN STATUS.
  29. * 0 = NORMAL COMPLETE.
  30. * 1 = CHECKSUM ERROR(GMSG ONLY).
  31. * 2 = NOT ENOUGH DATA IN BUFFER(BUFFER IS EMPTY).
  32. SPACE 4,10
  33. * COMMON DECKS.
  34.  
  35.  
  36. *CALL,COMCMAC
  37. TITLE LOCAL MACROS.
  38. ** UPACK - UNPACK ONE MESSAGE WORD.
  39. *
  40. * UNPACK SC
  41. *
  42. * WHERE SC = MASK AND SHIDT COUNT.
  43.  
  44.  
  45. PURGMAC UNPACK
  46.  
  47. UPACK MACRO SC
  48. SA1 A1+B1 GET NEXT PACKED WORD
  49. MX0 SC
  50. BX2 X0*X1
  51. LX2 SC-48 POSITION TO LOWER OF PREVOIUS
  52. BX6 X6+X2
  53. SA6 B2 STORE UNPACKED WORD
  54. SB2 B2+B1
  55. BX6 -X0*X1 LOWER TO NEXT WORD
  56. LX6 SC LEFT JUSTIFY
  57. ENDM
  58. TITLE MAIN ROUTINES.
  59. GMSG SPACE 0
  60. GMSG SUBR ENTRY/EXIT
  61. SB1 1
  62. SX7 A1
  63. SA7 PARL SAVE PARAMETER LIST
  64. SA0 X1 FET ADDRESS
  65. SB6 MBUF
  66. SB7 9
  67. RJ RDW READ MESSAGE TO WORKING BUFFER
  68. ZR B7,GMS2 IF FULL MESSAGE
  69. SX6 2 FLAG PARTIAL OR NO MESSAGE
  70. GMS1 SA1 PARL
  71. SA1 X1+2
  72. SA6 X1 STORE RESPONSE
  73. EQ GMSGX RETURN
  74.  
  75. GMS2 SA1 PARL
  76. SA1 X1+B1 CALLER MESSAGE BUFFER
  77. SB2 X1
  78. SA1 MBUF-1 INITIALIZE A1
  79. SB3 0 LOOP COUNTER
  80. GMS3 SA1 A1+B1
  81. MX0 48
  82. BX6 X0*X1
  83. SA6 B2
  84. SB2 B2+B1
  85. BX6 -X0*X1
  86. LX6 48 LEFT JUSTIFY
  87. UPACK 36
  88. UPACK 24
  89. UPACK 12
  90. SA6 B2 STORE LAST WORD
  91. SB2 B2+B1
  92. SB3 B3+B1
  93. LE B3,B1,GMS3
  94. SA1 A1+B1
  95. MX0 32 ONLY 32 BITS IN LAST WORD
  96. BX6 X0*X1
  97. SA6 B2
  98.  
  99. * CHECKSUM MESSAGE
  100.  
  101. SB3 B2-10 START OF MESSAGE
  102. MX0 -16
  103. BX6 X6-X6 INITIAL CHECKSUM
  104. GMS4 SA1 B3 MESSAGE WORD
  105. LX1 16
  106. BX2 -X0*X1
  107. IX6 X6+X2
  108. LX1 16
  109. BX2 -X0*X1
  110. IX6 X6+X2
  111. LX1 16
  112. BX1 -X0*X1
  113. IX6 X6+X1
  114. SB3 B3+B1
  115. LE B3,B2,GMS4 IF NOT ENTIRE MESSAGE
  116. BX6 -X0*X6 IGNORE OVERFLOW
  117. ZR X6,GMS1 IF CHECKSUM CORRECT
  118. SX6 1 RETURN CHECKSUM ERROR STATUS
  119. JP GMS1 STORE STATUS AND RETURN
  120. EJECT
  121. GDATA SPACE 0
  122. ** GDATA - GET ASSOCIATED DATA FROM BUFFER.
  123.  
  124.  
  125. GDATA SUBR ENTRY/EXIT
  126. SB1 1
  127. SX7 A1
  128. SA7 PARL SAVE PARAMETER LIST POINTER
  129. SA0 X1 FET ADDRESS
  130. SA1 A1+B1
  131. SB6 X1 DATA BUFFER
  132. SA1 A1+B1
  133. SA1 X1
  134. SB7 X1 LENGTH
  135. RJ RDW MOVE DATA TO BUFFER
  136. SX6 B7 REMAINDER WORD COUNT
  137. ZR X6,GDA1 IF ALL DATA
  138. SX6 2 SET NOT FULL BLOCK STATUS
  139. GDA1 SA1 PARL
  140. SA1 X1+3
  141. SA6 X1 STORE RESPONSE
  142. EQ GDATAX RETURN
  143. TITLE SUBROUTINES.
  144. RDW SPACE 4
  145. ** RDW - READ WORDS TO WORKING BUFFER.
  146. *
  147. ** RDW READS A GIVEN NUMBER OF WORDS FROM A CIRCULAR
  148. * BUFFER TO A WORKING BUFFER. RDW IS ADAPTED FROM RDW=(COMCRDW)
  149. *
  150. * ENTRY (A0) = ADDRESS OF FET FOR FILE.
  151. * (B6) = FWA WORKING BUFFER.
  152. * (B7) = WORD COUNT OF WORKING BUFFER.
  153. * IF (B7) = 0, NO TRANSFER WILL BE PERFORMED.
  154. *
  155. * EXIT (B7) = 0 FOR TRANSFER COMPLETE.
  156. * (B7) = REMAINING WORDS ON INCOMPLETE TRANSFER.
  157. *
  158. * USES X - 1, 2, 3, 4, 6, 7.
  159. * B - 1, 2, 3, 4, 5, 6, 7.
  160. * A - 1, 2, 3, 4, 6, 7.
  161. *
  162. * CALLS NONE.
  163.  
  164.  
  165. * PROCESS 1 WORD OR BUFFER EMPTY.
  166.  
  167. RDW18 ZR B3,RDWX IF NO DATA
  168. BX7 X1 STORE 1 WORD
  169. SA7 B6
  170. RDW19 SX6 B4+B3 ADVANCE OUT
  171. SB4 B4+B3
  172. SB6 B6+B3
  173. SB7 B7-B3
  174. NE B4,B5,RDW20 IF OUT " LIMIT
  175. SA1 A0+B1 READ FIRST
  176. SX6 X1 OUT = FIRST
  177. RDW20 SA6 A3 UPDATE OUT
  178. NZ B7,RDW1 IF NOT DONE
  179.  
  180. RDW SUBR ENTRY/EXIT
  181. RDW0 SX1 B0+
  182. LE B7,RDWX IF NO WORDS TO TRANSFER
  183. RDW1 SA3 A0+3 (B4) = OUT
  184. SA1 A0+2 (B3) = IN
  185. SB1 1
  186. SA4 A3+B1 (B5) = LIMIT
  187. SB4 X3
  188. SB3 X1
  189. SA1 X3 READ FIRST WORD
  190. SB5 X4
  191. GE B3,B4,RDW2 IF NO END AROUND
  192. SB3 B5
  193. RDW2 SB3 B3-B4 FREE DATA LENGTH
  194. LE B3,B7,RDW3 IF NOT ENOUGH ROOM
  195. SB3 B7
  196. RDWA BSS 0
  197. RDW3 SA3 RDWB PRESET CMU CODE
  198. RJ RDW16 PRESET CMU CODE
  199. * LE B3,B1,RDW18 IF 1 WORD OR LESS OF DATA (NO CMU)
  200. * BX7 X1 (NO CMU)
  201. * SA1 A1+B1 (NO CMU)
  202. *
  203. * LE B3,B1,RDW18 IF 1 WORD OR LESS OF DATA (CMU)
  204. * JP RDW14 (CMU)
  205.  
  206. * INITIALIZE REGISTERS FOR TRANSFER.
  207.  
  208. RDW4 SX4 B3-B1
  209. MX6 -3
  210. SA7 B6
  211. BX3 -X6*X4 NUMBER OF ODD WORDS
  212. AX4 3 NUMBER OF BLOCKS
  213.  
  214. * TRANSFER UP TO 7 WORDS.
  215.  
  216. ZR X3,RDW6 IF NO ODD WORDS
  217. SB2 X3
  218. RDW5 SB2 B2-B1
  219. BX7 X1
  220. SA1 A1+B1
  221. SA7 A7+B1
  222. NZ B2,RDW5 IF MORE WORDS
  223.  
  224. * PRE-READ REGISTERS.
  225.  
  226. RDW6 ZR X4,RDW19 IF NO BLOCKS
  227. SA2 A1+B1
  228. SB2 B1+B1 (B2) = 2
  229. SA3 A2+B1
  230. SB4 X4 (B4) = LOOP COUNT
  231. SA4 A3+B1
  232.  
  233. * TRANSFER 8 WORD BLOCKS.
  234.  
  235. RDW7 BX6 X1
  236. LX7 X2
  237. SA1 A3+B2
  238. SA2 A4+B2
  239. SA6 A7+B1
  240. SB4 B4-B1
  241. SA7 A6+B1
  242. BX6 X3
  243. LX7 X4
  244. SA3 A1+B2
  245. SA4 A2+B2
  246. SA6 A6+B2
  247. SA7 A7+B2
  248. BX6 X1
  249. LX7 X2
  250. SA1 A3+B2
  251. SA2 A4+B2
  252. SA6 A6+B2
  253. SA7 A7+B2
  254. BX6 X3
  255. LX7 X4
  256. SA3 A1+B2
  257. SA4 A2+B2
  258. SA6 A6+B2
  259. SA7 A7+B2
  260. NZ B4,RDW7 LOOP
  261.  
  262. * READ EXIT.
  263.  
  264. SA3 A0+3 OUT
  265. SA1 A3+B1 (B5) = LIMIT
  266. SB5 X1
  267. RDW8 SB6 B6+B3
  268. SB7 B7-B3
  269. SB4 X3+B3 ADVANCE OUT
  270. SX6 X3+B3
  271. SA1 A0+1 READ FIRST
  272. NE B4,B5,RDW20 IF OUT " LIMIT
  273. SX6 X1+ OUT = FIRST
  274. RDW9 EQ RDW20 CLEAN UP AND RETURN
  275.  
  276. * MOVE DATA WITH CMU.
  277.  
  278. RDW14 SX4 B3-819
  279. PL X4,RDW15 IF MOVE TOO BIG FOR CMU
  280. SX4 B3 10 * WORDS = CHARACTERS
  281. LX6 X4,B1
  282. BX1 X0 SAVE X0
  283. LX4 3
  284. IX6 X4+X6
  285. SX7 B6 SET DESTINATION ADDRESS
  286. LX3 30
  287. MX4 -4
  288. BX7 X7+X3
  289. BX3 X4*X6 EXTRACT UPPER PORTION OF CHARACTER COUNT
  290. LX3 48-4
  291. BX4 -X4*X6
  292. BX7 X3+X7
  293. LX4 26
  294. BX7 X4+X7
  295. AX3 51
  296. SA7 RDWB STORE DESCRIPTOR WORD
  297. IM RDWB MOVE DATA
  298. BX0 X1 RESTORE X0
  299. ZR X3,RDW19 IF NO READ EXIT CHECK
  300. SX3 B4 SET OUT
  301. JP RDW8
  302.  
  303. RDW15 BX7 X1
  304. SA1 A1+B1
  305. JP RDW4
  306.  
  307. * PRESET FOR CMU.
  308. * RDWB IS READ UP AND THEN RETURN JUMPED TO IN ORDER TO VOID
  309. * THE INSTRUCTION STACK.
  310.  
  311. RDWB LE B3,B1,RDW18 IF 1 WORD OR LESS (CMU)
  312. JP RDW14
  313.  
  314. RDW16 EQU RDWB USED TO VOID STACK AT PRESET
  315.  
  316. * PRESET FOR CMU.
  317.  
  318. SA4 CMUR CHECK IF CMU AVAIALABLE
  319. SB3 RDWA
  320. NG X4,RDW17 IF CMU
  321. SA3 RDWC
  322. RDW17 BX6 X3
  323. SA6 B3
  324. JP RDW1
  325.  
  326. RDWC LE B3,B1,RDW18 IF 1 WORD OR LESS (NO CMU)
  327. BX7 X1
  328. SA1 A1+B1
  329. TITLE WORKING STORAGE.
  330. * WORKING STORAGE.
  331.  
  332.  
  333. PARL BSS 1 PARAMETER LIST POINTER
  334. MBUF BSS 9 MESSAGE BUFFER
  335. SPACE 4
  336. END
cdc/nos2.source/opl871/gmsg.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator