> Anybody have a stupid DOS trick for importing
binary files
> over a com: port?
Oh, I assumed that on the target, floppy-less system, you have
utterly NO tools except what microsoft giveth. Hoepfully there's
debug. If not you may be screwed.
Hell, with debug you could WRITE the program to input the file
in binary! We're talking MSDOS, right? Not Windows? If so,
then you can simply talk to the bare iron, it's easy, I can do
this from memory:
I'd use MODE to set the serial port to something conservative,
like 9600 baud first. Even a 4.77MHz machine will easily do 9600
bits/sec; the big problem is overruns when the system writes to
the disk, so the solution is to NOT write to the disk at all,
load into memory and just execute it.
This assumes a .COM to be utterly trivial.
XXXX: mov ax, cs
mov ds, ax
mov es, ax
mov di, 100
mov cx,
theexactsizeofKERMIT.COM
foo1: in ax, COMPORT ; look up port addresses
and ax, RDA
jz foo1 ; wait for char ready,
in ax, DATAPORT ; read it,
mov [di], al ; store it,
inc di
djnz foo1 ; next...
jmp 100 ; done!
This will work (barring opcode thinkos) iff kermit is small
model. The address XXXX should be safely past the end of the
space that kermit will consume. If you've got more than a meg
or two of RAM, then you can put it in another segment, make
the last jump a jmpf.
You can type this crap directly into debug, "aXXXX".