interrupt-test.s 322 B

123456789101112131415161718
  1. .code32
  2. .section .text.user-space
  3. .globl user_interrupt_test
  4. user_interrupt_test:
  5. # write
  6. movl $1, %eax
  7. movl $__user_interrupt_test_string, %edi
  8. int $0x80
  9. # sleep
  10. movl $2, %eax
  11. movl $0xffffffff, %edi
  12. int $0x80
  13. # noreturn
  14. jmp .
  15. __user_interrupt_test_string:
  16. .ascii "syscall 0x01 write: hello from user space\n\0"