]> wirehaze git hosting - BOS.git/blob - kernel/krl_incs/sys_ints.inc

wirehaze git hosting

3f57ddd39af22ffb11f7b28481f09319095e8412
[BOS.git] / kernel / krl_incs / sys_ints.inc
1 ;----------------------------------------------------------;
2 ; BOS 0.04 Christoffer Bubach, 2004-2005. ;
3 ;----------------------------------------------------------;
4 ; ;
5 ; System interrupts.. ;
6 ; ;
7 ;----------------------------------------------------------;
8
9 ;----------------------------------------------------;
10 ; TODO: A lot, when user programs can be runned.. ;
11 ;----------------------------------------------------;
12
13 ;--------------------------;
14 ; System interrupt 0x32 ;
15 ;--------------------------;
16
17 isr32_str_1 db "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»", 0
18 isr32_str_2 db "º \10 INT 32 CALLED!! º", 0
19 isr32_str_3 db "º \ 2 \ 1 º", 0
20 isr32_str_4 db "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ", 0
21
22 isr32_str_5 db "CTRL+ALT+DEL was pressed!", 0
23
24 interrupt_32:
25
26 ;-----------------;
27 ; get char ;
28 ;-----------------;
29 cmp ax, 0x0001 ; get character int..
30 jne .cade
31
32 call getc
33
34 jmp .end
35
36 ;-----------------------------;
37 ; ctrl+alt+delete function ;
38 ;-----------------------------;
39 .cade:
40 cmp ax, 0xCADE ; CTRL+ALT+DEL was pressed
41 jne .ordinary
42
43 push bx
44 push cx
45 push dx
46
47 call getcursor
48 mov cx, bx
49
50 mov dl, 0x0C
51 mov dh, 0x1B
52 call setcursorxy
53
54 mov esi, isr32_str_5
55 mov al, 0x40
56 call print
57
58 mov bx, cx
59 call setcursor
60
61 pop dx
62 pop cx
63 pop bx
64
65 jmp .end
66
67 ;-----------------------------;
68 ; no selected function.. ;
69 ;-----------------------------;
70 .ordinary: ; print that int 0x32 was called...
71 push bx
72 push cx
73 push dx
74
75 mov dl, 0x0B
76 mov dh, 0x1A
77 call setcursorxy
78
79 mov esi, isr32_str_1
80 mov bl, 0x40
81 call print
82
83 mov dl, 0x0C
84 mov dh, 0x1A
85 call setcursorxy
86
87 mov esi, isr32_str_2
88 mov bl, 0x40
89 call print
90
91 mov dl, 0x0D
92 mov dh, 0x1A
93 call setcursorxy
94
95 mov esi, isr32_str_3
96 mov bl, 0x40
97 call print
98
99 mov dl, 0x0E
100 mov dh, 0x1A
101 call setcursorxy
102
103 mov esi, isr32_str_4
104 mov bl, 0x40
105 call print
106
107 pop dx
108 pop cx
109 pop bx
110
111 .end:
112 ret