This package contains complete C and assembly development software for the
HERO-1 ROBOT from Heathkit. It also includes a disassembler which can be
used to generate sources from the existing ROM's available for the ROBOT.

Please note that the content of this distribution is copyright, and must
not be redistributed in any way. The full text of the license agreement
is displayed during the INSTALL process.

All software, documentation and other material in this package is licensed
ONLY for personal (non-commercial) use by the owners of the HERO-1 robot.
If you require development tools for any other purpose, please see the
enclosed CATALOG file for information on our commercial products.

------------------------------- IMPORTANT -------------------------------
Since the HERO-1 is no longer in production, market for this package is
limited. Having acquired a used HERO-1 myself, I have ported several of
my commercial development tools to work with it. At the request of the
participants in the HERO-OWNERS mailing list, I have assembled the results
of that effort into this development package, however I have NOT spent the
time to customize all of the documentation specifically to the HERO.

Where there is a conflict, between the notes in this file and the other
documentation, use the information from this file!
-------------------------------------------------------------------------

                            * Getting Started *

To install this package:

From DOS/Command prompt
   - Select the drive containing the distribution.
   - CD to the subdirectory containing the distribution (if necessary)
   - Run the INSTALL program

From Windows:
   - From "My Computer", open the drive containing the distribution.
   - Locate and open the subdirectory containing the distribution.
   - Double-Click on the INSTALL program icon.

NOTE: INSTALL is menu driven, and allows you to choose what portions of
the distribution package to install, and where to put them (directory).
It will warn you before installing over an existing directory, and does
not modify AUTOEXEC.BAT or CONFIG.SYS. It simply copies/dearchives the
files from the distribution diskette into appropriate directories on your
hard disk.

Please refer to the various README.*, *.TXT, and *.DOC files installed
with the package for more information.

Note that some DDS source files ('.c', '.h' etc.) are written using tab
stops at 4 character intervals, which is much more convenient for 'C'
development than the usual MS-DOS tab stops at 8 character intervals.
The DDSIDE and EDT editors from Dunfield Development Systems correctly
support these 4 character tab stop.

For information on obtaining technical help, see the TECHSUPP.TXT file
installed with the package documentation.


Refer to the notes below, and then the files in the DOCS subdirectory for
complete information on configuring and using the various programs.

Contents of this package:

CCF.COM         Micro-C command line interface
MCP.EXE         Micro-C pre-processor
MCCCF.EXE       Micro-C compiler for the CFLEA
MCOCF.COM       Micro-C optimizer for the CFLEA
SLINK.EXE       Micro-C source linker
SLIB.COM        Micro-C source library manager
SINDEX.COM      Micro-C source library indexor
SCONVERT.COM    Micro-C library source convertor
SRENUM.COM      Micro-C library renumber utility
MAKE.COM        Micro-C MAKE utility
TOUCH.COM       Micro-C TOUCH utility (for MAKE)
DDSIDE.COM      Micro-C integrated development environment
DDSIDE.HLP      Micro-C IDE help file
HERO.IDE        Micro-C IDE configuration file
ASMCF.EXE       CFLEA Cross assembler
EMCF.COM        CFLEA simulator
SPKEASY.COM     Micro-C Speech/Phoneme editor for HERO
CFSETUP.COM     CFLEA setup utility
HERO.H          Micro-C general HERO definitions
PHONEME.H       Micro-C voice phoneme definitions
PHRASES.H       Micro-C ROM speech phrase addresses
ASMH.EXE        HERO-1 cross assembler
DISH.EXE        HERO-1 cross disassembler
HERO1.ASM       ASMH example source file
SYSTEM.MAP      DISH example MAP file (for SYSTEM 1.3)
BASIC.MAP       DISH example MAP file (for BASIC)
LAPTALK.COM     LAPTALK Communications software
XMODEM.COM      LAPTALK XMODEM module (not used with HERO)
DIAL.SCR        LAPTALK example script (not used with HERO)
HANGUP.SCR      LAPTALK example script (not used with HERO)
PHONE.SCR       LAPTALK example script (not used with HERO)
HOST.SCR        LAPTALK example script (not used with HERO)
HOST.CFG        LAPTALK host configuration (not used with HERO)
HOST.MSG        LAPTALK host message (not used with hero)
DOCS\           Documentation files
EXAMPLES\       Example C programs for the HERO-1
LIBCF\          Micro-C/CFLEA/HERO library files
SERIAL\         HERO-1 serial interface design (Contains MICROCAD)
SERIAL\PARTS\   Component drawings for use with MICROCAD
UTILITY\        Misc. useful utility programs

* Documentation files (in 'DOCS' subdirectory)
CATALOG         DDS product CATALOG
REGISTER        DDS product registration form
TECHSUPP        DDS technical support information
HERO.TXT        HERO-1 "reference card" (Misc. notes)
HEROMODS.TXT    Some useful HERO-1 modifications
HEROMAIL.TXT    Information captured from the HERO-OWNERS mailing list
HEROLIST.TXT    Information about the HERO-OWNERS mailing list
HERORAM1.TXT    A simple 4K RAM expansion
AUTOROM.TXT     Notes on the HERO-1 AUTOMODE ROM
UTILROM.TXT     Notes on the HERO-1 UTILITY ROM
BASIC.TXT       Notes on the HERO-1 BASIC ROM
MICROC.TXT      Micro-C Technical manual
HEROLIB.TXT     Additional library functions for the HERO-1
DDSIDE.TXT      Integrated development environment
ASMCF.TXT       CFLEA cross assembler
EMCF.TXT        CFLEA simulator
CFLEA.TXT       CFLEA virtual machine description
SPKEASY.TXT     Speech/Phoneme editor
CINTRO.TXT      Introduction to C
ASMH.TXT        HERO-1 cross assembler
DISH.TXT        HERO-1 cross disassembler
LAPTALK.TXT     Communications software

* ROM Images (in ROMS subdirectory)
README.TXT      Notes with Mobile Ed Productions release letter
SYSTEM13.HEX    System 1.3 ROM image
SYSTEM1U.HEX    System 1.U ROM image
BASICROM.HEX    HERO BASIC 1.0 ROM image
UTILROM.HEX     UTILITY ROM image
AUTOROM.HEX     AUTOMODE ROM image
BASIC.ASM       Modified BASIC interpreter source code
*.TXT           Notes and documentation

-- HERO-1 notes

To use the CFLEA, you need the following in your HERO-1:

- System ROM 1.3 or 1.U  (For serial interface)
- Memory expansion card  (See below)
- Serial interface board (See below)

You can get by without the expansion board by replacing the crystal
on the main CPU board with a 4.00Mhz one. The SYSTEM 1.3 or 1.U ROM
requires a 4.00Mhz crystal in order to perform serial I/O and other
timing functions correctly. Notes for adding 4K or RAM to an unexpanded
system are in the file HERORAM1.TXT in the DOCS directory.

The serial interface is required to download and debug CFLEA code. It is
not strictly necessary to RUN CFLEA code, as long as you have another way
to load the code into your ROBOT. A design for a HERO-1 serial port is
located in the SERIAL directory.


-- C compiler notes

Since the 6808 processor of the HERO-1 is not really suited to C (no 16
bit operations, no stack addressing, only 1 index register which can't be
pushed/popped) etc., I have based the HERO-1 C compiler on my CFLEA virtual
machine architecture, and provided a RUN time interpreter, which it normally
placed in ROM in the HERO (You can also download it into RAM if you prefer).
The interpreted instruction set does result in somewhat slower execution
than could be obtained on the native 6808, however it is still much faster
than the HERO-I BASIC interpreter, the only other high level language
available for the HERO-1. It is also worth noteing that the CFLEA is very
space efficent, allowing you to run very large/complex C programs in a
fairly small amount of memory.

Due to limitations of the CFLEA virtual machine, the C compiler does not
perform signed division. ie: division with negative numbers will not work
as expected. Also, since the CFLEA cannot perform sign extension, all 'char'
values in C are treated as positive numbers in the range of 0-255. Note
however that "char" and "unsigned char" are still different, as the
"unsigned" modifier will control how the compiler performs type promotion.
ie: "unsigned char" will force any expressions using it to be unsigned.

The C compiler is setup pretty much as described in its documentation,
however wherever you see the directory '\MC', use '\HERO' instead. Due
to the "bit bang" serial port of the HERO which cannot receive a character
while other processing is being performed, the 'chkch()' and 'chkchr()'
functions have been omitted from the library. Since the HERO serial port
automatically echo's input characters, the 'getstr()' function cannot
stop echoing input data when the buffer is full. Also, since DEL behaves
differently when echoed to different terminals, I have removed support for
it from 'getstr()', which now only accepts BACKSPACE to edit the input.

To setup the CFLEA kernal, you must run 'CFSETUP' from within the HERO
directory. This will ask you for the memory addresses you wish to use,
then generate a KERNAL.HEX file containing the kernal image. This kernal
must be placed in ROM or downloaded into the HERO-1. The file is in MHX
(S19) format, however you can use the supplied HEXFMT utility to change
it to Intel format, reposition the load records etc.

The PREFIX.ASM file in the library (LIBCF subdirectory), must also be
configured with line 7 '?CFROM EQU' set to the CFLEA kernal address, and
line 8 "ORG" set to the user code address. CFSETUP will make these changes
for you, however if problems occur, check these values.

CFLEA kernal entry points (offset from starting address):

  +0000 = Interactive debugger
  +0002 = Cold-run entry point (call to begin processing CFLEA)
  +0004 = Warm-run entry point (call after NATIVE to resume CFLEA)

Programs produced by the C compiler begin with a JSR to the CFLEA COLD-
RUN entry point, allowing you to download and execute them directly from
the system ROM monitor. If you execute at the CFLEA ROM address, you will
enter an interactive (serial) CFLEA debug monitor. The debuggers default
user PC is set to the program load address plus 3 in order to skip the
6808 JSR instruction placed at the beginning by the C compiler. This is
done because the debugger automatically runs in CFLEA mode. 

CFLEA debugger commands:
------------------------
B [addr]        - Set breakpoint        (SPACE = Display breakpoints)
C R value       - Change register value (R= A, I, S or P)
D addr,[addr]   - Dump memory           (SPACE = 256 bytes)
E addr          - Edit memory (Prompts with 'xx-'):
  xx    - Two HEX digits (replaces byte and advances)
  'c    - Quote (') followed by an ASCII character (replaces & advances)
  SPACE - Advance to next byte (without changing this one)
  BACKSP- Backup to previous byte
  RETURN- Exit edit command
G [addr]        - Go (execute) at addr  (SPACE = Continue from PC)
K addr          - Kill breakpoint       (SPACE = Display breakpoints)
R               - Display regsiters
S               - Single step one instruction
U addr,[addr]   - Unassemble memory     (SPACE=16 bytes)
X               - Exit to system monitor
Z               - Reset CFLEA virtual processor

The debugger does not understand native 6808 code. You must not try and
set a breakpoint on such code. Stepping over a NATIVE instruction will
treat it and all 6808 code executed by it as a single step.


-- DDSIDE notes

The DDSIDE program contained in the package is a special version which
accomodates the 7 bit 2 stop bit serial interface required by the HERO.

If you have a monochrome screen, remove the line indicated by the comment
in the HERO.IDE configuration file.


-- LAPTALK notes

The first time you run LAPTALK, it will complain about no config file. Be
sure to configure the serial interface for 7 bits, no parity and 2 stop bits.
Then save a default configuration file under the name LAPTALK. You may also
wish to set some pleasing screen colors in the configuration.

Use Upload/ASCII and Download/ASCII to load and save hex files to the
HERO, using executive mode commands '3A' and '39'. If you save the LAPTALK
configuration AFTER you have specified an upload/download filename, that
name will be the default name for future sessions.
