My issue is, I'm in the process of setting up an IDT for an x86-32 architecture. Of course, the `offset` in an IDT entry is split in two, like this:
Code: Select all
struct IDTDescr {
uint16_t offset_1; // offset bits 0..15
uint16_t selector; // a code segment selector in GDT or LDT
uint8_t zero; // unused, set to 0
uint8_t type_attr; // type and attributes, see below
uint16_t offset_2; // offset bits 16..31
};
I'm implementing my IDT entirely in NASM, and my issue is that when I'm using the dw and db directives to put data in the IDT, I can't work out how I would refer to my keyboard handler?
The reason for this is that I don't know what the absolute address of my keyboard handler code, so how can I put the address of it into an IDT entry?
Again sorry, I know this question is phrased horribly and might not even make sense, I don't know why I'm having such trouble wording it.
Thanks!