Subversion Repositories Kolibri OS

Rev

Rev 972 | Rev 1018 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 972 Rev 978
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 972 $
8
$Revision: 978 $
9
 
9
 
Line 15... Line 15...
15
PID_KERNEL  equ 1    ;os_idle thread
15
PID_KERNEL  equ 1    ;os_idle thread
Line 16... Line 16...
16
 
16
 
17
align 4
17
align 4
Line -... Line 18...
-
 
18
proc attach_int_handler stdcall, irq:dword, handler:dword, access_rights:dword
-
 
19
 
18
proc attach_int_handler stdcall, irq:dword, handler:dword, access_rights:dword
20
         push ebx
19
 
21
 
20
         mov  ebx, [irq]                   ;irq num
22
         mov  ebx, [irq]                   ;irq num
21
         test ebx, ebx
23
         test ebx, ebx
22
         jz   .err
24
         jz   .err
Line 39... Line 41...
39
         mov  [irq_rights + 4 * ebx], eax
41
         mov  [irq_rights + 4 * ebx], eax
Line 40... Line 42...
40
 
42
 
Line 41... Line 43...
41
         mov  [irq_owner + 4 * ebx], PID_KERNEL  ; all handlers belong to a kernel
43
         mov  [irq_owner + 4 * ebx], PID_KERNEL  ; all handlers belong to a kernel
-
 
44
 
42
 
45
         stdcall enable_irq, [irq]
43
         stdcall enable_irq, [irq]
46
         pop ebx
44
         mov eax, 1
47
         mov eax, 1
-
 
48
         ret
45
         ret
49
.err:
46
.err:
50
         pop ebx
47
         xor eax, eax
51
         xor eax, eax
Line 48... Line 52...
48
         ret
52
         ret