home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / hp9000basic / hpbker.bwr < prev    next >
Internet Message Format  |  2020-01-01  |  10KB

  1. Date: Thu, 27 Apr 89 15:17 EST
  2. From: Roger Wallace <22315@res2.ray.com>
  3. Subject: HP-9000 Kermit Bootstraping Methods
  4. Keywords: HP-9000, Bootstrapping
  5.  
  6.  Alternative Methods for Bootstrapping KERMIT-RMB to 
  7.          HP-9000 series Workstations.
  8.  
  9.      We have now successfully bootstrapped Kermit-RMB to several HP-9000
  10. series workstations, and are in the process of gathering user feedback on
  11. the performance of this new version.  This particular Kermit fills a long-
  12. standing need for reliable file transfer to hosts outside of the HP family.
  13. The basic terminal emulation and file transfer facilities seem to work as
  14. they should; we will forward any bug reports from our user community both
  15. to the Digest and to Andy Campagnola.  In the meantime, I thought I would
  16. pass along, as alternatives, the methods we tried for getting the appropriate
  17. files into HP-LIF disks.
  18.  
  19.      1). Raw Capture:  One of our groups tried simple raw capture of the
  20. HPBKER.BAS file from a local VAX host to the HP-9000 workstation.  The 
  21. interpreted BASIC program appeared to load and start properly, but no external
  22. communications could be established.  The particular workstation involved was
  23. running a pre-5.0 BASIC and lacked the BASIC compiler.  Kermit-RMB apparently
  24. makes system calls not supported under older BASIC versions, so a working 
  25. Kermit was not produced (no surprise!).  With the proper revision level of 
  26. HP-BASIC, and the BASIC compiler for generating the compiled subroutines, we 
  27. believe (from the "partial" success) that raw capture over "clean" local lines
  28. is a viable approach for bootstrapping the program from a mainframe.
  29.  
  30.      2). Decode .HEX files:  This approach provided our first successful
  31. installation, although circumstances forced us to use a technique different
  32. from that suggested in HPBAAA.HLP.  We had an MS-DOS PC on which the DOS/HPW
  33. to LIF conversion could be run, but no C-compiler for the "UNHEX.C" program, 
  34. and no alternative PC "unhex" program.  However, I did have in my lab several
  35. PDP-11's running TSX+, and happened to recall that Brian Nelson had included
  36. a hex-dehex program in the Kermit-11 distribution.  Brian's K11HEX.FTN was
  37. pulled from our library and hastily adapted to the problem at hand; the HEX
  38. decodes were run on a PDP-11, and the resulting "binaries" were shipped to the
  39. PC (Kermit-11 in binary mode to Kermit-MS).  Once the binaries were on the PC,
  40. HPWUTIL.EXE was run on the PC both to format LIF diskettes, 5.25-inch in our 
  41. case, and to write all of the LIF files needed to build Kermit-RMB.  Success
  42. of this approach depends on the fact that both RT-11/TSX+ and MS-DOS store 
  43. binary files as simple, undelimited byte strings;  The two Kermits provided
  44. the required eight-bit data path between the two machines.
  45.  
  46.      To aid anyone interested in this eccentric, but functional, method 
  47. for generating Kermit-RMB, I have appended the FORTRAN source for our modified
  48. version of K11HEX.FTN, called HPBDEH.F77, to this message.  A few points must
  49. be noted about our decoding scheme.  First, the original K11HEX program used a
  50. very robust coding scheme in which the HEX files consisted of a 64-byte "data"
  51. field, together with a checksum field, on each line.  Our bare-bones adapta-
  52. tion omits the checksum routine, since HPB*.HEX files are simple HEX-encodes,
  53. and as a result it requires HEX-source files with 64 characters per line.  We
  54. reformatted the HEX files in the distribution to accommodate this requirement.
  55. (This reformatting would be transparent to "UNHEX.C" which ignores end-of-line
  56. codes anyway.)  Second, in writing the decoded output file, both K11HEX and 
  57. HPBDEH conform to the "integral number of blocks" file-length requirement of 
  58. the RT-11 and TSX+ operating systems.  As luck would have it, most of the 
  59. decoded files met this requirement -- LIF files are an integral number of 
  60. 256-byte sectors ("half-blocks" to RT-11) long.  In three cases, however, it
  61. was necessary to pad the distributed HEX files so the decodes would come out
  62. "even".  The following "pads" were added at the ends of the HEX files listed:
  63.  
  64.      HPBINI.HEX -- 8 lines of 64 'F' characters each (continued the pattern
  65.                    for "empty" space in the distribution file)
  66.  
  67.      HPBMIS.HEX -- 8 lines of 64 '0' (zero) characters each
  68.  
  69.      HPBWUT.HEX -- 334 '0' (zero) characters; 14 completed the final line
  70.                    of the distributed file which was "short" after the con-
  71.                    version to 64-character-per-line format; an additional 
  72.                    5 lines of 64 zeros each completed the pad to the end of
  73.                    the block in the decoded file.
  74.  
  75.      Apparently, when HPWUTIL.EXE does the conversion to LIF-format files,
  76. it makes use of the file length information in HPWLIF.DIR, and the padded
  77. DOS files are truncated to produce LIF files of the correct length.  The
  78. first two files would probably have worked regardless of the "pad" character
  79. used.  The NUL padding of HPWUTIL.EXE produced by adding the zeros at the end
  80. of HPBWUT.HEX seemed to have no effect on the operation of the DOS-executable
  81. program.  Good luck again!
  82.  
  83.     We can supply the reformatted and padded HEX files if there is any
  84. real interest, but bootstrapping method (3) below will probably render
  85. the hex-dehex method obsolete in the future.  Also, our HPBDEH program offers
  86. very little protection against corrupted HEX files.  It will abort if it hits
  87. a "hard" read error (defective medium), but it will produce output files
  88. from HEX sources that contain "illegal" HEX characters, have short or long
  89. lines, i.e. missing or superfluous characters, or even have missing or 
  90. excess lines.
  91.  
  92.     3). "De-BOO" the .BOO files: Our final bootstrapping method, which has
  93. also been successful, really represents a suggestion for the method of dis-
  94. tributing Kermit-RMB.  The reasoning behind this approach is as follows:
  95. for the time being, the use of an MS-DOS machine as an "intermediary" at some
  96. point in the building of Kermit-RMB will be required for the DOS/HPW to LIF
  97. format conversion.  Since most sites using the HP-9000 series machines would
  98. probably have access to an IBM PC or clone, why not use the utilities in the
  99. Kermit-MS distribution for the encode-decode required to eliminate the "funny"
  100. characters in the DOS/HPW files.  Specifically, use MSBMKB.EXE to encode 
  101. the DOS/HPW files to ".BOO" form, and MSBPCT.EXE to decode the *.BOO files
  102. after network transmission and download.  An added bonus is that the .BOO
  103. files are shorter than the .HEX files.  Utilities MSBMKB.EXE and MSBPCT.EXE
  104. can be assembled from the Kermit-MS distribution.  The HPB*.HEX distribution
  105. can be retained for use by those sites which must receive files over EBCDIC
  106. links, where problems in handling .BOO files sometimes arise.
  107.  
  108.      To test the BOO -- DE-BOO sequence, we took our set of "reference"
  109. Kermit-RMB LIF-format files and used HPWUTIL.EXE to convert these back to
  110. DOS/HPW format on the PC.  These were BOO-encoded and decoded in the MS-DOS
  111. environment.  The DOS/HPW files so treated grew by three bytes (NUL-NUL-SUB)
  112. each; i.e., they acquired an explicit MS-DOS end-of-file mark.  This small
  113. "tail" was lopped off by HPWUTIL.EXE when encoded-decoded files were trans-
  114. formed back to LIF format.  Viewed at the HP-LIF file level, the complete set
  115. of conversions (LIF->DOS->BOO->DOS->LIF) caused no change in the files.  As
  116. for HPWUTIL.EXE, which must actually live and work at the DOS level, the extra
  117. bytes seem to cause no difficulty.  Our BOO - DE-BOO'ed version runs just like
  118. the "original" HEX-decoded version.  
  119.  
  120.      A couple of additional notes about the HPWUTIL.EXE program:  First, there
  121. seems to be no direct way to convert a single DOS/HPW file to LIF format.  The
  122. utility works on complete DOS/HPW file subsystems.  This causes no problem if
  123. you are writing the Kermit-RMB files to a 3.5" LIF-formatted floppy; the whole
  124. distribution fits on one diskette, and a single command sequence accomplishes
  125. the entire conversion.  For 5.25" floppies, where two diskettes are required
  126. to hold the complete distribution, we resorted to the following "game": start 
  127. with all of the DOS/HPW files, including HPWLIF.DIR, in a DOS sub-directory,
  128. and a blank LIF-formatted floppy in the destination drive.  Give the copy com-
  129. mands as described in the HPBAAA.HLP file.  The conversion will run until 
  130. insufficient space remains on the floppy.  Note which files were successfully 
  131. converted.  Delete the corresponding DOS/HPW files from the DOS subdirectory.
  132. Place the second blank LIF-formatted diskette in the drive and re-run the
  133. conversion procedure.  This time, HPWUTIL.EXE will note that it can't find all
  134. of the files, specifically the ones successfully converted on the first pass
  135. and subsequently deleted, but will convert the remaining DOS/HPW files to 
  136. LIF-format on the second floppy.
  137.  
  138.      The second note: if you run a LIF-to-DOS/HPW conversion as we did in the
  139. course of checking the BOO -- DE-BOO sequence, be aware that the DOS file 
  140. HPWLIF.DIR will be created in "Read-Only" mode.  It will be necessary to issue
  141. the DOS command "ATTRIB -R HPWLIF.DIR" before the file can be deleted with the
  142. usual "DEL" command.
  143.  
  144.      And finally, our thanks again to Andy Campagnola and his associates
  145. at HP for making a much-needed Kermit implementation available.
  146.  
  147.                                              Roger Wallace
  148.                                              Research Division
  149.                                              Raytheon Co.
  150.                                              Lexington, MA
  151.  
  152. ------------------------------
  153.  
  154.