User Tools

Site Tools


plato:source:plaopl:convrt1

CONVRT1

Table Of Contents

Source Code

CONVRT1.txt
  1. CONVRT1
  2. * /--- FILE TYPE = E
  3. * /--- BLOCK CONBIN 00 000 80/07/10 15.01
  4. C 'PROGRAM TO CONVERT OBJECT OUTPUT FROM 'ZILAS ASSEMBLER
  5. C TO 60 BIT BINARY FOR 'CYBER.
  6. PROGRAM CONVRT1(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. BUFF(11) = BUFF(11) .OR. FWA
  36. LEN = LEN .AND. 777777B
  37. BUFF(11) = BUFF(11) .OR. SHIFT(LEN,30)
  38. IF (LEN .GT. 16400) GO TO 110
  39. 65 READ(7,20) IN
  40. IF (EOF(7)) 120,70
  41. 70 IF (IN(1) .EQ. 1R8) GO TO 90
  42. IF (IN(1) .NE. 1R6) GO TO 65
  43. COL = CAH(IN(3)) * 16 + CAH(IN(4))
  44. INDEX = CAH(IN(5)) * 4096 + CAH(IN(6)) * 256
  45. " +CAH(IN(7)) * 16 + CAH(IN(8))
  46. INDEX = INDEX - FWA + 1
  47. DO 80 I = 9,COL,2
  48. MEM(INDEX) = CAH(IN(I)) * 16 + CAH(IN(I+1))
  49. 80 INDEX = INDEX + 1
  50. GO TO 65
  51. 90 ENTRY = CAH(IN(17)) * 4096 + CAH(IN(18)) * 256
  52. X +CAH(IN(19)) * 16 + CAH(IN(20))
  53. SIZE = LEN/6 + 12
  54. INDEX = 0
  55. DO 100 I = 12,SIZE
  56. DO 100 J = 1,3
  57. DO 100 K = 1,2
  58. INDEX = INDEX + 1
  59. IS = (K-1)*8+(J-1)*20
  60. 100 BUFF(I) = BUFF(I) .OR.
  61. " SHIFT((MEM(INDEX) .AND. 377B),IS)
  62. BUFF(SIZE+1) = 23000000000000000000B
  63. BUFFER OUT(10,0)(BUFF(1),BUFF(SIZE+1))
  64. IF (UNIT(10)) 1000,1000,130
  65. 105 STOP 105
  66. 110 STOP 110
  67. 120 STOP 120
  68. 130 STOP 130
  69. 1000 STOP
  70. END
  71. * /--- BLOCK CONBIN 00 000 80/07/10 15.02
  72. INTEGER FUNCTION CAH(ASCII)
  73. INTEGER ASCII
  74. I = ASCII .AND. 377B
  75. IF (I .LT. 1RA) GO TO 50
  76. IF (I .GT. 1RF) GO TO 20
  77. I = I + 9
  78. GO TO 40
  79. 20 IF (I .LT. 1R0) GO TO 50
  80. IF (I .GT. 1R9) GO TO 50
  81. I = I - 27
  82. 40 CAH = I
  83. RETURN
  84. 50 WRITE 80,ASCII
  85. 80 FORMAT(///,10X,*ILLEGAL ASCII CHAR. = *,R1)
  86. STOP 150
  87. END
plato/source/plaopl/convrt1.txt ยท Last modified: 2023/08/05 18:54 by Site Administrator