For my OS I'm writing a macro for the IDT table so when the kernel gets bigger/changes significantly I won't have to go back and update the hard coded addresses.
The macro only takes one parameter and that is the offset. (I'll add more when I get into user mode applications) The ISRs themselves are stored elsewhere and all I have is a symbol definition ([extern someplace]).
This is my macro code so far:
Code: Select all
%macro addid 1
dw %1
dw 0x8
dw 0x8E00
dw (%1) >> 16
%endmacro
In the DATA section of code that loads the IDT I have the IDT itself and it looks like this:
Code: Select all
idt:
addid [exceptdivide]
When I assemble it I get this:
Any ideas how to fix this?34: error: expression syntax error
34: error: expression syntax error