In setting up my IDT, I'm trying to export a symbol from assembly, and use it in C. So, I define the IDT:
Code: Select all
.global idt
idt:
.fill 512, 4, 0x0000
Code: Select all
extern unsigned int* idt;
...
idt[(vec * 2) + 0] = word1;
idt[(vec * 2) + 1] = word2;
Code: Select all
mov idt, %edx
Code: Select all
mov $idt, %edx
Code: Select all
extern unsigned int idt;
unsigned int* idt_ptr = &idt;
....
Am I doing something wrong in the assembly section? I'm used to inline assembly in C, but not so much dealing with mixed C and .S files... Might be on the wiki, but I failed to get the right keyword magic to pull it up.