home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / hp86 / hp8boo.for < prev    next >
Text File  |  2020-01-01  |  6KB  |  82 lines

  1. C     This Fortran program should be run on the mainframe in conjunctionBOO00010
  2. C     with a Basic program (HP86BOOT) on the HP86 to transfer           BOO00020
  3. C     HP86KERM.BOO to the HP86 and store it as 'KERMIT BOO'.  this      BOO00030
  4. C     program uses a very rudimentary technique to try to insure that   BOO00040
  5. C     the characters it sends arrive correctly.  It just sends a count  BOO00050
  6. C     of the number of characters sent after each line.  In this way anyBOO00060
  7. C     errors of character loss or insertion will be caught.  If a       BOO00070
  8. C     character is just corrupted it will not be caught.  Hopefully if  BOO00080
  9. C     this happens it will be in a non-critical part of the 'KERMIT BOO'BOO00090
  10. C     file.  The reason a simple checksum was not used was so that this BOO00100
  11. C     program could run on machines using either EBCDIC or ASCII        BOO00110
  12. C     characters.  This program should take about thirty minutes to run.BOO00120
  13. C                                                                       BOO00130
  14. C     This program assumes that 5 and 6 are directed to the terminal andBOO00140
  15. C     7 is directed to the file HP86KERM.BOOT.                          BOO00150
  16. C
  17. C     *Original Program* for use with a PC running MS-DOS by:-          BOO00160
  18. C     Bill Catchings, Columbia University Center for Computing ActivitieBOO00170
  19. C     June 1984 (Revised September 1984)                                BOO00180
  20. C                                                                       BOO00190
  21. C     *REVISED* at Sheffield City Polytechnic by R.L.Horton 22Aug85:-   BOO00200
  22. C      1) FORTRAN G1 cannot accept "I-1" on a WRITE statement.          BOO00210
  23. C      2) Insert a call to NULIN and to RETYPE.                         BOO00220
  24. C     *REVISED* at Sheffield City Polytechnic by R.L.Horton 10Apr86:-   BOO00020
  25. C      1) NULIN has been rename to NULLIN.                              BOO00021
  26. C      2) For some unknown reason this program started issuing a double BOO00021
  27. C         read to the terminal at statement 100/3 (at start-up)!
  28. C         The FORMAT statement 200 has been corrected to stop it.
  29. C      3) The FILEDEF for the terminal has been changed to RECFM F80.   BOO00021
  30. C
  31. C     *CHANGED* for use with HP86BOOT at Sheffield City Polytechnic
  32. C     By M.J.Rootes 11Apr86:-
  33. C      1) Accept lines up to 79 characters long
  34. C      2) Reverse character count as HP86 BASIC lines contain spaces
  35. C      3) Insert Linefeed between Line and character count
  36. C
  37.  
  38.       INTEGER LINE(79), ACK(4), CHECK, OK, SPACE, COMMA                 BOO00230
  39.       CALL NULLIN                                                       BOO00240
  40.       CALL RETYPE                                                       BOO00250
  41.                                                                         BOO00260
  42.       WRITE(6,100)                                                      BOO00270
  43. 100   FORMAT(' Ready to transfer data, now run HP86BOOT on the HP86.')  BOO00280
  44.                                                                         BOO00290
  45. C     Get characters for constants (character constants are rough in    BOO00300
  46. C     some FORTRANs).                                                   BOO00310
  47.       READ (5,200) OK, SPACE, COMMA, ACK                                BOO00320
  48. 200   FORMAT(A1,A1,A1,4A1)                                              BOO00330
  49. C     The following statement has been changed from GO TO 30.           BOO00340
  50.       GO TO 20                                                          BOO00350
  51.                                                                         BOO00360
  52. C     Get terminal handshake.                                           BOO00370
  53. 10    READ (5,200)ACK                                                   BOO00380
  54.                                                                         BOO00390
  55. C     Did the other side like it?  (Did they send OK?)                  BOO00400
  56.       IF (ACK(1) .NE. OK) GO TO 50                                      BOO00410
  57.                                                                         BOO00420
  58. C     Yes, get new line from file.                                      BOO00430
  59. 20    READ (7,300,END=99)LINE                                           BOO00440
  60. 300   FORMAT(79A1)                                                      BOO00450
  61.                                                                         BOO00460
  62. C           Count the characters as some rudimentary check for noise.   BOO00470
  63.       I = 79                                                            BOO00480
  64. 30    IF (LINE(I) .NE. SPACE) GO TO 50                                  BOO00490
  65.       I = I - 1                                                         BOO00500
  66.       GO TO 30                                                          BOO00510
  67.                                                                         BOO00520
  68. C           Put in a comma followed by the count.                       BOO00530
  69. C     40    LINE(I) = COMMA                                             BOO00540
  70.                                                                         BOO00550
  71. C     Write to TTY.                                                     BOO00560
  72. 50    WRITE (6,400)LINE,I                                               BOO00580
  73. 400   FORMAT(79A1/I2)                                                   BOO00590
  74.       GOTO 10                                                           BOO00620
  75.                                                                         BOO00630
  76. C     Send good-bye message.                                            BOO00640
  77. 99    WRITE (6,500)                                                     BOO00650
  78. 500   FORMAT(10('&')/'10')                                              BOO00660
  79.                                                                         BOO00670
  80.       STOP                                                              BOO00680
  81.       END                                                               BOO00690
  82.