idt1.S 381 B

12345678910111213141516171819202122232425262728
  1. /*
  2. # IDT 1
  3. Sanity check that we can also handle int 1 besides just int 0.
  4. Expected output: "int 1 handled"
  5. */
  6. #include "common.h"
  7. BEGIN
  8. STAGE2
  9. CLEAR
  10. PROTECTED_MODE
  11. IDT_SETUP_ENTRY $1, $handler
  12. lidt idt_descriptor
  13. int $1
  14. jmp .
  15. IDT_START
  16. IDT_SKIP 1
  17. IDT_ENTRY
  18. IDT_END
  19. handler:
  20. VGA_PRINT_STRING $message
  21. iret
  22. message:
  23. .asciz "int 1 handled"