[sebhc] OS (was: Boot ROM) modifications
Dwight K. Elvey
dwight.elvey at amd.com
Wed Aug 10 14:09:54 CDT 2005
I just looked at my code a little. There are
a couple of low level words that access the disk.
>From Forth, I always use disk that are volume 0
so this may only work for the first track ( that is
always volume 0 for HDOS ). Other tracks may
have volume numbers other than 0, depending on
how the disk was formatted.
There are two words that one can use. They
DREAD ( Sect# Address #bytes - )
DWRITE ( Sect# Address #bytes - )
An example of how one might modify a byte
of the first sector might be:
( I forget the sector size but I think it )
( is 256 decimal. )
CREATE SEC-BUF 1000 ALLOT ( someplace to put things )
( place the disk to modify in drive 0 )
0 SEC-BUF 100 DREAD ( read sector. note values in HEX )
SEC-BUF 20 + C@ . ( display the 20th hex location of buffer )
05 SEC-BUF 20 + C! ( modify the 20th hex location of buffer to value 5 )
0 SEC-BUF 100 DWRITE ( Write buffer back to disk )
If you want to display the data in the buffer, I have a dump
utility on the FSCRN.IMG disk. From Forth, put this disk into
the drive 0 and do:
You can then use this like:
DUMP ( address count - )
or in this case:
SEC-BUF 100 DUMP ( displays entire sector )
Don't forget to put the disk you are modifying back into the
drive before doing the DWRITE.
Also, if you use my transfer utility, you should be able to
make images onto the 10 sectored hard disk using the 96tpi
drive. It will still think it is talking to a 35 track
disk but you should still be able to create the disk.
They will, of course, only work on a 96tpi drive and
act like a 35 track disk( assuming not softsectored ).
If you'd like to disassemble a chunk of code, both meta
disks have a simple disassembler on them. Stick one of
the meta disk in drive 0 and do the following:
EMPTY-BUFFERS 6 LOAD 7 LOAD
It is used:
DISASSEMBLE ( StartAddr StopAddr DisAddr - )
or in this case:
SEC-BUF SEC-BUF 100 + 2280 DISASSEMBLE ( I hope that is right )
Of course, you might want to do just a few bytes
at a time:
SEC-BUF SEC-BUF 10 + 2280 DISASSEMBLE ( do first 16 locations )
Also note that 2280 Hex is the location that the H17
loads the first sector's code to bootstrap from.
If you are disassembling code that is located where it is
run, the DisAddr is the same as the StartAddr. In this
case we are disassembling at some other location.
Hope this helps a little.
>From: "Dwight K. Elvey" <dwight.elvey at amd.com>
>>From: "Dwight K. Elvey" <dwight.elvey at amd.com>
>> I think the Forth and the screens disk are on
>>the ftp but if not, I can make some images and
>>send them in. I don't think I sent in the meta
> I just checked what I have on the ftp and I
>did send in the meta disk images as well.
>I see that I also have images for both the
>H8-4 and H8-5 serial cards.
> Anyway, look at the source code for SAVE-SELF
>on the meta disk ( I think ) for how to write to the
>disk's first sector. You can do this on a DOS machine
>with something like Xtree but it is easiest to
>look at the disk from Forth on the Heathkit.
>The source disk are all in block format ( typical
>of many early Forth's ) and are not easily read
>Delivered by the SEBHC Mailing List
Delivered by the SEBHC Mailing List
More information about the Sebhc