User Tools

Site Tools


cdc:nos2.source:nam5871:kput

Table of Contents

KPUT

Table Of Contents

Source Code

KPUT.txt
  1. *DECK KPUT
  2. IDENT KPUT
  3. ENTRY KPUT
  4. KPUT BSSZ 1
  5. SB1 1
  6. SA1 A1
  7. SA2 X1 X2 HAS FIRST PARAM(KADR)
  8. SA3 A1+B1 ADDRESS NEXT PARAM
  9. SA4 A3+B1 AND THE NEXT ONE
  10. SA3 X3 X3 HAS 2ND PARAM(KINDEX)
  11. SA5 A4+1 LAST PARAM
  12. SA4 X4 X4 HAS THE *SYMBOL* VALUE
  13. SA1 X5 X1 HAS THE VALUE TO BE CONVERTED
  14. *
  15. * ANALIZE THE *SYMBOL* WORD
  16. *
  17. MX6 54
  18. BX6 -X6*X4
  19. SA5 SIX
  20. IX5 X5*X6
  21. SB6 X5 B6 HAS NUMBER OF BITS
  22. MX6 54
  23. AX4 6
  24. BX6 -X6*X4
  25. SA5 SIX
  26. IX5 X5*X6
  27. SB7 X5 B7 HAS THE STARTING BIT
  28. AX4 6
  29. MX6 57
  30. BX5 -X6*X4 GET NEXT 3 BITS
  31. SB2 X5 B2 HAS VALUE OF WORD NUMBER IN ENTRY
  32. AX4 3
  33. BX4 -X6*X4 X4 NOW HAS FUNCTION CODE
  34. *
  35. * COMPUTE THE ADDRESS OF WORD TO BE MODIFIED
  36. *
  37. SA5 SIX
  38. IX5 X3*X5
  39. IX5 X5+X2
  40. SX5 X5+B2
  41. SX5 X5+B1 SKIP OVER HEADER (2 WORDS)
  42. SX5 X5+B1 X5 HAS THE CORRECT ADDRESS
  43. SA5 X5 NOW X5=WORD TO BE MODIFIED,A5=ADDRESS
  44. *
  45. * CONVERT TO DESIRED VALUE FROM X1 TO LEFT JUST IN X4
  46. *
  47. ZR X4,CONV CONVERT FROM BINARY TO DISPLAY CODE DECIMAL
  48. SX4 X4-1
  49. ZR X4,COPY THIS IS TO CONVERT TO DISPLAY-CODE OCTAL
  50. MX3 3
  51. MX4 0 TO HOLD THE RESULT
  52. SB2 10 MAXIMUM 10 DIGITS ARE CONSIDERED
  53. LX1 30
  54. LOOP LT B2,B1,OCT2
  55. BX7 X3*X1 GET ONE DIGIT
  56. LX7 3
  57. SX7 X7+33B CONVERT TO OCTAL DISPLAY
  58. LX4 6
  59. BX4 X4+X7 AND PUT IN PLACE
  60. LX1 3 GET ANOTHER DIGIT
  61. SB2 B2-1 LOOP INCREMENT
  62. JP LOOP
  63. * LEFT JUSTIFY THE VALUE
  64. OCT2 SB3 60
  65. SB3 B3-B6
  66. LX4 B3
  67. JP INSERT
  68. *
  69. COPY BX4 X1 JUST GET THE (CHARACTER) VALUE...
  70. JP INSERT
  71. CONV RJ =XCDD=
  72. *
  73. * AND PLUG IT IN THE RIGHT BIT POSITIONS
  74. *
  75. INSERT MX7 1
  76. SB6 B6-B1
  77. AX7 B6 FORM MASK WITH PROPER BITS NO. IN X7
  78. BX4 X4*X7 MASK THE VALUE TO BE INSERTED
  79. SB3 60
  80. SB7 B3-B7
  81. LX7 B7 TAKE MASK TO STARTING BIT
  82. LX4 B7 AND SO WITH THE VALUE INSERTED
  83. BX5 -X7*X5 CLEAN FIELD FROM FORMER DATA
  84. BX6 X5+X4
  85. SA6 A5
  86. EQ KPUT
  87. SIX VFD 60/6
  88. END
cdc/nos2.source/nam5871/kput.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator