
Due to the requests I have received concerning how to download data, and my
own dilemma of downloading PC wav files, this file transfer program using the
KERMIT protocol was written. Prior to this, I had to convert files to the
"INTEL" hex format ( I refer to it as a papertape reader) and use the reader
normally used for code to transfer the data. This took awhile because for each
16 bytes of data there are 44 bytes in a hex file. This program is written in
assembly, the highest level language there is :-) and uses the little known
instruction movx @r0,a where P2 is modified to the page address. (I would have
designed two 16 bit regs) I've heard this may not work on some clone '51's. I
use the METALINK assembler though any should work and all the associated files
are included in the main programs (I51RECV.ASM) for receiving files and
(I51XMIT.ASM) for transferring files to the remote. All that is needed is all
the files be in the same directory. Either hex file is then loaded to the 8051
using the hex reader previously mentioned. The fopen function is a pointer
initialization to where in memory the data should go. The fwrite function then
moves the packet data to that memory. The fread gets data from memory for
subsequent encoding. The fclose does nothing at present but could be used for
other types of memory. The file "I51HEDR.INC" needs to be changed to suit your
specific memory configuration. As an example my test unit has 32k of ram
memory and a small bootloader rom that is switch off after loading into
ram. PSEN is or'd with RD so that code can be executed in ram, hence the close
range of rom to ram with no overlap. My monitor is from 0000h to 1fffh. 2000h
to 2fffh is for floating point routines and extended math functions. The
kermit code is loaded at 3000h to 33ffh and the data for kermit is at 3400h to
35ffh. 3600h to 3fffh is still available, but for simplicity, files from
KERMIT are loaded starting at 4000h and can go to 7fffh. Thats a maximum of a
16k file (about a 2 second wav file at 8000khz). After fixing my monitor to
accept 8 bit data (by removing the anl a,07fh), ascii text and binary image
files download successfully. I'll be adding a front-end that'll request the
start address and direction.

If you have any questions, my email addresses are:

glp@sleepy.anest.ufl.edu		! decmail smtp - preferred
pugh.anest1@wpo.health.ufl.edu		! word perfect office - mnotify=NO
greg@anest1.anest.ufl.edu		! pegasus internet mail - base64

