Directory structure loaded at wrong address

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
NOTNULL

Directory structure loaded at wrong address

Post by NOTNULL »

Hi all,
I have completed my primary bootloader long back and it worked fine. Now, when I was trying to run it in Bochs-2.1.1 in Intel Pentium III 651 MHz machine loaded with Windows XP, the directory structure is loaded at memory location 0x1FFD, instead of 0x2000. I have declared the address as macro, DIR_CPY. So, the primary loader couldn't find the secondary loader 'boot2.bin'. I have attached my boot loader code.

Any help greatly appreciated.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Directory structure loaded at wrong address

Post by Pype.Clicker »

weirdo. I don't see anything that's obviously wrong. maybe you should set a breakpoint at 0x7c00 and execute step by step in BOCHS from there ...
NOTNULL

Re:Directory structure loaded at wrong address

Post by NOTNULL »

Yes. I have traced the code already. Should I have to configure Bochs? Memory is configured to 32 Megs.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Directory structure loaded at wrong address

Post by Pype.Clicker »

well, i see two plausible cause of error:
- an interrupt trash your register before you use it.
- somehow you damaged your code (code overwriting code, load errors or something wrong in the way you prepare the disk image) and the value of 2000 has become something else when you execute the "mov BX,imm" instruction ...

If i may ask, what makes you believe the directory is badly loaded ? it seems to works perfectly for me ...
Post Reply