User Tools

Site Tools


cdc:nos2.source:nam5871:lfgzap

LFGZAP

Table Of Contents

  • [00005] INTERFACE TO *Z* ARGUMENT PROCCESSOR.
  • [00032] *Z* ARGUMENT PROCESSOR.
  • [00037] *Z* ARGUMENT PROCESSOR.

Source Code

LFGZAP.txt
  1. *DECK LFGZAP
  2. IDENT LFGZAP
  3. ENTRY LFGZAP
  4. SYSCOM B1
  5. ** LFGZAP - INTERFACE TO *Z* ARGUMENT PROCCESSOR.
  6. *
  7. * D.K. ENDO 81/12/17
  8. *
  9. * THIS PROCEDURE CALLS THE *Z* ARGUMENT PROCESSOR FOR LFG TO READ
  10. * THE DIRECTIVES OFF THE CONTROL CARD.
  11. *
  12. * LFGZAP(INFET)
  13. *
  14. * ENTRY INFET = INPUT DIRECTIVE FET.
  15. *
  16. * EXIT INFET CIO BUFFER IS FILLED WITH SOURCE LINE.
  17. *
  18. * METHOD
  19. *
  20. * INITIATE CALL TO *Z* ARGUMENT PROCESSOR(ZAP FROM CALLCPU)
  21. *
  22. LFGZAP DATA 0
  23. SB1 1
  24. SX2 X1
  25. RJ ZAP
  26. EQ LFGZAP
  27. IF -DEF,QUAL$,1
  28. QUAL COMCZAP
  29. BASE D
  30. * COMMENT COPYRIGHT CONTROL DATA CORP. 1976.
  31. ZAP SPACE 4
  32. *** COMCZAP - *Z* ARGUMENT PROCESSOR.
  33. * A. D. FORET. 77/02/08.
  34. * D. R. HILGREN. 79/04/15.
  35. * J. L. LARSON. 79/04/15.
  36. ZAP SPACE 4,10
  37. *** ZAP - *Z* ARGUMENT PROCESSOR.
  38. *
  39. * ENTRY (X2) = ADDRESS OF INPUT FET TO ENTER DIRECTIVES INTO.
  40. * (B6) = STRING BUFFER LENGTH. REQUIRED AND USED ONLY
  41. * WHEN VARIABLE LENGTH STRING BUFFER OPTION IS
  42. * SELECTED (USBL$ DEFINED). SEE COMCUSB.
  43. * USBB = STRING BUFFER. MUST BE USER DEFINED IF USBL$
  44. * IS SELECTED. SEE COMCUSB.
  45. * CCDR = CONTROL STATEMENT IMAGE.
  46. *
  47. * EXIT DIRECTIVES ENTERED INTO BUFFER OF FET SPECIFIED.
  48. * FET STATUS SET TO EOR READ.
  49. * *COMCZAP* WILL SUPPLY A TERMINATOR AT THE END OF A
  50. * DIRECTIVE IF NO TERMINATOR (PERIOD OR CLOSED
  51. * PARENTHESIS) HAS BEEN SUPPLIED FOR THAT DIRECTIVE
  52. * AND IF *ZAP$* HAS BEEN DEFINED IN THE CALLING PROGRAM.
  53. *
  54. * USES A - 1, 3, 6, 7.
  55. * B - 2, 6, 7.
  56. * X - 1, 2, 3, 4, 6, 7.
  57. *
  58. * CALLS /COMCUSB/USB.
  59. *
  60. * MACROS RECALL, WRITES.
  61. *
  62. * NOTES THE FIRST CHARACTER AFTER THE CONTROL STATEMENT
  63. * TERMINATOR IS THE SEPARATOR CHARACTER FOR ALL
  64. * DIRECTIVES ON THE CONTROL STATEMENT. ANY DISPLAY
  65. * CODE CHARACTER NOT USED IN ANY DIRECTIVE (INCLUDING
  66. * SPACE) CAN BE USED AS THE SEPARATOR CHARACTER.
  67.  
  68.  
  69. ZAP SUBR ENTRY/EXIT
  70.  
  71. * SET INPUT FET STATUS TO EOR READ.
  72.  
  73. BX4 X2
  74. RECALL X2
  75. MX3 42
  76. SA1 X4 SET EOR READ STATUS IN FET
  77. SX2 31B
  78. BX6 X3*X1
  79. SX3 41B PRESET TERMINATOR INDICATOR
  80. BX6 X6+X2
  81. LX3 12
  82. SA6 A1
  83. SB2 CCDR FWA CONTROL STATEMENT
  84. RJ /COMCUSB/USB UNPACK CONTROL STATEMENT
  85.  
  86. * FIND CONTROL STATEMENT TERMINATOR.
  87.  
  88. ZAP1 SA1 B6 GET NEXT CHARACTER FROM CONTROL STATEMENT
  89. SB2 X1
  90. LX7 X3,B2
  91. SB6 B6+B1
  92. GE B6,B7,ZAPX IF END OF CONTROL STATEMENT
  93. PL X7,ZAP1 IF NOT TERMINATOR
  94.  
  95. * EXTRACT ONE DIRECTIVE.
  96.  
  97. ZAP2 SA3 B6+ GET SEPARATOR
  98. SB2 B6+1 SAVE FWA DIRECTIVE
  99. .C IF DEF,ZAP$
  100. SX2 B1 ASSUME NO TERMINATOR FOUND
  101. .C ENDIF
  102. ZAP3 SB6 B6+B1
  103. SA1 B6+ GET NEXT CHARACTER FROM CONTROL STATEMENT
  104. BX7 X3-X1 CHECK FOR SEPARATOR
  105. GT B6,B7,ZAP4 IF END OF CONTROL STATEMENT
  106. .D IF DEF,ZAP$
  107. ZR X7,ZAP3.2 IF END OF DIRECTIVE
  108. SX7 X1-1R.
  109. ZR X7,ZAP3.1 IF TERMINATOR
  110. SX7 X1-1R)
  111. NZ X7,ZAP3 IF NOT TERMINATOR
  112. ZAP3.1 SX2 B0+
  113. EQ ZAP3 GET SEPARATOR
  114.  
  115. ZAP3.2 BSS 0
  116. .D ELSE
  117. NZ X7,ZAP3 IF NOT END OF DIRECTIVE
  118. .D ENDIF
  119. EQ B2,B6,ZAP2 IF TWO SEPARATORS IN A ROW
  120.  
  121. * ENTER DIRECTIVE INTO INPUT FET BUFFER.
  122.  
  123. ZAP4 SX6 B6 SAVE SEPARATOR ADDRESS
  124. SA6 ZAPA
  125. .A IF DEF,ZAP$
  126. BX7 X1 SAVE SEPARATOR
  127. SA7 ZAPB
  128. ZR X2,ZAP5 IF TERMINATOR FOUND
  129. SX6 1R.
  130. SA6 A1
  131. SB6 B6+B1 INCREMENT DIRECTIVE LENGTH
  132. ZAP5 BSS 0
  133. .A ENDIF
  134. SB7 B6-B2 SET DIRECTIVE LENGTH
  135. WRITES X4,B2,B7
  136. .B IF DEF,ZAP$
  137. SA1 ZAPA RESTORE PROPER SEPARATOR
  138. SA3 ZAPB
  139. SA1 X1
  140. BX6 X3
  141. SA6 A1+
  142. .B ENDIF
  143. SA1 ZAPA RESTORE SEPARATOR ADDRESS
  144. SA3 /COMCUSB/USBC RESTORE LWA CONTROL STATEMENT
  145. SX4 X2 RESET INPUT FET ADDRESS
  146. SB6 X1
  147. SB7 X3+
  148. LT B6,B7,ZAP2 IF MORE DIRECTIVES TO PROCESS
  149. EQ ZAPX RETURN
  150.  
  151.  
  152. ZAPA CON 0 SEPARATOR ADDRESS
  153. ZAPB CON 0 SEPARATOR USED BY CALLER
  154. ZAP SPACE 4,10
  155. BASE *
  156. QUAL$ IF -DEF,QUAL$
  157. QUAL *
  158. ZAP EQU /COMCZAP/ZAP
  159. QUAL$ ENDIF
  160. ENDX
  161. SPACE 4
  162. IF -DEF,QUAL$,1
  163. QUAL COMCUSB
  164. BASE D
  165. * COMMENT COPYRIGHT CONTROL DATA CORP. 1972.
  166. USB SPACE 4
  167. *** USB - UNPACK DATA BLOCK TO STRING BUFFER.
  168. * D. A. HIVELEY. 72/03/01.
  169. * S. R. MCPHERSON. 74/09/30.
  170. * A. D. FORET. 74/12/04. RESEQUENCE.
  171. USB SPACE 4
  172. *** USB - UNPACK DATA BLOCK TO STRING BUFFER.
  173. *
  174. * IF THE SYMBOL USBL$ IS DEFINED IN THE USER PROGRAM, THE
  175. * VARIABLE LENGTH STRING BUFFER OPTION IS SELECTED. THIS
  176. * VARIABLE LENGTH OPTION REQUIRES THAT THE STRING BUFFER USBB,
  177. * OF LENGTH SPECIFIED BY B6 UPON ENTRY, ALSO BE DEFINED IN THE
  178. * USER PROGRAM.
  179. *
  180. * ENTRY (B1) - 1.
  181. * (B2) - FWA OF PACKED DATA.
  182. * (B6) - STRING BUFFER LENGTH, REQUIRED AND USED ONLY
  183. * WHEN VARIABLE LENGTH STRING BUFFER OPTION
  184. * SELECTED (USBL$ DEFINED).
  185. *
  186. * EXIT CHARACTER UNPACKED 1 TO A WORD, RIGHT JUSTIFIED
  187. * STARTING AT (USBB). A MAXIMUM OF
  188. * 80 CHARACTERS ARE ACCOMMODATED, BY
  189. * DEFAULT. AN ADDITIONAL WORD IS PROVIDED
  190. * FOR THOSE PROGRAMS THAT GUARANTEE A
  191. * TERMINATOR AT THE END OF STRING.
  192. * (A1) = LWA PACKED DATA PROCESSED.
  193. * ((A6)) = LWA OF UNPACK BUFFER.
  194. * (B2) = 0, IF MAXIMUM CHARACTERS PROCESSED.
  195. * (B6) = FWA OF UNPACK BUFFER.
  196. * (B7) = LWA OF UNPACKED BUFFER.
  197. * (USBC) = LWA OF UNPACKED BUFFER.
  198. *
  199. * USES X - 1, 2, 6.
  200. * A - 1, 6.
  201. * B - 2, 6, 7.
  202.  
  203.  
  204. USB3 SX6 B7+ ADDRESS OF LAST CHARACTER
  205. SA6 USBC
  206. SB6 USBB SET BEGINNING ADDRESS OF STRING
  207.  
  208. USB PS ENTRY/EXIT
  209. SA1 B2+ CONTROL CARD BUFFER
  210. SB7 USBB-1 DATA BLOCK STRING BUFFER
  211. MX2 -6
  212. IF DEF,USBL$
  213. SB2 B6+
  214. ELSE 1
  215. SB2 80
  216. SB6 B0 SET CHARACTER COUNT IN WORD
  217. USB1 LX1 6
  218. SB6 B6+B1 BUMP CHARACTER COUNT THIS WORD
  219. BX6 -X2*X1
  220. BX1 X2*X1 CLEAR CURRENT CHARACTER FROM WORD
  221. USB2 SB7 B7+B1 INCREMENT STRING BUFFER ADDRESS
  222. SB2 B2-B1 DECREMENT CHARACTER COUNT
  223. SA6 B7+ STORE CURRENT CHARACTER IN STRING BUFFER
  224. ZR B2,USB3 IF MAXIMUM CHARACTERS PROCESSED
  225. NZ X1,USB1 IF MORE CHARACTERS THIS WORD
  226. SX6 B6-9 CHECK CHARACTERS PROCESSED THIS WORD
  227. NG X6,USB3 IF END OF LINE
  228. SB6 B0 RESET CHARACTER COUNT WITHIN WORD
  229. SA1 A1+B1 GET NEXT WORD
  230. ZR X1,USB3 IF END OF LINE
  231. NZ X6,USB1 IF LAST WORD COMPLETELY PROCESSED
  232. EQ USB2 PROCESS *00* TERMINATING PREVIOUS WORD
  233. SPACE 4
  234. IF -DEF,USBL$,2
  235. IF -DEF,USBB,1
  236. USBB BSS 81 STRING BUFFER
  237. IF -DEF,USBC,1
  238. USBC BSS 1
  239. QUAL$ IF -DEF,QUAL$
  240. QUAL *
  241. USB EQU /COMCUSB/USB
  242. IF -DEF,USBL$,2
  243. IF -DEF,USBB,1
  244. USBB EQU /COMCUSB/USBB
  245. IF -DEF,USBC,1
  246. USBC EQU /COMCUSB/USBC
  247. QUAL$ ENDIF
  248. BASE *
  249. ENDX
  250. END
cdc/nos2.source/nam5871/lfgzap.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator