Dump registry
Dump registry
Het everybody, I have a question. T wrote a function to print my registry value when I'm under real mode 16 bits. When my function print the registry value in Bochs and VmWare, I got the same values, but if I print this when I boot with my PC, the values are not the same. Why ?
- Combuster
- 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: Dump registry
Because it feels like it?
Really, to give a sensible answer we must know what you see, and especially what you expect to see.
Really, to give a sensible answer we must know what you see, and especially what you expect to see.
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Dump registry
What the hell does the registry have to do with OS development? There's no Windows in kernel-land.
--Troy
--Troy
Re: Dump registry
I'm not under Window, I wrote a osLoader ..
Re: Dump registry
I think he means register as in an Assembly register or something.Troy Martin wrote:What the hell does the registry have to do with OS development? There's no Windows in kernel-land.
--Troy
When the chance of succeeding is 99%, there is still a 50% chance of that success happening.
- salil_bhagurkar
- Member
- Posts: 261
- Joined: Mon Feb 19, 2007 10:40 am
- Location: India
Re: Dump registry
I guess you mean CPU registers like ax, bx, cx etc.
If it is C that you are using, then the compiler does not use some registers (depending on the optimization). So the value they contain depends on the code that ran before your os booted. You could try initializing all the registers to a known value at the start of your os code in assembly. That should solve your problem.
Also, if your os uses some kind of architecture (processor, bios) detection code, then the code execution paths and states will be dependent on the different architectures on which the code runs.
If it is C that you are using, then the compiler does not use some registers (depending on the optimization). So the value they contain depends on the code that ran before your os booted. You could try initializing all the registers to a known value at the start of your os code in assembly. That should solve your problem.
Also, if your os uses some kind of architecture (processor, bios) detection code, then the code execution paths and states will be dependent on the different architectures on which the code runs.