// ---------- C++ CODE ---------------
extern "C" void set_idtr();
struct tIDTR{
unsigned int base;
unsigned short limit;
}__attribute__((packed));
struct tIDTR IDTR;
void load_idtr( unsigned int base, unsigned short limit )
{
IDTR.base = base;
IDTR.limit = limit;
set_idtr(); // ASM Extern
}
// -------- ASM CODE ------------
global _set_idtr
extern _IDTR
_set_idtr:
lidt [_IDTR]
ret
But this isn't working. When an interrupt occured, pc rebooting. Is this code wrong? or my isr's wrong? If this code not wrong, i'll continue to question
