


Tookkit  is  a  a  file  oriented  binary editor along with file conversion
utilities to transfer binary data to  or  from  Motorola  S  or  Intel  Hex
format.   The  binary  file  is generally produced by reading an EPROM with
Ross Custom Electronics DumBurner Support software.  This file will then be
a "disk image" of the EPROM.  That is, byte zero of the EPROM will  be  the
first  byte  of the disk file, and so on.  Alternately, the binary file may
be produced by use of an assembler or cross assembler which produces  Intel
Hex  or  Motorola  S code; Menu options 4 or 6 would then be used to create
the binary file.

Since the binary file,  which  contains  non-ASCII  characters,  cannot  be
manipulated  with  a  standard  editor such as Wordstar, the Toolkit editor
(menu options 1 and 2) provides a method to manipulate these files.






+EJECT

                      Using the Toolkit Binary Editor

If you are editing a binary file read from EPROM or  converted  from  Intel
HEX  or Motorola S format, Menu Option 1 (Edit Existing File - no expansion
allowed) will usually be the appropriate choice.  If you are building a new
file or adding on to the end of an existing file Menu Option 2 (Edit File -
Expansion allowed) should be used.  The two  menu  options  are  identical,
except  that  option  1 will not allow the file to "grow".  After selecting
menu option 1 or 2, enter the file name you wish to edit.

Those familiar with CP/M's DDT will find the operation of Toolkit's  binary
editor  similar.   The  first  128  bytes  of  the  file  are automatically
displayed.  Data is displayed 16 bytes on a line.  The address of the first
byte is on the left side of the display.  The numbers across the top of the
display represent the least significant part of the address, which must  be
added  to the address on the left to obtain the full address of one byte of
data.  On the far right of the screen, the 16  bytes  of  binary  data  are
interpreted  in ASCII.  This allows much easier observation of the data you
are editing.


+EJECT



You will be asked whether you want to  modify  the  data  on  the  display,
install  modified  data  to disk, or display another block of data.  If you
are just observing the data in the binary file, pressing return will  bring
up  the  next  block of data; or you may enter any address within the file.
Note that if you enter an address which occurs in the middle of a 128  byte
block,  such  as 3F9, the editor will begin the display at the beginning of
that block, or 380 in this example.  The data for  the  address  3F9  would
occur in the last line of the 128 byte block.

Once  you  find  the  block  of  data  you wish to edit, use the M (Modify)
command to begin the edit session.  NOTE THAT NO CHANGES ARE  MADE  TO  THE
DISK  FILE  UNTIL  YOU SPECIFICALLY INSTALL THEM TO DISK WITH THE I OPTION.
You will now be requested to enter the address you  wish  to  modify.   The
address  you  enter must be in the 128 byte block, or an error will result.
The address is entered in hex, and may be from  1  to  4  characters  (i.e.
leading zeros are not required.) Data similar to the following will then be
displayed:


+EJECT


     03F9  41  A

The  first  number  is the address you requested.  The second number is the
data in that address, represented in hex.  The third number  is  the  ASCII
character  represented by the hex data.  You may now enter the new data, in
hex.  Either one or two digits may be entered.  You may enter the  data  in
ASCII  by  preceeding  the  character  with  a  single quote (i.e. 'B would
replace the ASCII A in the example above with an ASCII B)

Once you enter the new data, the editor will automatically advance  to  the
next byte in the 128 byte block of data.  If you just press RETURN, without
entering  any data, the current location will not be modified, and the next
location will be displayed.  If the next location is outside the  128  byte
block  (i.e.  advancing  from  3FF  to  400)  the editor will redisplay the
current block of data with all changes (i.e. it will  not  advance  to  the
next  block).   Remember  that changes have not been installed to disk, and
will not be until you select the Install option.



+EJECT





You may "back up" to review or reenter data for the  previous  location  by
pressing  -.  Exit by pressing Q or a period.  Exit will cause the question
"Address to Modify?" to again be displayed.  If you do not  wish  to  enter
more  data  in this block, again use Q or a period to exit.  The full block
of data, with all changes, will then be  displayed.   Be  sure  to  INSTALL
these  changes  to  the  disk  (with  the  I  option)  to  make the changes
permanent.  As the changes are installed to the disk, you may  or  may  not
see  indication  of  drive  activity.   Many  CP/M  and MS-DOS systems will
"buffer" several blocks of data before actually writing them to  the  disk.
All  data  will  automatically  be sent to the disk drive when you exit the
editor with the Q option.






+EJECT
                         File Conversion Utilities

Menu option 3 through 6 are fairly self explanatory.  You will be  required
to  enter  the  name  of  a  binary  file and either an Intel HEX file or a
Motorola S file.  If you are converting from  Intel  HEX  to  binary  (Menu
option  4) or from Motorola S to binary (Menu option 6), a few restrictions
apply.  First, leading characters in the line are not allowed.   Intel  Hex
files  must begin with a : as the first character in each line.  Motorola S
files must begin with an S as the first character in each line.  If leading
characters exist, they can be removed with a standard text editor  such  as
Wordstar.

A  characteristic  of  both Intel HEX and Motorola S files is that, since a
new address is specified on each line of the file, it is possible  for  the
data to "jump around" in memory.  It is possible that the first line of the
file  specifies  that  the  data  is  to  be  installed at location 10, for
example, and the second line specifies that the data is to be installed  at
location  8000.   This  would obviously leave many unspecified locations in
the middle.  Toolkit will fill the unspecified locations in the binary file
with nulls (00) in cases such as these.


+EJECT

It is also conceivable that the Intel HEX or Motorola  S  file  jumps  from
location 8000, for example, in the first line, to location 10 in the second
line.   This  will  only  occur  if  the  assembly  language source program
contained an ORG (orgin) instruction to a lower location in memory.  A JUMP
FROM A HIGH ADDRESS TO A LOWER ADDRESS IN AN INTEL HEX OR MOTOROLA  S  FILE
IS NOT ACCEPTED BY THE TOOLKIT FILE CONVERSION UTILITIES, AND WILL GENERATE
AN  ERROR.   If  you  cannot  fix the source code which caused the ORG to a
lower memory address, it is possible to rearrange the lines  in  the  Intel
HEX or Motorola S file with a text editor such as Wordstar.

Conversions  from  Binary  to Intel Hex, or from Binary to Motorola S (Menu
Options 3 and 5) are generally unnecessary.  One reason for  this  type  of
conversion  might  be  to  enable  a  binary  file  to  be  sent  across  a
communications link with ASCII characters.  If this is done, you  must  use
Toolkit  at  the other end to convert the file back to binary.  CP/M's LOAD
command should not be used due to address specifications  in  the  0000  to
0100 range, which is a reserved area in CP/M.




+EJECT




You  may  use Toolkit's binary editor to examine and/or modify COM files in
both CP/M and MS-DOS.  Remember, however,  that  Toolkit's  editor  assumes
that  the  first byte on the disk file is data for address 0, when in fact,
CP/M assumes that the first byte on the disk file is data for  address  100
hex.   Therefore, all addresses displayed by the Toolkit editor will be off
(low) by 100 hex.  The same thing occurs if a  COM  file  is  converted  to
Intel  HEX  format  using  Toolkit's  Menu option 3.  All Intel HEX address
specifications will be low by 100 hex.  As mentioned earlier, this is not a
problem if Toolkit, rather that CP/M's load, is used to  convert  the  file
back to binary.



+END




+EJECT
