Search found 8 matches
- Mon Mar 15, 2010 7:49 am
- Forum: Advanced OS Development
- Topic: How to get display's resolution?
- Replies: 1
- Views: 45181
How to get display's resolution?
I want to know how to get display's resolution by call bios interrupt
- Sat Jul 11, 2009 3:15 pm
- Forum: Beginning OS Development
- Topic: problem in demo 8
- Replies: 14
- Views: 62162
Re: problem in demo 8
The problem is solved!
I modified the code to
And all works well currently!
Thanks very much!
I modified the code to
Code: Select all
void _declspec (naked) i86_pit_irq () {
_asm pushad
//! increment tick count
_pit_ticks++;
//! tell hal we are done
interruptdone(0);
_asm popad
_asm iretd
}
Thanks very much!
- Fri Jul 10, 2009 4:19 pm
- Forum: Beginning OS Development
- Topic: problem in demo 8
- Replies: 14
- Views: 62162
Re: problem in demo 8
I found that i86_pit_irq() pushed 4 dword when it is called!
If I replaced "_asm add esp, 12" with "_asm add esp, 16", the #GP is not generated!
But the DebugPuts works wrong, it only display first line!
And I want to know when it generate "invalid op code"!
Thanks!
If I replaced "_asm add esp, 12" with "_asm add esp, 16", the #GP is not generated!
But the DebugPuts works wrong, it only display first line!
And I want to know when it generate "invalid op code"!
Thanks!
- Thu Jul 09, 2009 9:18 am
- Forum: Beginning OS Development
- Topic: problem in demo 8
- Replies: 14
- Views: 62162
Re: problem in demo 8
What code are you using for your i86_pit_irq() function? In almost all normal functions used as irq handlers, C/C++ doesnt deal properly with the stack pointer because the order of the stack for Interrupts. ~Andrew void _cdecl i86_pit_irq () { _asm add esp, 12 _asm pushad //! increment tick count _...
- Wed Jul 08, 2009 3:28 am
- Forum: Beginning OS Development
- Topic: problem in demo 8
- Replies: 14
- Views: 62162
problem in demo 8
After enabling interrupt, it will generate General Protection Fault when we using for(;;){}
I think the stack is damaged and the #GP is generated after i86_pit_irq() is called.
The ebp is changed after i86_pit_irq() is called.
But i don't know why it changes.
I think the stack is damaged and the #GP is generated after i86_pit_irq() is called.
The ebp is changed after i86_pit_irq() is called.
But i don't know why it changes.
- Thu Jun 25, 2009 11:03 am
- Forum: Advanced OS Development
- Topic: How to debug c++ codes?
- Replies: 4
- Views: 62216
Re: How to debug c++ codes?
It is not possible to use step-through debugging on your kernel. What the tutorials mean by debugging at this stage is excess printf statements around the suspect bit of code to see exactly what is going on If you NEED step through debugging, Bochs has a commandline debugging mode that you can try ...
- Thu Jun 25, 2009 6:44 am
- Forum: Advanced OS Development
- Topic: How to debug c++ codes?
- Replies: 4
- Views: 62216
Re: How to debug c++ codes?
You should follow this tutorial of how to setup the Kernel with C++ for debuging. http://www.brokenthorn.com/Resources/OSDevMSVC.html I tried using MSVC08 but I had error while compiling, I changed to MSVC05 and Everything works better now. :D I'm using MSVC08 and it works very well. I want to debu...
- Sun Jun 21, 2009 3:20 pm
- Forum: Advanced OS Development
- Topic: How to debug c++ codes?
- Replies: 4
- Views: 62216
How to debug c++ codes?
Thanks for your your tutorial!
I am following this tutorial, and i am in tutorial 14 now.
We use c++, but how to debug c++ codes?
I am following this tutorial, and i am in tutorial 14 now.
We use c++, but how to debug c++ codes?