Bochs strange issue

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
AttributedTensor
Posts: 1
Joined: Sat Nov 08, 2014 11:57 pm

Bochs strange issue

Post 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. :-)
Octocontrabass
Member
Member
Posts: 5590
Joined: Mon Mar 25, 2013 7:01 pm

Re: Bochs strange issue

Post 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.
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: Bochs strange issue

Post by SpyderTL »

You can also step through your code one instruction at a time with the Bochs debugger. Highly recommended.
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Post Reply