home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / hp9000basic / hpbaaa.txt next >
Text File  |  2020-01-01  |  10KB  |  268 lines

  1. HP-9000 BASIC Workstation Kermit
  2.  
  3. READ THIS FIRST!
  4.  
  5. The files whose names start with HPB comprise Kermit for the HP-9000 Series
  6. 200 and 300 BASIC workstation, submitted to Columbia by Andy Campagnola of
  7. Hewlett-Packard Company, on an MS-DOS diskette.  Unfortunately, most of the
  8. files on the disk are "binary", either in some kind of native HP workstation
  9. data format (see below), or in one case an MS-DOS .EXE file.  Since only text
  10. files can go in the Kermit distribution, these files have been converted to
  11. simple hexadecimal encoding, i.e. two hex characters per 8-bit byte.  The
  12. resulting .HEX files contain lines of 72 (or fewer) characters each.  The
  13. lines mean nothing, and when decoding these .HEX files, the line breaks
  14. should be ignored.
  15.  
  16. Here is a program that can be used to "dehexify" the .HEX files (one at a
  17. time) on the PC, written in C.  Use it with i/o redirection, e.g.
  18.  
  19.   unhex < hpblif.hex > hpwlif.dir
  20.  
  21. This program probably can't be used on the HP BASIC workstation, but it should
  22. be easy to translate it into HP BASIC (anyone who does this is invited to send
  23. it back to Columbia -- IN ASCII SOURCE FORM! -- so we can include it with the
  24. other HP9000 BASIC Kermit files).
  25.  
  26. /*  UNHEX.C - Program to translate a hex file from standard input
  27.  *  into an 8-bit binary file on standard output.
  28.  *  Usage: unhex < foo.hex > foo.exe
  29.  *  Christine M. Gianone, CUCCA, October 1986.
  30.  *  Modified Feb 89 to work right with Microsoft C on the PC.
  31.  */
  32.  
  33. #include <stdio.h>                    /* Include this for EOF symbol */
  34. #ifdef MSDOS
  35. #include <fcntl.h>                  /* For MS-DOS setmode() symbol */
  36. #endif
  37.  
  38. char a, b;                            /* High and low hex nibbles */
  39. unsigned c;
  40.  
  41. /* Main program reads each hex digit pair and outputs the 8-bit byte. */
  42.  
  43. main() {
  44. #ifdef MSDOS
  45.     setmode(fileno(stdout),O_BINARY); /* To avoid DOS text-mode conversions */
  46. #endif
  47.     while ((c = getchar()) != EOF) {  /* Read first hex digit */
  48.     a = c;                  /* Convert to char */
  49.         if (a == '\n')                /* Ignore line terminators */
  50.           continue;
  51.         if ((c = getchar()) == EOF)   /* Read second hex digit */
  52.           break;
  53.     b = c;                  /* Convert to char */
  54.         putchar( ((decode(a) * 16) & 0xF0) + (decode(b) & 0xF) );
  55.     }
  56.     exit(0);                          /* Done */
  57. }
  58.  
  59. decode(x) char x; {                   /* Function to decode a hex character */
  60.     if (x >= '0' && x <= '9')         /* 0-9 is offset by hex 30 */
  61.       return (x - 0x30);
  62.     else if (x >= 'A' && x <= 'F')    /* A-F offset by hex 37 */
  63.       return(x - 0x37);
  64.     else {                            /* Otherwise, an illegal hex digit */
  65.         fprintf(stderr,"Input is not in legal hex format\n");
  66.         exit(1);
  67.     }
  68. }
  69.  
  70. Following is the "read me" file that came with this program.  But before you
  71. read it, please not that the filenames listed below had to be changed so they
  72. would fit the requirements for Kermit Distribution filenames (unique prefix,
  73. 6.3 format, no funny characters):
  74.  
  75. DOS Diskette Name               Kermit Distribution Name
  76.  
  77. HPWLIF.DIR      (binary)    --> HPBLIF.HEX
  78. HPKERM02        (binary)    --> HPBKER.HEX
  79. HPK_INIT        (binary)    --> HPBINI.HEX
  80. HPK_HELP        (binary)    --> HPBHLP.HEX
  81. HPK_MISC        (binary)    --> HPBMIS.HEX
  82. HPK_GETM.E      (binary)    --> HPBGET.HEX
  83. HPK_DOC         (binary)    --> HPBDOC.HEX
  84. HPWUTIL.EXE     (binary)    --> HPBWUT.HEX
  85. HPK_DOC.PRN                 --> HPBKER.DOC
  86. HPK_ASCP.TXT                --> HPBKER.BAS
  87. README                      --> HPBAAA.HLP
  88.  
  89. The files marked "(binary)" were hexified.  README is the following file, now
  90. called HPBAAA.HLP.
  91.  
  92.  
  93.        HP-KERMIT  DOS  DISTRIBUTION DISC   - Version 1.02
  94.                                              May 9, 1989
  95.  
  96.        This is a modified version of the HP-KERMIT LIF distribution
  97.        diskette. It contains HP-KERMIT in two formats, a DOS text
  98.        format, and a LIF PROG file image existing on DOS media. A
  99.        utility program called HPWUTIL.EXE has been included on the
  100.        disc to allow you to copy the LIF File images from the DOS
  101.        distrbution disc to an HP-LIF disc.
  102.  
  103.        The HPWUTIL.EXE program is part of HP's 82300B BASIC LANGUAGE
  104.        CO-PROCESSOR product and is Copyright (C) Hewlett-Packard.
  105.        Permission is granted to use the product for installing the
  106.        HP-Kermit distribution disc.
  107.  
  108.        If you have obtained the 82300 BASIC Processor Card for the PC
  109.        you can use the BASIC copy command to copy files directly from
  110.        this installation disc to a LIF disc. Without the
  111.        Hardware product you must use the HPWUTIL.EXE Utility.
  112.  
  113.        This DOS distribution disc is being distributed by Columbia
  114.        University - Kermit Distribution Dept. at the Center For
  115.        Computing Activities. You may obtain a HP-LIF Distribution disc
  116.        from INTEREX  HP-Users Group at the following Address:
  117.  
  118.  
  119.            INTEREX
  120.            680 Almanor Ave
  121.            Sunnyvale, CA  94086-3513
  122.  
  123.            Attention: HP Kermit Distribution
  124.  
  125.  
  126.  
  127.        The files on this diskette include the following:
  128.  
  129.         DOS FILENAME            FILE TYPE        FILE CONTENTS
  130.  
  131.         HPWLIF   DIR     9728   LIF Image File   Directory Info
  132.      *  HPKERM02       194048   LIF-PROG Image   Kermit Program
  133.         HPK_INIT          256   LIF-ASCII Image  Kermit Init Script
  134.         HPK_HELP        11776   LIF-PROG Image   Help Subprogram
  135.      *  HPK_MISC        33024   LIF-PROG Image   Hex Edit, Misc Source
  136.         HPK_GETM E       4096   LIF-ASCII Image  LIF "README" file
  137.         HPK_DOC        135680   LIF-ASCII Image  Kermit User Manual
  138.  
  139.         HPK_DOC  PRN   134528   DOS TEXT         Kermit User Manual
  140.      *  HPK_ASCP TXT   208958   DOS TEXT         Kermit Prog (Ascii)
  141.      *  README           6784   DOS TEXT         This README File
  142.  
  143.      * = Files revised 5/9/89
  144.  
  145.        To Install the files on this disc you will need to use the
  146.        HPWUTIL.EXE program from DOS. Have ready a LIF Initialized
  147.        disc(s) from an HP BASIC Workstation. You will need two -
  148.        5 inch (blue) floppies, or a grey 3.5 inch floppy. They must be
  149.        initialized with 256 byte sectors (normal INITIALIZE command),
  150.        and the newer black 1.4 Mb discs cannot be used.  If you are
  151.        copying the files to a 3.5 inch LIF floppy you will need to
  152.        have a 3.5 inch dos disc drive on your PC.  External floppy
  153.        discs such as the HP-9122 cannot be used, the discs must be DOS
  154.        internal drive mechanisms.
  155.  
  156.  
  157.        COPYING THE DOS - LIF IMAGES TO AN HP-LIF DISC
  158.  
  159.        The DOS-LIF Image files are known as HPW (HP Workstation)
  160.        files. You will be copying from a HPW volume to a LIF Volume.
  161.        The following steps show you how to use the HPWUTIL program to
  162.        install the Kermit files:
  163.  
  164.        In the following example the DOS Kermit Distribution Disc is in
  165.        drive A: and the HP LIF Formatted disc is in drive B:
  166.  
  167.  
  168.      (1) A:> HPWUTIL            Run the Utility Program
  169.  
  170.      (2) Press F2               Press the COPY Option
  171.  
  172.      (3) Press F5               Select  HPW to LIF  Copy
  173.  
  174.      (4) Type Source DOS Directory
  175.  
  176.          A:\    <enter>
  177.  
  178.      (5) Type the Destination LIF Drive Name
  179.  
  180.          B:     <enter>
  181.  
  182.      WARNING: DO NOT ACCIDENTALLY INSTALL THE FILES TO A DOS HARD DISC
  183.               THIS MAY CORRUPT THE DOS DISC VOLUME.
  184.  
  185.      (6) "Please insert an HP LIF-Formatted Destination Disc
  186.           in drive B:
  187.  
  188.           Warning: The Destination Disc will be completely
  189.           overwritten ....
  190.  
  191.           Press <return> to begin copy
  192.  
  193.      (7)  You will see the folowing file copy status screen during
  194.           copying:
  195.  
  196.  
  197.           Source:    DOS HPW subsystem in directory:  A:\
  198.           Destination:  LIF Disc in drive B:
  199.           File Count = x
  200.           Copying File: HPKERM02
  201.  
  202.           After the copy is complete you will see the followiung
  203.           message on the screen:
  204.  
  205.          "DOS HPW directory to HP-LIF Volume copy is complete.
  206.           Number of files copied is 6."
  207.  
  208.           <Hit any key to continue>
  209.  
  210.  
  211.    (8)  To verify the copy operation perform a catalog function
  212.         (F3) on the destination disc:
  213.  
  214.  
  215.         From the HPWUTIL main (entry) screen -
  216.  
  217.           (a) Press F3      Catalog Function
  218.           (b) Press F1      LIF Disc
  219.           (c) B:            Type the DOS Drive for the LIF disc
  220.           (d) <enter>       Press Enter when ready
  221.  
  222.                 The LIF Disc is cataloged
  223.  
  224.           (e) <enter>       Press <enter> after catalog to exit
  225.           (f) Press F8      Press F8 to return to DOS
  226.  
  227.  
  228.         You can now place the LIF disc into an HP BASIC Workstation
  229.         disc drive and LOAD the Kermit PROG file.
  230.  
  231.        --------------------------------------------------------------
  232.  
  233.         Printing the Kermit Documentation from DOS:
  234.  
  235.        The HP-Kermit Users Manual is included on this disc as both a
  236.        DOS Text-Formatted Print File and LIF ASCII File.  There are no
  237.        non-printable or escape sequences in the document.  To print
  238.        the user manual from DOS use the DOS PRINT command:
  239.  
  240.         C:> PRINT HPK_DOC.PRN
  241.  
  242.        Don't print the LIF-ASCII document HPK_DOC from DOS.
  243.  
  244.        --------------------------------------------------------------
  245.  
  246.        The  HPK_ASCP.TXT  File
  247.  
  248.        The HPK_ASCP.TXT is a DOS text listing of the HP-Kermit
  249.        Program File. The File is really meant for viewing and printing
  250.        from DOS. It can be used to bootstrap the program from a
  251.        file transfer or tape with some limitations.
  252.  
  253.        Because the DOS program listing is ascii, all compiled sections
  254.        of the HPKERM02 Program have been replaced with the BASIC
  255.        interpreted source code.  The program text will run Kermit at
  256.        one-forth the speed of the BASIC PROG file because of the three
  257.        missing compiled subprograms SUB Spack, SUB Encode_pack, and
  258.        SUB Decode_pack.  The PHYREC CSUBS are also missing, and no
  259.        source is available.  The PHYREC CSUBS are part of the BASIC
  260.        5.x product from HP and can be "loadsub'd" from the BASIC
  261.        Utilities disc with the following command:
  262.  
  263.        LOADSUB ALL FROM "PHYREC:,7xx,1"
  264.  
  265.        The source code for the Spack, Encode_pack, and Decode_pack
  266.        subprograms can be compiled using any supported HP BASIC 5.x
  267.        compiler.
  268.