interrupt.S 262 B

123456789101112131415
  1. #include "common.h"
  2. BEGIN
  3. CLEAR
  4. DBG
  5. /* Set address of the handler for interrupt 0. */
  6. movw $handler, 0x00
  7. /* Set code segment of the handler for interrupt 0. */
  8. mov %cs, 0x02
  9. int $0
  10. PUTC $'b
  11. hlt
  12. handler:
  13. PUTC $'a
  14. iret