Table of Contents

ICPD

Table Of Contents

  • [00010] ICPD - INITIATE *CPD* EXECUTION.
  • [00012] INITIATE *CPD* EXECUTION.
  • [00122] *ICPD* PROCESSOR.
  • [00276] *ENDCPD* PROCESSOR.
  • [00278] MAIN PROGRAM.
  • [00302] SUBROUTINES.
  • [00304] CES - CHECK FET ERROR STATUS.
  • [00317] DATA DEFINITIONS.
  • [00350] TMDE - TABLE OF FILE MODES.

Source Code

ICPD.txt
  1. IDENT ICPD,ICPD
  2. SST FL
  3. ABS
  4. ENTRY ICPD
  5. ENTRY ENDCPD
  6. ENTRY RFL=
  7. ENTRY SSJ=
  8. SYSCOM B1
  9. *COMMENT ICPD - INITIATE *CPD* EXECUTION.
  10. TITLE ICPD - INITIATE *CPD* EXECUTION.
  11. ICPD SPACE 4,10
  12. *** ICPD - INITIATE *CPD* EXECUTION.
  13. *
  14. * S. L. KSANDER. 78/12/13.
  15. SPACE 4,10
  16. *** *ICPD* PROCESSES PARAMETERS AND DEFINES A DATA
  17. * FILE FOR *CPD*. AFTER AN EOF IS WRITTEN ON THE
  18. * DATA FILE, IT IS REWOUND AND *CPD* ACTIVATED.
  19. SPACE 4,15
  20. *** CONTROL STATEMENT CALL.
  21. *
  22. *
  23. * ICPD(P1,P2 ... PN)
  24. *
  25. * WHERE PN IS ANY OF THE FOLLOWING.
  26. *
  27. * OPTIONS DEFAULT PARAMETER
  28. *
  29. * FL = NNNN (5) FAST LOOP TIME. (MILLISECONDS)
  30. * ML = NNNN (100) MEDIUM LOOP TIME. (MILLISECONDS)
  31. * SL = NNNN (1000) SLOW LOOP TIME. (MILLISECONDS)
  32. * FW = NNNN (5) DATA BLOCK SAMPLE TIME. (SECONDS)
  33. * FN = XXXX (SAMPLE) SAMPLE DATA FILE.
  34. *
  35. * M=XXX (WRITE) SAMPLE DATA FILE MODE.
  36. * W = WRITE MODE
  37. * WRITE = WRITE MODE
  38. * A = APPEND MODE
  39. * APPEND = APPEND MODE
  40. * M = MODIFY MODE
  41. * MODIFY = MODIFY MODE
  42. *
  43. * IF THE SAMPLE DATA FILE IS ATTACHED IN APPEND OR MODIFY
  44. * MODE, THEN THE FILE MAY BE ACCESSED IN READ-ALLOW-MODIFY
  45. * MODE WHILE *CPD* IS STILL ACTIVE. THE ADVANTAGE OF
  46. * SPECIFYING WRITE MODE IS TO REDUCE SYSTEM OVERHEAD WHEN
  47. * *CPD* WRITES DATA TO THE SAMPLE FILE. THE SAMPLE DATA
  48. * FILE CAN NOT BE ACCESSED WHILE *CPD* IS ACTIVE IF WRITE
  49. * MODE IS SPECIFIED.
  50. *
  51. * IF A LOOP TIME IS SET TO ZERO, NO SAMPLES FOR THAT
  52. * LOOP WILL BE TAKEN. IF THE DATA BLOCK SAMPLE TIME IS
  53. * SET TO ZERO, THE ONLY TIME THE DATA FILE WILL BE WRITTEN
  54. * IS WHEN THE SAMPLING INTERVAL IS TERMINATED.
  55. *
  56. * ALL NUMERIC DATA SHOULD LIE WITHIN THE RANGE 0-7777B.
  57. SPACE 4,10
  58. *** *ENDCPD* WILL TERMINATE THE ACTIVE COPY OF *CPD*.
  59. SPACE 4,10
  60. *** CONTROL STATEMENT CALL.
  61. *
  62. * ENDCPD.
  63. SPACE 4,10
  64. *** DAYFILE MESSAGES.
  65. *
  66. *
  67. *
  68. * * ICPD COMPLETE.*
  69. * INFORMATIVE MESSAGE INDICATING SYSTEM MONITORING BY
  70. * *CPD* AS BEEN INITIATED.
  71. *
  72. * * ENDCPD COMPLETE.*
  73. * INFORMATIVE MESSAGE INDICATING THAT *ENDCPD* IS
  74. * FINISHED.
  75. *
  76. * * ARGUMENT ERROR.*
  77. * ARGUMENT CRACKING HAS DETECTED AN ERRONEOUS OR
  78. * UNDEFINED ARGUMENT.
  79. *
  80. * * FILE NOT FOUND.*
  81. * AN ERROR WAS ENCOUNTERED WHEN ATTEMPTING TO DEFINE THE
  82. * SAMPLE FILE, POSSIBLY BECAUSE AN INACCESSIBLE DEVICE
  83. * WAS ENCOUNTERED.
  84. *
  85. * * FORMAT ERROR IN TIME PARAMETER.*
  86. * THE VALUES SPECIFIED FOR THE LOOP OPERATION TIMES
  87. * DO NOT CONFORM TO STANDARD NUMERIC FORMAT.
  88. * (DIGITS 0 - 9 WITH OPTIONAL POST-RADIX *D* OR *B*)
  89. * DEFAULT BASE IS DECIMAL. ALL NUMERIC VALUES
  90. * SHOULD LIE WITHIN THE RANGE 0-7777B.
  91. *
  92. * * UNABLE TO ATTACH SAMPLE FILE.*
  93. * AN ERROR WAS DETECTED WHEN ATTEMPTING TO ATTACH THE
  94. * SAMPLE FILE, POSSIBLY DUE TO ENCOUNTERING AN I/O
  95. * ERROR OR AN INACCESSIBLE DEVICE.
  96. *
  97. * * UNABLE TO RETURN SAMPLE FILE.*
  98. * AN ERROR WAS DETECTED WHEN ATTEMPTING TO RETURN THE
  99. * SAMPLE FILE, POSSIBLY DUE TO ENCOUNTERING AN
  100. * INACCESSIBLE DEVICE.
  101. *
  102. * + *CPD* ALREADY ACTIVE.+
  103. * A REQUEST TO INITIALIZE *CPD* WAS ISSUED WHILE *CPD*
  104. * WAS ALREADY ACTIVE IN A PP.
  105. *
  106. * + *CPD* NOT ACTIVE.+
  107. * AN INFORMATIVE MESSAGE INDICATING THAT *ENDCPD*
  108. * WAS CALLED WHEN *CPD* WAS NOT ACTIVE.
  109. *
  110. * + *CPD* SAMPLE FILE IN USE.+
  111. * AN ERROR WAS ENCOUNTERED WHEN ATTEMPTING TO ENTER
  112. * SAMPLE AS A LOCAL FAST ATTACH FILE.
  113. SPACE 4,10
  114. * COMMON DECKS.
  115.  
  116.  
  117. *CALL COMCMAC
  118. *CALL COMCCMD
  119. *CALL COMSLFM
  120. *CALL COMSPFM
  121. *CALL COMSSFM
  122. TITLE *ICPD* PROCESSOR.
  123. ICPD SPACE 4,10
  124. ** MAIN PROGRAM.
  125.  
  126.  
  127. ORG 110B
  128.  
  129. ICPD SB1 1
  130.  
  131. * PROCESS COMMAND PARAMETERS.
  132.  
  133. SA1 ACTR
  134. SA4 ARGR ADDRESS FIRST ARGUMENT
  135. SB4 X1+ ARGUMENT COUNT
  136. SB5 TARG
  137. RJ ARG
  138. ZR X1,ICP2 IF NO ERROR
  139. ICP1 SX5 =C* ARGUMENT ERROR.*
  140. EQ ICP9 ISSUE MESSAGE AND ABORT
  141.  
  142. * CHECK FOR *CPD* ALREADY ACTIVE IN A PP.
  143.  
  144. ICP2 SYSTEM RSB,R,PPCR READ *PPCP*
  145. SYSTEM RSB,R,PPUR READ *PPUL*
  146. SA1 PPCB
  147. MX0 -12
  148. BX5 -X0*X1 FWA OF PP COMMUNICATION AREA
  149. SA2 PPUB
  150. LX2 -24
  151. BX4 -X0*X2 GET NUMBER OF PP-S
  152. LX4 3
  153. IX3 X5+X4 IR ADDRESS OF LAST PP + 1
  154. SB2 X5 CURRENT PP IR ADDRESS
  155. SB3 X3 IR ADDRESS OF LAST PP + 1
  156. SX5 =C+ *CPD* ALREADY ACTIVE.+
  157. ICP2.1 SA1 PIRR GET *RSB* REQUEST
  158. SX2 B2
  159. MX0 42
  160. LX0 18
  161. BX3 X0*X1 CLEAR OLD ADDRESS
  162. LX2 18
  163. BX6 X3+X2 PUT NEW ADDRESS IN REQUEST
  164. SA6 A1
  165. SA2 RSBB GET *RSB* BUFFER FORMAT
  166. BX6 X2
  167. SA6 PIRB SET UP FORMAT FOR *RSB*
  168. SYSTEM RSB,R,PIRR READ PP INPUT REGISTER
  169. SA1 PIRB
  170. MX0 18
  171. BX2 X0*X1 GET PP NAME
  172. LX2 18
  173. SX3 X2-3RCPD
  174. ZR X3,ICP9 IF *CPD* ACTIVE IN THIS PP
  175. SB2 B2+8
  176. LT B2,B3,ICP2.1 IF MORE PP-S TO CHECK
  177.  
  178. * IF *CPD* NOT ACTIVE, MAKE SURE DATA FILE WAS NOT LEFT ACTIVE.
  179.  
  180. SA1 F CLEAR COMPLETE BIT
  181. SX6 B1
  182. BX6 -X6*X1
  183. SA6 A1
  184. SYSTEM SFM,R,A6,SCDF*100B SET *CPD* DROP FLAG
  185.  
  186. * INITIALIZE DATA FILE.
  187.  
  188. RETURN F
  189. DEFINE F
  190. RJ CES CHECK ERROR STATUS
  191. MX0 42
  192. SX6 B1
  193. ZR X1,ICP3 IF NO ERROR - FILE DEFINED
  194. SX1 X1-/ERRMSG/FAP
  195. SX5 =C* FILE NOT FOUND.*
  196. NZ X1,ICP9 IF FILE NOT FOUND
  197. SA6 ICPA
  198. ICP3 SA1 TMDE-1 SET FILE MODE
  199. SA2 M
  200. ICP4 SA1 A1+B1 GET NEXT ENTRY
  201. ZR X1,ICP1 IF INVALID MODE SPECIFIED
  202. BX3 X1-X2
  203. BX3 X0*X3
  204. BX6 -X0*X1
  205. NZ X3,ICP4 IF NO MATCH
  206. SA6 MODE
  207. ATTACH F,,,,MODE
  208. RJ CES CHECK ERROR STATUS
  209. SX5 =C* UNABLE TO ATTACH SAMPLE FILE.*
  210. NZ X1,ICP9 IF ERROR IN FILE ATTACH
  211. SA1 ICPA
  212. ZR X1,ICP6 IF NEW FILE USED
  213. SA1 F CHECK FILE SIZE
  214. SX6 FIPBL*10000B+1
  215. MX7 42
  216. BX7 X7*X1
  217. BX6 X6+X7
  218. SA6 FBLK
  219. FILINFO FBLK
  220. SA1 FBLK+3
  221. MX7 24
  222. BX7 X7*X1
  223. ZR X7,ICP6 IF EMPTY SAMPLE FILE
  224. SKIPEI F,R
  225. WRITEF F,R
  226.  
  227. * PROCESS LOOP TIME PARAMETERS.
  228.  
  229. ICP6 SB7 B1+ SET DEFAULT BASE TO DECIMAL
  230. SA5 FW SET FIRST ARGUMENT
  231. SX6 B0+ CLEAR PARAMETER ACCUMULATOR
  232. SA6 F+5
  233. ICP7 MX0 42 CONVERT DISPLAY TO BINARY
  234. BX5 X0*X5
  235. RJ DXB
  236. ZR X4,ICP10 IF NO ERROR
  237. ICP8 SX5 =C* FORMAT ERROR IN TIME PARAMETER.*
  238. ICP9 MESSAGE X5
  239. ABORT
  240.  
  241. ICP10 MX0 -12
  242. SA1 A6 SET PARAMETER WORD
  243. BX3 X0*X6
  244. NZ X3,ICP8 IF OVERFLOW
  245. BX6 -X0*X6
  246. LX1 12
  247. BX6 X6+X1 MERGE THIS ARGUMENT
  248. SA6 A6+ RESET ARGUMENT
  249. SA5 A5+B1
  250. NZ X5,ICP7 IF TABLE NOT COMPLETED
  251.  
  252. * CALL *CPD*.
  253.  
  254. SA1 MODE MERGE MODE IN *CPD* FET
  255. SA3 F+8
  256. BX6 X1+X3
  257. SA6 A3
  258. SYSTEM SFM,R,F,ECFF*100B ENTER *CPD* SAMPLE FILE
  259. SX5 =C* CPD SAMPLE FILE IN USE.*
  260. RJ CES CHECK ERROR STATUS
  261. NZ X1,ICP9 IF SAMPLE FILE IN USE
  262. MESSAGE (=C* ICPD COMPLETE.*),3
  263. ENDRUN
  264.  
  265.  
  266. ICPA CON 0 NEW FILE FLAG
  267. FBLK BSS FIPBL FILINFO DATA BLOCK
  268. MODE CON 0 DATA FILE MODE
  269. PIRB VFD 1/1,23/0,18/1,18/0 PP INPUT REGISTER
  270. PIRR VFD 12/0,12/1,18/0,18/PIRB *RSB* REQUEST FOR PP IR
  271. PPCB VFD 1/1,23/0,18/1,18/0 FWA OF PP COMMUNICATION AREA
  272. PPCR VFD 12/0,12/1,18/PPCP,18/PPCB *RSB* REQUEST FOR *PPCP*
  273. PPUB VFD 1/1,23/0,18/1,18/0 NUMBER OF PPS
  274. PPUR VFD 12/0,12/1,18/PPUL,18/PPUB *RSB* REQUEST FOR *PPUL*
  275. RSBB VFD 1/1,23/0,18/1,18/0 *RSB* BUFFER FORMAT
  276. TITLE *ENDCPD* PROCESSOR.
  277. ENDCPD SPACE 4,10
  278. ** ENDCPD - MAIN PROGRAM.
  279.  
  280.  
  281. ENDCPD SB1 1
  282. SA1 ACTR
  283. SB4 X1
  284. ZR B4,ECP1 IF NO ARGUMENTS
  285. MESSAGE (=C* ARGUMENT ERROR.*)
  286. ABORT
  287.  
  288. ECP1 SA1 F CLEAR COMPLETE BIT
  289. SX6 B1
  290. BX6 -X6*X1
  291. SA6 A1
  292. SYSTEM SFM,R,A6,SCDF*100B SET *CPD* DROP FLAG
  293. RJ CES CHECK ERROR FLAG
  294. ZR X1,ECP2 IF NO ERROR
  295. SX1 X1-/ERR/CNF
  296. NZ X1,ECP2 IF ACTIVE COPY OF *CPD* FOUND
  297. MESSAGE (=C+ *CPD* NOT ACTIVE.+)
  298. ECP2 RETURN F,R
  299. SX5 =C* ENDCPD COMPLETE.*
  300. ECP3 MESSAGE X5,3
  301. ENDRUN
  302. TITLE SUBROUTINES.
  303. CES SPACE 4,10
  304. ** CES - CHECK FET ERROR STATUS.
  305. *
  306. * ENTRY (F) = FILE FET TO CHECK.
  307. *
  308. * EXIT (X1) = FET ERROR STATUS.
  309.  
  310.  
  311. CES SUBR ENTRY/EXIT
  312. SA1 F CHECK ERROR STATUS
  313. MX0 -8
  314. LX1 0-10
  315. BX1 -X0*X1
  316. EQ CESX RETURN
  317. TITLE DATA DEFINITIONS.
  318. SPACE 4,10
  319. * FETS/BUFFERS.
  320.  
  321.  
  322. F BSS 0
  323. SAMPLE FILEB BUF,1,FET=15D,EPR DATA FILE
  324.  
  325.  
  326. BUF EQU * DATA FILE BUFFER
  327. SPACE 4,10
  328. * ARGUMENT VALUE TABLE. (ORDER DEPENDENT)
  329.  
  330. FW DATA 0L5
  331. SL DATA 0L1000
  332. ML DATA 0L100
  333. FL DATA 0L5
  334. CON 0
  335.  
  336. M DATA 0LW SAMPLE DATA FILE MODE
  337. TARG SPACE 4,10
  338. * TARG - TABLE OF ARGUMENTS.
  339.  
  340.  
  341. TARG BSS 0
  342. FL ARG FL,FL,400B FAST LOOP TIME
  343. ML ARG ML,ML,400B MEDIUM LOOP TIME
  344. SL ARG SL,SL,400B SLOW LOOP TIME
  345. FW ARG FW,FW,400B FILE WRITE TIME
  346. FN ARG F+8,F+8,400B DATA FILE NAME
  347. M ARG M,M,400B SAMPLE DATAFILE MODE
  348. ARG END OF TABLE
  349. SPACE 4,10
  350. ** TMDE - TABLE OF FILE MODES.
  351.  
  352.  
  353. TMDE BSS 0
  354. VFD 42/0LWRITE,18/PTWR
  355. VFD 42/0LW,18/PTWR
  356. VFD 42/0LAPPEND,18/PTAP
  357. VFD 42/0LA,18/PTAP
  358. VFD 42/0LMODIFY,18/PTMD
  359. VFD 42/0LM,18/PTMD
  360. CON 0
  361. SPACE 4,10
  362. * COMMON DECKS.
  363.  
  364.  
  365. *CALL COMCARG
  366. *CALL COMCCIO
  367. *CALL COMCDXB
  368. *CALL COMCLFM
  369. *CALL COMCPFM
  370. *CALL COMCSYS
  371. SPACE 4,10
  372. USE LITERALS
  373.  
  374.  
  375. SSJ= EQU 0
  376. RFL= EQU *+10 ENSURE FWA+5 OF LAST MESSAGE .GT. FL
  377. SPACE 4
  378. END