Interrupts Tutorial: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
mNo edit summary
Line 468:
I have tested this code and it works in both Virtualbox and QEMU. Good luck!
 
If you are following the barebones II/meaty-skeleton route, and want to add interrupts to your OS, add the following code instead of the one provided above, as it will not work. thisThis is because the segment registers haven't been reloaded among other things. To make it work, add the following code instead:
 
<source lang="asm">
Line 520:
</source>
 
putPut this code into a file named gdt.asm (you can name it something else, but why?) then include it in the boot.asm file (iI do not know if position of the include matters, but iI have put it at the top and it works)
thenand put in the following line of code after the stack has been setupset up.
(again don't know if it matters, but if it ain't broke, don't fix it)
<source lang="asm"> call load_gdt </source>
 
thisThis can hopefully save you the headache, that iI had to endure.
thanksThanks to Klapap, poncho for the implementation of the codeseg and dataseg, and to this wiki for the explanations.
 
acccidiccc