interrupt1.S 244 B

123456789101112131415161718
  1. /*
  2. Test an interrupt handler different than 0.
  3. Expected outcome: 'ab' gets printed to the screen.
  4. */
  5. #include "common.h"
  6. BEGIN
  7. CLEAR
  8. movw $handler, 0x04
  9. mov %cs, 0x06
  10. int $1
  11. PUTC $'b
  12. hlt
  13. handler:
  14. PUTC $'a
  15. iret