Loading Files

The most important facility of a portable computer is its ability to communicate with other computers and peripheral devices. HUNTER has an industry standard RS-232 interface, supporting the most common and some of the not so common protocols and baud rates. See Communications.

HUNTER is supported by a wide range of micro computer systems including the IBM-PC, Superbrain, Apple (with Z80 card) and ACT-Sirius. Sections HUNTER to Apple Interface and HUNTER to IBM-PC Interface, give a detailed description of how to connect the Apple and IBM-PC micro computers to HUNTER and transfer files.

This section describes how to load a program file, an overlay file and an ASCII text file.

Two methods of loading files are described. The first involves loading direct into a file in the 8-bit format. Files are sent out from the host computer as they exist on disk, but, for example, if the PIP utility is used it must have the [O] option to indicate that all 8 bits must be sent. The second method is more time consuming, but has the advantage of built in checksums to guarantee the accuracy of data. All files including ASCII data files, must be converted into Intel Hex format, see Hex Data Format. These new files may be PIPed out to HUNTER in the normal manner. Both methods are described in full detail in the following subsections. The examples are particular to a CP/M machine.

Note

Some CP/M systems may not be configured for 8 bit communication. Check the serial port hardware manual for details of the UART configuration if in doubt.

File Description

File Name

Type

Length (k)

No.blocks (4xlength)

No. records (8xlength)

MAIN.COM

Object

22k

88

176

OVERLAY.OVR

Object

10k

40

80

PRODUCTS.TXT

ASCII

14k

56

112

The program MAIN.COM is a fictional file which organises and sorts a database file PRODUCTS.TXT. The file OVERLAY.OVR is an overlay file which like MAIN.COM is an executable program, but parts are loaded into the execution RAM page as and when required by MAIN.COM. All three files must be present in the filespace for correct operation.

Loading Method 1: 8-Bit Data

  1. Set up the communications, see Communications.

    • Baud rate: As required.

    • Protocols: None.

    • Parity: 8-bit.

    • RTS: As required.

    • SERIG: Off.

  2. Determine the size of the files to be copied.

    A>STAT *.*
    
    Recs Bytes Ext Acc
    176   22k   2  R/W  A:MAIN.COM
    80    10k   1  R/W  A:OVERLAY.OVR
    112   14k   1  R/W  A:PRODUCTS.TXT
    

    HUNTER loads files in blocks which are each twice the size of Records. Therefore MAIN.COM is 88 blocks in length.

  3. Load MAIN.COM

    Connect up HUNTER to the host computer with a suitable 5 way RS-232 cable. Then on HUNTER type:

    >INP 88 MAIN.COM
    

    After typing ENTER, HUNTER will respond with

    * Waiting
    

    To abort use the ESC key. If PIP is to be used to transfer the file to HUNTER using the LST; printer port, then type on the host computer

    PIP LST:=MAIN.COM[O]
    

    The [O] suffix is very important because this tells PIP to list using the full 8 bits. HUNTER will respond to the beginning of transmission with the message

    * Loading
    

    If too many blocks have been specified in the INP command then after transmission has completed the ‘waiting’ message will again be displayed. In this case use the ESC key to complete the transference of the file.

    The file MAIN.COM will now reside in a HUNTER file.

  4. Load OVERLAY.OVR

    The sequence of commands for loading this file is as follows:

    HUNTER INP 40 OVERLAY.OVR

    Host PIP LST:=OVERLAY.OVR[O]

  5. Load PRODUCTS.TXT

    This file is loaded with these commands:

    HUNTER INP 56 PRODUCTS.TXT

    Host PIP LST:=PRODUCTS.TXT[O]

  6. Run the program

    The three files MAIN.COM, OVERLAY.OVR and PRODUCTS.TXT should all now be in HUNTER files. Check this with the DIR command. Execute the CP/M program with

    >MAIN
    

Note

Some CP/M machines may not be capable of transmitting 8 bits per byte.

Loading Method 2: Hex Data Format

  1. All files must be converted into Intel Hex format. This is achieved with a standard CP/M utility program (usually called UNLOAD) a version of which is reproduced in Program 4 “UNLOAD”.

    When converted you will have two copies of each file, one in Intel Hex format:

    Orginal File

    Intel Hex File

    MAIN.COM

    MAIN.HEX

    OVERLAY.OVR

    OVERLAY.HEX

    PRODUCTS.TXT

    PRODUCTS.HEX

  2. Set up the communications, see Communications.

    • Baud rate: As required

    • Protocol: NONE

    • Parity: As required

    • RTS: As required

    • SERIG: OFF

  3. Load MAIN.COM

    Connect up HUNTER to the host computer with a suitable 5 way RS-232 cable. Then on HUNTER type:

    >INP
    

    After typing ENTER, HUNTER responds with

    * Waiting
    

    To abort use the ESC key. If Pip is to transfer the file to HUNTER using the LST: port, then type on the host computer

    PIP LST:=MAIN.HEX
    

    As soon as transmission begins, HUNTER responds with

    * Loading
    

    The file is loaded not directly into a file, but to RAM page 0, the program execution page. When the file is loaded and HUNTER displays

    * Loading completed
    File length = 88 Blocks
    

    the data is written into a file with the SAVE command. In this case:

    >SAVE 88 MAIN.COM
    

    The file MAIN.COM is now created.

  4. Load OVERLAY.OVR

    The sequence of commands for loading this file is as follows:

    HUNTER: INP

    Host PIP LST:=OVERLAY.HEX

    HUNTER >SAVE 40 OVERLAY.OVR

  5. Load PRODUCTS.TXT

    This file is loaded with these commands:

    HUNTER >INP

    Host PIP LST:= PRODUCTS.HEX

    HUNTER >SAVE 56 PRODUCTS.TXT

  6. Run the program

    The three files MAIN.COM, OVERLAY.OVR and PRODUCTS.TXT should all now be in HUNTER files. Check this with the DIR command. Execute the CP/M program with:

    >MAIN
    

Note

This method of loading HUNTER is again suitable all types for of files, but compared with 8-bit loading is two and a half time slower. However it does have the advantage that if an error occurs during transmission then the hex checksum will detect this and ‘* Loading Error’ will be displayed.

HUNTER to Apple Interface

An Apple IIe computer fitted with a Z80 card and running the CP/M operating system can communicate with HUNTER via the RS-232 communications port.

When the HUNTER is downloading to the Apple, problems may arise if the file being transferred is larger than 16K. This is because the Apple does not prevent incoming data during a disk access, and therefore may well loose characters. It is advisable to arrange for data within the HUNTER to be stored in 15K files and then transmit each file separately.

Apple Serial Card

A standard Apple compatible serial interface card, preferred type CCS7710A, must be installed in slot 2 of the Apple with its 25 pin ‘D’ connector mounted on the rear panel in position 7.

Interface Cable

The interface cable required to connect HUNTER to an Apple micro computer fitted with the above serial card should be fitted with a female 25 pin ‘D’ connector at one end, HUNTER, and a male 25 pin ‘D’ connector at the other, Apple. Pins 2,3, 4, 5 and 7 should be connected with a jumper connection from pin 8 to pin 20 on the male connector, Apple, see below.

APPLE                        HUNTER

PIN 2 ---------------------- 2


    3 ---------------------- 3

    4 ---------------------- 4

    5 ---------------------- 5

    7 ---------------------- 7 GND

    8 ---+
         |
   20 ---+

Apple Baud Rates

The baud rate on the Apple is selected by setting the 4-way DIP switch located at the top right hand comer of the above serial interface card, the switch should be set to 4800 baud.

Baud

SW1-1

SW1-2

SW1-3

SW1-4

50

on

on

on

off

75

on

on

off

on

110

on

on

off

off

135

on

off

on

on

150

on

off

on

off

300

on

off

off

on

600

on

off

off

off

1200

off

on

on

on

1800

off

on

on

off

2400

off

on

off

on

3600

off

on

off

off

4800

off

off

on

on

7200

off

off

on

off

9600

off

off

off

on

19200

off

off

off

off

HUNTER Baud Rate and Protocols

HUNTER’S communication parameters should be set as follows:

Transmit

Receive

Rate-4800

Rate-4800

Prtcl-N

Prtcl-N

Prty-N

Prty-N

CTS-Y

RTS-HOLD

DTR-N

DSR-N

LF-Y

DCD-N

Echo-Y

Serig-off

Null-0

See Communications for further details of selecting and setting HUNTER’S communication protocols.

Basic Program Transfer

When the correct communication protocols have been set and the interface cable installed, program transfer can take place. HUNTER will be treated as RDR; for input and PUN: for output. HUNTER should be in Basic interpreter mode, select ‘BAS’ from the File Manager function keys, with the program resident in RAM page 0, for Basic text transfers. For file or CP/M program transfers, refer to the examples given earlier.

HUNTER to Apple

To transfer a program from HUNTER to the Apple proceed as follows:

  1. Apple >PIP A:filename=RDR: 1. HUNTER LLIST 1. When transmission is complete type LOPCHR26 (control Z) on HUNTER. 1. Apple will now have a copy of the program stored on disk with the specified filename.

Note

If the program is greater then 20k the Apple may store part of the file to make more memory available for the incoming program.

Files created on the Apple in this way can be handled with the usual CP/M utilities such as ‘ED’ or more sophisticated programs such as word processors etc.

Apple to HUNTER

To transfer a program from an Apple disk file to HUNTER proceed as follows:

  1. Clear HUNTER’S memory with ‘NEW’.

  2. HUNTER LLOAD

  3. Apple >PIP PUN:=A:filename [E]

  4. When transmission is complete switch HUNTER off and back on again, the program may now be run.

HUNTER to IBM-PC Interface

An IBM PC or XT computer, fitted with the asynchronous communications adaptor can communicate with the HUNTER to either load or unload programs and data.

Communications Software

The HUNTER

No special software is required on the HUNTER. However, knowledge of the following commands will be necessary for communications.

From the filemanager:

and the following HUNTER Basic commands/statements:

See also Communications, with particular attention to comms parameter setup.

The IBM-PC

Special software is required for full communication capabilities on the IBM-PC. This software, together with the interface cable, is available from Husky Computers Limited on an IBM disk.

Tip

See HUNTER File Transfer Utility for further information about the Microsoft Windows version of this software.

Interface Cable

The interface cable required to connect HUNTER to the IBM-PC, fitted with a serial card, is a special one to ensure correct operation. The two female 25-pin ‘D’ type plugs are connected as below:

IBM PC                        HUNTER

PIN 2 ---------------------->  3 RCE

    3 <----------------------  2 XMT

    4 ---------------------->  5 CTS

    6 <----------------------  4 RTS

    7 -----------------------  7 GND

    5 ---o------------------>  6 DSR
         |
   20 ---+------------------> 20 DTR

Communications Software

  1. The HUNTER

    No special software is required on the HUNTER. However, knowledge of the following commands will be necessary for communications.

    From the filemanager:

    1. INP

    2. SEND

    and the following HUNTER Basic commands/statements:

    1. LLOAD

    2. LLIST

    3. LINPUT

    4. LPRINT

    5. LINCHR

    6. LOPCHR

    See also the section on Communications, with particular attention to comms parameter setup.

  2. The IBM-PC

    Special software is required for full communication capabilities on the IBM-PC. This software, together with the interface cable, is available from Husky Computers Limited on an IBM disk.

HUNTER Communications Set-up

To communicate in both directions at 4800 baud, the communication parameters should be set as follows:

TRANSMIT

RECEIVE

Rate - 4800

Rate - 4800

Prtcl - None

Prtcl - None

Prty - 8-bit

Prty - 8-bit

CTS - y

RTS - hold

DTR - n

DSR - n

ECHO - n

DCD - n

LF - n

Serig - Off

Null - 0

T/0 - no

T/0 - no

The above setup allows full bi-directional communications with hardware handshaking. Both ASCII text files and 8-bit object code files can be up and down loaded.

IBM-PC Communications Program

The files supplied on disk are:

  • COMMS1 .BAS

  • BASIC.COM

  • HUNTCOM.BAT

To run the program, follow these steps:

  1. Turn on the IBM-PC

  2. Insert a ’DOS’ disk into the A drive

  3. Insert the supplied disk into the B drive

  4. Copy the files onto the A disk:

    copy B:*.* A:
    
  5. Remove the B disk and store in a safe place

  6. Type:

    huntcom
    
  7. The IBM comms program is now running and asking for your selection of baud rate.

    It displays:

    Asynchronous Communications Program
    select baud rate (’s’ for system):
    (1) 300
    (2) 1200
    (3) 4800
    

Loading files from the IBM-PC

Make sure the file you want to send is on one of the disks in the IBM-PC and also that the three communications files are on the disk in the A slot.

  1. Plug the cable into the HUNTER and into the asynchronous port.

  2. Switch on the HUNTER and enter the file manager.

  3. Set up the HUNTER comms parameters.

  4. On the HUNTER, type:

    INP no. blocks filename
    

    The number of blocks (256 bytes) may be greater than the actual number, but never less.

  5. On the IBM-PC, select the baud rate:

    i.e. type ‘3’ for 4800 baud

  6. You are now prompted with:

    (R)receive or (T)ransmit _
    

    Type ‘t’ for transmit.

  7. Enter the filename of the file you wish to transfer. It may be preceded with a drive name if required:

    e.g. b:filename

  8. The bottom line of the display should show:

    transmitting
    

    to indicate that transmission is taking place.

When the file has been sent, the comms program will return to the baud rate set-up. If no more communications are required, type ‘s’ for system.

Note

If the message ‘waiting to transmit’ is displayed, then the HUNTER is not ready to receive the file.

Sending files to the IBM-PC

Ensure that the 3 communications files are on the A disk in the IBM.

  1. Plug the cable into the IBM and the HUNTER and switch on the HUNTER.

  2. It is Important to ensure that the RS-232 interface is powered up on the HUNTER before transmission occurs - to avoid an extraneous character on power up which would otherwise be added to your file. Power up the interface by selecting TERMINAL mode then return to the filemanager.

    This procedure only has to be followed when the HUNTER is first powered up.

  3. Set up the HUNTER comms parameters as before.

  4. On the IBM, select baud rate.

    i.e. type ‘3’ for 4800 baud.

  5. When prompted with:

    (R)eceive or (T)ransmit _
    

    type ‘r’ for receive. The following message will then appear on the bottom line.

    any key to abort
    
  6. On the HUNTER, type:

    SEND filename
    

    where filename is the name of the file you wish to transmit.

  7. When transmission is over, the HUNTER displays the message:

    COMPLETED
    
  8. Hit any key on the IBM to close the received file and return to the beginning of the program.

Communicating HUNTER Basic programs

A HUNTER Basic program (.HBA suffix) is stored in a tokenised form. These may be transferred to and from the IBM-PC, as described above.

A HUNTER Basic program, when stored on the IBM, is not in ASCII text form and cannot, therefore, be listed or displayed.

If it is desired to transfer the ASCII text of a program, it is necessary to transmit the program from the HUNTER Basic Interpreter as follows:

  1. Plug the cable into the IBM and the HUNTER and switch on the HUNTER.

  2. It Is important to ensure that the RS-232 interface is powered up on the HUNTER before transmission occurs - to avoid an extraneous character on power up which would otherwise be added to your file. Power up the interface by selecting TERMINAL mode then return to the filemanager. This procedure only has to be followed when the HUNTER is first powered up.

  3. Set up the HUNTER comms parameters as before.

  4. On the IBM, select baud rate.

    i.e. type ‘3’ for 4800 baud.

  5. When prompted with:

    (R)ecelve or (T)ransmit _
    

    type ‘r’ for receive. The following message will then appear on the bottom line.

    any key to abort
    
  6. Enter Basic on the HUNTER with the Basic file loaded into the workspace. On the HUNTER type:

    LLIST
    

    This will list the Basic program to the IBM for storage in the selected file.

  7. Transmission is over when the HUNTER displays:

    READY
    
  8. Hit any key on the IBM to close its file.

An ASCII file with Basic Text may be transferred directly into the Basic workspace using the LLOAD command in Basic. This is done as follows:

  1. Plug the cable into the HUNTER and into the asynchronous port.

  2. Switch on the HUNTER and enter the file manager.

  3. Set up the HUNTER comms parameters.

  4. On the HUNTER enter Basic and type:

    LLOAD
    
  5. On the IBM-PC, select the baud rate:

    i.e. type ‘3’ for 4800 baud

  6. You are now prompted with:

    (R)receive or (T)ransmit _
    

    Type ‘t’ for transmit.

  7. Enter the filename of the file you wish to transfer. It may be preceded with a drive name if required:

    e.g. b:filename

  8. The bottom line of the display should show:

    transmitting
    

    to indicate that transmission is taking place.