User Tools

Site Tools


plato:source:plaopl:convrt2

CONVRT2

Table Of Contents

Source Code

CONVRT2.txt
  1. CONVRT2
  2. * /--- FILE TYPE = E
  3. * /--- BLOCK CONBIN2 00 000 80/07/10 15.02
  4. C 'PROGRAM TO CONVERT OBJECT OUTPUT FROM 'ZILAS ASSEMBLER
  5. C TO 60 BIT BINARY FOR 'CYBER.
  6. PROGRAM CONVRT2(INPUT,OUTPUT,TAPE7=INPUT,TAPE10)
  7. IMPLICIT INTEGER(A-Z)
  8. DIMENSION MEM(16400),IN(80),BUFF(3000)
  9. REWIND 7 $ REWIND 10
  10. DO 5 I = 1,16400
  11. 5 MEM(I) = 0
  12. DO 10 I = 1,3000
  13. 10 BUFF(I) = 0
  14. 15 READ (7,20) IN
  15. 20 FORMAT(80R1)
  16. IF (EOF(7)) 105,25
  17. 25 IF (IN(1) .NE. 1R9) GO TO 15
  18. BUFF(1) = 77000011000000000000B
  19. DO 50 I = 9,16
  20. TEMP = IN(I) .AND. 77B
  21. 50 BUFF(2) = SHIFT(BUFF(2),6) .OR. TEMP
  22. BUFF(2) = BUFF(2) .AND. 77777777777777000000B
  23. BUFF(3) = DATE(A)
  24. BUFF(4) = CLOCK(A)
  25. BUFF(5) = 55161723553457355555B
  26. BUFF(6) = 03171520012323553657B
  27. BUFF(7) = 36463736445555555555B
  28. BUFF(8) = 55321114012355555555B
  29. BUFF(9) = 55555555555555555555B
  30. BUFF(11) = SHIFT(5,57)
  31. FWA = CAH(IN(17)) * 4096 + CAH(IN(18)) * 256
  32. X +CAH(IN(19)) * 16 + CAH(IN(20))
  33. LEN = CAH(IN(21)) * 4096 + CAH(IN(22)) * 256
  34. X +CAH(IN(23)) * 16 + CAH(IN(24))
  35. IF (FWA .LT. 144) GO TO 30
  36. FWA = FWA - 144
  37. LEN = LEN + 144
  38. 30 BUFF(11) = BUFF(11) .OR. FWA
  39. LEN = LEN .AND. 777777B
  40. BUFF(11) = BUFF(11) .OR. SHIFT(LEN,30)
  41. IF (LEN .GT. 16400) GO TO 110
  42. 65 READ(7,20) IN
  43. IF (EOF(7)) 120,70
  44. 70 IF (IN(1) .EQ. 1R8) GO TO 90
  45. IF (IN(1) .NE. 1R6) GO TO 65
  46. COL = CAH(IN(3)) * 16 + CAH(IN(4))
  47. INDEX = CAH(IN(5)) * 4096 + CAH(IN(6)) * 256
  48. " +CAH(IN(7)) * 16 + CAH(IN(8))
  49. INDEX = INDEX - FWA + 1
  50. DO 80 I = 9,COL,2
  51. MEM(INDEX) = CAH(IN(I)) * 16 + CAH(IN(I+1))
  52. 80 INDEX = INDEX + 1
  53. GO TO 65
  54. 90 ENTRY = CAH(IN(17)) * 4096 + CAH(IN(18)) * 256
  55. X +CAH(IN(19)) * 16 + CAH(IN(20))
  56. IF (FWA .LT. 144) GO TO 950
  57. 900 READ(7,20)IN
  58. IF (EOF(7))950,95
  59. 95 IF (IN(1) .NE. 1R6) GO TO 140
  60. COL = CAH(IN(3))*16 + CAH(IN(4))
  61. INDEX = CAH(IN(5))*4096 + CAH(IN(6))*256
  62. X +CAH(IN(7))*16 + CAH(IN(8))
  63. INDEX = INDEX - FWA + 1
  64. DO 800 I = 9,COL,2
  65. MEM(INDEX) = CAH(IN(I))*16 + CAH(IN(I+1))
  66. 800 INDEX = INDEX + 1
  67. GO TO 900
  68. 950 SIZE = LEN/6 + 12
  69. INDEX = 0
  70. DO 100 I = 12,SIZE
  71. DO 100 J = 1,3
  72. DO 100 K = 1,2
  73. INDEX = INDEX + 1
  74. IS = (K-1)*8+(J-1)*20
  75. 100 BUFF(I) = BUFF(I) .OR.
  76. " SHIFT((MEM(INDEX) .AND. 377B),IS)
  77. BUFF(SIZE+1) = 23000000000000000000B
  78. BUFFER OUT(10,0)(BUFF(1),BUFF(SIZE+1))
  79. IF (UNIT(10)) 1000,1000,130
  80. 105 STOP 105
  81. 110 STOP 110
  82. 120 STOP 120
  83. 130 STOP 130
  84. 140 STOP 140
  85. 1000 STOP
  86. END
  87. * /--- BLOCK CONBIN2 00 000 80/07/10 15.03
  88. INTEGER FUNCTION CAH(ASCII)
  89. INTEGER ASCII
  90. I = ASCII .AND. 377B
  91. IF (I .LT. 1RA) GO TO 50
  92. IF (I .GT. 1RF) GO TO 20
  93. I = I + 9
  94. GO TO 40
  95. 20 IF (I .LT. 1R0) GO TO 50
  96. IF (I .GT. 1R9) GO TO 50
  97. I = I - 27
  98. 40 CAH = I
  99. RETURN
  100. 50 WRITE 80,ASCII
  101. 80 FORMAT(///,10X,*ILLEGAL ASCII CHAR. = *,R1)
  102. STOP 150
  103. END
plato/source/plaopl/convrt2.txt ยท Last modified: 2023/08/05 18:54 by Site Administrator