interrupt_zero_divide.S 264 B

123456789101112131415161718192021
  1. #include "common.h"
  2. BEGIN
  3. CLEAR
  4. movw $handler, 0x00
  5. movw %cs, 0x02
  6. mov $0, %ax
  7. div %ax
  8. hlt
  9. handler:
  10. mov myvar, %ax
  11. incw myvar
  12. PRINT_WORD_HEX
  13. PRINT_NEWLINE
  14. iret
  15. myvar:
  16. #if 1
  17. .word 0x0000
  18. #else
  19. .word 0x0090
  20. #endif