[Coco] Re: Coco Digest, Vol 11, Issue 104
Robert Gault
robert.gault at worldnet.att.net
Mon Sep 27 20:17:22 EDT 2004
John R. Hogerhuis wrote:
> On Mon, 2004-09-27 at 15:06, farna at att.net wrote:
>
>>>I'd like to put the OS-9 boot program on cassette. I guess what I need
>>>is the boot track off the drivewire diskette.
>>>
>>>If I could bootstrap off cassette, then I could disconnect from the
>>>cassette as soon as the bootloader is transferred.
>>
>>
>>I hate to be the bearer of bad news, but I don't think this will work. IIRC OS-9 has no provisions to use the cassette port at all. I'm sure someone has written a utility to utilize the motor on/off commands, but that's about it.
>>
>
>
> OS-9 doesn't bootstrap itself. RS-DOS has the DOS command and that loads
> track 34 or whatever, jumps to it, and that boots OS-9, right? Somebody
> has to be first. I'm saying I'd like instead of bootstrapping to track34
> and boot that way, to instead bootstrap from a program loaded off
> cassette. This little program would have to have enough smarts to talk
> to DriveWire server so that the rest of OS-9 could be booted up.
>
> Here's my logic:
>
> OS-9 could be bootstrapped from *any* device. Directly accessible flash,
> serially read flash, a disk drive, a disk drive emulated on a serial
> port (drivewire), or even a cassette drive.
>
> I don't want to use the cassette within OS-9, or even to fully boot
> OS-9. I just want to use it to bootstrap os-9. OS-9 for the most part
> loads itself utilizing whatever drivers are built into it
>
> I'd posit the cassette recorder could be an OS-9 SCF device like any
> other, but that's beside the point.
>
> Remember that little program that was included with games like Sands Of
> Egypt, etc. in the manual? That's the bootstrap. If you can bootstrap
> from the keyboard, you can bootstrap from anything.
>
> I guess I didn't mention that I'm a code monkey, so that is what
> actually will make this work...
>
> -- John.
>
>
It should be simple enough for you to do it yourself. The DOS command is
well documented and the source can be read in "Disk Basic Unravelled".
In short it loads track 34 into memory and then jumps to the code so loaded.
From your point of view, the problem is that the code in track 34 does
not contain the prefix that tells Disk Basic where to load the code. So
you need to write your own program to store track 34 on tape and then
load it to the correct location and execute it.
One simple approach is to use the command DSKI$ to copy all of the
sectors of track 34 to strings and save the strings as data on a tape.
Then write a program to read the data strings off the tape and store
each byte of data to memory starting at $2600 until the data is used up.
You then would indicate EXEC&H2602. If you are not sure the data
transfer was good, you can include a quick and dirty test to check that
the values at $2600-1 are the characters "OS" and if not don't EXEC&H2602.
More information about the Coco
mailing list