Currently I have a C code that looks like this:
set_idt_entry(idt, 0, code_segment, &handle_interrupt0, 0, 0xE);
set_idt_entry(idt, 1, code_segment, &handle_interrupt1, 0, 0xE);
set_idt_entry(idt, 2, code_segment, &handle_interrupt2, 0, 0xE);
set_idt_entry(idt, 3, code_segment, &handle_interrupt3, 0, 0xE);
set_idt_entry(idt, 4, code_segment, &handle_interrupt4, 0, 0xE);
set_idt_entry(idt, 5, code_segment, &handle_interrupt5, 0, 0xE);
set_idt_entry(idt, 6, code_segment, &handle_interrupt6, 0, 0xE);
.
.
.
Repeated calls are taking about 256 lines and are looking ugly. I'm stuck trying to come up with a macro that could take care of this in a loop somehow. Is possible to do or leaving 256 lines of code is the best I can do?