Table of Contents

FSELIB

Table Of Contents

  • [00004] GETUTAB - GET USER TABLE.
  • [00037] GETUTAB - GET USER TABLE.
  • [00100] SAVUTAB - SAVE USER TABLE ENTRY.
  • [00136] SAVUTAB - SAVE USER TABLE ENTRY.
  • [00218] FINDBIT - FIND BIT ON IN SMFEX BITMAP.
  • [00246] FINDBIT - FIND BIT ON IN SMFEX BITMAP.
  • [00303] SPREAD - SPREAD RETURN JUMP WORDS TO ENTRIES.
  • [00330] SPREAD - SPREAD RETURN JUMP WORDS TO ENTRIES.
  • [00377] GATHER - GATHER RETURN JUMP WORDS FROM ENTRIES.
  • [00409] GATHER - GATHER RETURN JUMP WORDS FROM ENTRIES.
  • [00471] READECS - READ EXTENDED MEMORY BLOCK.
  • [00497] READECS - READ EXTENDED MEMORY BLOCK.
  • [00542] WRITECS - WRITE EXTENDED MEMORY BLOCK.
  • [00568] WRITECS - WRITE EXTENDED MEMORY BLOCK.
  • [00613] FLDLEN - CHANGE FIELD LENGTH.
  • [00631] FLDLEN - CHANGE FIELD LENGTH.
  • [00649] TESTECS - TEST FOR ECS AVAILABILITY.
  • [00669] TESTECS - TEST FOR ECS AVAILABILITY.
  • [00700] FLDLENE - CHANGE ECS FIELD LENGTH.
  • [00718] FLDLENE - CHANGE ECS FIELD LENGTH.
  • [00741] LINESZ - MEASURE LINE SIZE AND REPAIR.
  • [00780] LINESZ - MEASURE LINE SIZE AND REPAIR.
  • [00859] LENGTH - COUNT CHARACTERS IN LINE.
  • [00900] LENGTH - COUNT CHARACTERS IN LINE.
  • [00974] NOSWDSZ - MEASURE ZERO BYTE TERMINATOR.
  • [00997] NOSWDSZ - MEASURE ZERO BYTE TERMINATOR.
  • [01049] MOVELN - MOVE AND MEASURE INTERNAL LINE.
  • [01079] MOVELN - MOVE AND MEASURE INTERNAL LINE.
  • [01156] FASTCNI - CONVERT NORMAL INPUT.
  • [01185] FASTCNI - CONVERT NORMAL INPUT.
  • [01268] FASTCNO - CONVERT NORMAL OUTPUT.
  • [01296] FASTCNO - CONVERT NORMAL OUTPUT.
  • [01379] FASTCAI - CONVERT ASCII INPUT.
  • [01416] FASTCAI - CONVERT ASCII INPUT.
  • [01580] FASTCAO - CONVERT ASCII OUTPUT.
  • [01608] FASTCAO - CONVERT ASCII OUTPUT.
  • [01757] FASTFND - FIND STRING IN LINE.
  • [01793] FASTFND - FIND STRING IN LINE.
  • [01935] FASTRLC - RELOCATE VALUES IN VECTOR.
  • [01958] FASTRLC - RELOCATE VALUES IN VECTOR.
  • [01997] MOVEWD - MOVE WORDS.
  • [02017] MOVEWD - MOVE WORDS.
  • [02140] ZEROWD - ZERO WORDS.
  • [02159] ZEROWD - ZERO WORDS.
  • [02182] FIXCTL - FIX CONTROL BYTES.
  • [02203] FIXCTL - FIX CONTROL BYTES.
  • [02284] FASTLNB - IDENTIFY LAST NON BLANK.
  • [02309] FASTLNB - IDENTIFY LAST NON BLANK.
  • [02404] EXCHWD - EXCHANGE BLOCKS OF WRODS.
  • [02424] EXCHWD - EXCHANGE BLOCKS OF WRODS.
  • [02470] SFMSSTF - USE SFM TO ENABLE SUBSYSTEM.
  • [02492] SFMSSTF - USE SFM TO ENABLE SUBSYSTEM.
  • [02509] SFMCSTF - USE SFM TO DISABLE SUBSYSTEM.
  • [02531] SFMCSTF - USE SFM TO DISABLE SUBSYSTEM.
  • [02550] SETNAD - SET NO AUTO DROP FLAG.
  • [02569] SETNAD - SET NO AUTO DROP FLAG.
  • [02588] SETAUC - COMPUTE AND SET APPLICATION UNIT CHARGE.
  • [02614] SETAUC - COMPUTE AND SET APPLICATION UNIT CHARGE.
  • [02695] ONSW - SET SENSE SWITCHES.
  • [02711] ONSW - SET SENSE SWITCHES.
  • [02731] DISSJ - DISABLE/ENABLE SSJ=.
  • [02754] DISSJ - DISABLE/ENABLE SSJ=.
  • [02775] SETRFLE - SET RFL FOR EXTENDED MEMORY.
  • [02791] SETRFLE - SET RFL FOR EXTENDED MEMORY.
  • [02811] GETFLCE - DETERMINE EXTENDED MEMORY FIELD LENGTH.
  • [02827] GETFLCE - DETERMINE EXTENDED MEMORY FIELD LENGTH.
  • [02844] PROTEON - PROTECT EXTENDED MEMORY FIELD LENGTH.
  • [02860] PROTEON - PROTECT EXTENDED MEMORY FIELD LENGTH.
  • [02877] GETFNT - ACCESS LOCAL FNT-S.
  • [02893] GETFNT - ACCESS LOCAL FNT-S.
  • [02912] FILINFO - ACCESS FILE INFORMATION.
  • [02928] FILINFO - ACCESS FILE INFORMATION.
  • [02947] GETJO - GET JOB ORIGIN.
  • [02963] GETJO - GET JOB ORIGIN.
  • [02980] USERNUM - GET USER NUMBER.
  • [02996] USERNUM - GET USER NUMBER.
  • [03013] GETSS - GET SUBSYSTEM TYPE.
  • [03029] GETSS - GET SUBSYSTEM TYPE.
  • [03046] SETLOF - SET LIST OF FILES.
  • [03062] SETLOF - SET LIST OF FILES.
  • [03079] EXCST - EXECUTE CONTROL STATEMENT.
  • [03095] EXCST - EXECUTE CONTROL STATEMENT.
  • [03114] DISTCON - DISABLE TERMINAL CONTROL.
  • [03130] DISTCON - DISABLE TERMINAL CONTROL.
  • [03149] CSETA - SET 6/12 ASCII CHARACTER SET.
  • [03163] CSETA - SET 6/12 ASCII CHARACTER SET.
  • [03178] CSETN - SET NORMAL CHARACTER SET.
  • [03192] CSETN - SET NORMAL CHARACTER SET.
  • [03207] TSTATUS - GET TERMINAL STATUS.
  • [03223] TSTATUS - GET TERMINAL STATUS.
  • [03242] SYSREQ - PARAMETERIZED SYSTEM REQUEST.
  • [03261] SYSREQ - PARAMETERIZED SYSTEM REQUEST.
  • [03294] EESET - ENABLE EVENT.
  • [03310] EESET - ENABLE EVENT.

Source Code

FSELIB.txt
  1. IDENT GETUTAB
  2. ENTRY GETUTAB
  3. SYSCOM B1
  4. TITLE GETUTAB - GET USER TABLE.
  5. *COMMENT GETUTAB - GET USER TABLE.
  6. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  7. GUT SPACE 4,10
  8. *** GETUTAB - GET USER TABLE.
  9. *
  10. * G.K. CHACE. 83/02/03.
  11. GUT SPACE 4,10
  12. *** GETUTAB READS A PACKED SMFEX USER TABLE ENTRY INTO
  13. * AN EXPANDED VECTOR. THE SYMPL CODE IN SMFEX MUST AGREE
  14. * WITH THIS ALGORITHM AS TO FORMAT OF EACH ARRAY.
  15. *
  16. * THE VECTOR HAS ONE WORD PER VALUE. ONE-BIT VALUES
  17. * ARE IN THE SIGN BITS. LARGER FIELDS ARE AT RIGHT OF WORD.
  18. GUT SPACE 4,15
  19. *** CALLING SEQUENCE.
  20. *
  21. * *SYMPL* CALL -
  22. *
  23. * GETUTAB(UTAB,VECTOR);
  24. *
  25. * UTAB = PACKED USER TABLE.
  26. * FIRST WORD OF USERTABLE ENTRY
  27. * FOURTEEN 1-BIT FIELDS
  28. * FOUR UNUSED BITS
  29. * THREE SIX-BIT FIELDS
  30. * TWO TWELVE BIT FIELDS
  31. * SECOND WORD OF USERTABLE ENTRY
  32. * TWO TWELVE BIT FIELDS
  33. * ONE THIRTY-BIT FIELD
  34. * SIX UNUSED BITS
  35. * VECTOR = ONE WORD PER FIELD.
  36. GUT SPACE 4,10
  37. ** GETUTAB - GET USER TABLE.
  38. *
  39. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  40. *
  41. * USES X - 0, 2, 3, 4, 6, 7.
  42. * A - 2, 3, 4, 6, 7.
  43. * B - 1, 2, 7.
  44.  
  45.  
  46. GETUTAB SUBR ENTRY/EXIT
  47.  
  48. SB1 1
  49. SA2 A1+B1 GET ADDR SECOND PARM
  50. SA3 X1 READ FIRST TABLE WORD
  51. SA4 X1+B1 READ SECOND (LAST) TABLE WORD
  52. SB7 X2 ADDRESS OF VECTOR
  53.  
  54. SB2 14 LOOP COUNT
  55. MX0 1 MASK
  56. LOOP1 BX7 X3*X0 ISOLATE ONE BIT TO SIGN
  57. LX3 1 BRING UP ANOTHER BIT
  58. SA7 B7 STORE IT
  59. SB2 B2-B1 DECREMENT LOOP COUNT
  60. SB7 B7+B1 INCREMENT VECTOR POINTER
  61. NZ B2,LOOP1 UNTIL ALL 14 FLAGS COPIED
  62.  
  63. LX3 4+6 WASTE UNUSED BITS AND GET 6 BITS TO RIGHT
  64. MX0 -6 MASK TO ISOLATE 6 BITS AT BOTTOM
  65. SB2 3 LOOP COUNT
  66.  
  67. LOOP2 BX7 -X0*X3 ISOLATE 6 BITS AT RIGHT
  68. LX3 6 BRING UP NEXT 6 BITS
  69. SA7 B7 STORE IT
  70. SB2 B2-B1 DECREMENT LOOP COUNT
  71. SB7 B7+B1 INCREMENT VECTOR POINTER
  72. NZ B2,LOOP2 UNTIL ALL 3 FIELDS COPIED
  73.  
  74. LX3 6 ROTATE TO ALIGN 12 BITS AT BOTTOM
  75. MX0 -12 MASK TO ISOLATE 12 BITS AT BOTTOM
  76.  
  77. BX6 -X0*X3 ISOLATE FIRST 12-BIT FIELD
  78. LX3 12 BRING UP LAST 12-BIT FIELD OF FIRST WORD
  79. SA6 B7 SAVE
  80. BX7 -X0*X3 ISOLATE LAST DATA OF FIRST WORD
  81. SA7 A6+B1 SAVE LAST DATA FROM FIRST WORD
  82.  
  83. LX4 12 BRING FIRST DATA OF SECOND WORD TO RIGHT
  84. BX6 -X0*X4
  85. LX4 12 BRING SECOND 12-BIT FIELD OF SECOND WORD
  86. BX7 -X0*X4
  87. SA6 A7+B1
  88. SA7 A6+B1
  89.  
  90. LX4 30 BRING 30-BIT FIELD TO BOTTOM
  91. MX0 -30
  92. BX7 -X0*X4
  93. SA7 A7+B1
  94.  
  95. EQ GETUTAB RETURN
  96. END
  97. IDENT SAVUTAB
  98. ENTRY SAVUTAB
  99. SYSCOM B1
  100. TITLE SAVUTAB - SAVE USER TABLE ENTRY.
  101. *COMMENT SAVUTAB - SAVE USER TABLE ENTRY.
  102. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  103. SUT SPACE 4,10
  104. *** SAVUTAB - SAVE USER TABLE ENTRY.
  105. *
  106. * G.K. CHACE. 83/02/03.
  107. SUT SPACE 4,10
  108. *** *SAVUTAB* PRODUCES A COMPACTED USER TABLE FOR *SMFEX*
  109. * FROM THE EXPANDED VECTOR FORMAT. THE DEFINITIONS AND CODE
  110. * IN SMFEX MUST AGREE WITH THIS ROUTINE.
  111. *
  112. * THE EXPANDED TABLE USES ONE WORD PER ENTRY, WITH ONE-BIT
  113. * FIELDS AT THE SIGN BITS, ALL LARGER FIELDS RIGHT-JUSTIFIED.
  114. SUT SPACE 4,15
  115. *** CALLING SEQUENCE.
  116. *
  117. * *SYMPL* CALL -
  118. *
  119. * SAVUTAB(UTAB,VECTOR);
  120. *
  121. * UTAB = PACKED USER TABLE.
  122. * FIRST WORD OF USERTABLE ENTRY
  123. * FOURTEEN 1-BIT FIELDS
  124. * FOUR UNUSED BITS
  125. * THREE SIX-BIT FIELDS
  126. * TWO TWELVE BIT FIELDS
  127. * SECOND WORD OF USERTABLE ENTRY
  128. * TWO TWELVE BIT FIELDS
  129. * ONE THIRTY-BIT FIELD
  130. * SIX UNUSED BITS
  131. * VECTOR = ONE WORD PER FIELD.
  132. *
  133. * ORDINAL = TERMINAL MODEL NUMBER (1-5).
  134. * MNEMONIC = USER, VKX, 722, VT100, OR Z19.
  135. SUT SPACE 4,10
  136. ** SAVUTAB - SAVE USER TABLE ENTRY.
  137. *
  138. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  139. *
  140. * USES X - 0, 1, 2, 7.
  141. * A - 1, 2, 7.
  142. * B - 1, 2, 7.
  143.  
  144.  
  145. SAVUTAB SUBR ENTRY/EXIT
  146.  
  147. SB1 1
  148. SA2 A1+B1 GET ADDR SECOND PARM
  149. SB7 X1
  150.  
  151. SA1 X2 START FETCHING VECTOR WORDS
  152. SA2 A1+B1
  153.  
  154. MX7 0 CLEAR ACCUMULATOR
  155. MX0 1 FIELD ISOLATION MASK
  156. SB2 7 LOOP COUNTER
  157. LOOP1 BX1 X1*X0 PURIFY DATA
  158. BX7 X7+X1 ACCUMULATE A FLAG
  159. SA1 A2+B1 PREFETCH ANOTHER
  160. LX7 1 MAKE ROOM FOR MORE DATA
  161. BX2 X2*X0
  162. BX7 X7+X2 ACCUMULATE ANOTHER FLAG
  163. SA2 A1+B1 PREFETCH ANOTHER
  164. SB2 B2-B1 DECREMENT LOOP COUNT
  165. LX7 1 MAKE ROOM FOR MORE DATA
  166. NZ B2,LOOP1 UNTIL 14 FLAGS COPIED
  167.  
  168. LX7 4+6 ALLOW FOUR SPARES, ALLOCATE 6 BITS
  169. MX0 -6 FIELD ISOLATION MASK
  170.  
  171. BX1 -X0*X1 PURIFY DATA - FIRST 6-BIT FIELD
  172. BX7 X7+X1 ACCUMULATE
  173. SA1 A2+B1 PREFETCH ANOTHER
  174. LX7 6 ROOM FOR NEXT
  175. BX2 -X0*X2 SAME SEQUENCE - SECOND 6-BIT
  176. BX7 X7+X2
  177. SA2 A1+B1
  178. LX7 6
  179. BX1 -X0*X1 SAME - THIRD AND LAST 6-BIT FIELD
  180. BX7 X7+X1
  181. SA1 A2+B1
  182.  
  183. LX7 12 NOW MAKE ROOM FOR 12-BITS
  184. MX0 -12 FIELD ISOLATION MASK
  185.  
  186. BX2 -X0*X2 ISOLATE FIRST 12-BIT FIELD
  187. BX7 X7+X2
  188. SA2 A1+B1
  189. LX7 12
  190. BX1 -X0*X1 SECOND 12-BIT FIELD
  191. BX7 X7+X1
  192. SA1 A2+B1
  193.  
  194. SA7 B7 STORE FIRST PACKED WORD
  195. MX7 0 CLEAR NEW ACCUMULATOR
  196.  
  197. BX2 -X0*X2 ISOLATE NEXT 12-BIT FIELD
  198. BX7 X7+X2
  199. SA2 A1+B1
  200. LX7 12
  201. BX1 -X0*X1 ISOLATE LAST 12-BIT FIELD
  202. BX7 X7+X1
  203.  
  204. LX7 30 ALLOCATE 30 BITS
  205. MX0 -30 ISOLATION MASK
  206.  
  207. BX2 -X0*X2 ISOLATE 30-BIT DATA FIELD
  208. BX7 X7+X2
  209.  
  210. LX7 6 FINAL BIT ALIGNMENT IN SECOND WORD
  211. SA7 A7+B1
  212.  
  213. EQ SAVUTAB RETURN
  214. END
  215. IDENT FINDBIT
  216. ENTRY FINDBIT
  217. SYSCOM B1
  218. TITLE FINDBIT - FIND BIT ON IN SMFEX BITMAP.
  219. *COMMENT FINDBIT - FIND BIT ON IN SMFEX BITMAP.
  220. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  221. FBO SPACE 4,10
  222. *** FINDBIT - FIND BIT ON IN SMFEX BITMAP.
  223. *
  224. * G.K. CHACE. 83/02/03.
  225. FBO SPACE 4,10
  226. *** *FINDBIT* SEARCHES AN *SMFEX* BITMAP TO FIND THE FIRST BIT
  227. * WHICH IS ON. WE CHECK UP TO *LIMIT* WORDS TO FIND A BIT ON.
  228. * IF WE DONT FIND ANY, WE RETURN -1. THE NORMAL FUNCTION
  229. * RESULT IS A BIT INDEX. THE FORMAT IS 32 BITS PER WORD,
  230. * STARTING 12 BITS FROM THE LEFT. THE BOTTOM 16 BITS MUST BE
  231. * ZERO. THIS FORMAT ALLOWS EFFICIENT SCANNING OF THE WORD
  232. * WITH NORMALIZE AND ALSO ALLOWS EASY SPLITTING OF THE BIT
  233. * POSITION INTO WORD OFFSET AND BIT-WITHIN-WORD OFFSET. THE
  234. * RESULT MUST BE SATISFIED BY BOTH BITMAP AND BITMASK.
  235. FBO SPACE 4,10
  236. *** CALLING SEQUENCE.
  237. *
  238. * *SYMPL* CALL -
  239. *
  240. * INDEX=FINDBIT(LIMIT,BITMAP,BITMASK);
  241. *
  242. * LIMIT = NUMBER OF WORDS IN BITMAP AND BITMASK.
  243. * BITMAP = ALLOCATION BITS.
  244. * BITMASK = ADDITIONAL BITS AND-ED WITH BITMAP.
  245. FBO SPACE 4,10
  246. ** FINDBIT - FIND BIT ON IN SMFEX BITMAP.
  247. *
  248. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  249. *
  250. * USES X - ALL.
  251. * A - 1, 2, 3, 4.
  252. * B - 1, 6, 7.
  253.  
  254.  
  255. FINAL SB6 B6+B1 CORRECT WORD OFFSET
  256. SX7 B7-B6 COMPUTE WORD OFFSET
  257. LX7 5 MULT BY 32 TO MERGE BIT OFFSET
  258. IX6 X6+X7 FINAL RESULT
  259.  
  260. FINDBIT SUBR ENTER HERE
  261. SB1 1
  262. SA2 A1+B1 X2->BITMAP
  263. SA1 X1 X1=LIMIT
  264. SA3 A2+B1 X3->BITMASK
  265.  
  266. MX0 1 GEN 2000 MASK
  267. LX0 59
  268. SB6 X1 REMEMBER
  269. SB7 X1 DITTO
  270.  
  271. SA1 X2 START PREFETCH BOTH ARRAYS
  272. SA3 X3
  273. SA2 A1+B1
  274. SA4 A3+B1
  275.  
  276. LOOP BX6 X1*X3 MERGE MAP,MASK IN SCRATCH REG
  277. SA1 A2+B1 PREFETCH MORE
  278. SA3 A4+B1 DITTO
  279. BX7 X2*X4 SAME SEQUENCE
  280. SA2 A1+B1
  281. SA4 A3+B1
  282. BX6 X6+X0 MERGE 2000 DUMMY EXPONENTS
  283. BX7 X7+X0
  284. NX5 X6,B4 SEARCH FOR BIT ON
  285. SB6 B6-B1 CHECK LOOP EXPIRED
  286. MI B6,EXHAUST
  287. SX6 B4 TENTATIVE RESULT
  288. NZ X5,FINAL IF REALLY FOUND ONE
  289. NX5 X7,B4 SAME SEQUENCE
  290. SB6 B6-B1
  291. MI B6,EXHAUST
  292. SX6 B4
  293. NZ X5,FINAL
  294. EQ LOOP AND GO AROUND
  295.  
  296. EXHAUST SX6 -1
  297. EQ FINDBIT
  298.  
  299. END
  300. IDENT SPREAD
  301. ENTRY SPREAD
  302. SYSCOM B1
  303. TITLE SPREAD - SPREAD RETURN JUMP WORDS TO ENTRIES.
  304. *COMMENT SPREAD - SPREAD RETURN JUMP WORDS TO ENTRIES.
  305. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  306. SRJ SPACE 4,10
  307. *** SPREAD - SPREAD RETURN JUMP WORDS TO ENTRIES.
  308. *
  309. * G.K. CHACE. 83/02/03.
  310. SRJ SPACE 4,10
  311. *** *SPREAD* IS A SPECIAL-PURPOSE ROUTINE FOR THE SMFEX
  312. * SUBSYSTEM. SMFEX CALLS SPREAD JUST BEFORE INVOKING A NEW
  313. * USER SUBTASK, TO RESTORE ALL RETURN JUMP WORDS TO THEIR
  314. * PREVIOUS STATE. WE ASSUME THE STACK WAS USED IN THE GATHER
  315. * ROUTINE EARLIER TO SAVE THE RJ WORDS. THE STACK CONSISTS
  316. * OF SINGLE-WORD ENTRIES. THE UPPER 30 BITS ARE THE
  317. * MACHINE-GENERATED *EQ* INSTRUCTION USED TO RETURN OUT OF
  318. * THE SUBROUTINE. THE LOWEST 18 BITS ARE THE ADDRESS OF THE
  319. * SUBROUTINE.
  320. SRJ SPACE 4,15
  321. *** CALLING SEQUENCE.
  322. *
  323. * *SYMPL* CALL -
  324. *
  325. * SPREAD(RSTKPTR,RENTSTK);
  326. *
  327. * RSTKPTR = NUMBER OF WORDS IN STACK ARRAY.
  328. * RENTSTK = THE STACK ARRAY BUILT BY GATHER ROUTINE.
  329. SRJ SPACE 4,10
  330. ** SPREAD - SPREAD RETURN JUMP WORDS TO ENTRIES.
  331. *
  332. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  333. *
  334. * USES X - 1, 2, 3, 4, 6, 7.
  335. * A - 1, 2, 3, 4, 6, 7.
  336. * B - 1, 2, 4, 7.
  337.  
  338.  
  339. SPREAD SUBR
  340. SB1 1
  341. SA2 A1+B1 GET ADDR STACK
  342. SA1 X1 GET VALUE STACK LEVEL
  343. SB2 B1+B1 CONSTANT 2
  344. SB4 B2+B2 CONSTANT 4
  345. SB7 X1 LOOP CONTROL
  346. SA1 X2 START PREFETCH
  347. SA2 X2+B1
  348. SA3 A1+B2
  349. SA4 A2+B2
  350.  
  351. LOOP BX6 X1
  352. SB7 B7-B1
  353. SA1 A1+B4 PREFETCH ANOTHER
  354. ZR B7,SPREAD CHECK IF DONE
  355. SA6 X6
  356. BX7 X2
  357. SB7 B7-B1
  358. SA2 A2+B4
  359. ZR B7,SPREAD
  360. SA7 X7
  361. BX6 X3
  362. SB7 B7-B1
  363. SA3 A3+B4
  364. ZR B7,SPREAD
  365. SA6 X6
  366. BX7 X4
  367. SB7 B7-B1
  368. SA4 A4+B4
  369. ZR B7,SPREAD
  370. SA7 X7
  371. EQ LOOP
  372.  
  373. END
  374. IDENT GATHER
  375. ENTRY GATHER
  376. SYSCOM B1
  377. TITLE GATHER - GATHER RETURN JUMP WORDS FROM ENTRIES.
  378. *COMMENT GATHER - GATHER RETURN JUMP WORDS FROM ENTRIES.
  379. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  380. GRJ SPACE 4,10
  381. *** GATHER - GATHER RETURN JUMP WORDS FROM ENTRIES.
  382. *
  383. * G.K. CHACE. 83/02/03.
  384. GRJ SPACE 4,10
  385. *** *GATHER* SCANS AN ARRAY WHICH STACKS THE ADDRESSES OF THE
  386. * ENTRY POINTS FOR ALL ACTIVE *SYMPL* SUBROUTINES. THE SMFEX
  387. * SUBSYSTEM AND FSE EDITOR ARE ONLY CAPABLE OF KEEPING ENTRY
  388. * POINT ADDRESSES, AND CANNOT KEEP RETURN ADDRESSES, DUE TO
  389. * THE CODE-GENERATION LIMITATIONS OF THE SYMPL COMPILER.
  390. * SMFEX CALLS GATHER WHEN HALTING ONE USER SUBTASK. GATHER
  391. * SCANS THE VECTOR OF ENTRY ADDRESSES, AND READS UP THE
  392. * RETURN JUMP WORDS AT EACH ENTRY POINT, THEN PACKS THE
  393. * RETURN JUMP BACK INTO THE VECTOR. THE ENHANCED VECTOR THEN
  394. * CONTAINS ENTRY/EXIT CODE IN THE TOP 30 BITS OF EACH ENTRY,
  395. * AND THE ADDRESS FOR RESTORATION OF THAT CODE, IN THE LOWER
  396. * 18 BITS. SMFEX SAVES THIS VECTOR AND USES THE *SPREAD*
  397. * ROUTINE TO RESTORE THE ENTRY POINTS FOR RESUMPTION OF THE
  398. * SUBTASK.
  399. GRJ SPACE 4,10
  400. *** CALLING SEQUENCE.
  401. *
  402. * *SYMPL* CALL -
  403. *
  404. * GATHER(RSTKPTR,RENTSTK);
  405. *
  406. * RSTKPTR = NUMBER OF WORDS IN STACK.
  407. * RENTSTK = THE REENTRANCY STACK.
  408. GRJ SPACE 4,10
  409. ** GATHER - GATHER RETURN JUMP WORDS FROM ENTRIES.
  410. *
  411. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  412. *
  413. * USES X - 0, 1, 2, 3, 4, 6, 7.
  414. * A - 1, 2, 3, 4, 6, 7.
  415. * B - 1, 2, 6, 7.
  416.  
  417.  
  418. GATHER SUBR
  419. SB1 1
  420. SA2 A1+B1 GET ADDR STACK
  421. SA1 X1 GET VALUE STACKLEVEL
  422. SB2 B1+B1 CONSTANT 2
  423. SB6 X2+B2 BRACKETED BY PRE AND POST PROCESSES
  424. SB7 X1 LOOP CONTROL
  425. SA1 X2 START PREFETCH
  426. SA2 X2+B1
  427. SA3 A1+B2
  428. SA4 A2+B2
  429. MX0 30
  430.  
  431. LOOP SA1 X1 NOW LOAD RJ-GENERATED WORDS
  432. SA2 X2
  433. SA3 X3
  434. SA4 X4
  435. SX6 A1 PREPARE TO MERGE HALVES
  436. SX7 A2
  437. BX1 X1*X0 PURIFY
  438. BX2 X2*X0
  439. IX6 X6+X1 MERGE ENTRY AND RETURN ADDRESSES
  440. IX7 X7+X2
  441. SA1 B6+B2 PREFETCH MORE FROM STACK
  442. SB7 B7-B1 LOOPCONTROL
  443. SA2 A1+B1
  444. ZR B7,GATHER WHEN DONE
  445. SB7 B7-B1
  446. SA6 B6-B2
  447. ZR B7,GATHER
  448. SA7 A6+B1
  449. SB6 B6+B2
  450. SX6 A3 PREPARE OTHER MERGES
  451. SX7 A4
  452. BX3 X3*X0
  453. BX4 X4*X0
  454. IX6 X6+X3
  455. IX7 X7+X4
  456. SA3 B6+B2
  457. SB7 B7-B1
  458. SA4 A3+B1
  459. ZR B7,GATHER
  460. SB7 B7-B1
  461. SA6 B6-B2
  462. ZR B7,GATHER
  463. SA7 A6+B1
  464. SB6 B6+B2
  465. EQ LOOP
  466.  
  467. END
  468. IDENT READECS
  469. ENTRY READECS
  470. SYSCOM B1
  471. TITLE READECS - READ EXTENDED MEMORY BLOCK.
  472. *COMMENT READECS - READ EXTENDED MEMORY BLOCK.
  473. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  474. REM SPACE 4,10
  475. *** READECS - READ EXTENDED MEMORY BLOCK.
  476. *
  477. * G.K. CHACE. 83/02/03.
  478. REM SPACE 4,10
  479. *** *READECS* READS A BLOCK OF TEXT FROM THE EXTENDED MEMORY
  480. * FIELD LENGTH AND REPORTS THE SUCCESS OR FAILURE.
  481. REM SPACE 4,15
  482. *** CALLING SEQUENCE.
  483. *
  484. * *SYMPL* CALL -
  485. *
  486. * READECS(NWORDS,FROMECS,TOCM,ERRFLG);
  487. *
  488. * NWORDS = NUMBER OF WORDS IN BLOCK.
  489. * FROMECS = EXTENDED MEMORY ARRAY OF TEXT.
  490. * TOCM = CENTRAL MEMORY ARRAY TO RECEIVE TEXT.
  491. * ERRFLG = SUCCESS/FAILURE RESULT.
  492. * 0 = SUCCESSFUL ON FIRST TRY.
  493. * 1 = SUCCESSFUL AFTER ONE RETRY.
  494. * 2 = SUCCESS AFTER WORD-BY-WORD RETRY.
  495. * 3 = FAILURE.
  496. REM SPACE 4,10
  497. ** READECS - READ EXTENDED MEMORY BLOCK.
  498. *
  499. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  500. *
  501. * USES X - 0, 1, 2, 3, 4, 6.
  502. * A - 0, 1, 2, 3, 4, 6.
  503. * B - 1, 2, 7.
  504.  
  505.  
  506. TOP SA6 X4 STORE RESULT FLAG
  507. SA0 B2 RESTORE A0
  508.  
  509. READECS SUBR ENTRY/EXIT
  510. SB1 1
  511. SA2 A1+B1 ->FROMECS
  512. SA3 A2+B1 ->TOCM
  513. SA4 A3+B1 ->ERRFLG
  514. SA1 X1 =NWORDS
  515. SB2 A0 SAVE FOR LANGUAGES
  516. BX0 X2 ->ECS
  517. SA0 X3 ->CM
  518. SB7 X1 =NWORDS
  519. MX6 0 NORMAL ERRFLAG
  520. RE B7 FAST TRANSFER
  521. EQ ERROR IF TROUBLE
  522. EQ TOP NORMAL EXIT
  523. ERROR SX6 X6+B1 BAD NEWS
  524. RE B7 TRY ENTIRE BLOCK AGAIN
  525. EQ ERROR2 IF SECOND ERROR
  526. EQ TOP NORMAL EXIT
  527. ERROR2 SX6 X6+B1 WORSE NEWS
  528. SX1 B1 60-BIT ONE
  529. LOOP RE B1 TRY SINGLE WORD LOOP
  530. EQ ERROR3 TERRIBLE
  531. SA0 A0+B1 INCREMENT POINTERS
  532. IX0 X0+X1
  533. SB7 B7-B1 DECREMENT WORD COUNT
  534. GT B7,LOOP
  535. EQ TOP
  536. ERROR3 SX6 X6+B1 HIGHER ERROR LEVEL
  537. EQ TOP
  538. END
  539. IDENT WRITECS
  540. ENTRY WRITECS
  541. SYSCOM B1
  542. TITLE WRITECS - WRITE EXTENDED MEMORY BLOCK.
  543. *COMMENT WRITECS - WRITE EXTENDED MEMORY BLOCK.
  544. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  545. WEM SPACE 4,10
  546. *** WRITECS - WRITE EXTENDED MEMORY BLOCK.
  547. *
  548. * G.K. CHACE. 83/02/03.
  549. WEM SPACE 4,10
  550. *** *WRITECS* COPIES A BLOCK OF TEXT FROM CENTRAL MEMORY TO
  551. * THE EXTENDED MEMORY FIELD LENGTH.
  552. WEM SPACE 4,15
  553. *** CALLING SEQUENCE.
  554. *
  555. * *SYMPL* CALL -
  556. *
  557. * WRITECS(NWORDS,TOECS,FROMCM,ERRFLG);
  558. *
  559. * NWORDS = NUMBER OF WORDS IN BLOCK.
  560. * TOECS = EXTENDED MEMORY ARRAY TO RECEIVE TEXT.
  561. * FROMCM = CENTRAL MEMORY ARRAY OF TEXT.
  562. * ERRFLG = SUCCESS/FAILURE RESULT.
  563. * 0 = SUCCESSFUL ON FIRST TRY.
  564. * 1 = SUCCESSFUL AFTER ONE RETRY.
  565. * 2 = SUCCESS AFTER WORD-BY-WORD RETRY.
  566. * 3 = FAILURE.
  567. WEM SPACE 4,10
  568. ** WRITECS - WRITE EXTENDED MEMORY BLOCK.
  569. *
  570. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  571. *
  572. * USES X - 0, 1, 2, 3, 4, 6.
  573. * A - 0, 1, 2, 3, 4, 6.
  574. * B - 1, 2, 7.
  575.  
  576.  
  577. TOP SA6 X4 STORE RESULT FLAG
  578. SA0 B2 RESTORE A0
  579.  
  580. WRITECS SUBR ENTRY/EXIT
  581. SB1 1
  582. SA2 A1+B1 ->FROMCM
  583. SA3 A2+B1 ->TOECS
  584. SA4 A3+B1 ->ERRFLG
  585. SA1 X1 =NWORDS
  586. SB2 A0 SAVE FOR LANGUAGES
  587. BX0 X3 ->ECS
  588. SA0 X2 ->CM
  589. SB7 X1 =NWORDS
  590. MX6 0 NORMAL ERRFLAG
  591. WE B7 FAST TRANSFER
  592. EQ ERROR IF TROUBLE
  593. EQ TOP NORMAL EXIT
  594. ERROR SX6 X6+B1 BAD NEWS
  595. WE B7 TRY ENTIRE BLOCK AGAIN
  596. EQ ERROR2 IF SECOND ERROR
  597. EQ TOP NORMAL EXIT
  598. ERROR2 SX6 X6+B1 WORSE NEWS
  599. SX1 B1 60-BIT ONE
  600. LOOP WE B1 TRY SINGLE WORD LOOP
  601. EQ ERROR3 TERRIBLE
  602. SA0 A0+B1 INCREMENT POINTERS
  603. IX0 X0+X1
  604. SB7 B7-B1 DECREMENT WORD COUNT
  605. GT B7,LOOP
  606. EQ TOP
  607. ERROR3 SX6 X6+B1 HIGHER ERROR LEVEL
  608. EQ TOP
  609. END
  610. IDENT FLDLEN
  611. ENTRY FLDLEN
  612. SYSCOM B1
  613. TITLE FLDLEN - CHANGE FIELD LENGTH.
  614. *COMMENT FLDLEN - CHANGE FIELD LENGTH.
  615. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  616. CFL SPACE 4,10
  617. *** FLDLEN - CHANGE FIELD LENGTH.
  618. *
  619. * G.K. CHACE. 83/02/03.
  620. CFL SPACE 4,10
  621. *** *FLDLEN* CHANGES THE JOB*S FIELD LENGTH.
  622. CFL SPACE 4,15
  623. *** CALLING SEQUENCE.
  624. *
  625. * *SYMPL* CALL -
  626. *
  627. * FLDLEN(CMWORDS);
  628. *
  629. * CMWORDS = DESIRED FIELD LENGTH.
  630. CFL SPACE 4,10
  631. ** FLDLEN - CHANGE FIELD LENGTH.
  632. *
  633. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  634. *
  635. * USES X - 2
  636. * A - 2
  637. *
  638. * MACROS MEMORY.
  639.  
  640.  
  641. FLDLEN BSS 1 STAT,WORDS
  642. SA2 X1 GET DESIRED SIZE
  643. MEMORY CM,,R,X2
  644. EQ FLDLEN
  645. END
  646. IDENT TESTECS
  647. ENTRY TESTECS
  648. SYSCOM B1
  649. TITLE TESTECS - TEST FOR ECS AVAILABILITY.
  650. *COMMENT TESTECS - TEST FOR ECS AVAILABILITY.
  651. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  652. TEC SPACE 4,10
  653. *** TESTECS - TEST FOR ECS AVAILABILITY.
  654. *
  655. * G.K. CHACE. 83/02/03.
  656. TEC SPACE 4,10
  657. *** *TESTECS* DETERMINES HOW LARGE OF AN EXTENDED MEMORY FIELD
  658. * LENGTH THE JOB IS VALIDATED TO OBTAIN AND THE SYSTEM IS
  659. * ABLE TO DELIVER.
  660. TEC SPACE 4,15
  661. *** CALLING SEQUENCE.
  662. *
  663. * *SYMPL* CALL -
  664. *
  665. * TESTECS(FLAG)
  666. *
  667. * FLAG .NE. 0 IF USER ECS ENABLED AND VALIDATED.
  668. TEC SPACE 4,10
  669. ** TESTECS - TEST FOR ECS AVAILABILITY.
  670. *
  671. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  672. *
  673. * USES X - 1, 2, 6.
  674. * A - 1, 2, 6.
  675. * B - 1.
  676. *
  677. * MACROS MEMORY.
  678.  
  679.  
  680. TESTECS SUBR
  681. SB1 1
  682. BX6 X1 SAVE PARAMETER ADDRESS
  683. SA6 SAVE
  684. MX6 29 GENERATE -1 IN UPPER HALF
  685. SA6 STAT
  686. MEMORY ECS,STAT,R
  687. SA1 STAT WILL RETURN UPPER HALF
  688. SA2 SAVE
  689. MX6 30
  690. BX6 X6*X1
  691. SA6 X2
  692. EQ TESTECS
  693.  
  694. SAVE BSSZ 1
  695. STAT BSSZ 1
  696. END
  697. IDENT FLDLENE
  698. ENTRY FLDLENE
  699. SYSCOM B1
  700. TITLE FLDLENE - CHANGE ECS FIELD LENGTH.
  701. *COMMENT FLDLENE - CHANGE ECS FIELD LENGTH.
  702. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  703. CFL SPACE 4,10
  704. *** FLDLENE - CHANGE ECS FIELD LENGTH.
  705. *
  706. * G.K. CHACE. 83/02/03.
  707. CFL SPACE 4,10
  708. *** *FLDLENE* CHANGES THE JOB*S FIELD LENGTH.
  709. CFL SPACE 4,15
  710. *** CALLING SEQUENCE.
  711. *
  712. * *SYMPL* CALL -
  713. *
  714. * FLDLENE(ECSWORDS);
  715. *
  716. * ECSWORDS = DESIRED FIELD LENGTH.
  717. CFL SPACE 4,10
  718. ** FLDLENE - CHANGE ECS FIELD LENGTH.
  719. *
  720. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  721. *
  722. * USES X - 2.
  723. * A - 2.
  724. * B - 1.
  725. *
  726. * MACROS MEMORY.
  727.  
  728.  
  729. FLDLENE SUBR
  730. SB1 1
  731. SA2 X1 GET DESIRED SIZE
  732. MEMORY ECS,STAT,R,X2
  733. EQ FLDLENE
  734. STAT DATA 1
  735. END
  736. IDENT LINESZ
  737. ENTRY LINESZ
  738. EXT FATAL
  739. EXT LINSIZ
  740. SYSCOM B1
  741. TITLE LINESZ - MEASURE LINE SIZE AND REPAIR.
  742. *COMMENT LINESZ - MEASURE LINE SIZE AND REPAIR.
  743. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  744. MLS SPACE 4,10
  745. *** LINESZ - MEASURE LINE SIZE AND REPAIR.
  746. *
  747. * G.K. CHACE. 83/02/03.
  748. MLS SPACE 4,10
  749. *** *LINESZ* SCANS A TEXT LINE, CODED IN INTERNAL CHARACTER
  750. * SET, TO MEASURE ITS LENGTH IN WORDS. THIS ROUTINE ALSO
  751. * REPAIRS THE TOP FOUR BITS OF EACH WORD IN THE LINE IMAGE,
  752. * SO THAT THE SIGN BIT INDICATES WHETHER A WORD IS THE LAST
  753. * WORD OF A LINE.
  754. *
  755. * THE FULL SCREEN EDITOR INTERNAL CHARACTER SET USES 7 BITS
  756. * PER CHARACTER, 8 CHARACTERS PER WORD, WITH THE TOP FOUR
  757. * BITS OF EACH WORD NOT BELONGING IN ANY CHARACTER FIELD.
  758. * THE SIGN BIT IS A FLAG FOR THE LAST WORD IN EACH LINE
  759. * IMAGE, AND THE NEXT THREE BITS ARE RESERVED AND NORMALLY
  760. * ZEROED. EACH LINE IMAGE IS TERMINATED BY A CHARACTER WHOSE
  761. * SEVEN BITS ARE ALL ONES. THE EDITING CODE NORMALLY
  762. * MAINTAINS THE END OF LINE CHARACTER BUT NEGLECTS THE LAST
  763. * WORD SIGN BIT, WHILE THE WORKFILE MANAGER LOOKS ONLY FOR
  764. * THE SIGN BIT.
  765. *
  766. * THE ALGORITHM IS TO *AND* A WORD AGAINST ITSELF SHIFTED
  767. * EVERY BIT SUCCESSIVELY, THEN *AND* IT WITH A MASK
  768. * CONTAINING 1'S AT THE TOP BIT FOR EACH SEVEN-BIT CHARACTER
  769. * POSITION. IF THE RESULT IS NON-ZERO, THEN THE WORD MUST
  770. * HAVE CONTAINED A 177 CHARACTER.
  771. MLS SPACE 4,15
  772. *** CALLING SEQUENCE.
  773. *
  774. * *SYMPL* CALL -
  775. *
  776. * NUMWORDS=LINESZ(LINEBUF);
  777. *
  778. * LINEBUF = INTERNALLY FORMATTED LINE BUFFER.
  779. MLS SPACE 4,10
  780. ** LINESZ - MEASURE LINE SIZE AND REPAIR.
  781. *
  782. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  783. *
  784. * USES X - ALL.
  785. * A - 1, 2, 4, 5, 6, 7.
  786. * B - 1, 2, 3, 5, 6.
  787. *
  788. * CALLS LINSIZ, FATAL.
  789.  
  790.  
  791. FINAL BX7 X1+X0 SET LAST WORD FLAG
  792. SX6 A1-B5 COMPUTE FUNCTION RESULT
  793. SA7 A1 STORE FLAGGED WORD
  794. SX6 X6+B1 FIX FUNCTION RESULT
  795.  
  796. LINESZ SUBR ENTRY POINT
  797. SA5 MASK TOP BIT EACH CHARACTER
  798. SA4 LINSIZ LIMITATION
  799. SB1 1
  800. SB5 X1 ADDR OF TEXT LINE
  801. SA1 X1 START FETCHING DATA
  802. SA2 B5+B1 FETCH MORE
  803. SB2 B1+B1 2
  804. SB3 B2+B1 3
  805. SB6 X4 MAX NUM WORDS
  806.  
  807. LOOP MX0 1 WILL FIX TOP BIT WORD 1
  808. BX6 -X0*X1
  809. BX0 X2 MERELY SAVE SECOND WORD
  810. SA6 A1
  811. LX3 X1,B1 COPY AND SHIFT 1
  812. LX4 X2,B1 DITTO
  813. BX6 X1*X3 FIRST MERGE
  814. BX7 X2*X4 DITTO
  815. SA1 A1+B2 PREFETCH NEXT
  816. SA2 A2+B2 DITTO
  817. LX3 X6,B2 START FUNNY CUT AND PASTE
  818. LX4 X7,B2
  819. BX6 X6*X3
  820. BX7 X7*X4
  821. LX3 X6,B3
  822. LX4 X7,B3
  823. BX6 X6*X3
  824. BX7 X7*X4
  825. BX6 X6*X5 ISOLATE CRUCIAL BITS
  826. BX7 X7*X5 DITTO
  827. EQ B6,B0,ERROR NO CHANCE
  828. NZ X6,FOUND1
  829. EQ B6,B1,ERROR LAST CHANCE
  830. NZ X7,FOUND2
  831. SB6 B6-B2 DECREMENT LOOP
  832. MX6 1 NOW CAN FIX TOP BIT 2ND WORD
  833. BX7 -X6*X0
  834. SA7 A2-B2
  835. EQ LOOP
  836.  
  837. FOUND1 SA1 A1-B2 RE-FETCH LAST WORD TO FIX
  838. MX0 1 NEED TO FIX TOP BIT AGAIN
  839. EQ FINAL
  840.  
  841. FOUND2 SA1 A2-B2 AS ABOVE
  842. MX0 1 NEED TO FIX TOP BIT AGAIN
  843. EQ FINAL
  844.  
  845. ERROR SA1 PARM
  846. RJ FATAL
  847.  
  848.  
  849. MASK DATA 02010040201004020100B
  850. PARM CON STRING
  851. STRING DATA C*LINESZ TOO LONG$*
  852.  
  853. END
  854. IDENT LENGTH
  855. ENTRY LENGTH
  856. EXT FATAL
  857. EXT LINSIZ
  858. SYSCOM B1
  859. TITLE LENGTH - COUNT CHARACTERS IN LINE.
  860. *COMMENT LENGTH - COUNT CHARACTERS IN LINE.
  861. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  862. CCL SPACE 4,10
  863. *** LENGTH - COUNT CHARACTERS IN LINE.
  864. *
  865. * G.K. CHACE. 83/02/03.
  866. CCL SPACE 4,10
  867. *** *LENGTH* SCANS A TEXT LINE, CODED IN INTERNAL CHARACTER
  868. * SET, TO MEASURE ITS LENGTH IN CHARACTERS. THIS LENGTH
  869. * VALUE IS EQUIVALENT TO THE ZERO-BASED CHARACTER POSITION
  870. * OF THE END OF LINE CHARACTER.
  871. *
  872. * THE FULL SCREEN EDITOR INTERNAL CHARACTER SET USES 7 BITS
  873. * PER CHARACTER, 8 CHARACTERS PER WORD, WITH THE TOP FOUR
  874. * BITS OF EACH WORD NOT BELONGING IN ANY CHARACTER FIELD.
  875. * THE SIGN BIT IS A FLAG FOR THE LAST WORD IN EACH LINE
  876. * IMAGE, AND THE NEXT THREE BITS ARE RESERVED AND NORMALLY
  877. * ZEROED. EACH LINE IMAGE IS TERMINATED BY A CHARACTER WHOSE
  878. * SEVEN BITS ARE ALL ONES. THE EDITING CODE NORMALLY
  879. * MAINTAINS THE END OF LINE CHARACTER BUT NEGLECTS THE LAST
  880. * WORD SIGN BIT, WHILE THE WORKFILE MANAGER LOOKS ONLY FOR
  881. * THE SIGN BIT. *LENGTH* DOES NO REPAIR OF THE SIGN BITS,
  882. * WHILE THE *LINESZ* ROUTINE DOES REPAIR THE SIGN BITS.
  883. *
  884. * THE ALGORITHM IS TO *AND* A WORD AGAINST ITSELF SHIFTED
  885. * EVERY BIT SUCCESSIVELY, THEN *AND* IT WITH A MASK
  886. * CONTAINING 1'S AT THE TOP BIT FOR EACH SEVEN-BIT CHARACTER
  887. * POSITION. IF THE RESULT IS NON-ZERO, THEN THE WORD MUST
  888. * HAVE CONTAINED A 177 CHARACTER. WITH THE LAST WORD FOUND,
  889. * THE LAST PHASE OF THE ALGORITHM ROTATES THE LAST WORD ON
  890. * A CHARACTER BY CHARACTER BASIS TO IDENTIFY THE END OF LINE.
  891. CCL SPACE 4,15
  892. *** CALLING SEQUENCE.
  893. *
  894. * *SYMPL* CALL -
  895. *
  896. * NUMCHARS=LENGTH(LINEBUF);
  897. *
  898. * LINEBUF = INTERNALLY FORMATTED LINE BUFFER.
  899. CCL SPACE 4,10
  900. ** LENGTH - COUNT CHARACTERS IN LINE.
  901. *
  902. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  903. *
  904. * USES X - ALL.
  905. * A - 1, 2, 4, 5.
  906. * B - 1, 2, 3, 5, 6.
  907. *
  908. * CALLS FATAL, LINSIZ.
  909.  
  910.  
  911. FOUND1 LX7 X6,B0 SPECIFY PARTIAL RESULT
  912. SX6 A1-B2 SPECIFY WORD OFFSET
  913. LX7 57 GET IT A CHAR POS OFF
  914.  
  915. FINAL IX6 X6-X0 WORD OFFSET
  916. LX6 3 CHAR OFFSET
  917. SB5 B0-B1 GEN CONSTANT -1
  918. SX6 X6+B5 TRICK OFFSET DOWN 1
  919. FINLOOP LX7 7 TEST NEXT CHAR FLAG
  920. SX6 X6+B1
  921. PL X7,FINLOOP
  922.  
  923.  
  924. LENGTH SUBR ENTRY POINT
  925. SA4 LINSIZ LIMITATION
  926. SA5 MASK TOP BIT EACH CHARACTER
  927. SB1 1
  928. SX0 X1 ADDR OF TEXT LINE
  929. SA1 X1 START FETCHING DATA
  930. SA2 X0+B1 FETCH MORE
  931. SB2 B1+B1 2
  932. SB3 B1+B2 3
  933. SB6 X4 MAX NUM WORDS
  934.  
  935. LOOP LX3 X1,B1 COPY AND SHIFT 1
  936. LX4 X2,B1 DITTO
  937. BX6 X1*X3 FIRST MERGE
  938. BX7 X2*X4 DITTO
  939. SA1 A1+B2 PREFETCH NEXT
  940. SA2 A2+B2 DITTO
  941. LX3 X6,B2 START FUNNY CUT AND PASTE
  942. LX4 X7,B2
  943. BX6 X6*X3
  944. BX7 X7*X4
  945. LX3 X6,B3
  946. LX4 X7,B3
  947. BX6 X6*X3
  948. BX7 X7*X4
  949. BX6 X6*X5 ISOLATE CRUCIAL BITS
  950. BX7 X7*X5 DITTO
  951. EQ B6,B0,ERROR NO CHANCE
  952. NZ X6,FOUND1
  953. EQ B6,B1,ERROR LAST CHANCE
  954. NZ X7,FOUND2
  955. SB6 B6-B2 DECREMENT LOOP
  956. EQ LOOP
  957.  
  958. FOUND2 LX7 57 SPECIFY PARTIAL RESULT
  959. SX6 A2-B2 NEED WORD OFFSET
  960. EQ FINAL
  961.  
  962. ERROR SA1 PARM
  963. RJ FATAL
  964.  
  965.  
  966. MASK DATA 02010040201004020100B
  967. PARM CON STRING
  968. STRING DATA C*LENGTH TOO LONG$*
  969.  
  970. END
  971. IDENT NOSWDSZ
  972. ENTRY NOSWDSZ
  973. SYSCOM B1
  974. TITLE NOSWDSZ - MEASURE ZERO BYTE TERMINATOR.
  975. *COMMENT NOSWDSZ - MEASURE ZERO BYTE TERMINATOR.
  976. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  977. MZB SPACE 4,10
  978. *** NOSWDSZ - MEASURE ZERO BYTE TERMINATOR.
  979. *
  980. * G.K. CHACE. 83/02/03.
  981. MZB SPACE 4,10
  982. *** *NOSWDSZ* DETERMINES THE LENGTH IN WORDS OF A DISPLAY CODE
  983. * LINE OF TEXT. IF IT NO END OF LINE IS FOUND WITHIN THE
  984. * SIZE LIMIT, THE VALUE RETURNED IS ONE MORE THAN THE LIMIT.
  985. * THE ALGORITHM IS SIMPLY TO LOOK FOR A WORD WITH THE LAST 12
  986. * BITS ZERO.
  987. MZB SPACE 4,15
  988. *** CALLING SEQUENCE.
  989. *
  990. * *SYMPL* CALL -
  991. *
  992. * NUMWORDS=NOSWDSZ(LIMIT,LINEBUF);
  993. *
  994. * LIMIT = MAXIMUM ALLOWABLE LINE SIZE.
  995. * LINEBUF = THE LINE BUFFER.
  996. MZB SPACE 4,10
  997. ** NOSWDSZ - MEASURE ZERO BYTE TERMINATOR.
  998. *
  999. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  1000. *
  1001. * USES X - ALL.
  1002. * A - 1, 2, 3, 4.
  1003. * B - 1, 2, 4, 6, 7.
  1004.  
  1005.  
  1006. FOUND SX6 B6-B7 INDICATE WORD COUNT
  1007. MI B7,EXHAUST IN CASE SLIPPING OFF END
  1008.  
  1009. NOSWDSZ SUBR ENTRY EXIT
  1010. SB1 1 CONSTANT
  1011. SA2 A1+B1 GET TEXT ADDR
  1012. SA1 X1 GET LIMIT VALUE
  1013. SB2 B1+B1 CONSTANT
  1014. SB4 B2+B2 CONSTANT
  1015. SB6 X1 REMEMBER FOR FINAL COMPUTATION
  1016. SB7 X1 COUNTS EACH WORD DOWN
  1017. SA1 X2 START PREFETCH
  1018. SA2 X2+B1 DITTO
  1019. SA3 A1+B2 DITTO
  1020. SA4 A2+B2 DITTO
  1021.  
  1022. LOOP MX0 -12 GEN MASK
  1023. BX5 -X0*X1 FOR TESTING FIRST EOL
  1024. SA1 A1+B4 START ANOTHER PREFETCH
  1025. BX6 -X0*X2 SAME SEQUENCE
  1026. SA2 A2+B4
  1027. BX7 -X0*X3
  1028. SA3 A3+B4
  1029. BX0 -X0*X4
  1030. SA4 A4+B4
  1031. SB7 B7-B1 DECR FOR FIRST TEST
  1032. ZR X5,FOUND THIS IS FIRST EOL TEST
  1033. SB7 B7-B1 SAME SEQUENCE
  1034. ZR X6,FOUND
  1035. SB7 B7-B1
  1036. ZR X7,FOUND
  1037. SB7 B7-B1
  1038. ZR X0,FOUND
  1039. GT B7,LOOP WHILE NOT OUTRIGHT EXHAUSTED
  1040.  
  1041. EXHAUST SX6 B6+B1 SHOW LIMIT+1
  1042. EQ NOSWDSZ NOW GET OUT
  1043.  
  1044. END
  1045. IDENT MOVELN
  1046. ENTRY MOVELN
  1047. EXT LINSIZ MAX LENGTH OF LINE
  1048. SYSCOM B1
  1049. TITLE MOVELN - MOVE AND MEASURE INTERNAL LINE.
  1050. *COMMENT MOVELN - MOVE AND MEASURE INTERNAL LINE.
  1051. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  1052. MML SPACE 4,10
  1053. *** MOVELN - MOVE AND MEASURE INTERNAL LINE.
  1054. *
  1055. * G.K. CHACE. 83/02/03.
  1056. MML SPACE 4,10
  1057. *** *MOVELN* MOVES A LINE IMAGE FROM ONE BUFFER TO ANOTHER, AND
  1058. * MEASURES THE NUMBER OF WORDS. THE LINE IMAGES MUST BE
  1059. * CODED IN THE FULL SCREEN EDITOR INTERNAL CHARACTER SET, AND
  1060. * MUST BE IN THE REPAIRED FORMAT AS PRODUCED BY THE *LINESZ*
  1061. * ROUTINE. THE INTERNAL CHARACTER SET USES SEVEN BITS PER
  1062. * CHARACTER, EIGHT CHARACTER PER WORDS, WITH THE 56 DATA BITS
  1063. * RIGHT JUSTIFIED IN EACH WORD. ONCE REPAIRED BY *LINESZ*,
  1064. * THE SIGN BIT OF EACH WORD INDICATES THE LAST WORD OF EACH
  1065. * LINE.
  1066. *
  1067. * THIS ROUTINE PERFORMS THE MEASUREMENT FUNCTION ONLY, WITH
  1068. * NO MOVE, IF THE TARGET ADDRESS IS ZERO.
  1069. MML SPACE 4,15
  1070. *** CALLING SEQUENCE.
  1071. *
  1072. * *SYMPL* CALL -
  1073. *
  1074. * NUMWORDS=MOVELN(FROM,TO);
  1075. *
  1076. * FROM = SOURCE BUFFER, INTERNAL CHARACTER SET.
  1077. * TO = TARGET BUFFER, INTERNAL CHARACTER SET.
  1078. MML SPACE 4,10
  1079. ** MOVELN - MOVE AND MEASURE INTERNAL LINE.
  1080. *
  1081. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  1082. *
  1083. * USES X - 1, 2, 3, 4, 5, 6, 7.
  1084. * A - 1, 2, 3, 4, 5, 7.
  1085. * B - 1, 3.
  1086. *
  1087. * CALLS FATAL, LINSIZ.
  1088.  
  1089.  
  1090. EOL SB3 -B3
  1091. SX6 X5+B3
  1092.  
  1093.  
  1094. MOVELN SUBR
  1095. SB1 1
  1096. SA5 LINSIZ
  1097. SA4 A1+B1 ADDR OF TO
  1098. SA1 X1 START PREFETCH
  1099. SA2 A1+B1
  1100. SA3 A2+B1
  1101. SB3 X5 INIT LOOP COUNTER
  1102.  
  1103. ZR X4,SCAN ONLY COMPUTE SIZE IF NULL TARGET
  1104.  
  1105. BX7 X1 STORE FIRST WORD
  1106. SA7 X4
  1107. SA4 A3+B1 ONE LAST PREFETCH
  1108.  
  1109. LOOP SB3 B3-B1 HERE GOES
  1110. MI X7,EOL
  1111. BX7 X2
  1112. SA1 A4+B1
  1113. SA7 A7+B1
  1114.  
  1115. SB3 B3-B1
  1116. MI X7,EOL
  1117. BX7 X3
  1118. SA2 A1+B1
  1119. SA7 A7+B1
  1120.  
  1121. SB3 B3-B1
  1122. MI X7,EOL
  1123. BX7 X4
  1124. SA3 A2+B1
  1125. SA7 A7+B1
  1126.  
  1127. SB3 B3-B1
  1128. MI X7,EOL
  1129. BX7 X1
  1130. SA4 A3+B1
  1131. SA7 A7+B1
  1132.  
  1133. LE B3,FULL IF OVERFLOWED LIMIT
  1134. EQ LOOP
  1135.  
  1136. SCAN SB3 B3-B1 DECREMENT COUNT
  1137. MI X1,EOL WHEN DONE
  1138. SA1 A3+B1 PICK UP NEXT WORD
  1139. SB3 B3-B1
  1140. MI X2,EOL
  1141. SA2 A1+B1
  1142. SB3 B3-B1
  1143. MI X3,EOL
  1144. SA3 A2+B1
  1145. EQ SCAN SCAN ANOTHER THREE WORDS IN PARALLEL
  1146.  
  1147. FULL SA1 PARM
  1148. RJ =XFATAL
  1149.  
  1150. PARM CON MSG
  1151. MSG DIS ,/MOVELN - LINE TOO LONG$/
  1152. END
  1153. IDENT FASTCNI
  1154. ENTRY FASTCNI
  1155. SYSCOM B1
  1156. TITLE FASTCNI - CONVERT NORMAL INPUT.
  1157. *COMMENT FASTCNI - CONVERT NORMAL INPUT.
  1158. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  1159. CNI SPACE 4,10
  1160. *** FASTCNI - CONVERT NORMAL INPUT.
  1161. *
  1162. * G.K. CHACE. 83/02/03.
  1163. CNI SPACE 4,10
  1164. *** *FASTCNI* PROVIDES AN OPTIMIZED ALGORITHM TO CONVERT LINE
  1165. * IMAGES FROM THE DISPLAY CODE CHARACTER SET AND ZERO-BYTE
  1166. * TERMINATION, TO THE FULL SCREEN EDITOR INTERNAL CHARACTER
  1167. * SET AND END OF LINE CHARACTER TERMINATION. THE FSE
  1168. * CHARACTER SET USES SEVEN BITS PER CHARACTER AND EIGHT
  1169. * CHARACTERS PER WORD, WITH THE 56 DATA BITS RIGHT JUSTIFIED
  1170. * IN EACH WORD. END OF LINE IS SIGNALLED BY A CHARACTER OF
  1171. * ALL ONE BITS. THE REMAINING BITS OF THE LAST WORD ARE
  1172. * RANDOM. CHARACTER VALUES ARE IDENTICAL.
  1173. CNI SPACE 4,15
  1174. *** CALLING SEQUENCE.
  1175. *
  1176. * *SYMPL* CALL -
  1177. *
  1178. * FASTCNI(FSELINE,NOSLINE,FSEWORDS,NOSWORDS);
  1179. *
  1180. * FSELINE = FSE-FORMAT LINE BUFFER.
  1181. * NOSLINE = NOS-FORMAT LINE BUFFER.
  1182. * FSEWORDS = MAXIMUM CAPACITY OF FSELINE.
  1183. * NOSWORDS = MAXIMUM CAPACITY OF NOSLINE.
  1184. CNI SPACE 4,10
  1185. ** FASTCNI - CONVERT NORMAL INPUT.
  1186. *
  1187. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  1188. *
  1189. * USES X - 0, 2, 3, 4, 5, 6, 7.
  1190. * A - 2, 3, 4, 5, 6.
  1191. * B - ALL.
  1192.  
  1193.  
  1194. FASTCNI SUBR
  1195. SB1 1
  1196. * X1->FSELINE
  1197. SA2 A1+B1 X2->NOSLINE
  1198. SA3 A2+B1 X3->FSELIMIT
  1199. SA4 A3+B1 X4->NOSLIMIT
  1200. SA3 X3 X3=FSELIMIT
  1201. SA4 X4 X4=NOSLIMIT
  1202. SB3 X3 REMEMBER
  1203. SB4 X4 REMEMBER
  1204. SB7 X1 REMEMBER OUTPUT ADDR
  1205. SA5 X2 FETCH FIRST INPUT
  1206. SA4 A5+B1 EXTRA PREFETCH
  1207. SX7 10 USEFUL CONSTANT
  1208. SB5 X7 INPUT CHAR COUNT
  1209. SB6 8 OUTPUT CHAR COUNT
  1210. MX6 0 CLEAR OUTPUT ACCUM
  1211. MX0 6 INPUT CHAR ISOLATION
  1212. SB2 55 INITAL ROTATE COUNT
  1213.  
  1214. LOOP ZR B5,NXTINPT NO INPUT TO USE
  1215. ZR B6,NXTOUTP MUST CLEAR OUTPUT
  1216. BX3 X5*X0 ISOLATE INPUT CHAR
  1217. ZR X3,COLON TO TELL COLON FROM EOL
  1218. DOCHAR LX3 B2 LINE UP UNDER NOSWORD
  1219. BX5 -X0*X5 REMOVE INPUT CHAR
  1220. BX6 X6+X3 ADD OUTPUT CHAR
  1221. LX5 6 NEXT INPUT CHAR
  1222. SB2 B2-7 NEXT ROTATE COUNT
  1223. SB5 B5-B1 DECR CHAR COUNTS
  1224. SB6 B6-B1
  1225. EQ LOOP DO MORE CHARACTERS
  1226.  
  1227. * NXTOUTP IS RIGHT AFTER THE LOOP, BEFORE NXTINPT, SINCE
  1228. * IT USED FIRST AND MORE OFTEN, THE STACK PREFETCH WILL
  1229. * WORK WELL AND A CYBER175 WILL NEVER VOID STACK TILL COLON.
  1230.  
  1231. NXTOUTP SA6 B7 STORE THE FULL WORD
  1232. SB7 B7+B1 POINT TO NEXT
  1233. MX6 0 CLEAR FOR MORE ACCUM
  1234. SB3 B3-B1 DECR LIMIT
  1235. SB6 8 RESET CHAR CTR
  1236. SB2 55 RESET ROTATE CTR
  1237. LE B3,FORCEOL WE ARE IN TROUBLE
  1238. EQ LOOP USUAL EXIT
  1239.  
  1240. NXTINPT BX5 X4 BRING UP PREFETCHED
  1241. SA4 A4+B1 PREFETCH ANOTHER
  1242. SB5 X7 RESET CHAR CTR
  1243. SB4 B4-B1 CHECK LIMIT
  1244. LE B4,GOTEOL NO MORE INPUT
  1245. EQ LOOP USUAL EXIT
  1246.  
  1247. COLON NZ X5,DOCHAR DEFINITELY NOT EOL
  1248. SX0 B5-B1 SEE IF 10-TH CHAR
  1249. NZ X0,GOTEOL DEFINITELY EOL
  1250. MX0 6 REBUILD MASK
  1251. NZ X4,DOCHAR NOT EOL IF NXT WORD NOT EOL
  1252. GOTEOL MX3 7 GEN AN EOL FSE CHAR
  1253. LX3 B2 LINE UP
  1254. LX3 1 LINE UP
  1255. BX6 X6+X3 ACCUMULATE IT
  1256. SA6 B7 STORE IT
  1257. EQ FASTCNI NORMAL COMPLETION
  1258.  
  1259. FORCEOL MX6 7 EMERGENCY TERMINATE
  1260. LX6 56
  1261. SA6 B7-B1 STORE AGAIN IN LAST WORD
  1262. EQ FASTCNI
  1263.  
  1264. END
  1265. IDENT FASTCNO
  1266. ENTRY FASTCNO
  1267. SYSCOM B1
  1268. TITLE FASTCNO - CONVERT NORMAL OUTPUT.
  1269. *COMMENT FASTCNO - CONVERT NORMAL OUTPUT.
  1270. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  1271. CNO SPACE 4,10
  1272. *** FASTCNO - CONVERT NORMAL OUTPUT.
  1273. *
  1274. * G.K. CHACE. 83/02/03.
  1275. CNO SPACE 4,10
  1276. *** *FASTCNO* PROVIDES AN OPTIMIZED ALGORITHM TO CONVERT LINE
  1277. * IMAGES FROM THE FULL SCREEN EDITOR CHARACTER SET TO THE NOS
  1278. * DISPLAY CODE CHARACTER SET. THE FSE CHARACTER SET USES
  1279. * SEVEN BITS PER CHARACTER, EIGHT CHARACTERS PER WORD, WITH
  1280. * THE 56 DATA BITS RIGHT JUSTIFIED. END OF LINE IS INDICATED
  1281. * BY A CHARACTER CONTAINING ALL ONE BITS. THE NOS LINE
  1282. * FORMAT USES DISPLAY CODE WITH A ZERO BYTE TERMINATOR. THE
  1283. * CHARACTER VALUES ARE IDENTICAL.
  1284. CNO SPACE 4,15
  1285. *** CALLING SEQUENCE.
  1286. *
  1287. * *SYMPL* CALL -
  1288. *
  1289. * FASTCNO(FSELINE,NOSLINE,FSEWORDS,NOSWORDS);
  1290. *
  1291. * FSELINE = FSE-FORMAT LINE IMAGE BUFFER.
  1292. * NOSLINE = NOS-FORMAT LINE IMAGE BUFFER.
  1293. * FSEWORDS = MAXIMUM CAPACITY OF FSELINE.
  1294. * NOSWORDS = MAXIMUM CAPACITY OF NOSLINE.
  1295. CNO SPACE 4,10
  1296. ** FASTCNO - CONVERT NORMAL OUTPUT.
  1297. *
  1298. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  1299. *
  1300. * USES X - ALL.
  1301. * A - 2, 3, 4, 5, 6.
  1302. * B - ALL.
  1303.  
  1304.  
  1305. FASTCNO SUBR
  1306. SB1 1
  1307. * X1->FSELINE
  1308. SA2 A1+B1 X2->NOSLINE
  1309. SA3 A2+B1 X3->FSELIMIT
  1310. SA4 A3+B1 X4->NOSLIMIT
  1311. SA3 X3 X3=FSELIMIT
  1312. SA4 X4 X4=NOSLIMIT
  1313. SB3 X3 REMEMBER
  1314. SB4 X4 REMEMBER
  1315. SB7 X2 REMEMBER FIRST OUT ADDR
  1316. SA5 X1 PREFETCH FIRSTINPUT
  1317. SA4 A5+B1 PREFETCH EXTRA
  1318. MX6 0 CLEAR OUTPUT ACCUMULATOR
  1319. SX7 8 USEFUL CONSTANT
  1320. SB5 X7 INPUT CHAR CTR
  1321. SB6 10 OUTPUT CHAR CTR
  1322. MX0 7 ISOLATION MASK
  1323. MX1 59 CLEAR SEVENTH BIT AWAY
  1324. LX0 56
  1325. SB2 60 INITIAL ROTATE CTR
  1326.  
  1327. LOOP ZR B5,NXTINPT IF NEED MORE INPUT
  1328. ZR B6,NXTOUTP IF MUST CLEAR OUTPUT
  1329. BX3 X5*X0 ISOLATE INPUT
  1330. BX2 X3-X0 SEE IF ALL ONES - EOL
  1331. ZR X2,GENEOL
  1332. LX3 5 TO TOP AND SPILL SURPLUS BIT
  1333. LX5 7 NEXT INPUT CHAR
  1334. BX3 X3*X1 GET RID OF SEVENTH BIT
  1335. LX3 B2 NOW ALIGN UNDER ACCUM
  1336. SB2 B2-6 NEXT ROTATE COUNT
  1337. BX6 X6+X3 ACCUMULATE IT
  1338. SB5 B5-B1 DECR CHAR CTRS
  1339. SB6 B6-B1
  1340. EQ LOOP DO ANOTHER CHAR
  1341.  
  1342. * NXTINPT COMES NEXT AND BEFORE NXTOUTO, SINCE NXTINPT IS
  1343. * FIRST AND MORE OFTEN, THE STACK PREFETCH WILL GET BOTH
  1344. * NXTINPT AND NXTOUTP INTO THE STACK QUICKLY ENOUGH THAT
  1345. * WE NEVER VOID THE CYBER175 STACK.
  1346.  
  1347. NXTINPT BX5 X4 BRING UP PREFETCHED
  1348. SA4 A4+B1 PREFETCH ANOTHER
  1349. SB5 X7 RESET CHAR CTR TO 8
  1350. SB3 B3-B1 CHEC LIMIT
  1351. LE B3,GENEOL EMERGENCY EXIT
  1352. EQ LOOP USUAL EXIT
  1353.  
  1354. NXTOUTP SA6 B7 STORE
  1355. SB7 B7+B1 POINT TO NEXT
  1356. MX6 0 CLEAR ACCUM
  1357. SB4 B4-B1 CHECK LIMIT
  1358. SB6 10 RESET CHAR CTR
  1359. SB2 60 RESET ROTATE CTR
  1360. LE B4,FORCEOL EMERGENCY EXIT
  1361. EQ LOOP NORMAL EXIT
  1362.  
  1363. GENEOL SA6 B7 STORE WHAT WE HAVE
  1364. MX0 48 ASSURE 12 BIT ENDOFLINE
  1365. BX6 -X0*X6
  1366. ZR X6,FASTCNO
  1367. MX6 0 PREVIOUS WORD NOT EOL ITSELF
  1368. SA6 B7+B1
  1369. EQ FASTCNO
  1370.  
  1371. FORCEOL MX6 0 CLOBBER AN EOL
  1372. SA6 B7-B1 STORE AGAIN TO ASSURE EOL
  1373. EQ FASTCNO
  1374.  
  1375. END
  1376. IDENT FASTCAI
  1377. ENTRY FASTCAI
  1378. SYSCOM B1
  1379. TITLE FASTCAI - CONVERT ASCII INPUT.
  1380. *COMMENT FASTCAI - CONVERT ASCII INPUT.
  1381. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  1382. CAI SPACE 4,10
  1383. *** FASTCAI - CONVERT ASCII INPUT.
  1384. *
  1385. * G.K. CHACE. 83/02/03.
  1386. CAI SPACE 4,10
  1387. *** *FASTCAI* PROVIDES AN OPTIMIZED ALGORITHM TO CONVERT LINE
  1388. * IMAGES FROM THE NOS LINE FORMAT WITH 6/12 ASCII CHARACTERS,
  1389. * TO THE FULL SCREEN EDITOR INTERNAL FORMAT AND CHARACTER
  1390. * SET. THE FSE CHARACTER SET USES SEVEN BITS PER CHARACTER
  1391. * AND EIGHT CHARACTERS PER WORD, WITH THE 56 DATA BITS RIGHT
  1392. * JUSTIFIED IN EACH WORD. END OF LINE IS DENOTED BY A
  1393. * CHARACTER OF ALL ONE BITS, AND THE REST OF THE LAST WORD
  1394. * MAY BE RANDOM.
  1395. *
  1396. * THE TOP BIT OF EACH FSE CHARACTER IS AN ESCAPE FLAG WHICH
  1397. * EFFECTIVELY MIMICS THE UPARROW OF THE 6/12 FORMAT. THE
  1398. * LOWER SIX BITS OF EACH FSE CHARACTER EQUAL THE DISPLAY CODE
  1399. * VALUES OF THE 6/12 FORMAT. UNTRANSLATABLE CHARACTERS ARE
  1400. * CHANGED TO COMMERCIAL AT SYMBOLS. A STATUS CODE IS RETURNED
  1401. * TO THE CALLER TO INDICATE WHETHER UNTRANSLATABLE CHARACTERS
  1402. * AND/OR 00B FORMAT COLONS WERE ENCOUNTERED.
  1403. CAI SPACE 4,15
  1404. *** CALLING SEQUENCE.
  1405. *
  1406. * *SYMPL* CALL -
  1407. *
  1408. * FASTCAI(FSELINE,NOSLINE,FSELIMIT,NOSLIMIT,ZEROFLG);
  1409. *
  1410. * FSELINE = FSE-FORMAT LINE IMAGE BUFFER.
  1411. * NOSLINE = 6/12 NOS ASCII LINE IMAGE BUFFER.
  1412. * FSELIMIT = MAXIMUM CAPCITY OF FSELINE.
  1413. * NOSLIMIT = MAXIMUM CAPACITY OF NOSLINE.
  1414. * ZEROFLG = BAD CHARACTER AND/OR 00B COLON STATUS.
  1415. CAI SPACE 4,10
  1416. ** FASTCAI - CONVERT ASCII INPUT.
  1417. *
  1418. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  1419. *
  1420. * EXIT NOSLINE CONTAINS CONVERTED LINE IN INTERNAL FORMAT.
  1421. * ZEROFLG = 0 IF NO BAD CHARACTERS OR 00B COLONS FOUND.
  1422. * = 1 IF 00B COLON(S) FOUND.
  1423. * = 2 IF BAD CHARACTER CODE(S) CHANGED.
  1424. * = 3 IF BOTH 00B COLON(S) AND BAD CHARACTER(S).
  1425. *
  1426. * USES X - ALL.
  1427. * A - 1, 2, 3, 4, 5, 6, 7.
  1428. * B - ALL.
  1429.  
  1430.  
  1431. FASTCAI SUBR
  1432. SB1 1
  1433.  
  1434. SA2 A1+B1 X1->FSELINE, X2->NOSLINE
  1435. SA3 A2+B1 X3->FSELIMIT
  1436. SA4 A3+B1 X4->NOSLIMIT
  1437. SA5 A4+B1 GET ZEROFLG
  1438.  
  1439. SA3 X3 X3=FSELIMIT
  1440. SA4 X4 X4=NOSLIMIT
  1441. BX6 X5 SAVE POINTER TO ZEROFLG
  1442. SA6 SAVADDR
  1443.  
  1444. MX7 0 CLEAR ACCUMULATOR
  1445. SA7 SAVBADC CLEAR FLAGS
  1446. SA7 SAVZCOL
  1447. SB7 X1 OUTPUT POINTER
  1448. SB3 X3 REMEMBER LIMIT COUNTERS
  1449. SB4 X4 DITTO
  1450.  
  1451. SA5 X2 PREFETCH FIRST NOS WORD
  1452. SA4 A5+B1 ADDITIONAL PREFETCH
  1453.  
  1454. MX0 6 6-BIT MASK
  1455. SB6 8 NUM FSE CHAR/WORD
  1456. SB5 8 NUM NOS CHAR/WORD MINUS PRE-FETCH
  1457.  
  1458. SB2 49 INIT ALIGNMENT SHIFTER
  1459.  
  1460. LX0 6 WE WILL WORK AT BOTTOM OF WORD
  1461. LX5 6 DITTO
  1462.  
  1463. BX1 X0*X5 PRELOAD FIRST TWO CHARS
  1464. BX5 -X0*X5
  1465. LX5 6
  1466. BX2 X0*X5
  1467. BX5 -X0*X5
  1468. LX5 6
  1469.  
  1470. LOOP ZR B5,NXTINPT IF NEED ANOTHER CM READ
  1471. ZR B6,NXTOUTP IF NEED ANOTHER CM WRITE
  1472. ZR X1,COLON SPECIAL CASE
  1473. SX3 X1-1R@ SPECIAL CASE
  1474. ZR X3,ATSIGN
  1475. SX3 X1-1R^ PARTLY SPECIAL
  1476. NZ X3,GENCHAR
  1477. SX1 X2+100B SHIFTED ALPHA CHAR
  1478. SX2 X2-77B CHECK FOR *US* CONTROL CHARACTER
  1479. ZR X2,BADCHAR IF *US* CONTROL CHARACTER MUST DISCARD
  1480. EXTRACH BX2 X0*X5 GEN NEXT CHAR
  1481. BX5 -X0*X5
  1482. LX5 6
  1483. SB5 B5-B1 DECR CHAR/WORD
  1484. NZ B5,GENCHAR IF NORMAL
  1485. RJ GETINPT IF ENDING WORD
  1486. GENCHAR LX1 B2 ALIGN FSE CHAR UNDER ACCUM
  1487. SB2 B2-7
  1488. BX7 X7+X1 ACCUMULATE
  1489. BX1 X2 ADVANCE THE TWO CHARACTERS
  1490. BX2 X0*X5
  1491. BX5 -X0*X5
  1492. LX5 6
  1493. SB6 B6-B1 DECR CHAR/WORD COUNTERS
  1494. SB5 B5-B1
  1495. EQ LOOP
  1496.  
  1497. NXTOUTP SA7 B7 WRITE A RESULT WORD
  1498. SB7 B7+B1 INCR PTR FOR NXT
  1499. MX7 0 CLEAR ACCUM
  1500. SB3 B3-B1 CHECK LIMIT
  1501. SB6 8
  1502. SB2 49
  1503. LE B3,FORCEOL IF IN TROUBLE
  1504. EQ LOOP
  1505.  
  1506. NXTINPT BX5 X4 ADVANCE PREFETCH
  1507. SA4 A4+B1 PREFETCH ANOTHER
  1508. SB5 10 RESET COUNTER
  1509. SB4 B4-B1 CHECK LIMIT
  1510. LX5 6 PRE-SHIFT TO BOTTOM
  1511. LE B4,GOTEOL
  1512. EQ LOOP
  1513.  
  1514. GETINPT BSSZ 1
  1515. BX5 X4 ADVANCE PREFETCHED
  1516. SA4 A4+B1 PREFETCH ANOTHER
  1517. SB5 10 RESET COUNTERS
  1518. SB4 B4-B1 CHECK LIMIT
  1519. LX5 6 PRE-SHIFT TO BOTTOM
  1520. LE B4,GOTEOL
  1521. EQ GETINPT
  1522.  
  1523. ATSIGN SX3 X2-1RA CHECK FOUR KNOWN SEQUENCES
  1524. ZR X3,ATSIGNA
  1525. SX3 X2-1RB
  1526. ZR X3,ATSIGNB
  1527. SX3 X2-1RD
  1528. ZR X3,ATSIGND
  1529. SX3 X2-1RG
  1530. ZR X3,ATSIGNG
  1531. BADCHAR SX6 2 NOTE THAT BAD CHARACTER OCCURRED
  1532. SA6 SAVBADC
  1533. ATSIGNA SX1 74B
  1534. EQ EXTRACH
  1535.  
  1536. ATSIGNB SX1 76B
  1537. EQ EXTRACH
  1538.  
  1539. ATSIGND SX1 0
  1540. EQ EXTRACH
  1541.  
  1542. ATSIGNG SX1 100B FSE ACCENT-GRAVE
  1543. EQ EXTRACH
  1544.  
  1545. ZERCHAR SX6 B1 NOTE THAT 00B FORMAT COLON OCCURRED
  1546. SA6 SAVZCOL
  1547. MX1 0 REGENERATE INTERNAL CHARACTER VALUE
  1548. EQ GENCHAR PROCEED TO GENERATE THE COLON
  1549.  
  1550. COLON NZ X2,ZERCHAR IF NEXT CHAR NOT ALSO COLON
  1551. SX3 B5-10 SEE IF LAST 2 CHARS OF WORD
  1552. ZR X3,GOTEOL THATS THE WHOLE STORY
  1553. NZ X5,ZERCHAR IF MORE TO CHECK
  1554. * EQ GOTEOL DRIFT INTO END-OF-LINE
  1555.  
  1556. GOTEOL SX1 177B FSE EOL CHAR
  1557. LX1 B2 POSITION UNDER ACCUM
  1558. BX7 X7+X1
  1559. SETFLAG SA3 SAVBADC GET BAD CHARACTER FLAG
  1560. SA2 SAVZCOL GET 00B COLON FLAG
  1561. SA7 B7 PUT LINE TERMINATOR IN PLACE
  1562. SA1 SAVADDR GET STATUS WORD ADDRESS
  1563. BX7 X2+X3 RETURN 00B COLON / BAD CHARACTER STATUS
  1564. SA7 X1+
  1565. EQ FASTCAI NORMAL EXIT
  1566.  
  1567. FORCEOL SX7 177B EMERGENCY EXIT
  1568. LX7 49
  1569. SB7 B7-B1 BACK UP ONE WORD
  1570. EQ SETFLAG SET 00B COLON AND BAD CHARACTER FLAGS
  1571.  
  1572. SAVADDR CON 0 ADDRESS OF STATUS RETURN WORD
  1573. SAVBADC CON 0 BAD CHARACTER FLAG
  1574. SAVZCOL CON 0 00B FORMAT COLON FLAG
  1575.  
  1576. END
  1577. IDENT FASTCAO
  1578. ENTRY FASTCAO
  1579. SYSCOM B1
  1580. TITLE FASTCAO - CONVERT ASCII OUTPUT.
  1581. *COMMENT FASTCAO - CONVERT ASCII OUTPUT.
  1582. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  1583. CAO SPACE 4,10
  1584. *** FASTCAO - CONVERT ASCII OUTPUT.
  1585. *
  1586. * G.K. CHACE. 83/02/03.
  1587. CAO SPACE 4,10
  1588. *** *FASTCAO* COPIES AND CONVERTS A LINE IMAGE FROM THE FULL
  1589. * SCREEN EDITOR CHARACTER SET AND LINE FORMAT, TO THE 6/12
  1590. * ASCII NOS CHARACTER SET AND LINE FORMAT. THE FSE CHARACTER
  1591. * SET USES SEVEN BITS PER CHARACTER, EIGHT CHARACTERS PER
  1592. * WORD, WITH THE 56 DATA BITS RIGHT JUSTIFIED. THE END OF
  1593. * LINE IS DENOTED BY A CHARACTER OF ALL ONE BITS. THE TOP
  1594. * BIT OF EACH CHARACTER MIMICS THE UPARROW ESCAPE CONVENTION
  1595. * OF THE 6/12 CHARACTER SET, AND THE LOWER SIX BITS OF EACH
  1596. * CHARACTER EQUAL THE DISPLAY CODES. THE 6/12 LINE IMAGE
  1597. * USES THE NOS ZERO BYTE TERMINATOR.
  1598. CAO SPACE 4,10
  1599. * *SYMPL* CALL -
  1600. *
  1601. * FASTCAO(FSELINE,NOSLINE,FSELIMIT,NOSLIMIT);
  1602. *
  1603. * FSELINE = FSE-FORMAT LINE IMAGE BUFFER.
  1604. * NOSLINE = 6/12 ASCII LINE IMAGE BUFFER.
  1605. * FSELIMIT = MAXIMUM CAPACITY OF FSELINE.
  1606. * NOSLIMIT = MAXIMUM CAPACITY OF NOSLINE.
  1607. CAO SPACE 4,10
  1608. ** FASTCAO - CONVERT ASCII OUTPUT.
  1609. *
  1610. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  1611. *
  1612. * USES X - ALL.
  1613. * A - 0, 2, 3, 4, 5, 7.
  1614. * B - ALL.
  1615.  
  1616.  
  1617. FASTCAO SUBR
  1618. SB1 1
  1619.  
  1620. SA2 A1+B1 X1->FSELINE, X2->NOSLINE
  1621. SA3 A2+B1 X3->FSELIMIT
  1622. SA4 A3+B1 X4->NOSLIMIT
  1623. SA5 A4+B1 X5->COLONFLG
  1624.  
  1625. SB7 X2 REMEMBER OUTPUT ADDR
  1626. SA3 X3 X3=FSELIMIT
  1627. SA4 X4 X4=NOSLIMIT
  1628. SA5 X5 X5=COLONFLG
  1629.  
  1630. MX0 7 ISOLATE FSE CHARACTER
  1631. LX0 56 IN POSITION
  1632. SB2 54 INITIAL ROTATE COUNT
  1633. SB5 8 CHAR/WORD
  1634. SB6 10 CHAR/WORD
  1635. SA0 -6 USEFUL CONSTANT
  1636.  
  1637. SB3 X3 REMEMBER
  1638. SB4 X4
  1639. BX6 X5
  1640.  
  1641. SA5 X1 PREFETCH FIRST FSE WORD
  1642. SA4 A5+B1 PREFETCH ANOTHER
  1643.  
  1644. MX7 0 CLEAR ACCUMULATOR
  1645. MX3 54 HELPS FIND SPECIAL CHARS
  1646.  
  1647. EQ LOOP START ITERATION
  1648.  
  1649.  
  1650. GENCHAR LX1 B2 POSITION THE CHARACTER
  1651. SB2 B2+A0 DECR SHIFT COUNT
  1652. BX7 X7+X1 ACCUMULATE IT
  1653. LX5 7 BRING UP NEXT FSE CHAR
  1654. SB6 B6-B1 DECR CHAR/WORD
  1655. SB5 B5-B1 DECR CHAR/WORD
  1656.  
  1657. LOOP ZR B5,NXTINPT
  1658. ZR B6,NXTOUTP
  1659. BX1 X0*X5 ISOLATE CURRENT FSE CHAR
  1660. BX2 X1-X0 CHECK FOR FSE EOL CHAR
  1661. ZR X2,GENEOL
  1662. LX1 11 PUT IT AT BOTTOM OF WORD
  1663.  
  1664. BX2 -X3*X1 LOOK FOR COLON + ACCENT
  1665. ZR X2,SPECIAL
  1666. SX2 X2-73B LOOK FOR OTHER SPECIALS
  1667. PL X2,SPECIAL SOME WILL COME RIGHT BACK
  1668.  
  1669. TSTSHFT SX2 X1-100B NOW LOOK FOR SHIFTED
  1670. MI X2,GENCHAR NORMAL
  1671. SX2 1R^ ESTABLISH SHIFT CHAR
  1672. LX2 B2 GEN EXTRA CHAR
  1673. SB6 B6-B1 DECR COUNTER
  1674. SB2 B2+A0 DECR SHIFT COUNTER
  1675. BX7 X7+X2 ACCUMULATE POSITIONED CHAR
  1676. BX1 -X3*X1 GET RID OF SHIFT BIT IN CHAR
  1677. NZ B6,GENCHAR IF USUAL CASE, GENERATE OTHER CHAR
  1678. EQ GENOUTP WHEN CROSSING WORDS RIGHT NOW
  1679.  
  1680.  
  1681. NXTINPT BX5 X4 ADVANCE PREFETCHED
  1682. SA4 A4+B1 PREFETCH ANOTHER
  1683. SB5 8 RESET CHAR/WORD
  1684. SB3 B3-B1 CHECK LIMIT
  1685. LE B3,GENEOL
  1686. EQ LOOP
  1687.  
  1688. NXTOUTP SA7 B7 STORE IT
  1689. SB7 B7+B1
  1690. MX7 0 CLEAR ACCUM
  1691. SB4 B4-B1 CHECK LIMIT
  1692. SB6 10 RESET CHAR/WORD
  1693. SB2 54 RESET POSITIONER
  1694. LE B4,FORCEOL ABNORMAL SITUATION
  1695. EQ LOOP
  1696.  
  1697. GENOUTP SA7 B7
  1698. SB7 B7+B1
  1699. MX7 0
  1700. SB4 B4-B1
  1701. SB6 10
  1702. SB2 54
  1703. LE B4,FORCEOL
  1704. EQ GENCHAR
  1705.  
  1706.  
  1707. SPECIAL ZR X1,COLON
  1708. SX2 X1-1R@ CHECK EACH SPECIAL CASE
  1709. ZR X2,ATSIGN
  1710. SX2 X1-1R^
  1711. ZR X2,UPARROW
  1712. SX2 X1-100B
  1713. ZR X2,ACCENT
  1714. EQ TSTSHFT ONE OF THE NORMAL CHARS 73-77
  1715.  
  1716. COLON ZR X6,GENCHAR IF GEN 00
  1717. SX1 04B IF GEN 7404
  1718. SX2 74B
  1719. EQ GENSPEC
  1720.  
  1721. ATSIGN SX2 74B
  1722. SX1 01B
  1723. EQ GENSPEC
  1724.  
  1725. UPARROW SX2 74B
  1726. SX1 02B
  1727. EQ GENSPEC
  1728.  
  1729. ACCENT SX2 74B
  1730. SX1 07B
  1731. * EQ GENSPEC
  1732.  
  1733. GENSPEC LX2 B2 ALIGN UNDER ACCUM
  1734. SB6 B6-B1 DECR COUNTERS
  1735. SB2 B2+A0
  1736. BX7 X7+X2
  1737. NZ B6,GENCHAR IF USUAL CASE
  1738. EQ GENOUTP WHEN CROSSING WORD BOUNDARY
  1739.  
  1740.  
  1741. GENEOL SA7 B7 STORE CURRENT WORD
  1742. MX0 48 ASSURE 12 BIT ENDOFLINE
  1743. BX7 -X0*X7
  1744. ZR X7,FASTCAO
  1745. MX7 0 PREVIOUS WORD NOT EOL ITSELF
  1746. SA7 A7+B1
  1747. EQ FASTCAO
  1748.  
  1749. FORCEOL MX7 0 GENERATE CRISIS END-OF-LINE
  1750. SA7 B7-B1 STORE LAST WORD AGAIN
  1751. EQ FASTCAO
  1752.  
  1753. END
  1754. IDENT FASTFND
  1755. ENTRY FASTFND
  1756. SYSCOM B1
  1757. TITLE FASTFND - FIND STRING IN LINE.
  1758. *COMMENT FASTFND - FIND STRING IN LINE.
  1759. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  1760. FSL SPACE 4,10
  1761. *** FASTFND - FIND STRING IN LINE.
  1762. *
  1763. * G.K. CHACE. 83/02/03.
  1764. FSL SPACE 4,10
  1765. *** *FASTFND* SEARCHES AN INTERNALLY FORMATTED LINE IMAGE FOR A
  1766. * CHARACTER STRING. THE INTERNAL LINE FORMAT USES SEVEN BITS
  1767. * PER CHARACTER AND EIGHT CHARACTERS PER WORD, WITH THE 56
  1768. * DATA BITS RIGHT JUSTIFIED. THE CALLER PROVIDES BOUNDARIES
  1769. * FOR THE FIRST AND LAST CHARACTER POSITIONS WITHIN THE LINE
  1770. * WHERE THE SEARCH CAN BE ATTEMPTED. THE CALLER PROVIDES A
  1771. * MASK WHICH EFFECTIVELY DETERMINES WHETHER THE TOP BIT OF
  1772. * EACH CHARACTER (THE LOWER CASE FLAG) SHALL BE CHECKED OR
  1773. * IGNORED. THIS ROUTINE RETURNS A TRUE/FALSE FUNCTION VALUE
  1774. * FOR THE SUCCESS OR FAILURE OF THE SEARCH, PLUS A CHARACTER
  1775. * POSITION WHERE THE SEARCH SUCCEEDS.
  1776. FSL SPACE 4,15
  1777. *** CALLING SEQUENCE.
  1778. *
  1779. * *SYMPL* CALL -
  1780. *
  1781. * SUCCESS=FASTFND(LINE,LAST,FIRST,STRING,STRLEN,SLTS,POS,MASK);
  1782. *
  1783. * SUCCESS = BOOLEAN SEARCH RESULT.
  1784. * LINE = LINE IMAGE BUFFER.
  1785. * LAST = LAST POSITION TO SEARCH IN.
  1786. * FIRST = FIRST POSITION TO SEARCH IN.
  1787. * STRING = LINE IMAGE BUFFER WITH SEARCH KEY.
  1788. * STRLEN = NUMBER OF SEVEN-BIT CHARACTERS IN STRING.
  1789. * SLTS = LENGTH OF STRING LESS TRAILING SPACES.
  1790. * POS = IF SEARCH SUCCEEDS, POSITION WHERE FOUND.
  1791. * MASK = UPPER/LOWER SIGNIFICANCE BITMASK.
  1792. FSL SPACE 4,10
  1793. ** FASTFND - FIND STRING IN LINE.
  1794. *
  1795. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  1796. *
  1797. * EXIT (X6) = 0, IF STRING NOT FOUND.
  1798. * (X6) = 1, IF STRING FOUND.
  1799. * (POS) = POSITION OF STRING IN LINE, IF STRING FOUND.
  1800. *
  1801. * USES X - ALL.
  1802. * A - 0, 1, 2, 3, 4, 5, 6.
  1803. * B - ALL.
  1804.  
  1805.  
  1806. FASTFND BSS 1
  1807. SB1 1
  1808. SX6 A1+
  1809. SA6 FNDA
  1810. * X1 = LINE
  1811. SA2 A1+B1 X2 = LEN
  1812. SA3 A2+B1 X3 = START
  1813. SA5 A3+B1 X5 = FOR
  1814. SA4 A5+B1 X4 = FORLEN
  1815. SA2 X2 X2 = LEN
  1816. SA3 X3 X3 = START
  1817. SA5 X5 X5 = FOR[0]
  1818. SX6 X3 X6 = WHERE (INIT TO START)
  1819. SA3 A4+B1
  1820. SA4 X4 X4 = FORLEN
  1821. SA3 X3 X3 = FORLEN LESS TRAILING SPACES
  1822. PL X3,FND0 IF SOME NON-SPACE CHARACTERS
  1823. BX3 X3-X3
  1824. FND0 NG X4,FND12 IF NULL KEY
  1825. IX0 X2-X6 GET NUMBER TO LOOK FOR IN OUTER
  1826. IX0 X0-X3
  1827. SB6 X0+B1
  1828. LE B6,FND12 IF NOT ENOUGH CHARACTERS
  1829. LX3 30
  1830. BX4 X4+X3 X4 = FORLEN-T.S.(59-30), FORLEN(29-0)
  1831. BX7 X6 X7 = START/8
  1832. AX7 3
  1833. MX0 -3 X0 = MOD(START,8)
  1834. BX0 -X0*X6
  1835. SB3 X7 A3,X3 = LINE[START/8]
  1836. SA3 X1+B3
  1837. SA1 A1+7 READ CHARACTER MASK ADDRESS
  1838. SA1 X1+
  1839. BX7 X1 X7 = CHAR MASK
  1840. BX1 X4 X1 = FORLEN-T.S.(59-30), FORLEN(29-0)
  1841. ZR X0,FND1 IF ON WORD BOUNDRY
  1842. SX2 8 B2 = # CHARS LEFT IN WORD
  1843. IX2 X2-X0
  1844. SB2 X2
  1845. BX2 X3 X2 = LINE[START/8]
  1846. SX3 7 LEFT SHIFTED MOD(START,8) CHARS
  1847. IX3 X3*X0
  1848. SB3 X3
  1849. LX2 B3
  1850. SA3 A3+1 ENTER BYTE LOOP
  1851. SB6 B6-B2
  1852. GT B6,FND2 IF NOT LAST WORD
  1853. SB2 B6+B2 FIX LAST WORD
  1854. SB6 X0+B2
  1855. SB6 -B6
  1856. EQ FND2 BEGIN FIRST BYTE COMPARISON
  1857.  
  1858. FND1 LE B6,FND12 IF END OF LINE
  1859. BX2 X3 GET NEXT WORD
  1860. SB2 8
  1861. SA3 A3+B1
  1862. GE B2,B6,FND4 IF ON THE LAST WORD
  1863. SB6 B6-B2
  1864. FND2 BX0 X5-X2 COMPARE CHAR
  1865. BX0 X0*X7
  1866. ZR X0,FND5 IF FIRST CHARACTERS MATCH
  1867. FND3 SX6 X6+1 STEP TO NEXT CHARACTER
  1868. LX2 7
  1869. SB2 B2-B1
  1870. NE B2,FND2 IF WORD NOT EXHAUSTED
  1871. EQ FND1 GET NEXT WORD
  1872.  
  1873. FND4 SB2 B6 FIX UP LAST WORD
  1874. SB6 -B6
  1875. EQ FND2 CONTINUE FIRST BYTE COMPARISON
  1876.  
  1877. FND5 SB7 X1+
  1878. LX1 30
  1879. SB4 B2+X1
  1880. LX1 30
  1881. LT B6,FND6 IF WORKING ON LAST WORD
  1882. SB4 B4+B6
  1883. FND6 GT B4,B7,FND7 IF MORE LEFT THAN STRING LENGTH
  1884. SB7 B4-1 ONLY COMPARE REMAINDER
  1885. FND7 LE B7,FND13 IF ZERO STRING LENGTH
  1886. BX4 X5 X4 = WORKING FOR WORD
  1887. SB5 A5+B1 B5 = WORKING FOR ADDR
  1888. SB4 8 B4 = # CHARS LEFT IN X4
  1889. SA0 B2+ SAVE B2
  1890. BX3 X2 SAVE X2
  1891. SB3 A3 B3 = WORKING LINE ADDR
  1892. GE B6,FND8 IF NOT LAST WORD
  1893. SB2 B4+B2 CORRECT CHAR COUNT OF X2
  1894. SB2 B2+B6
  1895. FND8 LX2 7 SHIFT LINE WORD
  1896. SB2 B2-B1
  1897. NE B2,FND9 IF NOT END OF WORD
  1898. SA2 B3
  1899. SB3 B3+B1
  1900. SB2 8
  1901. FND9 LX4 7 SHIFT FOR WORD
  1902. SB4 B4-B1
  1903. NE B4,FND10 IF NOT END OF WORD
  1904. SA4 B5
  1905. SB5 B5+B1
  1906. SB4 8
  1907. FND10 BX0 X4-X2 COMPARE CHARS
  1908. BX0 X0*X7
  1909. NZ X0,FND11 IF COMPARISON FAILED
  1910. SB7 B7-1
  1911. NE B7,FND8 IF MORE TO COMPARE
  1912. EQ FND13 EXIT WITH STRING MATCH
  1913.  
  1914. FND11 BX2 X3 RESTORE X2
  1915. SA3 A3 START UP PREFETCH
  1916. SB2 A0+
  1917. EQ FND3 REENTER OUTER LOOP
  1918.  
  1919. FND12 SX6 B0+ FASTFND = FALSE
  1920. EQ FASTFND RETURN
  1921.  
  1922. FND13 SA1 FNDA RETURN DISP OF FOUND STRING
  1923. SA1 X1+6 IN *POS* PARM
  1924. SA6 X1
  1925. SX6 B1 FASTFND = TRUE
  1926. EQ FASTFND RETURN
  1927.  
  1928.  
  1929. FNDA BSS 1 PARAMETER LIST ADDRESS
  1930.  
  1931. END
  1932. IDENT FASTRLC
  1933. ENTRY FASTRLC
  1934. SYSCOM B1
  1935. TITLE FASTRLC - RELOCATE VALUES IN VECTOR.
  1936. *COMMENT FASTRLC - RELOCATE VALUES IN VECTOR.
  1937. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  1938. RLC SPACE 4,10
  1939. *** FASTRLC - RELOCATE VALUES IN VECTOR.
  1940. *
  1941. * G.K. CHACE. 83/02/03.
  1942. RLC SPACE 4,10
  1943. *** *FASTRLC* PROVIDES AN OPTIMIZED ALGORITHM TO CHECK A VECTOR
  1944. * OF INTEGERS FOR VALUES EQUAL TO OR GREATER THAN A THRESHOLD
  1945. * AND INCREMENT OR DECREMENT THOSE VALUES BY AN OFFSET.
  1946. RLC SPACE 4,15
  1947. *** CALLING SEQUENCE.
  1948. *
  1949. * *SYMPL* CALL -
  1950. *
  1951. * FASTRLC(STACK,NWORDS,THRESH,INCR);
  1952. *
  1953. * STACK = THE ARRAY OF RELOCATABLE VALUES.
  1954. * NWORDS = SIZE OF STACK.
  1955. * THRESH = THRESHOLD VALUE FOR RELOCATION TO OCCUR.
  1956. * INCR = OFFSET TO BE ADDED.
  1957. RLC SPACE 4,10
  1958. ** FASTRLC - RELOCATE VALUES IN VECTOR.
  1959. *
  1960. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  1961. *
  1962. * USES X - 0, 2, 3, 4, 5, 7.
  1963. * A - 2, 3, 4, 7.
  1964. * B - 1, 2.
  1965.  
  1966.  
  1967. FASTRLC SUBR
  1968. * A1->PARMS, X1->STACK
  1969. SA2 A1+1 X2->NWORDS
  1970. SA3 A1+2 X3->CURL
  1971. SA4 A1+3 X4->INCR
  1972.  
  1973. SB1 1
  1974.  
  1975. SA2 X2 X2=NWORDS
  1976. SA3 X3 X3=CURL
  1977. SA4 X4 X4=INCR
  1978.  
  1979. SB2 X2 B2=NWORDS, X2 FREE
  1980. SA2 X1 X2=FIRST WORD, X1 FREE
  1981. MX0 30 USEFUL MASK
  1982.  
  1983. LOOP BX1 X2 BRING IN THE PREFETCHED WORD
  1984. SA2 A2+B1 PREFETCH NEXT
  1985. SB2 B2-B1 DECREMENT LOOP COUNT
  1986. IX5 X1-X3 COMPARE FOR RELOCATION
  1987. NG B2,FASTRLC WHEN EXHAUSTED
  1988. NG X5,LOOP IF NEEDS NO HELP
  1989. IX7 X1+X4 RELOCATE IT
  1990. SA7 A2-B1 RE-STORE IT
  1991. EQ LOOP
  1992.  
  1993. END
  1994. IDENT MOVEWD
  1995. ENTRY MOVEWD
  1996. SYSCOM B1
  1997. TITLE MOVEWD - MOVE WORDS.
  1998. *COMMENT MOVEWD - MOVE WORDS.
  1999. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  2000. MVW SPACE 4,10
  2001. *** MOVEWD - MOVE WORDS.
  2002. *
  2003. * G.K. CHACE. 83/02/03.
  2004. MVW SPACE 4,10
  2005. *** *MOVEWD* MOVES A BLOCK OF CENTRAL MEMORY TO ANOTHER LOCATION.
  2006. MVW SPACE 4,15
  2007. *** CALLING SEQUENCE.
  2008. *
  2009. * *SYMPL* CALL -
  2010. *
  2011. * MOVEWD(LENGTH,FROM,TO);
  2012. *
  2013. * LENGTH = NUMBER OF WORDS.
  2014. * FROM = SOURCE ARRAY.
  2015. * TO = TARGET ARRAY.
  2016. MVW SPACE 4,10
  2017. ** MOVEWD - MOVE WORDS.
  2018. *
  2019. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  2020. *
  2021. * USES X - 1, 2, 3, 4, 6, 7.
  2022. * A - 1, 2, 3, 4, 6, 7.
  2023. * B - ALL.
  2024.  
  2025.  
  2026. MOVEWD BSS 1
  2027. SB1 1
  2028. SA2 A1+B1
  2029. SA3 A2+B1
  2030. SA1 X1
  2031.  
  2032. * NOW X1=COUNT, X2 POINTS FROM, X3 POINTS WHERE
  2033.  
  2034. ZR X1,MOVEWD IF NULL COUNT
  2035. SB5 X1 B5 = COUNT
  2036. SB6 X2 B6 POINTS FROM
  2037. SB7 X3 B7 POINTS TO
  2038.  
  2039. SB3 B7-B6 ADDRESS OFFSET
  2040. ZR B3,MOVEWD IF NULL OFFSET
  2041. PL B3,HIGHER IF MOVE TO HIGHER ADDRESS
  2042.  
  2043. SB2 1
  2044. SB3 2
  2045. SB4 8
  2046. EQ START
  2047.  
  2048. HIGHER SB2 -1
  2049. SB3 -2
  2050. SB4 -8
  2051. SB6 B6+B5
  2052. SB7 B7+B5
  2053. SB6 B6-B1 LWA OF FROM
  2054. SB7 B7-B1 LWA OF TO
  2055.  
  2056. START SA1 B6 START PREFETCH OF DATA
  2057. SA2 A1+B2
  2058. SA3 A2+B2
  2059. SA4 A3+B2
  2060.  
  2061. SB5 B5-8 SEE IF ALREADY NEAR DONE
  2062. NG B5,FINAL
  2063.  
  2064. LOOP BX6 X1
  2065. SA1 A3+B3 PREFETCH MORE
  2066. BX7 X2
  2067. SA2 A4+B3
  2068. SA6 B7
  2069. SA7 B7+B2
  2070. BX6 X3
  2071. SA3 A1+B3
  2072. BX7 X4
  2073. SA4 A2+B3
  2074. SA6 A6+B3
  2075. SA7 A7+B3
  2076. BX6 X1
  2077. SA1 A3+B3
  2078. BX7 X2
  2079. SA2 A4+B3
  2080. SA6 A6+B3
  2081. SA7 A7+B3
  2082. BX6 X3
  2083. SA3 A1+B3
  2084. BX7 X4
  2085. SA4 A2+B3
  2086. SA6 A6+B3
  2087. SA7 A7+B3
  2088. SB5 B5-8 DECREMENT COUNT
  2089. SB7 B7+B4 INCREMENT OUTPUT ADDRESS
  2090. PL B5,LOOP IF NOT WITHIN 7 OR LESS WORDS
  2091.  
  2092. * HANDLE LAST 1 TO 7 WORDS IN LINE
  2093.  
  2094. FINAL SB5 B5+8
  2095. ZR B5,MOVEWD
  2096.  
  2097. BX6 X1
  2098. SB5 B5-B1
  2099. SA6 B7
  2100. ZR B5,MOVEWD
  2101.  
  2102. BX6 X2
  2103. SB5 B5-B1
  2104. SA6 A6+B2
  2105. ZR B5,MOVEWD
  2106.  
  2107. BX6 X3
  2108. SB5 B5-B1
  2109. SA6 A6+B2
  2110. ZR B5,MOVEWD
  2111.  
  2112. BX6 X4
  2113. SB5 B5-B1
  2114. SA6 A6+B2
  2115. ZR B5,MOVEWD
  2116.  
  2117. SA1 A3+B3
  2118. BX6 X1
  2119. SB5 B5-B1
  2120. SA6 A6+B2
  2121. ZR B5,MOVEWD
  2122.  
  2123. SA2 A4+B3
  2124. BX6 X2
  2125. SB5 B5-B1
  2126. SA6 A6+B2
  2127. ZR B5,MOVEWD
  2128.  
  2129. SA3 A1+B3
  2130. BX6 X3
  2131. SB5 B5-B1
  2132. SA6 A6+B2
  2133.  
  2134. EQ MOVEWD
  2135.  
  2136. END
  2137. IDENT ZEROWD
  2138. ENTRY ZEROWD
  2139. SYSCOM B1
  2140. TITLE ZEROWD - ZERO WORDS.
  2141. *COMMENT ZEROWD - ZERO WORDS.
  2142. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  2143. ZWD SPACE 4,10
  2144. *** ZEROWD - ZERO WORDS.
  2145. *
  2146. * G.K. CHACE. 83/02/03.
  2147. ZWD SPACE 4,10
  2148. *** *ZEROWD* ZEROES OUT A BLOCK IN MEMORY.
  2149. ZWD SPACE 4,15
  2150. *** CALLING SEQUENCE.
  2151. *
  2152. * *SYMPL* CALL -
  2153. *
  2154. * ZEROWD(ARRAY,LENGTH);
  2155. *
  2156. * ARRAY = TARGET ADDRESS.
  2157. * LENGTH = NUMBER OF WORDS.
  2158. ZWD SPACE 4,10
  2159. ** ZEROWD - ZERO WORDS.
  2160. *
  2161. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  2162. *
  2163. * USES X - 2, 6.
  2164. * A - 2, 6.
  2165. * B - 1, 2.
  2166.  
  2167.  
  2168. ZEROWD BSS 1 FROM,NW
  2169. SB1 1 MAKE SURE
  2170. SA2 A1+B1 X2=NW ADR
  2171. MX6 0 GET A ZERO
  2172. SA2 X2 X2=NW
  2173. SB2 X2-1 B2=MAX OFFSET
  2174. ZEROWD1 MI B2,ZEROWD
  2175. SA6 X1+B2 ZERO TOPMOST WORD
  2176. SB2 B2-B1 DECREMENT
  2177. EQ ZEROWD1 LOOP
  2178. END
  2179. IDENT FIXCTL
  2180. ENTRY FIXCTL
  2181. SYSCOM B1
  2182. TITLE FIXCTL - FIX CONTROL BYTES.
  2183. *COMMENT FIXCTL - FIX CONTROL BYTES.
  2184. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  2185. FCB SPACE 4,10
  2186. *** FIXCTL - FIX CONTROL BYTES.
  2187. *
  2188. * G.K. CHACE. 83/02/03.
  2189. FCB SPACE 4,10
  2190. *** *FIXCTL* SCANS A ZERO-TERMINATED LINE IMAGE IN EITHER
  2191. * DISPLAY CODE OR 6/12 ASCII, SUPPRESSING ANY CONTROL BYTES
  2192. * BY CHANGING THEIR COLONS TO SEMICOLONS.
  2193. FCB SPACE 4,15
  2194. *** CALLING SEQUENCE.
  2195. *
  2196. * *SYMPL* CALL -
  2197. *
  2198. * FIXCTL(LIMIT,LINE);
  2199. *
  2200. * LIMIT = MAXIMUM CAPACITY OF LINE BUFFER.
  2201. * LINE = THE LINE BUFFER.
  2202. FCB SPACE 4,10
  2203. ** FIXCTL - FIX CONTROL BYTES.
  2204. *
  2205. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  2206. *
  2207. * USES X - ALL.
  2208. * A - 1, 2, 4, 5, 7.
  2209. * B - 1, 2, 3, 4, 6, 7.
  2210. *
  2211. * CALLS NOSWDSZ.
  2212.  
  2213.  
  2214. FIXCTL SUBR
  2215. SX7 A1 SAME PARAMETER LIST ADDR
  2216. SA7 SAVPARM
  2217. RJ =XNOSWDSZ GET LENGTH IN WORDS
  2218.  
  2219. SB1 1
  2220. SB6 X6 SAVE LENGTH COMPUTED BY NOSWDSZ
  2221. MX6 0 DEFAULT RESULT IS NO CTL BYTES
  2222. MX0 48 USEFUL MASK
  2223.  
  2224. START SA1 SAVPARM
  2225. SA1 X1+B1
  2226. SB2 B6 THIS IS LENGTH OF LINE
  2227. SA1 X1 FETCH FIRST DATA
  2228. SA2 A1+B1 PREFETCH ANOTHER
  2229.  
  2230. OUTLOOP SB7 60 BIT POINTER FOR REPAIR
  2231. BX7 X1 SAVE VIRGIN COPY DATA FOR REPAIR
  2232. INLOOP ZR X1,ENDWORD SEE IF ANYTHING TO DO
  2233. LX1 12 ROTATE NEXT DOUBLE BYTE
  2234. BX3 -X0*X1 ISOLATE
  2235. BX1 X0*X1 REMOVE
  2236. SX4 X3-0001B LOWEST CONTROL BYTE
  2237. SX5 X3-0016B LARGEST PLUS ONE
  2238. BX4 -X4*X5 LOOK FOR X4 PLUS, X5 MINUS
  2239. MI X4,GOT THIS IS A CONTROL BYTE
  2240. NOGOT SB7 B7-12 ADJUST BIT POINTER
  2241. EQ INLOOP
  2242.  
  2243. ENDWORD BX1 X2 BRING UP PREFETCHED DATA
  2244. SA2 A2+B1 PREFETCH MORE
  2245. SB2 B2-B1 DECREMENT WORD COUNT
  2246. NZ B2,OUTLOOP
  2247. EQ FIXCTL WHEN ALL DONE
  2248.  
  2249. GOT SA4 MASK CONTROLS WHICH TESTS
  2250. SB3 X3 NEED ORDINAL FOR ROTATE COUNT
  2251. LX4 B3 EOL FLAG TO SIGN BIT
  2252. PL X4,GOT2 NOT INTERESTED IN EOL
  2253. NZ X1,NOGOT DEFINITELY NOT EOL
  2254. SB4 B7-12
  2255. NZ B4,GOT2 DEFINITELY IS EOL
  2256. NZ X2,NOGOT NOT EOL
  2257. GOT2 LX4 20 BOW FLAG TO SIGN
  2258. PL X4,GOT3 NOT INTERESTED IN BEGIN-WORD
  2259. SB4 B7-60
  2260. NZ B4,NOGOT NOT BEGIN OF WORD
  2261. GOT3 LX4 20 BOL FLAG TO SIGN
  2262. PL X4,ZAP NOT INTERESTED IN BEGIN-LINE
  2263. SA5 SAVPARM
  2264. SA5 X5+B1
  2265. SB4 X5
  2266. SB4 A2-B4 COMPARE ADDRESSES
  2267. SB4 B4-B1
  2268. NZ B4,NOGOT IF NOT BEGIN OF LINE
  2269.  
  2270. ZAP MX6 -1 SHOW SOME WERE FOUND
  2271. MX5 6 GENERATE A SEMICOLON
  2272. LX5 B7 LINE UP TO POINTED BIT
  2273. BX7 X7+X5 INSERT SEMICOLON
  2274. SA7 A2-B1 STORE BACK WHERE CAME FROM
  2275. EQ START RE-SCAN ALL OVER
  2276.  
  2277. SAVPARM BSSZ 1
  2278. MASK DATA 37132000751000130000B
  2279.  
  2280. END
  2281. IDENT FASTLNB
  2282. ENTRY FASTLNB
  2283. SYSCOM B1
  2284. TITLE FASTLNB - IDENTIFY LAST NON BLANK.
  2285. *COMMENT FASTLNB - IDENTIFY LAST NON BLANK.
  2286. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  2287. LNB SPACE 4,10
  2288. *** FASTLNB - IDENTIFY LAST NON BLANK.
  2289. *
  2290. * G.K. CHACE. 83/02/03.
  2291. LNB SPACE 4,10
  2292. *** *FASTLNB* COMPUTES THE NUMBER OF TRAILING BLANKS IN AN FSE
  2293. * LINE BUFFER. THESE CODED LINES ARE IN THE SPECIAL
  2294. * CHARACTER SET AND LINE FORMAT USED INTERNALLY BY FSE.
  2295. *
  2296. * *FASTLNB* THEN SUBTRACTS THIS FROM THE LINE LENGTH, ALREADY
  2297. * COMPUTED VIA LENGTH FUNCTION, TO SHOW WHERE AN END-OF-LINE
  2298. * CHARACTER MAY BE OVERWRITTEN TO TRIM THE LINE BUFFER.
  2299. LNB SPACE 4,15
  2300. *** CALLING SEQUENCE.
  2301. *
  2302. * *SYMPL* CALL -
  2303. *
  2304. * LASTNON=FASTLNB(LINE);
  2305. *
  2306. * LASTNON = FUNCTION RESULT IS POSITION OF NON BLANK.
  2307. * LINE = LINE IMAGE BUFFER, FSE INTERNAL FORMAT.
  2308. LNB SPACE 4,10
  2309. ** FASTLNB - IDENTIFY LAST NON BLANK.
  2310. *
  2311. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  2312. *
  2313. * USES X - ALL.
  2314. * A - 1, 2, 3, 4, 5.
  2315. * B - ALL.
  2316. *
  2317. * CALLS LENGTH.
  2318.  
  2319.  
  2320. TOP SX6 B7-B6 SUBTRACT TRAIL COUNT FROM LENGTH
  2321.  
  2322. FASTLNB SUBR
  2323. SX6 X1 SAVE TEXT POINTER
  2324. SA6 SAVPARM
  2325. RJ =XLENGTH CALL LENGTH FUNCTION, SAME PARM
  2326. SA1 SAVPARM REBUILD PARM CHAIN
  2327. SB1 1
  2328. SB2 -8 USEFUL CONSTANT
  2329.  
  2330. * X6=LENGTH IN CHARACTERS
  2331.  
  2332. ZR X6,FASTLNB IF NOTHING TO DO
  2333. BX4 X6 BREAK TOTAL INTO WORDS, CHARS
  2334. MX0 57D
  2335. AX4 3
  2336. BX5 -X0*X6
  2337. SB4 X4 B4=WORDS-1
  2338. SB5 X5 B5=EXTRA CHARS
  2339.  
  2340. SB6 B0 NOW B6 IS RESULT ACCUMULATOR
  2341. SB7 X6+8 OFFSET LENGTH BY 8 ...
  2342. SB7 B7-B5 ... AND BY SURPLUS CHARACTERS
  2343.  
  2344. SA3 X1+B4 LOAD ENDING WORD
  2345. SA4 DIVIDE USEFUL FOR DIVISION
  2346. SA5 FLIP USEFUL TO CHANGE 055 TO 000
  2347. SA1 A3-B1 PREFETCH MORE WORDS DOWN FROM TOP
  2348. SA2 A1-B1 DITTO
  2349.  
  2350. SX6 B5 NEED TO MULTIPLY CHAR COUNT BY 7
  2351. SX0 7
  2352. IX6 X6*X0
  2353. MX7 4 WILL BE 4+7*CHARS LONG
  2354. SX0 B1 FOR FUTURE 60-BIT DECREMENT
  2355. SB3 X6 GET VARIABLE BIT COUNT
  2356. AX7 B3 THIS IS 4+7*CHARS BITS LONG
  2357.  
  2358. BX3 X3-X5 CONVERT ANY 055 FIELD TO 000
  2359. BX3 X3*X7 FORCE TRAILER TO ARTIFICIAL BLANKS
  2360. IX6 X3-X0 CHANGE LOW ZEROES TO LOW ONES
  2361. BX3 X3-X6 ELIMINATE MOST SIGNIFICANT UPPER BITS
  2362. BX3 X3*X4 CONSIDER ONLY TOPS OF CHAR FIELDS
  2363. CX3 X3 HOW MANY REAL+ARTIFICAL TRAIL BLANKS
  2364. SB6 B6+X3 ACCUMULATE RESULT
  2365.  
  2366. SX3 X3+B2 SEE IF ALL EIGHT BLANKS
  2367. ZR B4,TOP IF NO OTHER WORDS TO DO
  2368. NZ X3,TOP DONT DO MORE IF NON-BLANK
  2369.  
  2370. LOOP BX6 X1 MOVE PREFETCHED TO SCRATCH
  2371. BX7 X2 DITTO
  2372. SA1 A2-B1 PREFETCH MORE
  2373. SA2 A1-B1 DITTO
  2374. BX6 X6-X5 CONVERT 055 FIELDS TO 000
  2375. BX7 X7-X5 DITTO
  2376. IX3 X6-X0 CHANGE LOW ZEROES TO LOW ONES
  2377. BX6 X6-X3 REMOVE MOST UPPER BITS
  2378. IX3 X7-X0 CHANGE LOW ZEROES TO LOW ONES
  2379. BX7 X7-X3 REMOVE MOST UPPER BITS
  2380. BX6 X6*X4 CONSIDER ONLY TOPS OF CHAR FIELDS
  2381. BX7 X7*X4 DITTO
  2382. CX6 X6 COUNT TRAILING BLANKS
  2383. CX7 X7 DITTO
  2384. SB6 B6+X6 ACCUMULATE RESULT
  2385. SX6 X6+B2 SEE IF ALL EIGHT WERE BLANKS
  2386. SB4 B4-B1 DECREMENT WORD COUNT
  2387. NZ X6,TOP NO, NOTHING MORE TO DO
  2388. ZR B4,TOP WHEN ALL WORDS DONE
  2389. SB6 B6+X7 ACCUMULATE ANOTHER RESULT
  2390. SX7 X7+B2 SEE IF ALL EIGHT BLANKS
  2391. SB4 B4-B1 DECREMENT WORD COUNT
  2392. NZ X7,TOP MUST NOT DO MORE SINCE A NON-BLANK
  2393. ZR B4,TOP WHEN ALL WORDS DONE
  2394. EQ LOOP DO SOME MORE
  2395.  
  2396. SAVPARM BSSZ 1
  2397. FLIP VFD 4/0,7/55B,7/55B,7/55B,7/55B,7/55B,7/55B,7/55B,7/55B
  2398. DIVIDE VFD 4/0,7/100B,7/100B,7/100B,7/100B,7/100B,7/100B,7/100B,7/100B
  2399.  
  2400. END
  2401. IDENT EXCHWD
  2402. ENTRY EXCHWD
  2403. SYSCOM B1
  2404. TITLE EXCHWD - EXCHANGE BLOCKS OF WRODS.
  2405. *COMMENT EXCHWD - EXCHANGE BLOCKS OF WRODS.
  2406. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  2407. XCH SPACE 4,10
  2408. *** EXCHWD - EXCHANGE BLOCKS OF WRODS.
  2409. *
  2410. * G.K. CHACE. 83/02/03.
  2411. XCH SPACE 4,10
  2412. *** *EXCHWD* EXCHANGES THE TEXT BETWEEN TWO BLOCKS OF WORDS
  2413. * IN CENTRAL MEMORY.
  2414. XCH SPACE 4,15
  2415. *** CALLING SEQUENCE.
  2416. *
  2417. * *SYMPL* CALL -
  2418. *
  2419. * EXCHWD(LENGTH,ARRAY1,ARRAY2);
  2420. *
  2421. * LENGTH = NUMBER OF WORDS.
  2422. * ARRAY1, ARRAY2 = THE TWO AREAS TO EXCHANGE.
  2423. XCH SPACE 4,10
  2424. ** EXCHWD - EXCHANGE BLOCKS OF WRODS.
  2425. *
  2426. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  2427. *
  2428. * USES X - 1, 2, 3, 4, 6, 7.
  2429. * A - 1, 2, 3, 4, 6, 7.
  2430. * B - 1, 2, 5.
  2431.  
  2432.  
  2433. EXCHWD SUBR
  2434. SB1 1
  2435. SA2 A1+B1 X2 -> A
  2436. SA3 A2+B1 X3 -> B
  2437. SA1 X1 X1 = N
  2438. SB2 B1+B1
  2439. ZR X1,EXCHWD
  2440. MI X1,EXCHWD
  2441. SB5 X1 B5 = N
  2442.  
  2443. SA1 X2 PREFETCH DATA
  2444. SA3 X3
  2445. SA2 A1+B1
  2446. SA4 A3+B1
  2447.  
  2448. LOOP BX6 X1
  2449. SA1 A1+B2
  2450. BX7 X3
  2451. SA3 A3+B2
  2452. SB5 B5-B1
  2453. SA6 A3-B2
  2454. SA7 A1-B2
  2455. ZR B5,EXCHWD
  2456. BX6 X2
  2457. SA2 A2+B2
  2458. BX7 X4
  2459. SA4 A4+B2
  2460. SB5 B5-B1
  2461. SA6 A4-B2
  2462. SA7 A2-B2
  2463. ZR B5,EXCHWD
  2464. EQ LOOP
  2465.  
  2466. END
  2467. IDENT SFMSSTF
  2468. ENTRY SFMSSTF
  2469. SYSCOM B1
  2470. TITLE SFMSSTF - USE SFM TO ENABLE SUBSYSTEM.
  2471. *COMMENT SFMSSTF - USE SFM TO ENABLE SUBSYSTEM.
  2472. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  2473. SST SPACE 4,10
  2474. *** SFMSSTF - USE SFM TO ENABLE SUBSYSTEM.
  2475. *
  2476. * G.K. CHACE. 83/02/03.
  2477. SST SPACE 4,10
  2478. *** *SFMSSTF* CALLS *SFM* WITH THE *SSTF* FUNCTION CODE TO
  2479. * SET THE SUBSYSTEM ACCESSABILITY FLAG.
  2480. SST SPACE 4,10
  2481. ** COMMON DECKS.
  2482.  
  2483.  
  2484. *CALL COMSSFM
  2485. SST SPACE 4,15
  2486. *** CALLING SEQUENCE.
  2487. *
  2488. * *SYMPL* CALL -
  2489. *
  2490. * SFMSSTF;
  2491. SST SPACE 4,10
  2492. ** SFMSSTF - USE SFM TO ENABLE SUBSYSTEM.
  2493. *
  2494. * USES B - 1.
  2495. *
  2496. * MACROS SYSTEM.
  2497.  
  2498.  
  2499. SFMSSTF SUBR
  2500. SB1 1
  2501. SYSTEM SFM,R,XXX,SSTF*100B
  2502. EQ SFMSSTF
  2503.  
  2504. XXX CON 0
  2505. END
  2506. IDENT SFMCSTF
  2507. ENTRY SFMCSTF
  2508. SYSCOM B1
  2509. TITLE SFMCSTF - USE SFM TO DISABLE SUBSYSTEM.
  2510. *COMMENT SFMCSTF - USE SFM TO DISABLE SUBSYSTEM.
  2511. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  2512. CST SPACE 4,10
  2513. *** SFMCSTF - USE SFM TO DISABLE SUBSYSTEM.
  2514. *
  2515. * G.K. CHACE. 83/02/03.
  2516. CST SPACE 4,10
  2517. *** *SFMCSTF* CALLS *SFM* WITH THE *CSTF* FUNCTION CODE TO
  2518. * CLEAR THE SUBSYSTEM ACCESSABILITY FLAG.
  2519. CST SPACE 4,10
  2520. ** COMMON DECKS.
  2521.  
  2522.  
  2523. *CALL COMSSFM
  2524. CST SPACE 4,15
  2525. *** CALLING SEQUENCE.
  2526. *
  2527. * *SYMPL* CALL -
  2528. *
  2529. * SFMCSTF;
  2530. CST SPACE 4,10
  2531. ** SFMCSTF - USE SFM TO DISABLE SUBSYSTEM.
  2532. *
  2533. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  2534. *
  2535. * USES B - 1.
  2536. *
  2537. * MACROS SYSTEM.
  2538.  
  2539.  
  2540. SFMCSTF SUBR
  2541. SB1 1
  2542. SYSTEM SFM,R,XXX,CSTF*100B
  2543. EQ SFMCSTF
  2544.  
  2545. XXX CON 0
  2546. END
  2547. IDENT SETNAD
  2548. ENTRY SETNAD
  2549. SYSCOM B1
  2550. TITLE SETNAD - SET NO AUTO DROP FLAG.
  2551. *COMMENT SETNAD - SET NO AUTO DROP FLAG.
  2552. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  2553. NAD SPACE 4,10
  2554. *** SETNAD - SET NO AUTO DROP FLAG.
  2555. *
  2556. * G.K. CHACE. 83/02/03.
  2557. NAD SPACE 4,10
  2558. *** *SETNAD* USES *LFM* TO SET THE NO-AUTO-DROP FLAG ON
  2559. * THE SPECIFIED FILE.
  2560. NAD SPACE 4,15
  2561. *** CALLING SEQUENCE.
  2562. *
  2563. * *SYMPL* CALL -
  2564. *
  2565. * SETNAD(FET);
  2566. *
  2567. * FET = FET FOR THE FILE TO BE PROCESSED.
  2568. NAD SPACE 4,10
  2569. ** SETNAD - SET NO AUTO DROP FLAG.
  2570. *
  2571. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  2572. *
  2573. * USES X - 2.
  2574. * B - 1.
  2575. *
  2576. * MACROS SETFS.
  2577.  
  2578.  
  2579. SETNAD SUBR
  2580. SB1 1
  2581. BX2 X1
  2582. SETFS X2,NAD
  2583. EQ SETNAD
  2584. END
  2585. IDENT SETAUC
  2586. ENTRY SETAUC
  2587. SYSCOM B1
  2588. TITLE SETAUC - COMPUTE AND SET APPLICATION UNIT CHARGE.
  2589. *COMMENT SETAUC - COMPUTE AND SET APPLICATION UNIT CHARGE.
  2590. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  2591. AUC SPACE 4,10
  2592. *** SETAUC - COMPUTE AND SET APPLICATION UNIT CHARGE.
  2593. *
  2594. * G.K. CHACE. 83/05/27.
  2595. AUC SPACE 4,10
  2596. *** *SETAUC* USES *CPM* TO SET THE APPLICATION UNIT CHARGE.
  2597. AUC SPACE 4,10
  2598. ** COMMON DECKS.
  2599.  
  2600.  
  2601. *CALL COMCCMD
  2602. *CALL COMSSRU
  2603. AUC SPACE 4,10
  2604. *** CALLING SEQUENCE.
  2605. *
  2606. * *SYMPL* CALL -
  2607. *
  2608. * SETAUC(CIO,SECTOR,TERMINAL);
  2609. *
  2610. * CIO = NUMBER OF CIO CALLS.
  2611. * SECTOR = NUMBER OF SECTORS TRANFERRED VIA CIO.
  2612. * TERMINAL = NUMBER OF WORDS OF TERMINAL OUTPUT.
  2613. AUC SPACE 4,10
  2614. ** SETAUC - COMPUTE AND SET APPLICATION UNIT CHARGE.
  2615. *
  2616. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  2617. *
  2618. * USES X - 0, 1, 2, 3, 6, 7.
  2619. * A - 1, 2, 3, 6, 7.
  2620. * B - 1.
  2621. *
  2622. * MACROS SETAUC.
  2623.  
  2624.  
  2625. SETAUC SUBR ENTRY/EXIT
  2626. SB1 1
  2627. SA2 A1+B1
  2628. SA3 A2+B1
  2629. SA1 X1 NUMBER OF CIO CALLS
  2630. SA2 X2 NUMBER OF PRU-S
  2631. SA3 X3+ NUMBER OF WORDS OF TERMINAL OUTPUT
  2632. SX0 IMRD READ OPERATION CHARGE
  2633. IX1 X1*X0
  2634. LX2 IMPT PRU TRANSFER CHARGE
  2635. IX6 X1+X2 MS UNITS
  2636. SX0 1000 TEMPORARY SCALE TO PREVENT TRUNCATION
  2637. IX3 X3*X0
  2638. SA6 AUCD
  2639. SX0 IFCO CPU PER OUTPUT, MSEC PER WORD
  2640. IX3 X3*X0
  2641. SX0 "IFCO_D"
  2642. IX6 X3/X0 CP TIME
  2643. SA6 AUCC
  2644. AUC1 SA1 AUCC GET CP TIME
  2645. SA2 A1+B1 GET MS UNITS
  2646. IX3 X1+X2
  2647. ZR X3,SETAUCX IF NO MORE INCREMENTS
  2648. SX6 B0
  2649. BX3 X3-X3
  2650. SA2 AUCE MAXIMUM CP TIME
  2651. ZR X1,AUC2 IF NO MORE CP TIME
  2652. IX6 X1-X2
  2653. BX3 X2
  2654. PL X6,AUC2 IF MAXIMUM CP TIME EXCEEDED
  2655. BX3 X1 CP TIME INCREMENT
  2656. SX6 B0 NO MORE CP TIME
  2657. AUC2 SA6 A1 CP TIME OVERFLOW
  2658. SX7 B0
  2659. SA2 AUCA
  2660. SA7 A2+B1 WORD ZERO
  2661. BX6 X2+X3
  2662. SA6 A7+1 CP TIME WORD ONE
  2663. SA1 AUCD MS UNITS
  2664. SX2 1777B MAXIMUM MS UNITS
  2665. BX3 X3-X3
  2666. SX6 B0
  2667. ZR X1,AUC3 IF NO MORE MS UNITS
  2668. IX6 X1-X2
  2669. BX3 X2
  2670. PL X6,AUC3 IF MAXIMUM MS UNITS EXCEEDED
  2671. SX6 B0 NO MORE MS UNITS
  2672. BX3 X1 MS UNITS INCREMENT
  2673. AUC3 SA6 AUCD MS UNITS OVERFLOW
  2674. LX3 40-0
  2675. BX6 X3
  2676. SA6 AUCB+2 MS UNITS WORD TWO
  2677. SX7 B0
  2678. SA7 A6+B1 WORD THREE
  2679. SA7 A7+1 WORD FOUR
  2680. SETAUC AUCB APPLY CHARGES
  2681. EQ AUC1 LOOP FOR NEXT INCREMENT
  2682.  
  2683. AUCA VFD 6/1,54/0
  2684. AUCB BSSZ 5 SETAUC PARAMETER BLOCK
  2685. AUCC CON 0 CP TIME
  2686. AUCD CON 0 MS UNITS
  2687. AUCE CON 37777777777B MAXIMUM CP TIME INCREMENT
  2688.  
  2689. *CALL COMCCPM
  2690.  
  2691. END
  2692. IDENT ONSW
  2693. ENTRY ONSW
  2694. SYSCOM B1
  2695. TITLE ONSW - SET SENSE SWITCHES.
  2696. *COMMENT ONSW - SET SENSE SWITCHES.
  2697. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  2698. ONS SPACE 4,10
  2699. *** ONSW - SET SENSE SWITCHES.
  2700. *
  2701. * G.K. CHACE. 83/02/03.
  2702. ONS SPACE 4,15
  2703. *** CALLING SEQUENCE.
  2704. *
  2705. * *SYMPL* CALL -
  2706. *
  2707. * ONSW(PARAMETER);
  2708. *
  2709. * PARAMETER = PARAMETER TO PASS TO ONSW MACRO.
  2710. ONS SPACE 4,10
  2711. ** ONSW - SET SENSE SWITCHES.
  2712. *
  2713. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  2714. *
  2715. * USES X - 1.
  2716. * A - 1.
  2717. * B - 1.
  2718. *
  2719. * MACROS ONSW.
  2720.  
  2721.  
  2722. TOP ONSW X1
  2723. ONSW SUBR
  2724. SB1 1
  2725. SA1 X1
  2726. EQ TOP
  2727. END
  2728. IDENT DISSJ
  2729. ENTRY DISSJ
  2730. SYSCOM B1
  2731. TITLE DISSJ - DISABLE/ENABLE SSJ=.
  2732. *COMMENT DISSJ - DISABLE/ENABLE SSJ=.
  2733. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  2734. DISSJ SPACE 4,10
  2735. *** DISSJ - DISABLE/ENABLE SSJ=.
  2736. *
  2737. * E.D. REDIG. 84/03/01.
  2738. DISSJ SPACE 4,15
  2739. ** COMMON DECKS.
  2740.  
  2741.  
  2742. *CALL COMCMAC
  2743. DISSJ SPACE 4,15
  2744. *** CALLING SEQUENCE.
  2745. *
  2746. * *SYMPL* CALL -
  2747. *
  2748. * DISSJ(PARAMETER);
  2749. *
  2750. * PARAMETER = PARAMETER TO PASS TO DISSJ MACRO.
  2751. * = 2, DISABLE SSJ= PRIVILEGES.
  2752. * = 3, ENABLE SSJ= PRIVILEGES.
  2753. DISSJ SPACE 4,10
  2754. ** DISSJ - DISABLE/ENABLE SSJ=.
  2755. *
  2756. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  2757. *
  2758. * USES X - 1.
  2759. * A - 1.
  2760. * B - 1.
  2761. *
  2762. * MACROS DISSJ.
  2763.  
  2764.  
  2765. DISSJ SUBR ENTRY/EXIT
  2766. SB1 1
  2767. SA1 X1+
  2768. DISSJ X1
  2769. EQ DISSJX RETURN
  2770.  
  2771. END
  2772. IDENT SETRFLE
  2773. ENTRY SETRFLE
  2774. SYSCOM B1
  2775. TITLE SETRFLE - SET RFL FOR EXTENDED MEMORY.
  2776. *COMMENT SETRFLE - SET RFL FOR EXTENDED MEMORY.
  2777. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  2778. RFL SPACE 4,10
  2779. *** SETRFLE - SET RFL FOR EXTENDED MEMORY.
  2780. *
  2781. * G.K. CHACE. 83/02/03.
  2782. RFL SPACE 4,15
  2783. *** CALLING SEQUENCE.
  2784. *
  2785. * *SYMPL* CALL -
  2786. *
  2787. * SETRFLE(PARAMETER);
  2788. *
  2789. * PARAMETER = PARAMETER TO PASS TO SETRFL MACRO.
  2790. RFL SPACE 4,10
  2791. ** SETRFLE - SET RFL FOR EXTENDED MEMORY.
  2792. *
  2793. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  2794. *
  2795. * USES X - 1.
  2796. * A - 1.
  2797. * B - 1.
  2798. *
  2799. * MACROS SETRFL.
  2800.  
  2801.  
  2802. TOP SETRFL ,X1
  2803. SETRFLE SUBR
  2804. SB1 1
  2805. SA1 X1
  2806. EQ TOP
  2807. END
  2808. IDENT GETFLCE
  2809. ENTRY GETFLCE
  2810. SYSCOM B1
  2811. TITLE GETFLCE - DETERMINE EXTENDED MEMORY FIELD LENGTH.
  2812. *COMMENT GETFLCE - DETERMINE EXTENDED MEMORY FIELD LENGTH.
  2813. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  2814. FLC SPACE 4,10
  2815. *** GETFLCE - DETERMINE EXTENDED MEMORY FIELD LENGTH.
  2816. *
  2817. * G.K. CHACE. 83/02/03.
  2818. FLC SPACE 4,15
  2819. *** CALLING SEQUENCE.
  2820. *
  2821. * *SYMPL* CALL -
  2822. *
  2823. * GETFLCE(PARAMETER);
  2824. *
  2825. * PARAMETER = PARAMETER TO PASS TO GETFLC MACRO.
  2826. FLC SPACE 4,10
  2827. ** GETFLCE - DETERMINE EXTENDED MEMORY FIELD LENGTH.
  2828. *
  2829. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  2830. *
  2831. * USES B - 1.
  2832. *
  2833. * MACROS GETFLC.
  2834.  
  2835.  
  2836. TOP GETFLC ,X1
  2837. GETFLCE SUBR
  2838. SB1 1
  2839. EQ TOP
  2840. END
  2841. IDENT PROTEON
  2842. ENTRY PROTEON
  2843. SYSCOM B1
  2844. TITLE PROTEON - PROTECT EXTENDED MEMORY FIELD LENGTH.
  2845. *COMMENT PROTEON - PROTECT EXTENDED MEMORY FIELD LENGTH.
  2846. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  2847. PRO SPACE 4,10
  2848. *** PROTEON - PROTECT EXTENDED MEMORY FIELD LENGTH.
  2849. *
  2850. * G.K. CHACE. 83/02/03.
  2851. PRO SPACE 4,15
  2852. *** CALLING SEQUENCE.
  2853. *
  2854. * *SYMPL* CALL -
  2855. *
  2856. * PROTEON(PARAMETER);
  2857. *
  2858. * PARAMETER = PARAMETER TO PASS TO PROTECT MACRO.
  2859. PRO SPACE 4,10
  2860. ** PROTEON - PROTECT EXTENDED MEMORY FIELD LENGTH.
  2861. *
  2862. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  2863. *
  2864. * USES B - 1.
  2865. *
  2866. * MACROS PROTECT.
  2867.  
  2868.  
  2869. TOP PROTECT ON
  2870. PROTEON SUBR
  2871. SB1 1
  2872. EQ TOP
  2873. END
  2874. IDENT GETFNT
  2875. ENTRY GETFNT
  2876. SYSCOM B1
  2877. TITLE GETFNT - ACCESS LOCAL FNT-S.
  2878. *COMMENT GETFNT - ACCESS LOCAL FNT-S.
  2879. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  2880. FNT SPACE 4,10
  2881. *** GETFNT - ACCESS LOCAL FNT-S.
  2882. *
  2883. * G.K. CHACE. 83/02/03.
  2884. FNT SPACE 4,15
  2885. *** CALLING SEQUENCE.
  2886. *
  2887. * *SYMPL* CALL -
  2888. *
  2889. * GETFNT(PARAMETER);
  2890. *
  2891. * PARAMETER = PARAMETER TO PASS TO GETFNT MACRO.
  2892. FNT SPACE 4,10
  2893. ** GETFNT - ACCESS LOCAL FNT-S.
  2894. *
  2895. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  2896. *
  2897. * USES X - 2.
  2898. * B - 1.
  2899. *
  2900. * MACROS GETFNT.
  2901.  
  2902.  
  2903. TOP GETFNT X2
  2904. GETFNT SUBR
  2905. SB1 1
  2906. BX2 X1
  2907. EQ TOP
  2908. END
  2909. IDENT FILINFO
  2910. ENTRY FILINFO
  2911. SYSCOM B1
  2912. TITLE FILINFO - ACCESS FILE INFORMATION.
  2913. *COMMENT FILINFO - ACCESS FILE INFORMATION.
  2914. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  2915. FIL SPACE 4,10
  2916. *** FILINFO - ACCESS FILE INFORMATION.
  2917. *
  2918. * G.K. CHACE. 83/02/03.
  2919. FIL SPACE 4,15
  2920. *** CALLING SEQUENCE.
  2921. *
  2922. * *SYMPL* CALL -
  2923. *
  2924. * FILINFO(PARAMETER);
  2925. *
  2926. * PARAMETER = PARAMETER TO PASS TO FILINFO MACRO.
  2927. FIL SPACE 4,10
  2928. ** FILINFO - ACCESS FILE INFORMATION.
  2929. *
  2930. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  2931. *
  2932. * USES X - 2.
  2933. * B - 1.
  2934. *
  2935. * MACROS FILINFO.
  2936.  
  2937.  
  2938. TOP FILINFO X2
  2939. FILINFO SUBR
  2940. SB1 1
  2941. BX2 X1
  2942. EQ TOP
  2943. END
  2944. IDENT GETJO
  2945. ENTRY GETJO
  2946. SYSCOM B1
  2947. TITLE GETJO - GET JOB ORIGIN.
  2948. *COMMENT GETJO - GET JOB ORIGIN.
  2949. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  2950. GJO SPACE 4,10
  2951. *** GETJO - GET JOB ORIGIN.
  2952. *
  2953. * G.K. CHACE. 83/02/03.
  2954. GJO SPACE 4,15
  2955. *** CALLING SEQUENCE.
  2956. *
  2957. * *SYMPL* CALL -
  2958. *
  2959. * GETJO(PARAMETER);
  2960. *
  2961. * PARAMETER = PARAMETER TO PASS TO GETJO MACRO.
  2962. GJO SPACE 4,10
  2963. ** GETJO - GET JOB ORIGIN.
  2964. *
  2965. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  2966. *
  2967. * USES B - 1.
  2968. *
  2969. * MACROS GETJO.
  2970.  
  2971.  
  2972. TOP GETJO X1
  2973. GETJO SUBR
  2974. SB1 1
  2975. EQ TOP
  2976. END
  2977. IDENT USERNUM
  2978. ENTRY USERNUM
  2979. SYSCOM B1
  2980. TITLE USERNUM - GET USER NUMBER.
  2981. *COMMENT USERNUM - GET USER NUMBER.
  2982. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  2983. GUN SPACE 4,10
  2984. *** USERNUM - GET USER NUMBER.
  2985. *
  2986. * G.K. CHACE. 83/02/03.
  2987. GUN SPACE 4,15
  2988. *** CALLING SEQUENCE.
  2989. *
  2990. * *SYMPL* CALL -
  2991. *
  2992. * USERNUM(PARAMETER);
  2993. *
  2994. * PARAMETER = PARAMETER TO PASS TO USERNUM MACRO.
  2995. GUN SPACE 4,10
  2996. ** USERNUM - GET USER NUMBER.
  2997. *
  2998. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  2999. *
  3000. * USES B - 1.
  3001. *
  3002. * MACROS USERNUM.
  3003.  
  3004.  
  3005. TOP USERNUM X1
  3006. USERNUM SUBR
  3007. SB1 1
  3008. EQ TOP
  3009. END
  3010. IDENT GETSS
  3011. ENTRY GETSS
  3012. SYSCOM B1
  3013. TITLE GETSS - GET SUBSYSTEM TYPE.
  3014. *COMMENT GETSS - GET SUBSYSTEM TYPE.
  3015. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  3016. GSS SPACE 4,10
  3017. *** GETSS - GET SUBSYSTEM TYPE.
  3018. *
  3019. * G.K. CHACE. 83/02/03.
  3020. GSS SPACE 4,15
  3021. *** CALLING SEQUENCE.
  3022. *
  3023. * *SYMPL* CALL -
  3024. *
  3025. * GETSS(PARAMETER);
  3026. *
  3027. * PARAMETER = PARAMETER TO PASS TO GETSS MACRO.
  3028. GSS SPACE 4,10
  3029. ** GETSS - GET SUBSYSTEM TYPE.
  3030. *
  3031. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  3032. *
  3033. * USES B - 1.
  3034. *
  3035. * MACROS GETSS.
  3036.  
  3037.  
  3038. TOP GETSS X1
  3039. GETSS SUBR
  3040. SB1 1
  3041. EQ TOP
  3042. END
  3043. IDENT SETLOF
  3044. ENTRY SETLOF
  3045. SYSCOM B1
  3046. TITLE SETLOF - SET LIST OF FILES.
  3047. *COMMENT SETLOF - SET LIST OF FILES.
  3048. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  3049. LOF SPACE 4,10
  3050. *** SETLOF - SET LIST OF FILES.
  3051. *
  3052. * G.K. CHACE. 83/02/03.
  3053. LOF SPACE 4,15
  3054. *** CALLING SEQUENCE.
  3055. *
  3056. * *SYMPL* CALL -
  3057. *
  3058. * SETLOF(PARAMETER);
  3059. *
  3060. * PARAMETER = PARAMETER TO PASS TO SETLOF MACRO.
  3061. LOF SPACE 4,10
  3062. ** SETLOF - SET LIST OF FILES.
  3063. *
  3064. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  3065. *
  3066. * USES B - 1.
  3067. *
  3068. * MACROS SETLOF.
  3069.  
  3070.  
  3071. TOP SETLOF X1
  3072. SETLOF SUBR
  3073. SB1 1
  3074. EQ TOP
  3075. END
  3076. IDENT EXCST
  3077. ENTRY EXCST
  3078. SYSCOM B1
  3079. TITLE EXCST - EXECUTE CONTROL STATEMENT.
  3080. *COMMENT EXCST - EXECUTE CONTROL STATEMENT.
  3081. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  3082. XCS SPACE 4,10
  3083. *** EXCST - EXECUTE CONTROL STATEMENT.
  3084. *
  3085. * G.K. CHACE. 83/02/03.
  3086. XCS SPACE 4,15
  3087. *** CALLING SEQUENCE.
  3088. *
  3089. * *SYMPL* CALL -
  3090. *
  3091. * EXCST(PARAMETER);
  3092. *
  3093. * PARAMETER = PARAMETER TO PASS TO EXCST MACRO.
  3094. XCS SPACE 4,10
  3095. ** EXCST - EXECUTE CONTROL STATEMENT.
  3096. *
  3097. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  3098. *
  3099. * USES X - 2.
  3100. * B - 1.
  3101. *
  3102. * MACROS EXCST.
  3103.  
  3104.  
  3105. TOP SYSTEM TCS,R,X1,X2
  3106. EXCST SUBR
  3107. SB1 1
  3108. SX2 500B
  3109. EQ TOP
  3110. END
  3111. IDENT DISTCON
  3112. ENTRY DISTCON
  3113. SYSCOM B1
  3114. TITLE DISTCON - DISABLE TERMINAL CONTROL.
  3115. *COMMENT DISTCON - DISABLE TERMINAL CONTROL.
  3116. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  3117. DTC SPACE 4,10
  3118. *** DISTCON - DISABLE TERMINAL CONTROL.
  3119. *
  3120. * G.K. CHACE. 83/02/03.
  3121. DTC SPACE 4,15
  3122. *** CALLING SEQUENCE.
  3123. *
  3124. * *SYMPL* CALL -
  3125. *
  3126. * DISTCON(PARAMETER);
  3127. *
  3128. * PARAMETER = PARAMETER TO PASS TO DISTC MACRO.
  3129. DTC SPACE 4,10
  3130. ** DISTCON - DISABLE TERMINAL CONTROL.
  3131. *
  3132. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  3133. *
  3134. * USES X - 5.
  3135. * B - 1.
  3136. *
  3137. * MACROS DISTC.
  3138.  
  3139.  
  3140. DISTCON SUBR
  3141. SB1 1
  3142. BX5 X1
  3143. DISTC ON,X5
  3144. EQ DISTCON
  3145. END
  3146. IDENT CSETA
  3147. ENTRY CSETA
  3148. SYSCOM B1
  3149. TITLE CSETA - SET 6/12 ASCII CHARACTER SET.
  3150. *COMMENT CSETA - SET 6/12 ASCII CHARACTER SET.
  3151. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  3152. CSA SPACE 4,10
  3153. *** CSETA - SET 6/12 ASCII CHARACTER SET.
  3154. *
  3155. * G.K. CHACE. 83/02/03.
  3156. CSA SPACE 4,15
  3157. *** CALLING SEQUENCE.
  3158. *
  3159. * *SYMPL* CALL -
  3160. *
  3161. * CSETA;
  3162. CSA SPACE 4,10
  3163. ** CSETA - SET 6/12 ASCII CHARACTER SET.
  3164. *
  3165. * USES B - 1.
  3166. *
  3167. * MACROS CSET.
  3168.  
  3169.  
  3170. CSETA SUBR
  3171. SB1 1
  3172. CSET ASCII
  3173. EQ CSETA
  3174. END
  3175. IDENT CSETN
  3176. ENTRY CSETN
  3177. SYSCOM B1
  3178. TITLE CSETN - SET NORMAL CHARACTER SET.
  3179. *COMMENT CSETN - SET NORMAL CHARACTER SET.
  3180. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  3181. CSN SPACE 4,10
  3182. *** CSETN - SET NORMAL CHARACTER SET.
  3183. *
  3184. * G.K. CHACE. 83/02/03.
  3185. CSN SPACE 4,15
  3186. *** CALLING SEQUENCE.
  3187. *
  3188. * *SYMPL* CALL -
  3189. *
  3190. * CSETN;
  3191. CSN SPACE 4,10
  3192. ** CSETN - SET NORMAL CHARACTER SET.
  3193. *
  3194. * USES B - 1.
  3195. *
  3196. * MACROS CSET.
  3197.  
  3198.  
  3199. CSETN SUBR
  3200. SB1 1
  3201. CSET NORMAL
  3202. EQ CSETN
  3203. END
  3204. IDENT TSTATUS
  3205. ENTRY TSTATUS
  3206. SYSCOM B1
  3207. TITLE TSTATUS - GET TERMINAL STATUS.
  3208. *COMMENT TSTATUS - GET TERMINAL STATUS.
  3209. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  3210. GTS SPACE 4,10
  3211. *** TSTATUS - GET TERMINAL STATUS.
  3212. *
  3213. * G.K. CHACE. 83/02/03.
  3214. GTS SPACE 4,15
  3215. *** CALLING SEQUENCE.
  3216. *
  3217. * *SYMPL* CALL -
  3218. *
  3219. * TSTATUS(PARAMETER);
  3220. *
  3221. * PARAMETER = PARAMETER TO PASS TO TSTATUS MACRO.
  3222. GTS SPACE 4,10
  3223. ** TSTATUS - GET TERMINAL STATUS.
  3224. *
  3225. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  3226. *
  3227. * USES X - 5.
  3228. * B - 1.
  3229. *
  3230. * MACROS TSTATUS.
  3231.  
  3232.  
  3233. TSTATUS SUBR
  3234. SB1 1
  3235. BX5 X1
  3236. TSTATUS X5
  3237. EQ TSTATUS
  3238. END
  3239. IDENT SYSREQ
  3240. ENTRY SYSREQ
  3241. SYSCOM B1
  3242. TITLE SYSREQ - PARAMETERIZED SYSTEM REQUEST.
  3243. *COMMENT SYSREQ - PARAMETERIZED SYSTEM REQUEST.
  3244. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  3245. SYS SPACE 4,10
  3246. *** SYSREQ - PARAMETERIZED SYSTEM REQUEST.
  3247. *
  3248. * G.K. CHACE. 83/02/03.
  3249. SYS SPACE 4,15
  3250. *** CALLING SEQUENCE.
  3251. *
  3252. * *SYMPL* CALL -
  3253. *
  3254. * SYSREQ(STRING,R,PARM1,PARM2);
  3255. *
  3256. * STRING = THREE-CHARACTER NAME OF RA+1 REQUEST.
  3257. * R = ZERO OR ONE FOR AUTO RECALL.
  3258. * PARM1 = FIRST PARAMETER.
  3259. * PARM2 = SECOND PARAMETER.
  3260. SYS SPACE 4,10
  3261. ** SYSREQ - PARAMETERIZED SYSTEM REQUEST.
  3262. *
  3263. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  3264. *
  3265. * USES X - 0, 1, 2, 4, 6.
  3266. * A - 1, 2, 3, 4.
  3267. * B - 1.
  3268. *
  3269. * MACROS SYSTEM.
  3270.  
  3271.  
  3272. TOP LX2 40
  3273. LX4 18
  3274. BX6 X1+X2
  3275. BX6 X6+X3
  3276. BX6 X6+X4
  3277. SYSTEM
  3278. SYSREQ SUBR
  3279. SB1 1
  3280. SA2 A1+1
  3281. SA3 A1+2
  3282. SA4 A1+3
  3283. SA1 X1
  3284. SA2 X2
  3285. SA3 X3
  3286. SA4 X4
  3287. MX0 18
  3288. BX1 X0*X1
  3289. EQ TOP
  3290. END
  3291. IDENT EESET
  3292. ENTRY EESET
  3293. SYSCOM B1
  3294. TITLE EESET - ENABLE EVENT.
  3295. *COMMENT EESET - ENABLE EVENT.
  3296. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  3297. EES SPACE 4,10
  3298. *** EESET - ENABLE EVENT.
  3299. *
  3300. * G.K. CHACE. 83/02/03.
  3301. EES SPACE 4,15
  3302. *** CALLING SEQUENCE.
  3303. *
  3304. * *SYMPL* CALL -
  3305. *
  3306. * EESET(PARAMETER);
  3307. *
  3308. * PARAMETER = PARAMETER TO PASS TO EESET MACRO.
  3309. EES SPACE 4,10
  3310. ** EESET - ENABLE EVENT.
  3311. *
  3312. * ENTRY (A1) = FWA OF FORMAL PARAMETER LIST.
  3313. *
  3314. * USES X - 1.
  3315. * A - 1.
  3316. * B - 1.
  3317. *
  3318. * MACROS EESET.
  3319.  
  3320.  
  3321. TOP EESET X1
  3322. EESET SUBR
  3323. SB1 1
  3324. SA1 X1
  3325. EQ TOP
  3326. END