Rev 6044 | Rev 8926 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6044 | Rev 8869 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | ;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
4 | ;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
5 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; Distributed under terms of the GNU General Public License ;; |
6 | ;; ;; |
6 | ;; ;; |
7 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
7 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 8... | Line 8... | ||
8 | 8 | ||
Line 9... | Line 9... | ||
9 | $Revision: 6044 $ |
9 | $Revision: 8869 $ |
Line 10... | Line 10... | ||
10 | 10 | ||
11 | button.MAX_BUTTONS = 4095 |
11 | button.MAX_BUTTONS = 4095 |
Line 73... | Line 73... | ||
73 | mov [edi], ax |
73 | mov [edi], ax |
74 | shl eax, 4 |
74 | shl eax, 4 |
75 | add edi, eax |
75 | add edi, eax |
76 | ; NOTE: this code doesn't rely on SYS_BUTTON struct, |
76 | ; NOTE: this code doesn't rely on SYS_BUTTON struct, |
77 | ; please revise it, if you change something. |
77 | ; please revise it, if you change something. |
78 | mov ax, [CURRENT_TASK] |
78 | mov ax, word [current_slot_idx] |
79 | stosw |
79 | stosw |
80 | mov ax, dx |
80 | mov ax, dx |
81 | stosw ; button id number: bits 0-15 |
81 | stosw ; button id number: bits 0-15 |
82 | mov eax, ebx |
82 | mov eax, ebx |
83 | rol eax, 16 |
83 | rol eax, 16 |
Line 224... | Line 224... | ||
224 | 224 | ||
225 | add ecx, sizeof.SYS_BUTTON |
225 | add ecx, sizeof.SYS_BUTTON |
Line 226... | Line 226... | ||
226 | add esi, -sizeof.SYS_BUTTON |
226 | add esi, -sizeof.SYS_BUTTON |
227 | 227 | ||
228 | ; does it belong to our process? |
228 | ; does it belong to our process? |
229 | mov ax, [CURRENT_TASK] |
229 | mov ax, word [current_slot_idx] |
Line 230... | Line 230... | ||
230 | cmp ax, [esi + SYS_BUTTON.pslot] |
230 | cmp ax, [esi + SYS_BUTTON.pslot] |
231 | jne .next_button |
231 | jne .next_button |