home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / mskermit / msboot.for < prev    next >
Text File  |  2020-01-01  |  2KB  |  61 lines

  1. C     This Fortran program should be run on the mainframe in conjunction
  2. C     with a Basic program (MSBPCB.BAS) on the PC to transfer
  3. C     MSKERMIT.BOO to the PC and translate it into KERMIT.EXE.  This
  4. C     program uses a very rudimentary technique to try to insure that
  5. C     the characters it sends arrive correctly.  It just sends a count
  6. C     of the number of characters sent after each line.  In this way any
  7. C     errors of character loss or insertion will be caught.  If a
  8. C     character is just corrupted it will not be caught.  Hopefully if
  9. C     this happens it will be in a non-critical part of the KERMIT.EXE
  10. C     file.  The reason a simple checksum was not used was so that this
  11. C     program could run on machines using either EBCDIC or ASCII
  12. C     characters.  This program should take about thirty minutes to run.
  13. C
  14. C     This program assumes that 5 and 6 are directed to the terminal and
  15. C     7 is directed to the file MSKERMIT.BOO.
  16. C
  17. C     Bill Catchings, Columbia University Center for Computing Activities
  18. C     June 1984 (Revised September 1984)
  19. C
  20.       INTEGER LINE(77), ACK(4), CHECK, OK, SPACE, COMMA
  21.  
  22.       WRITE(6,100)
  23. 100   FORMAT(' Ready to transfer data, now run MSPCBOOT.BAS on the PC.')
  24.  
  25. C     Get characters for constants (character constants are rough in
  26. C     some FORTRANs).
  27.       READ (5,200) OK, SPACE, COMMA, ACK
  28. 200   FORMAT(4A1)
  29.       GO TO 20
  30.  
  31. C     Get terminal handshake.
  32. 10    READ (5,200)ACK
  33.  
  34. C     Did the other side like it?  (Did they send OK?)
  35.       IF (ACK(1) .NE. OK) GO TO 50
  36.  
  37. C     Yes, get new line from file.
  38. 20    READ (7,300,END=99)LINE
  39. 300   FORMAT(77A1)
  40.  
  41. C     Count the characters as some rudimentary check for noise.
  42.       I = 1
  43. 30    IF (LINE(I) .EQ. SPACE) GO TO 40
  44.       I = I + 1
  45.       GO TO 30
  46.  
  47. C     Put in a comma followed by the count.
  48. 40    LINE(I) = COMMA
  49.  
  50. C     Write to TTY.
  51. 50    WRITE (6,400)LINE,I-1
  52. 400   FORMAT(' ',77A1,I2)
  53.       GOTO 10
  54.  
  55. C     Send good-bye message.
  56. 99    WRITE (6,500)
  57. 500   FORMAT(' ',10('&'),',10')
  58.  
  59.       STOP
  60.       END
  61.