Page 1 of 1

Bochs strange issue

Posted: Sun Nov 09, 2014 12:18 am
by AttributedTensor
I haven't fiddled with my simple real mode OS project for a long time.

Now that I'm trying to get started again it seems Bochs no longer is able to run the code successfully.

Code: Select all

00014260637i[BIOS ] Booting from 0000:7c00
00086270628i[BIOS ] rror ff !
00086273893e[DMA  ] io write to address 00000000, len=2
00086273899e[DMA  ] io write to address 00000000, len=2
I start to comment out code as I see this is related to writing to the screen. Then I get a lot of:

Code: Select all

...
00296843190e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00296875966e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00296908742e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
I'm sure I can figure this out, it is actually rather interesting on some level, but at the same time it is also just very annoying. I know the code works on an actual physical machine (tested with recently assembled image), so I'm wondering if this is simply some issue with Bochs? Obviously I'm doing something strange though as I'm assuming Bochs doesn't just do this in general. But I'm basically just asking if this is something obvious that I should be aware of, otherwise I'll just try to work out what this is first on my own. Thanks. :-)

Re: Bochs strange issue

Posted: Sun Nov 09, 2014 7:13 am
by Octocontrabass
AttributedTensor wrote:

Code: Select all

00014260637i[BIOS ] Booting from 0000:7c00
00086270628i[BIOS ] rror ff !
Somewhere between these two lines, you begin executing garbage instead of the expected code. Without seeing your code, I can only guess at what the problem might be. Do you rely on the values in any registers other than DL when your code begins executing? (This includes CS and EFLAGS!) Have you made sure your stack points to available RAM and not the EBDA or ROM?

By the way, you should post your code too.

Re: Bochs strange issue

Posted: Sun Nov 09, 2014 10:57 am
by SpyderTL
You can also step through your code one instruction at a time with the Bochs debugger. Highly recommended.