home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / mskermit / msbaaa.txt < prev    next >
Text File  |  2020-01-01  |  5KB  |  94 lines

  1. MSBAAA.HLP         MS-DOS KERMIT 3.0 "BOOTSTRAPPING"              June 1990
  2.  
  3. MS-DOS Kermit 3.0 is distributed on diskette in binary executable form on a
  4. 5.25-inch IBM DOS-format diskette in the book "Using MS-DOS Kermit", by
  5. Christine M.  Gianone, published by Digital Press, Bedford, MA, 1990, order
  6. number EY-C204E-DP (phone 1-800-343-8321).  It is also available from Kermit
  7. Distribution at Columbia University and wherever computer books are sold.
  8. The MSB*.* files are for people who cannot get MS-DOS Kermit on diskette.
  9.  
  10. MS-DOS Kermit (and many other Kermit programs) are often distributed using a
  11. special encoding called "boo" (short for "bootstrap") format, developed
  12. especially for distribution of MS-DOS Kermit over networks, e-mail, and
  13. communication lines.  MS-DOS Kermit has grown to have so many features that
  14. the binary program image (the .EXE file) has become quite large.  But binary
  15. files are generally not compatible with the common labeled tape formats (e.g.
  16. ANSI D), electronic mail, or raw downloading -- methods commonly used for
  17. Kermit software distribution.
  18.  
  19. A common practice is to encode .EXE and other binary files into printable
  20. characters, such as hexadecimal digits, for transportability.  A simple "hex"
  21. encoding results in two characters per 8-bit binary byte, plus CRLFs added
  22. every 80 (or less) hex characters to allow the file to pass through
  23. card-oriented networks like BITNET.  A hex file is therefore more than twice
  24. as large as the original binary file.
  25.  
  26. A .BOO file is a more compact, but somewhat more complicated, encoding.  Every
  27. three binary bytes (24 bits) are split up into four 6-bit bytes with 48 (ASCII
  28. character "0") added to each, resulting in four ASCII characters ranging from
  29. "0" (ASCII 48) to "o" (ASCII 111), with CRLFs added at or near "column 76".
  30. The resulting file size would therefore be about 4/3 the .EXE file size.  This
  31. is still quite large, so .BOO files also compress consecutive null (zero)
  32. bytes.  Up to 78 consecutive nulls are compressed into two characters.  Tilde
  33. ("~") is the null-compression lead-in, and the following character indicates
  34. how many nulls are represented (subtract 48 from this character's ASCII
  35. value).  For instance "~A" means 17 consecutive nulls; "~~" means 78 of them.
  36. Repeated nulls are very common in .EXE files.
  37.  
  38. 4-for-3 encoding combined with null compression reduces the size of the
  39. encoded file to approximately the same size as the original .EXE file, and
  40. sometimes even smaller.  The first line of a .BOO file is the name (in plain
  41. text) of the original file.  Here's what the first few lines of a typical .BOO
  42. file look like:
  43.  
  44.   MSVIBM.EXE
  45.   CEYP0Id05@0P~3oomo2Y01FWeP8@007P000040HB4001`W~28bL005\W~2JBP00722V0ZHPYP:
  46.   \8:H2]R2V0[`PYP:68>H2S23V0YHPiP:Xg800;Qd~2UWD006Yg~2Ogl009]o~2L8000;20~~~~
  47.   ~~~~~~~:R2H008TV?P761T410<H6@P40j4l6RRH0083l17@PP?`1M@?YSP20o0Ee0nUD0h3l
  48.   1WD3jO@3]0VjW03=8L?X4`N0o01h1\H6~20l>0i7n0o1]e7[@2\PO=8LH60@00Raj>04^97Xh0
  49.  
  50.  
  51. PROGRAMS FOR HANDLING .BOO FILES
  52.  
  53. Kermit Distribution includes several useful .BOO-file programs:
  54.  
  55. MSBPCT.BAS
  56.     This Microsoft BASIC program can be used on any PC or PS/2 that has BASIC 
  57.     to decode a .BOO file into an .EXE file.  It's about 50 lines, so it can 
  58.     be typed in.
  59.  
  60. MSBPCT.BOO
  61.     BASIC programs run rather slowly, so .BOO-file decoders have also been
  62.     written in high-level languages like C.  The MSBPCT.EXE file that was
  63.     produced by compiling MSBPCT.C is encoded into MSBPCT.BOO, which can be
  64.     decoded back into MSBPCT.EXE using MSBPCT.BAS.  Once you've done that, you
  65.     don't need to run the slow BASIC version any more, which is a blessing,
  66.     because the MS-DOS Kermit .BOO file takes up to half an hour to decode 
  67.     using the BASIC version (depending on the system), but only seconds using
  68.     MSBPCT.EXE.
  69.  
  70. MSBPCT.*
  71.     There are .BOO-file decoders written in other languages too, like
  72.     assembler, Turbo Pascal, Fortran, etc.  Take your pick.  They all do the
  73.     same thing.
  74.  
  75. MSBMKB.*
  76.     This is the program for encoding an .EXE file into a .BOO file.  It is
  77.     written in C, compiled, and translated (by itself) into .BOO format,
  78.     suitable for decoding back into .EXE form by any of the MSBPCT programs.
  79.     Also in other languages, including Fortran and Turbo Pascal.
  80.  
  81. MSBPCG.*
  82.     MSBPCG.ASM is an assembly language program that compiles into a very
  83.     short executable program that consists entirely of printable ASCII
  84.     characters (MSBPCG.COM).  This program can be used, like the MSBPCT
  85.     programs, to decode BOO files.
  86.  
  87. MSBRCV.BAS
  88.     This is a receive-only Kermit program in Microsoft Basic for the IBM PC
  89.     and PS/2, short enough to type in, usable for downloading a real Kermit 
  90.     from a host that has Kermit to a PC that doesn't.  See "Kermit, A File
  91.     Transfer Protocol" by Frank da Cruz for a detailed explanation.
  92.  
  93. MSBHEX.* are C programs for producing and decoding straight hex files.
  94.