Re: Basic Floppy Disk loader help.
- From: "Benjamin David Lunt" <spamtrap@xxxxxxxxxx>
- Date: Thu, 29 Dec 2005 22:07:52 -0700
"Jean-François Michaud" <spamtrap@xxxxxxxxxx> wrote in message
news:1135915163.385782.110730@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Does anybody see why this bombs if i put 3Ch or above in
> nbSectorsTotal? This is a really old bug I can't seem to pinpoint. 3Ch
> would put us at 60 decimal which would be, if I calculated correctly,
> Track 1, head 1, sector 6. The code works fine below 3Ch.
<snip code>
If your code is at 0x07C00 and you load 60 512-byte sectors
at 0x00500, wouldn't this overwrite your code?
60 sectors = 0x7800
plus the 0x0500 offset
would place the start of the 60th sector at 0x07D00
Whereas 59 sectors writes that last byte just before
0x07D00.
If your code is at 0x07C00, reading the 59th sector
overwrites your code. Since it doesn't "bomb" your
code, I am assuming that your read_sector code is
at least 0x00100 passed the start of your loader.
Is this the case?
Ben
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Forever Young Software
http://www.frontiernet.net/~fys/index.htm
To reply by email, please remove the zzzzzz's
Batteries not included,
Some assembly required.
.
- Follow-Ups:
- Re: Basic Floppy Disk loader help.
- From: Jean-François Michaud
- Re: Basic Floppy Disk loader help.
- Prev by Date: Basic Floppy Disk loader help.
- Next by Date: Re: Basic Floppy Disk loader help.
- Previous by thread: Re: Basic Floppy Disk loader help.
- Next by thread: Re: Basic Floppy Disk loader help.
- Index(es):
Relevant Pages
|