Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9970 → Rev 9971

/programs/system/zkey/trunk/ZKEY.ASM
11,13 → 11,16
use32
org 0x0
 
db 'MENUET00' ; 8 byte id
dd 38 ; required os
db 'MENUET01'
dd 1 ; version
dd STARTAPP ; program start
dd I_END ; program image size
dd 0x100000 ; required amount of memory
dd 0x00000000 ; reserved=no extended header
dd MEM ; size memory for program
dd STACKTOP ; base stack pointer
dd 0
dd 0
 
include '../../../macros.inc'
include "ASPAPI.INC"
 
N_KEYCOLOR equ 0x00677889 ; Normal button color
26,8 → 29,6
TEXTCOLOR equ 0x00FFFFFF ; Button caption color
 
ASCII_KEYMAP_SIZE equ 128
PROCINFO_SIZE equ 1024
PROCINFO_BUFF equ ascii_keymap + ASCII_KEYMAP_SIZE
 
STARTAPP:
mov ecx, 1 ; to send scancodes.
189,7 → 190,7
mov [zkey_window], eax
set_event_mask:
mov eax, 40
mov ebx, 39
mov ebx, EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE ; 39 ; 100111b
int 0x40
 
still:
198,8 → 199,9
call set_keyboard_mode
; delete_switch_button
mov eax, 8
mov edx, 0x80700000
mov edx, BT_DEL + 0x00700000
int 0x40
 
mov byte [red_type], 2
call draw_window.draw_switch_button
206,11 → 208,11
mov eax, 10 ; Wait for an event in the queue.
int 0x40
 
cmp al,1 ; redraw request ?
cmp al, EV_REDRAW ; redraw request ?
jz red
cmp al,2 ; key in buffer ?
cmp al, EV_KEY ; key in buffer ?
jz key
cmp al,3 ; button in buffer ?
cmp al, EV_BUTTON ; button in buffer ?
jz button
 
jmp still
391,7 → 393,7
mov ebx, PROCINFO_BUFF
mov ecx, [receiver_window]
int 0x40
movzx ecx, byte [ebx + 75]
movzx ecx, byte [ebx + process_information.keyboard_mode]
ret
 
;************************************
477,4 → 479,11
 
I_END: ; End of application code and data marker
 
ascii_keymap:
ascii_keymap: rb ASCII_KEYMAP_SIZE
 
PROCINFO_BUFF process_information
 
rb 4096
STACKTOP:
MEM: