User Tools

Site Tools


cdc:nos2.source:nam5871:listppm

LISTPPM

Table Of Contents

  • [00008] LIST PERIPHERAL PROCESSOR MEMORY DUMP
  • [00199] PRS - PROCESS CONTROL CARD ARGUMENTS
  • [00283] FPD - FORMAT PPU DUMP.
  • [00438] SOC - STRING OUT CHARACTERS.

Source Code

LISTPPM.txt
  1. *DECK LISTPPM
  2. IDENT LISTPPM
  3. SST
  4. SYSCOM B1
  5. B1=1
  6. COMMENT LISTPPM - LIST PERIPHERAL PROCESSOR MEMORY DUMP.
  7. SPACE 3
  8. *** LISTPPM - LIST PERIPHERAL PROCESSOR MEMORY DUMP
  9. *
  10. * J.C. LEE CDC - SVLOPS 80/04/15
  11. *
  12. * ADAPTED FROM DSDI (EXPRESS DEADSTART DUMP INTERPRETER).
  13. SPACE 3
  14. *** LISTPPM IS A CONTROL CARD CALLABLE UTILITY WHICH
  15. * PRODUCES LISTABLE OUTPUT FROM A PIP - PPU MEMORY DUMP FILE.
  16. * THE PPU MEMORY DUMP FILE ZZZZZPP WAS CREATED BY NIP DURING
  17. * NIP-S REPRIEVE PROCESSING WHEN IT DETECTED THE NPU DRIVER,
  18. * PIP HAD DUMPED ITS MEMORY CONTENTS FOR SUBSEQUENT DEBUGGING.
  19. * THE PPU MEMORY DUMP FILE MUST EXIST AS A LOCAL FILE WHEN
  20. * LISTPPM IS CALLED.
  21. *
  22. * FORMAT OF THE PROGRAM CALL CARD
  23. * -------------------------------
  24. *
  25. * LISTPPM [,P1] [,P2].
  26. *
  27. * WHERE PI IS A KEYWORD EQUATED TO A VALUE, IT CAN BE ONE OF
  28. * THE FOLLOWING:
  29. *
  30. * B = LFNB, LFNB IS THE LOCAL FILE NAME OF THE PIP
  31. * MEMORY DUMP FILE.
  32. * OMITTED, ZZZZZPP IS THE LOCAL FILE NAME OF THE PIP
  33. * MEMORY DUMP FILE.
  34. *
  35. * L = LFNO, OUTPUT IS PLACED ON FILE LFNO.
  36. * OMITTED, OUTPUT IS PLACED ON FILE OUTPUT.
  37. *
  38. SPACE 3
  39. *** DAYFILE MESSAGES ISSUED -
  40. *
  41. * * LISTPPM - INVALID DUMP FILE.*
  42. * * LISTPPM - ARGUMENT ERROR.*
  43. * * LISTPPM COMPLETE.*
  44. *
  45. OPL XTEXT COMCWOD
  46. LIST F
  47. ENTRY LISTPPM
  48. EJECT
  49.  
  50. * LOCAL SYMBOLS
  51.  
  52. DBUFL EQU 2001B DUMP FILE BUFFER LENGTH
  53. OBUFL EQU 2001B OUTPUT FILE BUFFER LENGTH
  54. *CALL LPMCOM
  55.  
  56. * FETS
  57.  
  58. D BSS 0 DUMP FILE
  59. ZZZZZPP FILEB DBUF,DBUFL,FET=6
  60.  
  61. O BSS 0 OUTPUT FILE
  62. OUTPUT FILEB OBUF,OBUFL,FET=6
  63.  
  64. * LOCAL VARIABLES
  65.  
  66. PPORD DATA 1
  67. NUMAPIP BSSZ 1 NUMBER OF PIP DUMP IN ZZZZZPP
  68.  
  69. * DUMP FILE HEADER
  70.  
  71. PDRHDR BSS 0
  72. PDHDR BSSZ PDFHDRL
  73.  
  74. * OUTPUT FILE HEADER
  75.  
  76. OHDR BSS 0
  77. DATA 10H1
  78. CON 0
  79. DUP 4,2
  80. DATA 10H-
  81. CON 0
  82. DATA 10H
  83. DATA 10HPIP DUMPS
  84. CON 0
  85. DATA 10H-
  86. CON 0
  87. DATA 10H
  88. DATA 10HDATE -
  89. OHDATE CON 0 DATE OF DUMP TAKEN IN DC
  90. CON 0
  91. DATA 10H0
  92. CON 0
  93. DATA 10H
  94. DATA 10HTIME -
  95. OHTIME CON 0 TIME OF DUMP TAKEN IN DC
  96. CON 0
  97. OHDRL EQU *-OHDR
  98.  
  99. * PIP DUMP RECORD HEADER
  100.  
  101. PPHDR DATA 10H1
  102. CON 0
  103. DATA 10H0
  104. CON 0
  105. DUP 5,1
  106. DATA 10H
  107. DATA 10HDUMP OF PI
  108. PIPO DATA 10HP NUMBER N
  109. CON 0
  110. DATA 10H0
  111. CON 0
  112. PPHDRL EQU *-PPHDR
  113. EJECT
  114. * MAIN PROGRAM
  115.  
  116. LISTPPM BSS 0
  117. SB1 1
  118. RJ PRS PROCESS CONTROL CARD ARGUMENTS
  119. *
  120. REWIND D,R REWIND DUMP FILE
  121. *
  122. READ D,R READ FIRST RECORD OF DUMP FILE
  123. *
  124. READW D,PDHDR,PDFHDRL READ DUMP FILE HEADER
  125. ZR X1,LPM1 JIF NOT EOR/EOF
  126. *
  127. LPM0 BSS 0
  128. SA0 =C* LISTPPM - INVALID DUMP FILE.*
  129. EQ LPM5 TERMINATE OUTPUT
  130. *
  131. LPM1 BSS 0 VALIDATE DUMP FILE HEADER
  132. SA1 PDHDR
  133. MX0 54
  134. BX6 -X0*X1
  135. SA6 NUMAPIP SAVE NUMBER OF PIP DUMP
  136. ZR X6,LPM4 NO PIP ACTIVE IN DUMP FILE
  137. BX1 X0*X1 PUT BLANK INTO X1
  138. SX2 55B
  139. BX1 X1+X2
  140. SA2 PDFHDR
  141. BX3 X1-X2
  142. NZ X3,LPM0 JIF A VALID FILE HEADER
  143. *
  144. SA1 A1+B1 (X1) = DATE OF DUMP IN DC
  145. BX6 X1
  146. SA6 OHDATE
  147. SA1 A1+B1 (X1) = TIME OF DUMP TAKEN IN DC
  148. BX6 X1
  149. SA6 OHTIME
  150. *
  151. WRITEW O,OHDR,OHDRL WRITE OUTPUT FILE HEADER
  152. *
  153. LPM2 BSS 0 PROCESS PIP DUMP RECORD
  154. READW D,PDRHDR,PDRHDRL
  155. NZ X1,LPM0 JIF EOR/EOF REACHED
  156. *
  157. SA1 PDRHDR PIP DUMP RECORD HEADER WORD
  158. LX1 6
  159. MX0 54
  160. BX2 -X0*X1
  161. SX3 X2-PDRID
  162. NZ X3,LPM3 JIF NO PIP DUMP IN CURRENT RECORD
  163. *
  164. SA1 PPORD PIP NUMBER
  165. SX6 X1+33B
  166. SA1 PIPO
  167. BX6 -X0*X6
  168. BX1 X0*X1
  169. BX6 X1+X6
  170. SA6 A1 SET PIP NUMBER IN DUMP RECORD HEADER
  171. WRITEW O,PPHDR,PPHDRL WRITE HEADER TO OUTPUT FILE
  172. *
  173. RJ FPD FORMAT PPU DUMP
  174. *
  175. SA4 NUMAPIP
  176. SX6 X4-1 ONE ACTIVE PIP IS PROCESSED
  177. ZR X6,LPM4 NO MORE TO PROCESS
  178. SA6 X4 STILL SOME PIP TO BE PROCESSED
  179.  
  180. LPM3 BSS 0
  181. SA1 PPORD ORDINAL OF NEXT PIP
  182. SX6 X1+B1
  183. SA6 A1 UPDATE NEXT PIP NUMBER
  184. SA1 B1+D
  185. SX6 X1
  186. SA6 A1+B1
  187. SA6 A6+B1 FIRST=IN=OUT
  188. *
  189. READ D,R READ NEXT DUMP FILE RECORD
  190. EQ LPM2 CONTINUE
  191. *
  192. LPM4 BSS 0
  193. SA0 =C* LISTPPM COMPLETE.*
  194. LPM5 BSS 0
  195. MESSAGE A0,7,R DAYFILE MESSAGE
  196. WRITER O,R END OUTPUT FILE
  197. ENDRUN
  198. EJECT
  199. ** PRS - PROCESS CONTROL CARD ARGUMENTS
  200. *
  201. * ENTRY NONE
  202. *
  203. * EXIT NONE
  204. *
  205. * CALLS LAP, BAP
  206. SPACE 2
  207. PRS BSSZ 1 ENTRY/EXIT
  208. SA1 ACTR
  209. SX7 X1 (X7) = ARGUMENT COUNT
  210. ZR X7,PRS RETURN IF NO ARGUMENTS SPECIFIED
  211. *
  212. SA1 ARGR (X1) = FIRST ARGUMENT
  213. MX0 42
  214. *
  215. PRS1 BSS 0
  216. BX2 X0*X1 (X2) = ARGUMENT KEYWORD
  217. SA3 ARGTAB (A3) = FWA OF ARGUMENT TABLE
  218. *
  219. PRS2 BSS 0 SCAN ARGUMENT TABLE
  220. ZR X3,PRS4 UNKNOWN KEYWORD, DAYFILE ERROR
  221. *
  222. BX4 X0*X3 VALID KEYWORD IN ARGUMENT TABLE
  223. BX5 -X0*X3 ARGUMENT PROCESSOR ADDRESS
  224. SB5 X5
  225. SA3 A3+B1 (X3) = NEXT ENTRY IN ARGUMENT TABLE
  226. BX5 X4-X2
  227. NZ X5,PRS2 CONTINUE TABLE SCAN IF NO MATCH
  228. *
  229. PRS3 JP B5 PROCESS ARGUMENT
  230. *
  231. PRS4 SA0 =C* LISTPPM - ARGUMENT ERROR.*
  232. EQ LPM5 DAYFILE ERROR
  233. *
  234. PRS5 BSS 0
  235. SX7 X7-1 DECREMENT ARGUMENT COUNT
  236. ZR X7,PRS RETURN IF ALL ARGUMENT PROCESSED
  237. *
  238. SA1 A1+B1 PROCESS NEXT ARGUMENT
  239. EQ PRS1
  240. SPACE 3
  241. ** ARGUMENT TABLE
  242. SPACE 2
  243. ARGTAB BSS 0
  244. VFD 42/0LB,18/BAP DUMP FILE ARGUMENT
  245. VFD 42/0LL,18/LAP OUTPUT FILE ARGUMENT
  246. CON 0
  247. EJECT
  248. * DUMP FILE ARGUMENT PROCESSOR
  249. SPACE 2
  250. BAP BSS 0
  251. BX2 -X0*X1 (X2) = SEPARATOR
  252. SX2 X2-2
  253. NZ X2,PRS4 ERROR IF NOT AN EQUIVALENCE
  254. *
  255. SX7 X7-1 DECREMENT ARGUMENT COUNT
  256. ZR X7,PRS4 ERROR, MORE ARGUMEN0 SHOULD FOLLOW
  257. *
  258. SA1 A1+B1 SECOND WORD OF ARGUMENT
  259. SA5 D
  260. BX6 X0*X1 ARGUMENT VALUE
  261. BX5 -X0*X5
  262. BX6 X5+X6
  263. SA6 A5 UPDATE PIP DUMP FILE NAME
  264. EQ PRS5
  265. SPACE 4
  266. * OUTPUT FILE ARGUMENT PROCESSOR
  267. SPACE 2
  268. LAP BSS 0
  269. BX2 -X0*X1 (X2) = SEPARATOR
  270. SX2 X2-2
  271. NZ X2,PRS4 ERROR IF NOT AN EQUIVALENCE
  272. *
  273. SX7 X7-1 DECREMENT ARGUMENT COUNT
  274. ZR X7,PRS4 ERROR, MORE ARGUMENT SHOULD FOLLOW
  275. SA1 A1+B1 SECOND WORD OF ARGUMENT
  276. SA5 O
  277. BX6 X0*X1 ARGUMENT VALUE
  278. BX5 -X0*X5
  279. BX6 X5+X6
  280. SA6 A5 UPDATE OUTPUT FILE NAME
  281. EQ PRS5
  282. EJECT
  283. ** FPD - FORMAT PPU DUMP.
  284. *
  285. * ENTRY (HDR)= PPU HEADER WORD.
  286. *
  287. * EXIT NONE.
  288. *
  289. * USES B - 2,6,7.
  290. * A - 0,1,3,4,6,7.
  291. * X - ALL.
  292. *
  293. * CALLS WTW=,RDW=,WOD,WTS=,SFN,SOC.
  294.  
  295.  
  296.  
  297. FPD SUBR ENTRY/EXIT
  298. READW D,FPDC,1 START FIRST WORD CONVERSION.
  299. SB6 FPDC+1
  300. SX5 PBUF INITIALIZE PPU MEMORY BUFFER
  301.  
  302. * STORE PPU MEMORY CONVERTED TO DISPLAY CODE.
  303. * PUT OCTAL DISPLAY IN UPPER 24 BITS, BINARY IN LOW 12 BITS.
  304.  
  305. FPD1 SA1 B6-B1 CONVERT 5 BYTES
  306. SB2 X5
  307. RJ WOD
  308. SA4 A1 GET ORIGINAL WORD AGAIN
  309. MX0 4*6
  310. BX1 X6
  311. MX3 12
  312. BX6 X0*X6 WORD 1
  313. LX1 4*6
  314. BX5 X3*X4 GET BINARY
  315. LX5 12
  316. IX6 X6+X5
  317. LX4 12
  318. SA6 B2
  319. BX2 X7
  320. BX6 X0*X1 WORD 2
  321. LX1 4*6
  322. BX5 X3*X4 GET BINARY
  323. LX5 12
  324. IX6 X6+X5
  325. LX4 12
  326. SA6 A6+B1
  327. BX7 X3*X1 TOP OF WORD 3
  328. BX6 X3*X2 BOTTOM OF WORD 3
  329. LX2 2*6
  330. LX6 -12
  331. BX7 X7+X6
  332. BX6 X0*X2 WORD 4
  333. BX5 X3*X4 GET BINARY
  334. LX5 12
  335. IX7 X7+X5
  336. LX4 12
  337. SA7 A6+B1
  338. LX2 4*6
  339. BX5 X3*X4 GET BINARY
  340. LX5 12
  341. IX6 X6+X5
  342. LX4 12
  343. SA6 A7+B1
  344. BX7 X0*X2 WORD 5
  345. BX5 X3*X4
  346. LX5 12
  347. IX7 X7+X5
  348. SA7 A6+1
  349. SX5 B2+5 ADVANCE BUFFER ADDRESS
  350. READW D,FPDC,1
  351. ZR X1,FPD1 IF NOT EOR
  352.  
  353. SA1 STAR
  354. BX7 X1
  355. SB2 A7-DBUF+2
  356. FPD1A SA7 A7+B1
  357. SB2 B2+B1 USE ASTERISK FILL FOR REMAINDER OF BUFFER
  358. NG B2,FPD1A
  359.  
  360. *
  361. * LIST PPU
  362. *
  363. SA0 B0 PPU BYTE ADDRESS COUNTER
  364. FPD2A BSS 0
  365. SA6 ALIN-1 INITIATE LINE CHAR. STRING POINTER
  366. SB2 B0 HALF LINE AND END OF LINE INDICATOR
  367. SA7 FPDBF-1 INI. BUFFER FOR DISPLAY CODE
  368. SA1 =6L PPU LIST * PPU *
  369. RJ SOC
  370. *
  371. FPD2B BSS 0
  372. SB3 10B HALF LINE PPU BYTE COUNTER
  373. *
  374. SX1 A0
  375. RJ WOD PPU ADDRESS FOR DISPLAY CODE
  376. MX0 4*6
  377. LX7 -4*6
  378. BX1 X0*X7
  379. RJ SOC
  380.  
  381. SA1 =2L
  382. RJ SOC 2 SPACES
  383.  
  384. * STRING OUT 8 PPU BYTES.
  385.  
  386. FPD2C SA1 =1L
  387. RJ SOC 1 SPACE
  388.  
  389. SA1 A0+PBUF ONE BYTE
  390. MX0 4*6
  391. BX7 -X0*X1 GET BINARY INFO.
  392. BX1 X0*X1 CLEAR BINARY INFO.
  393. SA2 =4L0000
  394. SA7 A7+B1
  395. IX3 X2-X1
  396. NZ X3,FPD2E IF NOT A ZERO BYTE
  397. SA1 =4L----
  398. FPD2E RJ SOC
  399. SB3 B3-B1
  400. SA0 A0+B1
  401. NZ B3,FPD2C IF NOT DONE
  402. SA1 =3L
  403. RJ SOC 3 SPACES
  404. *
  405. NE B2,B0,FPD3 IF A FULL LINE HAS FORMATED
  406. SB2 B1
  407. EQ FPD2B OTHERWISE, BACK FOR THE SECOND HALF
  408.  
  409. FPD3 SB3 0 INIT. DISPLAY BUFFER INDEX
  410. FPD3B SA1 FPDBF+B3 GET NEXT BYTE
  411. MX0 9*6
  412. BX2 X0*X1
  413. NZ X2,FPD3E IF LEFT CHARACTER PRESENT
  414. SX1 X1+5500B ADD IN BLANK
  415. FPD3E BX2 -X0*X1
  416. NZ X2,FPD3F IF RIGHT CHARACTER PRESENT
  417. SX1 X1+1R ADD IN BLANK
  418. FPD3F LX1 8*6
  419. RJ SOC
  420. SB3 B3+B1
  421. SB2 B3-16
  422. MI B2,FPD3B IF NOT DONE WITH LINE
  423. *
  424. * LIST ONE LINE
  425. *
  426. WRITES O,ALIN,A6-ALIN+1
  427. SB2 A0-7777B
  428. LT B2,B0,FPD2A IF NOT ALL LISTED YET
  429. *
  430. EQ FPDX RETURN
  431.  
  432. STAR VFD 60/4L****
  433. SPACE 3
  434. FPDC CON 0
  435. BSSZ 1
  436. FPDBF BSSZ 16
  437. EJECT
  438. ** SOC - STRING OUT CHARACTERS.
  439. * STOP AT 00 CHARACTER OR END OF WORD.
  440. *
  441. * ENTRY (A6)= ADDRESS OF DESTINATION - 1.
  442. * (X1)= CHARACTERS TO STRING OUT.
  443. *
  444. * EXIT (A6)= LWA OF STRUNG OUT CHARACTERS.
  445. *
  446. * USES B - NONE.
  447. * A - 6.
  448. * X - 1,6,7.
  449. *
  450. * CALLS NONE.
  451.  
  452.  
  453. SOC SUBR ENTRY/EXIT
  454. SX7 77B CHARACTER MASK
  455. SOC1 LX1 6 ADVANCE CHARACTER
  456. BX6 X7*X1 EXTRACT CHARACTER
  457. ZR X6,SOCX RETURN - IF END OF STRING
  458. BX1 X1-X6 REMOVE CHARACTER
  459. SA6 A6+B1 STORE CHARACTER
  460. EQ SOC1 LOOP TO END OF STRING
  461. EJECT
  462. * BUFFERS
  463.  
  464. PBUF BSS 0 PPU BUFFER
  465. DBUF EQU PBUF+4095+5 DUMP FILE BUFFER
  466. OBUF EQU DBUF+DBUFL OUTPUT FILE BUFFER
  467. ALIN EQU OBUF+OBUFL+1 PPU DUMP LINE STRING BUFFER
  468. RFL= EQU ALIN+137 END OF MEMORY USED
  469. ORG RFL=
  470. END LISTPPM
cdc/nos2.source/nam5871/listppm.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator