Getting PA of a structure/inside a class
Posted: Tue Oct 26, 2010 6:11 pm
I have implemented the following code with a ASM file inside my project...
but I would like to use your way... it is more easy to keep track...
The Case: I'm building my own OS with C++, based in "classes"/not linear C... however, when I need to some low-level instructions, I have included "in project" assembly files...
for example:
How do I use this beauty code?
The problem is that _idtr, in my case, is inside class capsule...
does not work
Is there any way to take the physical address of that structure that reside inside the class?
but I would like to use your way... it is more easy to keep track...
The Case: I'm building my own OS with C++, based in "classes"/not linear C... however, when I need to some low-level instructions, I have included "in project" assembly files...
for example:
Code: Select all
class definition _GDT
{
protected struct record for IDTR
member functions
Install();
}
Code: Select all
_GDT::Install()
{
call my low-level asm code to perform the lidt...
}
Code: Select all
_asm lidt [_idtr]
The problem is that _idtr, in my case, is inside class capsule...
Code: Select all
_asm lidt [this->_idtr]
Is there any way to take the physical address of that structure that reside inside the class?