gdt and idt ???
Posted: Sun Oct 03, 2010 5:49 pm
interrupt ?
I am wondering when I create an interrupt route must it have void parameters and return void. Or can you pass parameters and get return values from an interrupt routine.
The other problem I am running into is when to use an interrupt or a regular function.
The system reserves the first 32 interrupt entries for internal hardware interrupts cause by the cpu, their are then 16 irq hardware interrupts that are triggered when hardware other then the cpu causes the interrupt such as a harddrive , keyboard , mouse , sound card ,...etc
What my problem is if I use the 16 irq which I think have to return void and take void parameters.... then how do I write a sector to my harddrive (cann't use interrupts because I cann't pass the data to it.) And I don't really want to start using a global array to do.
I just don't see the point of interrupts only for maybe keyboard/mouse , timer that's it.
And if I create user defined interrupts these seem to be useless since you cann't pass/return stuff to them only call them. So they are only useful if you put stuff globally which is in general not a good programming practice.
gdt ?
I have a few entries in the gdt table one for null entry , kernel data , kernel code , user mode data , user mode code. Why is their so many possible entries that can be put into a gdt (8192
entries) and also the possiblity of using LDT entries to extend this.
I would think an OS would only typically every use a hand full of entries in the gdt.
Curious what linux, windows xp , and mac osx use???
I am wondering when I create an interrupt route must it have void parameters and return void. Or can you pass parameters and get return values from an interrupt routine.
The other problem I am running into is when to use an interrupt or a regular function.
The system reserves the first 32 interrupt entries for internal hardware interrupts cause by the cpu, their are then 16 irq hardware interrupts that are triggered when hardware other then the cpu causes the interrupt such as a harddrive , keyboard , mouse , sound card ,...etc
What my problem is if I use the 16 irq which I think have to return void and take void parameters.... then how do I write a sector to my harddrive (cann't use interrupts because I cann't pass the data to it.) And I don't really want to start using a global array to do.
I just don't see the point of interrupts only for maybe keyboard/mouse , timer that's it.
And if I create user defined interrupts these seem to be useless since you cann't pass/return stuff to them only call them. So they are only useful if you put stuff globally which is in general not a good programming practice.
gdt ?
I have a few entries in the gdt table one for null entry , kernel data , kernel code , user mode data , user mode code. Why is their so many possible entries that can be put into a gdt (8192
entries) and also the possiblity of using LDT entries to extend this.
I would think an OS would only typically every use a hand full of entries in the gdt.
Curious what linux, windows xp , and mac osx use???