Can anyone see any problems with this C++ code?

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.
User avatar
iansjack
Member
Member
Posts: 4711
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Can anyone see any problems with this C++ code?

Post by iansjack »

I linked to the SimNow home page earlier in this thread. Unfortunately that page only contains a link to the Linux version although it says there is a Windows version. If I were you I would consider running Linux for OS development, either as a dual-boot or in a VirtualBox VM. It is far easier to set up and use the GNU tools in such an environment than in Windows IMO.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Can anyone see any problems with this C++ code?

Post by Combuster »

Looks like SimNow was never updated past Windows XP.

The best alternative is to compile Bochs with debugger enabled.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
iansjack
Member
Member
Posts: 4711
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Can anyone see any problems with this C++ code?

Post by iansjack »

You can even use the console in qemu to do limited debugging, although it's not as versatile as other tools.

TBH, I think that careful inspection of the generated assembler code should reveal the problem in this particular case, and would be a very instructive exercise; but that becomes exponentially more difficult as the complexity of the source code increases. Some sort of debugging tools is an essential IMO.
User avatar
Nessphoro
Member
Member
Posts: 308
Joined: Sat Apr 30, 2011 12:50 am

Re: Can anyone see any problems with this C++ code?

Post by Nessphoro »

The problem is not in the code.
I would say a missing rodata section or something else wrong with the linker.
Or the bootloader
User avatar
BMW
Member
Member
Posts: 286
Joined: Mon Nov 05, 2012 8:31 pm
Location: New Zealand

Re: Can anyone see any problems with this C++ code?

Post by BMW »

Ok guys.

I have moved to ubuntu for OS dev. I am already finding it much better.

I think the problem here was that I didn't use a loader (assembly code which calls the kernel entry point), resulting in the kernel being executed incorrectly.

Solved :D
Currently developing Lithium OS (LiOS).

Recursive paging saves lives.
"I want to change the world, but they won't give me the source code."
Post Reply