User Tools

Site Tools


cdc:nos2.source:nam5871:nmi_upc

NMI=UPC

Table Of Contents

  • [00038] UPC - UNPACK CONTROL CARD
  • [00043] UNPACK CONTROL CARD.

Source Code

NMI=UPC.txt
  1. *DECK NMI=UPC
  2. IDENT SETUPC
  3. ENTRY SETUPC,SETUPC2
  4. USE /PACKING/
  5. LINE BSS 18
  6. LINEND VFD 6/76B,54/9L
  7. KBUF BSS 80
  8. UPCSTAT BSS 1
  9. UPCOUNT BSS 1
  10. USE
  11.  
  12.  
  13. ** SETUPC
  14. * SET UP THE DATA LINE TO BE CRACKED FOR THE
  15. * PROCESS UPC
  16. *
  17. SETUPC EQ *+1S17 ENTRY FOR 8 WORD UPC
  18. SA1 LINEND
  19. BX6 X1
  20. SA6 LINE+8 SET UP TERMINATOR
  21. SET1 SB1 1
  22. SB7 KBUF
  23. SA5 LINE
  24. RJ =XUPC
  25. SA6 UPCSTAT SAVE STATUS
  26. SX7 B6-B1 SAVE
  27. SA7 UPCOUNT PARAMETER COUNT
  28. EQ SETUPC
  29.  
  30. SETUPC2 EQ *+1S17 ENTRY FOR 16 WORD UPC
  31. SA1 SETUPC2
  32. BX6 X1 RESET RETURN ADDRESS
  33. SA6 SETUPC
  34. EQ SET1
  35. END
  36. IDENT UPC
  37. ENTRY UPC
  38. TITLE UPC - UNPACK CONTROL CARD
  39. UPC SPACE 4,10
  40. BASE D
  41. * COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1994.
  42. UPC SPACE 4,10
  43. *** UPC - UNPACK CONTROL CARD.
  44. *
  45. * G. R. MANSFIELD. 70/12/12.
  46. * P. C. TAM. 77/05/25.
  47. *
  48. * *******************************************************
  49. * * THIS COMMON DECK IS PART OF THE COMMON COMMON DECKS *
  50. * * RESIDING ON THE COMPASS PROGRAM LIBRARY, AND BEING *
  51. * * MAINTAINED BY THE COMPASS PROJECT. ANY CHANGES *
  52. * * REQUIRED SHOULD BE DIRECTED TO THE COMPASS PROJECT *
  53. * * THROUGH THE PROPER PROCEDURE. *
  54. * *******************************************************
  55. *
  56. *
  57. * UPC UNPACKS A CONTROL/DATA STREAM INTO
  58. * INDIVIDUAL PARAMETERS
  59. UPC SPACE 4,10
  60. *** UPC UNPACKS A CONTROL CARD TO INDIVIDUAL PARAMETERS.
  61. * THE FOLLOWING CONDITIONS ARE NOTED.
  62. * (1.) IF (B7) IS NEGATIVE ON ENTRY, A BLANK AFTER THE KEYWORD
  63. * IS A SEPARATOR, OTHERWISE BLANKS ARE IGNORED.
  64. * (2.) THE SPECIAL (NON A/N) CHARACTERS CONSIDERED AS PARAMETER
  65. * SEPARATORS.
  66. * (3.) THE CHARACTER 76B IS CONSIDERED AS THE TERMINATION OF
  67. * THE CONTROL CARD.
  68. * (4.) CHARACTER WITH DISPLAY CODE VALUES 00B
  69. * IS ILLEGAL BEFORE THE TERMINATOR.
  70. * (5.) THE PARAMETER MUST CONTAIN 7 OR LESS CHARACTERS.
  71. * (6.) THE PARAMETERS ARE STORED LEFT JUSTIFIED WITH ZERO
  72. * FILL.
  73. * (7.) THE SEPARATOR CHARACTER WILL BE PLACED IN THE
  74. * LOWER 18 BITS OF THE PARAMETER UNLESS IT IS A *,*
  75. * IN WHICH CASE THE LOWER 18 BITS WILL BE ZERO
  76. * (8.) TWO SUCCESSIVE SEPARATORS OR A SEPARATOR FOLLOWED BY
  77. * A TERMINATOR RESULTS IN A PARAMETER OF ALL ZERO.
  78. *
  79. * ENTRY (X5) = FIRST WORD OF CONTROL CARD.
  80. * (A5) = ADDRESS OF FIRST WORD.
  81. * (B7) = ADDRESS FOR FIRST PARAMETER IF (B7) IS POSITIVE
  82. * COMPLEMENT OF ADDRESS FOR FIRST PARAMETER IF
  83. * (B7) IS NEGATIVE.
  84. * (B1) = 1.
  85. *
  86. * EXIT (X6) = 0 IF NO ERROR DURING UNPACK.
  87. * (B6) = PARAMETER COUNT.
  88. *
  89. * USES X - 0, 1, 2, 3, 4, 5, 6, 7.
  90. * B - 2, 3, 4, 5, 6.
  91. * A - 1, 2, 3, 5, 6, 7.
  92. *
  93. * CALLS NONE.
  94.  
  95.  
  96. UPC SUBR ENTRY/EXIT
  97. SB2 B7
  98. PL B2,UPC1 IF (B7) IS NEGATIVE ON ENTRY
  99. SB2 -B7 IF NEGATIVE, RESET
  100. UPC1 SA6 B2 PRESET A6 FOR WRITE
  101. SA3 TERMCHR (X3) = MASK FOR TERMINATORS
  102. SB5 60 (B5) = CONSTANT 60
  103. MX0 -6 (X0) = CHARACTER MASK
  104. BX6 X6-X6 CLEAR ASSEMBLY
  105. SB2 B5 CLEAR CHARACTER COUNT
  106. MX2 18 (X2) = EXCESS CHARACTER MASK
  107. MX4 1 (X4) = CHARACTER COUNTER
  108. SB6 B0 (B6) = ASSEMBLY INDEX
  109. EQ UPC3 ENTER LOOP
  110.  
  111. UPC2 LX6 6 ADVANCE ASSEMBLY
  112. SB2 B2-6
  113. BX6 X6+X7
  114. UPC3 LX5 6 NEXT CHARACTER
  115. BX7 -X0*X5
  116. NZ X7,UPC3A
  117. SX7 76B CHANGE 00B TO 76B (TERMINATOR)
  118. UPC3A SB3 X7-1R9 CHECK CHARACTER
  119. LX4 6 ADVANCE DISASSEMBLY
  120. PL X4,UPC4
  121.  
  122. * 00 CHARACTER IS ILLEGAL AND * IS ALPHANUMERIC.
  123.  
  124. SA5 A5+B1
  125. UPC4 ZR X7,UPC7 IF CHARACTER = 00
  126. LT B3,B1,UPC2 IF ALPHA/NUMERIC
  127. * SB4 X7-66B CHARS. 66-77B ARE ILLEGAL
  128. * GE B4,UPC7
  129. SB4 X7-1R*
  130. ZR B4,UPC2 IF CHARACTER = *
  131.  
  132. * CHECK FOR BLANK AS SEPARATOR.
  133.  
  134. SB4 X7-1R CHECK CHARACTER
  135. NZ B4,UPC5 NOT BLANK, MUST BE SEPARATOR
  136. PL B7,UPC3 (B7) POSITIVE, BLANK IGNORED
  137. NZ B6,UPC3 NOT JUST AFTER KEYWORD, BLANK IGNORED
  138.  
  139. * CHECK FOR PARAMETER .GT. 7 CHARACTERS.
  140.  
  141. UPC5 BX1 X2*X6 CHECK ASSEMBLY
  142. LX6 X6,B2 LEFT JUSTIFY ASSEMBLY
  143. NZ X1,UPC7 IF .GT. 7 CHARACTERS ASSEMBLED
  144. AX1 X3,B3 CHECK FOR TERMINATOR
  145. * EQ B4,B1,UPC6 IF SEPARATOR = *,*
  146. BX6 X6+X7 INSERT SEPARATOR
  147. UPC6 SA6 A6
  148. SB2 B5 RESET ASSEMBLY
  149. BX6 X6-X6
  150. LX1 59
  151. SB6 B6+B1
  152. SA6 A6+B1 CLEAR LAST + 1
  153. PL X1,UPC3 LOOP IF NOT TERMINATOR
  154. SA2 A6-B1 CLEAR TERMINATOR
  155. MX3 42
  156. BX7 X3*X2
  157. SA7 A2
  158. EQ UPCX RETURN
  159.  
  160. UPC7 SX6 B1 RETURN ERROR
  161. SB6 B0
  162. EQ UPCX RETURN
  163.  
  164.  
  165. TERMCHR VFD 60/400000000B WAS 4100B FOR .) NOW 76B
  166. UPC SPACE 4,10
  167. BASE *
  168. END
cdc/nos2.source/nam5871/nmi_upc.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator