User Tools

Site Tools


plato:source:plaopl:cmdmp

Table of Contents

CMDMP

Table Of Contents

  • [00016] CMDMP - CONTROL POINT CM DUMP (PLATO).
  • [00018] CONTROL POINT CM DUMP (PLATO).
  • [00033] LOCAL SYMBOLS / FETS / GLOBAL STORAGE.
  • [00067] PRESET.
  • [00147] MAIN LOOP.

Source Code

CMDMP.txt
  1. CMDMP
  2. * /--- FILE TYPE = E
  3. * /--- BLOCK INTRO 00 000 82/09/30 10.20
  4. IDENT CMDMP,FETS
  5. ABS
  6. SST
  7.  
  8. ENTRY CMDMP
  9. ENTRY DMP=
  10. ENTRY MFL=
  11.  
  12. *COMMENT CMDMP - CONTROL POINT CM DUMP (PLATO).
  13. COMMENT COPYRIGHT CONTROL DATA CORP. 1982.
  14.  
  15. SYSCOM B1
  16. TITLE CMDMP - CONTROL POINT CM DUMP (PLATO).
  17. SPACE 4
  18. *** CMDMP - CONTROL POINT CM DUMP (PLATO).
  19. *
  20. * E. TRUSS. PDEV. 09/28/82.
  21. SPACE 4
  22. *** CMDMP PROVIDES A FULL DUMP OF A JOBS
  23. * CENTRAL MEMORY TO A SPECIFIED FILE. IF NO
  24. * FILE IS SPECIFIED, *CMFILE* IS USED.
  25. *
  26. * THE FIRST RECORD OF THE SPECIFIED FILE IS A
  27. * HEADER RECORD CONTAINING THE NAME OF THE JOB
  28. * WHICH CALLED THE DUMP PROGRAM AND THE DATE
  29. * AND TIME OF THE DUMP. THE REMAINDER OF THE
  30. * FILE IS A SERIES OF 1000B-WORD RECORDS WHICH
  31. * CONTAIN THE CM DUMP AND IS TERMINATED BY AN
  32. * END-OF-FILE.
  33. TITLE LOCAL SYMBOLS / FETS / GLOBAL STORAGE.
  34. * LOCAL SYMBOLS.
  35.  
  36.  
  37. FBUFL EQU 1001B USER FILE BUFFER SIZE
  38. DBUFL EQU 401B SYSTEM DUMP FILE BUFFER SIZE
  39. SPACE 4
  40. * COMMON DECKS.
  41.  
  42.  
  43. *CALL,COMCMAC
  44. SPACE 4
  45. * FETS.
  46.  
  47. ORG 120B
  48. FETS BSS 0
  49.  
  50.  
  51. CMFILE FILEB FBUF,FBUFL,(FET=8)
  52.  
  53. D RFILEB DBUF,DBUFL
  54.  
  55. DD EQU *
  56. ORG D
  57. VFD 42/3LDM*,18/3
  58. ORG DD
  59.  
  60. SPACE 4
  61. * GLOBAL STORAGE.
  62.  
  63. DL BSS 1 BLOCKS TO READ FROM DUMP FILE
  64. DA BSS 1 DUMP ADDRESS (0 = FILE-ONLY)
  65. CL BSS 1 BLOCKS TO READ FROM MEMORY
  66. * /--- BLOCK PRESET 00 000 82/09/29 15.06
  67. TITLE PRESET.
  68. * PRESET USER FILE NAME.
  69.  
  70. CMDMP SB1 1
  71. SA1 ARGR
  72. MX6 42
  73. BX6 X6*X1
  74. ZR X6,CMD1
  75. SX1 B1
  76. BX6 X6+X1
  77. SA6 CMFILE
  78.  
  79. * OPEN AND POSITION OUTPUT FILE.
  80.  
  81. CMD1 OPEN CMFILE,WRITE,R
  82. RECALL CMFILE
  83. REWIND CMFILE
  84. RECALL CMFILE
  85.  
  86. * WRITE HEADER RECORD
  87.  
  88. GETJN FBUF SET JOB NAME IN HEADER
  89. DATE FBUF+1 SET DATE IN HEADER
  90. CLOCK FBUF+2 SET TIME IN HEADER
  91. SX6 FBUF+3 SET IN POINTER
  92. SA6 CMFILE+2
  93. SX6 FBUF SET OUT POINTER
  94. SA6 A6+B1
  95. WRITER CMFILE,R WRITE HEADER
  96. RECALL CMFILE
  97.  
  98. * SET UP DUMP FILE.
  99.  
  100. OPEN D,READ,R
  101. RECALL D
  102. SA1 D+6 SET FILE RANDOM INDEX
  103. MX6 42
  104. BX6 X6*X1
  105. SX1 1 SKIP SYSTEM SECTOR
  106. BX6 X6+X1
  107. SA6 A1
  108. READ D,R START INPUT
  109. RECALL D
  110. .OSL IFGE "MODLEVEL",552D
  111. SA1 DBUF+FLSW GET JOBS FIELD LENGTH
  112. .OSL ELSE
  113. SA1 DBUF+STSW GET JOBS FIELD LENGTH
  114. .OSL ENDIF
  115. MX6 -12
  116. BX6 -X6*X1
  117. LX6 6
  118. SA0 X6
  119. SX6 DBUF+200B SKIP CP AREA IN DUMP
  120. SA6 D+3
  121.  
  122. * SET BLOCKS TO READ FROM DUMP FILE (DUMPS MEMORY
  123. * OVERWRITTEN BY THIS PROGRAM).
  124.  
  125. SX1 A0 GET FL
  126. SX1 X1+FBUFL-1
  127. AX1 9 (IN BLOCKS)
  128. SX6 CMDL LENGTH OF PROGRAM
  129. SX6 X6+FBUFL-2
  130. AX6 9
  131. IX2 X1-X6
  132. SX3 X2-1
  133. PL X3,CMD2 IF FL .GE. PROGRAM LENGTH
  134. SX6 X1-1
  135. SA6 DL SET DUMP FILE LENGTH
  136. MX6 0
  137. SA6 CL SET MEMORY DUMP LENGTH
  138. SA6 DA FLAG ALL MEMORY IN FILE
  139. EQ MAIN
  140.  
  141. CMD2 SA6 DL SET DUMP FILE LENGTH
  142. LX6 9 SET MEMORY DUMP ADDRESS
  143. SA6 DA
  144. SX6 X2-1
  145. SA6 CL SET MEMORY DUMP LENGTH
  146. * /--- BLOCK MAIN 00 000 82/09/29 15.07
  147. TITLE MAIN LOOP.
  148. * READ BLOCKS FROM DUMP FILE AND WRITE TO USER FILE
  149. * UNTIL THE MEMORY OVERWRITTEN BY THIS PROGRAM
  150. * IS DUMPED.
  151.  
  152. MAIN SA1 DL DECREMENT BLOCK COUNT
  153. SX6 X1-1
  154. SA6 A1
  155. NG X6,MAIN1 IF DONE WITH FILE BLOCKS
  156.  
  157. SA1 CMFILE+1 RESET BUFFER POINTERS
  158. SX6 X1+FBUFL-1
  159. SA6 A1+B1 SET IN
  160. SX6 X1
  161. SA6 A6+B1 SET OUT
  162.  
  163. READW D,FBUF,FBUFL-1
  164.  
  165. WRITER CMFILE,R WRITE TO USER FILE
  166. RECALL CMFILE
  167. EQ MAIN
  168.  
  169. * SET BUFFER POINTERS FOR USER FILE FET INTO JOBS
  170. * MEMORY SO WE DON'7T NEED TO MOVE THE DATA INTO
  171. * THE NORMAL CIO BUFFER. WRITE REMAINDER OF JOBS
  172. * CM TO THE USER FILE.
  173.  
  174. MAIN1 SA1 CL DECREMENT BLOCK COUNT
  175. SX6 X1-1
  176. SA6 A1
  177. NG X6,MAIN2 IF NO CM BLOCKS
  178. ZR X6,MAIN1A IF ON LAST FULL BLOCK
  179.  
  180. SA1 CMFILE+1 RESET BUFFER POINTERS
  181. MX6 42
  182. BX6 X6*X1
  183. SA2 DA
  184. BX6 X6+X2
  185. SA6 A1 SET FIRST
  186. SX7 X2+FBUFL-1
  187. SA7 A6+B1 SET IN
  188. SA6 A7+B1 SET OUT
  189. SX6 X6+FBUFL
  190. SA6 A6+B1 SET LIMIT
  191. SX6 FBUFL-1 INCREMENT DUMP ADDRESS
  192. IX6 X2+X6
  193. SA6 A2
  194.  
  195. WRITER CMFILE,R WRITE TO USER FILE
  196. RECALL CMFILE
  197. EQ MAIN1
  198.  
  199. * MOVE THE LAST FULL BLOCK INTO THE USER FILE BUFFER
  200. * TO AVOID SETTING THE CIO POINTERS OUT OF RANGE ON
  201. * JOBS WHOSE FL IS AN EVEN MULTIPLE OF 10000B (IN
  202. * THIS CASE, ON THE LAST FULL BLOCK, *LIMIT* WILL
  203. * BE SET TO *FL+1*).
  204.  
  205. MAIN1A SB2 FBUFL-2
  206. SA1 DA BEGINNING OF LAST FULL BLOCK
  207. SB3 X1
  208. NZ X1,MAIN1B IF BLOCK IN CM
  209.  
  210. READW D,FBUF,FBUFL-1 READ WORDS FROM FILE
  211. EQ MAIN1C
  212.  
  213. MAIN1B SA1 B3+B2
  214. BX6 X1
  215. SA6 FBUF+B2
  216. SB2 B2-B1
  217. PL B2,MAIN1B
  218.  
  219. MAIN1C SA1 CMFILE+1 RESET BUFFER POINTERS
  220. MX6 42
  221. BX6 X6*X1
  222. SX1 FBUF
  223. BX6 X6+X1
  224. SA6 A1 SET FIRST
  225. SX6 X1+FBUFL-1
  226. SA6 A1+B1 SET IN
  227. SX6 X1
  228. SA6 A6+B1 SET OUT
  229. SX6 X1+FBUFL
  230. SA6 A6+B1 SET LIMIT
  231. SA1 DA INCREMENT DUMP ADDRESS
  232. SX6 FBUFL-1
  233. IX6 X1+X6
  234. SA6 A1
  235.  
  236. WRITER CMFILE,R
  237. RECALL CMFILE
  238. * /--- BLOCK MAIN 00 000 82/09/30 10.20
  239.  
  240. * ZERO THE USER FILE BUFFER, MOVE THE LAST (PARTIAL)
  241. * BLOCK INTO IT AND WRITE TO THE USER FILE.
  242.  
  243. MAIN2 MX6 0
  244. SB2 FBUFL-1
  245.  
  246. MAIN3 SA6 FBUF+B2
  247. SB2 B2-B1
  248. PL B2,MAIN3
  249.  
  250. SX1 A0 GET LENGTH TO MOVE
  251. MX2 -9
  252. BX1 -X2*X1
  253. ZR X1,MAIN5 IF NO PARTIAL BLOCK
  254. SB2 X1-1
  255. SA1 DA BEGINNING OF PARTIAL BLOCK
  256. SB3 X1
  257. NZ X1,MAIN4 IF PARTIAL BLOCK IN CM
  258.  
  259. READW D,FBUF,B2+B1 READ WORDS FROM FILE
  260. EQ MAIN4A
  261.  
  262. MAIN4 SA1 B3+B2
  263. BX6 X1
  264. SA6 FBUF+B2
  265. SB2 B2-B1
  266. PL B2,MAIN4
  267.  
  268. MAIN4A SA1 CMFILE+1 RESET BUFFER POINTERS
  269. MX6 42
  270. BX6 X6*X1
  271. SX1 FBUF
  272. BX6 X6+X1
  273. SA6 A1 SET FIRST
  274. SX6 X1+FBUFL-1
  275. SA6 A1+B1 SET IN
  276. SX6 X1
  277. SA6 A6+B1 SET OUT
  278. SX6 X1+FBUFL
  279. SA6 A6+B1 SET LIMIT
  280.  
  281. WRITER CMFILE,R
  282. RECALL CMFILE
  283.  
  284. MAIN5 WRITEF CMFILE
  285. RECALL CMFILE
  286. ENDRUN
  287. SPACE 4
  288. * COMMON DECKS.
  289.  
  290.  
  291. *CALL COMCSYS
  292. *CALL COMCCIO
  293. *CALL COMCCPM
  294. *CALL COMCRDW
  295. * /--- BLOCK BUFFERS 00 000 82/09/28 13.50
  296. BUFFS TITLE BUFFERS.
  297. * BUFFERS.
  298.  
  299. BUFFERS BSS 0
  300. USE //
  301. SEG
  302.  
  303.  
  304. DBUF BSS DBUFL DM* FILE BUFFER
  305. FBUF BSS FBUFL USER FILE BUFFER
  306. BSS 10B ALLOW FOR *COMCRDW* READ AHEAD
  307.  
  308. IDENT
  309. *
  310. * ALL FOLLOWING COMPUTATIONS MUST BE ROUNDED
  311. * TO NEAREST 1000B SO CORRECT NUMBER OF BLOCKS
  312. * OF CM WILL BE WRITTEN TO DUMP FILE.
  313. *
  314. .1 SET *+777B
  315. DMP= EQU .1/1000B*10B+10000B
  316. CMDL EQU .1/1000B*1000B END OF MEMORY IN FILE
  317. MFL= EQU CMDL
  318.  
  319.  
  320. END
plato/source/plaopl/cmdmp.txt ยท Last modified: 2023/08/05 18:54 by Site Administrator