Re: Basic Floppy Disk loader help.




"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.



.



Relevant Pages

  • Re: CDREAD for DVDs
    ... :>> No, bombs out at, if my memory serves me correctly, 1,048,576 sectors which ... :>> corresponds to the 2 Gb file size limit. ...
    (comp.os.os2.multimedia)
  • Re: FileCopy overwrites the existing file
    ... If you're lucky your new file will overwrite the disk sectors occupied by old file, but you can't make any assumption about that. ... Note that even if you wrote a low level utility overwrites exactly the same the sectors as old file, it would still be possible to recover parts of that file if it has been moved earlier by for example a defragmentation program service. ... Also be aware that simple overwriting of the file is not enough to make it unrecoverable by data recovery specializing entities. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: secure file deletion
    ... Tim Haynes wrote: ... >> On what to overwrite with I'd say I expect the number of overwrites to be ... Some drives employ unpublished 'reserve' tracks and use them to ... replace sectors which start to become unreliable. ...
    (comp.os.linux.security)
  • Re: disks
    ... > I would like to overwrite all sectors of the disk. ... Type in "man format" ...
    (comp.unix.solaris)