Rev 4263 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4263 | Rev 9971 | ||
---|---|---|---|
Line 9... | Line 9... | ||
9 | ; |
9 | ; |
Line 10... | Line 10... | ||
10 | 10 | ||
11 | use32 |
11 | use32 |
Line 12... | Line 12... | ||
12 | org 0x0 |
12 | org 0x0 |
13 | 13 | ||
14 | db 'MENUET00' ; 8 byte id |
14 | db 'MENUET01' |
15 | dd 38 ; required os |
15 | dd 1 ; version |
16 | dd STARTAPP ; program start |
16 | dd STARTAPP ; program start |
17 | dd I_END ; program image size |
17 | dd I_END ; program image size |
- | 18 | dd MEM ; size memory for program |
|
- | 19 | dd STACKTOP ; base stack pointer |
|
Line -... | Line 20... | ||
- | 20 | dd 0 |
|
18 | dd 0x100000 ; required amount of memory |
21 | dd 0 |
Line 19... | Line 22... | ||
19 | dd 0x00000000 ; reserved=no extended header |
22 | |
20 | 23 | include '../../../macros.inc' |
|
21 | include "ASPAPI.INC" |
24 | include "ASPAPI.INC" |
22 | 25 | ||
Line 23... | Line 26... | ||
23 | N_KEYCOLOR equ 0x00677889 ; Normal button color |
26 | N_KEYCOLOR equ 0x00677889 ; Normal button color |
24 | C_KEYCOLOR equ 0x00344556 ; Control button color |
- | |
25 | L_KEYCOLOR equ 0x00258778 ; Lock button color |
- | |
Line 26... | Line 27... | ||
26 | TEXTCOLOR equ 0x00FFFFFF ; Button caption color |
27 | C_KEYCOLOR equ 0x00344556 ; Control button color |
27 | 28 | L_KEYCOLOR equ 0x00258778 ; Lock button color |
|
28 | ASCII_KEYMAP_SIZE equ 128 |
29 | TEXTCOLOR equ 0x00FFFFFF ; Button caption color |
Line 187... | Line 188... | ||
187 | mov ebx, 7 |
188 | mov ebx, 7 |
188 | int 0x40 |
189 | int 0x40 |
189 | mov [zkey_window], eax |
190 | mov [zkey_window], eax |
190 | set_event_mask: |
191 | set_event_mask: |
191 | mov eax, 40 |
192 | mov eax, 40 |
192 | mov ebx, 39 |
193 | mov ebx, EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE ; 39 ; 100111b |
193 | int 0x40 |
194 | int 0x40 |
Line 194... | Line 195... | ||
194 | 195 | ||
195 | still: |
196 | still: |
196 | call get_receiver_window_slot_number |
197 | call get_receiver_window_slot_number |
197 | call get_receiver_window_keyboard_mode ; return in ecx keyboard_mode for set_keyboard_mode |
198 | call get_receiver_window_keyboard_mode ; return in ecx keyboard_mode for set_keyboard_mode |
198 | call set_keyboard_mode |
199 | call set_keyboard_mode |
199 | ; delete_switch_button |
200 | ; delete_switch_button |
200 | mov eax, 8 |
201 | mov eax, 8 |
201 | mov edx, 0x80700000 |
202 | mov edx, BT_DEL + 0x00700000 |
- | 203 | int 0x40 |
|
202 | int 0x40 |
204 | |
203 | mov byte [red_type], 2 |
205 | mov byte [red_type], 2 |
Line 204... | Line 206... | ||
204 | call draw_window.draw_switch_button |
206 | call draw_window.draw_switch_button |
205 | 207 | ||
Line 206... | Line 208... | ||
206 | mov eax, 10 ; Wait for an event in the queue. |
208 | mov eax, 10 ; Wait for an event in the queue. |
207 | int 0x40 |
209 | int 0x40 |
208 | 210 | ||
209 | cmp al,1 ; redraw request ? |
211 | cmp al, EV_REDRAW ; redraw request ? |
210 | jz red |
212 | jz red |
211 | cmp al,2 ; key in buffer ? |
213 | cmp al, EV_KEY ; key in buffer ? |
Line 212... | Line 214... | ||
212 | jz key |
214 | jz key |
Line 213... | Line 215... | ||
213 | cmp al,3 ; button in buffer ? |
215 | cmp al, EV_BUTTON ; button in buffer ? |
Line 389... | Line 391... | ||
389 | get_receiver_window_keyboard_mode: |
391 | get_receiver_window_keyboard_mode: |
390 | mov eax, 9 |
392 | mov eax, 9 |
391 | mov ebx, PROCINFO_BUFF |
393 | mov ebx, PROCINFO_BUFF |
392 | mov ecx, [receiver_window] |
394 | mov ecx, [receiver_window] |
393 | int 0x40 |
395 | int 0x40 |
394 | movzx ecx, byte [ebx + 75] |
396 | movzx ecx, byte [ebx + process_information.keyboard_mode] |
395 | ret |
397 | ret |
Line 396... | Line 398... | ||
396 | 398 | ||
397 | ;************************************ |
399 | ;************************************ |
398 | ;* input: edx = code of the key * |
400 | ;* input: edx = code of the key * |
Line 475... | Line 477... | ||
475 | keyboard_mode db 0 ; Scan or ASCII keys to send ? 0 - ASCII , 1 - Scan |
477 | keyboard_mode db 0 ; Scan or ASCII keys to send ? 0 - ASCII , 1 - Scan |
476 | red_type db 0 ; Type of window redraw. 0 - default , 1 - on ASCII_keymap change , 2 - Switch button pressed. |
478 | red_type db 0 ; Type of window redraw. 0 - default , 1 - on ASCII_keymap change , 2 - Switch button pressed. |
Line 477... | Line 479... | ||
477 | 479 | ||
Line 478... | Line 480... | ||
478 | I_END: ; End of application code and data marker |
480 | I_END: ; End of application code and data marker |
- | 481 | ||
- | 482 | ascii_keymap: rb ASCII_KEYMAP_SIZE |
|
- | 483 | ||
- | 484 | PROCINFO_BUFF process_information |
|
- | 485 | ||
- | 486 | rb 4096 |
|
- | 487 | STACKTOP: |