User Tools

Site Tools


cdc:nos2.source:nam5871:nmi_cpi

NMI=CPI

Table Of Contents

  • [00006] XCDD - CONVERT INTEGER TO DECIMAL DISPLAY CODE.
  • [00031] XCFD - CONVERT INTEGER TO F10.3 FORMAT.
  • [00056] XCOD - CONVERT INTEGER TO OCTAL DISPLAY CODE.
  • [00081] XSFN - SPACE FILL NAME.
  • [00107] XSFW - SPACE FILL WORD.
  • [00133] XWOD - CONVERT WORD TO OCTAL DISPLAY CODE.

Source Code

NMI=CPI.txt
  1. *DECK NMI=CPI
  2. IDENT XCDD
  3. ENTRY XCDD
  4. B1=1
  5. LIST F
  6. TITLE XCDD - CONVERT INTEGER TO DECIMAL DISPLAY CODE.
  7. COMMENT CONVERT INTEGER TO DECIMAL DISPLAY CODE.
  8. XCDD SPACE 4,10
  9. *** XCDD - CONVERT INTEGER TO DECIMAL DISPLAY CODE.
  10. *
  11. * HOLLERITH = XCDD (INTEGER)
  12. *
  13. * XX = XCDD(YY); ( SYMPL CALL )
  14. *
  15. * ENTRY - YY, AN ITEM THAT CONTAINS THE INTEGER TO BE CONVERTED
  16. *
  17. * EXIT - XX, A CHAR. ITEM TO CONTAIN DISPLAY CODE ON EXIT
  18.  
  19.  
  20. XCDD SUBR = ENTRY/EXIT
  21. SB1 1
  22. SA1 X1+
  23. RJ =XCDD=
  24. JP XCDDX RETURN, RESULT IN X6
  25.  
  26. END
  27. IDENT XCFD
  28. ENTRY XCFD
  29. B1=1
  30. LIST F
  31. TITLE XCFD - CONVERT INTEGER TO F10.3 FORMAT.
  32. COMMENT CONVERT INTEGER TO F10.3 FORMAT.
  33. XCFD SPACE 4,10
  34. *** XVFD - CONVERT INTEGER TO F10.3 FORMAT.
  35. *
  36. * HOLLERITH = XCFD (INTEGER)
  37. *
  38. * XX = XCFD(YY); ( SYMPL CALL )
  39. *
  40. * ENTRY - YY, AN ITEM THAT CONTAINS THE INTEGER TO BE CONVERTED
  41. *
  42. * EXIT - XX, A CHAR. ITEM TO CONTAIN DISPLAY CODE ON EXIT
  43.  
  44.  
  45. XCFD SUBR = ENTRY/EXIT
  46. SB1 1
  47. SA1 X1+
  48. RJ =XCFD= CONVERT
  49. JP XCFDX RETURN, RESULT IN X6
  50. CFD SPACE 4,10
  51. END
  52. IDENT XCOD
  53. ENTRY XCOD
  54. B1=1
  55. LIST F
  56. TITLE XCOD - CONVERT INTEGER TO OCTAL DISPLAY CODE.
  57. COMMENT CONVERT INTEGER TO OCTAL DISPLAY CODE.
  58. XCOD SPACE 4,10
  59. *** XCOD - CONVERT INTEGER TO OCTAL DISPLAY CODE.
  60. *
  61. * HOLLERITH = XCOD (INTEGER)
  62. *
  63. * XX = XCOD(YY); ( SYMPL CALL )
  64. *
  65. * ENTRY - YY, AN ITEM THAT CONTAINS THE INTEGER TO BE CONVERTED
  66. *
  67. * EXIT - XX, A CHAR. ITEM TO CONTAIN DISPLAY CODE ON EXIT
  68.  
  69.  
  70. XCOD SUBR = ENTRY/EXIT
  71. SB1 1
  72. SA1 X1+
  73. RJ =XCOD=
  74. JP XCODX RETURN, RESULT IN X6
  75.  
  76. END
  77. IDENT XSFN
  78. ENTRY XSFN
  79. B1=1
  80. LIST F
  81. TITLE XSFN - SPACE FILL NAME.
  82. COMMENT SPACE FILL NAME.
  83. XSFN SPACE 4,10
  84. *** XSFN - SPACE FILL NAME.
  85. *
  86. * HOLLERITH = XSFN (NAME)
  87. *
  88. * XX = XSFN(NAME); ( SYMPL CALL )
  89. *
  90. * ENTRY - NAME, AN ITEM CONTAINING THE NAME, LEFT JUSTIFIED,
  91. * ZERO FILLED
  92. *
  93. * EXIT - XX, A CHAR. ITEM TO CONTAIN DISPLAY CODE ON EXIT
  94.  
  95.  
  96. XSFN SUBR = ENTRY/EXIT
  97. SB1 1
  98. SA1 X1+
  99. RJ =XSFN= SPACE FILL NAME
  100. JP XSFNX RETURN, RESULT IN X6
  101. SFN SPACE 4,10
  102. END
  103. IDENT XSFW
  104. ENTRY XSFW
  105. B1=1
  106. LIST F
  107. TITLE XSFW - SPACE FILL WORD.
  108. COMMENT SPACE FILL WORD.
  109. XSFW SPACE 4,10
  110. *** XSFW - SPACE FILL WORD.
  111. *
  112. * HOLLERITH = XSFW (WORD)
  113. *
  114. * XX = XSFW(WORD)
  115. *
  116. * ENTRY - WORD, AN ITEM CONTAINING TO WORD TO CHANGE ZEROES TO
  117. * BLANKS
  118. *
  119. * EXIT - XX, A CHAR. ITEM TO CONTAIN DISPLAY CODE ON EXIT
  120.  
  121.  
  122. XSFW SUBR = ENTRY/EXIT
  123. SB1 1
  124. SA1 X1+
  125. RJ =XZTB= SPACE FILL WORD
  126. JP XSFWX RETURN, RESULT IN X6
  127.  
  128. END
  129. IDENT XWOD
  130. ENTRY XWOD
  131. B1=1
  132. LIST F
  133. TITLE XWOD - CONVERT WORD TO OCTAL DISPLAY CODE.
  134. COMMENT CONVERT WORD TO OCTAL DISPLAY CODE.
  135. XWOD SPACE 4,8
  136. *** XWOD - CONVERT WORD TO OCTAL DISPLAY CODE
  137. *
  138. * M. D. PICKARD. 77/03/15
  139. *
  140. * SYMPL CALLABLE ROUTINE TO CONVERT ONE 60 BIT WORD INTO
  141. * TWO 60 BIT WORDS CONTAINING THE THE OCTAL REPRESENTATION
  142. * OF THE INPUT WORD.
  143. *
  144. * XWOD(W,A); ( SYMPL CALL )
  145. *
  146. * ENTRY - W, AN ITEM THAT CONTAINS THE WORD TO BE CONVERTED
  147. * A, A 20 CHARACTER BUFFER FWA
  148. * ( AN ARRAY OR ITEM 20 CHARACTERS LONG )
  149. *
  150. * EXIT - A AND A+1, CONTAIN CONVERTED WORD
  151.  
  152.  
  153. XWOD SUBR = ENTRY/EXIT
  154. SB1 1 (B1) = 1
  155. SB7 A1 SAVE (A1)
  156. SA1 X1 FETCH W
  157. RJ =XWOD=
  158. SA2 B7+B1 FETCH LOC (A)
  159. SA6 X2 STORE UPPER 10 CHARACTERS
  160. SA7 X2+B1 STORE LOWER 10 CHARACTERS
  161. JP XWODX RETURN
  162.  
  163. END
  164. *CWEOR,0
cdc/nos2.source/nam5871/nmi_cpi.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator