-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsigint.inc
More file actions
35 lines (31 loc) · 715 Bytes
/
sigint.inc
File metadata and controls
35 lines (31 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
_user_code _sigint
xor eax, eax
mov al, _SYSCALL_SIGNAL
mov ebx, SIGCONT
mov ecx, _sigint_sigcont
int 030H
xor eax, eax
mov al, _SYSCALL_SIGNAL
mov ebx, SIGTTOU
mov ecx, _sigint_sigttou
int 030H
xor eax, eax
mov al, _SYSCALL_WRITE
mov ebx, _TELETYPE_CURRENT
mov ecx, _sigint_info
mov edx, _sigint_info.sizeof
int 030H
jmp $
_sigint_sigcont:
xor eax, eax
mov al, _SYSCALL_WRITE
mov ebx, _TTY1
mov ecx, _sigint_cont
mov edx, _sigint_cont.sizeof
int 030H
ret
_sigint_sigttou:
ret
_sigint_info string "you must use CTRL-C to quit this software", 00AH
_sigint_cont string "SIGINT continued", 00AH
end _user_code