Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I know it's 2048 bytes (and 256 QWORD) but the code just doesn't work when I use 'times 256 dq 0'. I showed you the (working) code, which is working.
The problem is that the "times" directive can't handle a big number like 2048.
is already an user error.
I said I think the problem is the times directive because when debugging my code I found out that there was some kind of error with my IDT buffer (times 256 dq 0). So I assumed that it couldn't handle big numbers because when I reduced the number the code did work.
I know I'm making mistakes, but eh, humans make mistakes and thank you for pointing them out to me so I can learn from them
About the lack of debugging skills, you're actually right. They are pretty bad
the number of times directive has no reason to change anything directly, but maybe it overwrite something at the end of the area where the kernel is loaded if it's too big, or some reserved area get crossed, or maybe empty idt entry should be initialized as well to something special , but normally it should work if they are all 0, and the size of the area defined by the number of times directive shouldn't matter at all
maybe the size of the total idt get too big if you use the size of the times directive to compute it's size to send to the cpu, i use an hardcoded number to specify the size of the idt
i see you use idt_end-idt_start -1 to compute the size of the idt, maybe it's not aligned with what the lidt expect if it expect some size multiple of a certain number, maybe the problem come from this