Update headers programs : delete MENUET00 header on 2 programs.

Fixed mario2 game : delete using sysfn 6 and added constants 
Update macro.inc : Added new fields in process_information 

git-svn-id: svn://kolibrios.org@9971 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Doczom 2024-01-21 11:23:12 +00:00
parent ef78b78d1c
commit 7f7718f532
10 changed files with 1754 additions and 1733 deletions

View File

@ -8,19 +8,12 @@
use32 use32
org 0x0 org 0x0
;db 'MENUET00' ; 8 byte id db 'MENUET01' ; header
;dd 38 ; required os dd 1 ; version
;dd STARTAPP ; program start dd STARTAPP ; program start
;dd I_END ; program image size dd I_END ; program image size
;dd 0x100000 ; required amount of memory dd MEM ; size memory for program
;dd 0x00000000 ; reserved=no extended header dd STACKTOP ; pointer of stack
db 'MENUET01'
dd 1
dd STARTAPP
dd I_END
dd MEM
dd STACKTOP
dd 0 dd 0
dd 0 dd 0

View File

@ -7,30 +7,45 @@
use32 use32
org 0x0 org 0x0
db 'MENUET01' ; header
dd 1 ; version
dd START ; program start
dd I_END ; image size
dd MEM ; size memory program
dd STACKTOP ; pointer to begin stack pos
dd 0
dd 0
db 'MENUET00' ; 8 byte id res_base = loadp + 0x36 ; offset on array pixel in BMP file
dd 38 ; required os res_width_px = 150
dd START ; program start res_height_px = 35
dd I_END ; image size res_line_size = (res_width_px*3 + 11b) and not 11b ; 150*3 + 2
dd 0x100000 ; reguired amount of memory
dd 0x00000000 ; reserved=no extended header
block_width = 40
block_height = 40
empty equ 0x80000 + 0*3*40*40 block_line_size = block_width * 3
build_1 equ 0x80000 + 1*3*40*40 block_img_size = block_width * block_height * 3
build_2 equ 0x80000 + 2*3*40*40 block_draw_size = (block_width shl 16) + block_height ; for sysfn 7
build_3 equ 0x80000 + 3*3*40*40 block_count_pixel = block_width * block_height
mario_1 equ 0x90000 + 0*3*70*51 mario_width = 50
mario_2 equ 0x90000 + 1*3*70*51 mario_height = 70
mario_3 equ 0x90000 + 2*3*70*51 mario_line_size = mario_width * 3
mario_4 equ 0x90000 + 3*3*70*51 mario_img_size = mario_width * mario_height * 3
mario_5 equ 0x90000 + 4*3*70*51 mario_draw_size = (mario_width shl 16) + mario_height
mario_6 equ 0x90000 + 5*3*70*51 mario_count_pixel = mario_width * mario_height
mario_green equ 0x90000 + 6*3*70*51
loadp equ 0x90000 + 7*3*70*51
wnd_pos_x = 80
wnd_pos_y = 20
wnd_header_size = 0x16
wnd_height = 9*block_height + wnd_header_size
wnd_width = 12*block_width + 1
START: START:
@ -46,55 +61,51 @@ START:
sta: sta:
mov eax,field mov eax,field
mov edx,1*65526+30 mov dword[xxyy], 1*65536 + wnd_header_size
mov [xxyy],dword 1*65536+22
stl: stl:
cmp [eax],byte ' ' cmp byte[eax], ' '
jnz noempty jnz @f
mov ebx,empty mov ebx,empty
noempty: @@:
cmp [eax],byte '1' cmp byte[eax], '1'
jnz no1 jnz @f
mov ebx,build_1 mov ebx,build_1
no1: @@:
cmp [eax],byte '2' cmp byte[eax], '2'
jnz no2 jnz @f
mov ebx,build_2 mov ebx,build_2
no2: @@:
cmp [eax],byte '3' cmp byte[eax], '3'
jnz no3 jnz @f
mov ebx,build_3 mov ebx,build_3
no3: @@:
pusha pusha
mov edx,[xxyy] mov edx,[xxyy]
mov eax,7 ; display image mov eax,7 ; display image
mov ecx,40*65536+40 mov ecx, block_draw_size
int 0x40 int 0x40
popa popa
add word [xxyy+2],word 40 add word [xxyy+2], block_width
cmp word [xxyy+2],word 40*12+1 cmp word [xxyy+2], block_width*12+1
jnz nonewline jnz .nonewline
mov word [xxyy+2],word 1
add word [xxyy+0],word 40 mov word [xxyy+2], 1
nonewline: add word [xxyy+0], block_height
.nonewline:
add eax,1 add eax,1
cmp eax,field+12*9 cmp eax, field.end
jz nodraw jnz stl
jmp stl
nodraw:
; ********* MAIN LOOP *********** ; ********* MAIN LOOP ***********
@ -105,15 +116,17 @@ wait_for_event:
mov eax,11 ; check for event mov eax,11 ; check for event
int 0x40 int 0x40
cmp eax,1 cmp eax,1
jz red jz red
cmp eax,2 cmp eax,2
jz key jz key
cmp eax,3 cmp eax,3 ; check pressed button
jnz wait_for_event jnz wait_for_event
jmp button
mov eax, -1 ; close this program
int 0x40
red: red:
mov [mariomem],dword 0x0 mov [mariomem],dword 0x0
@ -128,17 +141,17 @@ wait_for_event:
mov eax,2 ; ah <- key mov eax,2 ; ah <- key
int 0x40 int 0x40
cmp ah,176 cmp ah,176 ; 'left'
jnz key1 jnz key1
mov byte [leftright],byte 1 mov byte [leftright],byte 1
key1: key1:
cmp ah,179 cmp ah,179 ; 'right'
jnz key2 jnz key2
mov byte [leftright],byte 4 mov byte [leftright],byte 4
key2: key2:
cmp ah,177 cmp ah,177 ; 'down'
jnz key3 jnz key3
mov al,byte [leftright] mov al,byte [leftright]
mov bl,al mov bl,al
@ -153,57 +166,42 @@ wait_for_event:
mov byte [leftright],bl mov byte [leftright],bl
key3: key3:
cmp ah,178 cmp ah,178 ; 'up'
jnz key4 jnz key4
cmp [velocity],dword 0xff cmp [velocity],dword 0xff
jnz key4 jnz key4
mov [velocity],dword 0x110 mov [velocity],dword 0x110
key4: key4:
mov eax,71 ;draw caption ; this code using for fix defects drawing(draw in caption area)
mov ebx,1 mov eax,71 ;draw caption
mov ecx,title mov ebx,1
int 0x40 mov ecx,title
int 0x40
jmp sta ;draw field
jmp sta ;draw field
;jmp wait_for_event ;jmp wait_for_event
button:
mov eax,0xffffffff ; close this program
int 0x40
load_graph: load_graph:
pusha pusha
mov eax,6 ; 6 = open file ; empty block init - set in 0x00500f color
mov ebx,filename
mov ecx,0
mov edx,0xFFFFFF
mov esi,loadp
mov edi,0 ; floppy
int 0x40
; empty
mov edi,empty mov edi,empty
mov ecx,40*40 mov ecx, block_count_pixel
mov eax,0x00500f mov eax,0x00500f
cld cld
emptyl: @@:
mov [edi],eax mov [edi],eax
add edi,3 add edi, 3
loop emptyl loop @b
mov [width],40*3 mov [width], block_line_size
mov [width_move],20 mov [width_move], block_width/2
mov [sub_esi],150*3+2 mov [height_move], block_height/2
mov [add_edi],40*3*2
mov [imul_esi],20*3 mov [imul_esi],20*3
mov [base],loadp+18*3+3*150*34+3*98-1 mov [base], res_base + 3*res_width_px * 34 +3*98-1
mov esi,0 mov esi,0
mov edi,build_1 mov edi,build_1
@ -216,26 +214,24 @@ load_graph:
; build_3 ; build_3
mov edi,build_3 mov edi,build_3
mov esi,loadp+18*3+230*3+3*300*69 mov esi, res_base + 230*3+3*300*69
mov ecx,40 mov ecx, block_height
build_3l: build_3l:
pusha pusha
mov ecx,3*40 mov ecx, block_line_size
cld cld
rep movsb rep movsb
popa popa
sub esi,300*3 sub esi,300*3
add edi,40*3 add edi, block_line_size
loop build_3l loop build_3l
mov [width],50*3 mov [width], mario_line_size
mov [width_move],25 mov [width_move], mario_width/2
mov [sub_esi],150*3+2 mov [height_move], mario_height/2
mov [add_edi],50*3*2
mov [imul_esi],25*3 mov [imul_esi],25*3
mov [base],loadp+18*3+3*150*34+68 mov [base], res_base + 3*res_width_px*34 + 68
mov esi,0 mov esi,0
mov edi,mario_1 mov edi,mario_1
@ -252,16 +248,21 @@ load_graph:
jmp mario_mirror jmp mario_mirror
; copy in [edi], image x2
convert: convert:
imul esi,[imul_esi] imul esi,[imul_esi]
add esi,[base] ; loadp+18*3+3*150*34+68 add esi,[base] ; loadp+18*3+3*150*34+68
mov ecx,70 mov eax, [width]
mario_1l: shl eax, 1 ; *2
mov ecx, [height_move] ;?
.new_line:
pusha pusha
mov ecx,[width_move] mov ecx,[width_move]
putpix:
.putpix: ; set 4 pixel: edi, edi+3, edi+width, edi+width+3
mov eax,[esi] mov eax,[esi]
mov [edi+00],ax mov [edi+00],ax
mov [edi+03],ax mov [edi+03],ax
@ -278,45 +279,41 @@ convert:
mov [edi+ebx],al mov [edi+ebx],al
add esi,3 add esi,3
add edi,6 add edi,6
loop putpix loop .putpix
popa popa
sub esi,[sub_esi]
add edi,[add_edi] sub esi,res_line_size
loop mario_1l add edi, eax
loop .new_line
ret ret
sub_esi dd 0x0 imul_esi dd 0
add_edi dd 0x0 base dd 0
imul_esi dd 0x0 width dd 0
base dd 0x0 width_move dd 0
width dd 0x0 height_move dd 0
width_move dd 0x0
mario_mirror: mario_mirror:
; mario_green ; mario_green
mov edi,mario_green mov edi,mario_green
mov ecx,70*50 mov ecx, mario_count_pixel
mario_greenl: @@:
mov [edi],dword 0x00500f mov [edi],dword 0x00500f
add edi,3 add edi, 3
loop mario_greenl loop @b
; mario_4 - reverse mario_1
mov edi, mario_4
; mario_4 mov esi, mario_1 + (mario_width - 1)*3
mov ecx, mario_height
mov edi,mario_4
mov esi,mario_1+49*3
mov ecx,70
m4l1: m4l1:
pusha pusha
mov ecx,50 mov ecx, mario_width
m4l2: m4l2:
mov eax,[esi] mov eax,[esi]
mov [edi],ax mov [edi],ax
@ -326,19 +323,20 @@ mario_mirror:
sub esi,3 sub esi,3
loop m4l2 loop m4l2
popa popa
add esi,50*3
add edi,50*3 add esi, mario_width*3
add edi, mario_width*3
loop m4l1 loop m4l1
; mario_5 ; mario_5 - reverse mario_2
mov edi,mario_5 mov edi, mario_5
mov esi,mario_2+49*3 mov esi, mario_2 + (mario_width - 1)*3
mov ecx,70 mov ecx, mario_height
m5l1: m5l1:
pusha pusha
mov ecx,50 mov ecx, mario_width
m5l2: m5l2:
mov eax,[esi] mov eax,[esi]
mov [edi],ax mov [edi],ax
@ -348,19 +346,20 @@ mario_mirror:
sub esi,3 sub esi,3
loop m5l2 loop m5l2
popa popa
add esi,50*3
add edi,50*3 add esi, mario_width*3
add edi, mario_width*3
loop m5l1 loop m5l1
; mario_6 ; mario_6 - reverse mario_3
mov edi,mario_6 mov edi, mario_6
mov esi,mario_3+49*3 mov esi, mario_3 + (mario_width - 1)*3
mov ecx,70 mov ecx, mario_height
m6l1: m6l1:
pusha pusha
mov ecx,50 mov ecx, mario_width
m6l2: m6l2:
mov eax,[esi] mov eax,[esi]
mov [edi],ax mov [edi],ax
@ -370,13 +369,13 @@ mario_mirror:
sub esi,3 sub esi,3
loop m6l2 loop m6l2
popa popa
add esi,50*3
add edi,50*3 add esi, mario_width*3
add edi, mario_width*3
loop m6l1 loop m6l1
popa popa
ret ret
@ -532,7 +531,7 @@ mario_delay:
pusha pusha
mov eax,5 ;pause mov eax,5 ;pause
mov ebx,2 mov ebx,2
int 0x40 int 0x40
@ -547,129 +546,132 @@ draw_mario:
mov eax,[mariomem] mov eax,[mariomem]
cmp eax,[marioxy] cmp eax,[marioxy]
jnz dm1 jnz @f
call mario_delay call mario_delay
popa popa
ret ret
dm1: @@:
mov eax,[marioxy] mov eax,[marioxy]
mov [mariomem],eax mov [mariomem],eax
cmp byte [leftright],byte 1 ; go left cmp byte [leftright], 1 ; go left
jnz no_m_left jz m_left
jmp m_left
no_m_left:
cmp byte [leftright],byte 4 ; go right cmp byte [leftright], 4 ; go right
jnz no_m_right jz m_right
jmp m_right
no_m_right:
cmp byte [leftright],byte 2 ; stand left cmp byte [leftright], 2 ; stand left
jnz no_r_still jnz no_r_still
mov eax,7 mov eax,7
mov ebx,mario_green mov ebx,mario_green
mov ecx,50*65536+70 mov ecx, mario_draw_size
mov edx,[marioxy] mov edx,[marioxy]
int 0x40 int 0x40
call advance_mario call advance_mario
mov eax,7 mov eax,7
mov ebx,mario_1 mov ebx,mario_1
mov ecx,50*65536+70 mov ecx, mario_draw_size
mov edx,[marioxy] mov edx,[marioxy]
int 0x40 int 0x40
call mario_delay call mario_delay
popa popa
ret ret
no_r_still: no_r_still:
cmp byte [leftright],byte 3 ; stand right cmp byte [leftright],byte 3 ; stand right
jnz no_l_still jnz no_l_still
mov eax,7 mov eax,7
mov ebx,mario_green mov ebx,mario_green
mov ecx,50*65536+70 mov ecx, mario_draw_size
mov edx,[marioxy] mov edx,[marioxy]
int 0x40 int 0x40
call advance_mario call advance_mario
mov eax,7 mov eax,7
mov ebx,mario_4 mov ebx,mario_4
mov ecx,50*65536+70 mov ecx, mario_draw_size
mov edx,[marioxy] mov edx,[marioxy]
int 0x40 int 0x40
call mario_delay call mario_delay
popa
ret
no_l_still: no_l_still:
popa popa
ret ret
m_left: m_left:
mov eax,7 mov eax,7
mov ebx,mario_green mov ebx,mario_green
mov ecx,50*65536+70 mov ecx, mario_draw_size
mov edx,[marioxy] mov edx,[marioxy]
int 0x40 int 0x40
call advance_mario call advance_mario
mov eax,7 mov eax,7
mov ebx,mario_1 mov ebx,mario_1
mov ecx,50*65536+70 mov ecx, mario_draw_size
mov edx,[marioxy] mov edx,[marioxy]
int 0x40 int 0x40
call mario_delay call mario_delay
mov eax,7 mov eax,7
mov ebx,mario_green mov ebx,mario_green
mov ecx,50*65536+70 mov ecx, mario_draw_size
mov edx,[marioxy] mov edx,[marioxy]
int 0x40 int 0x40
call advance_mario call advance_mario
mov eax,7 mov eax,7
mov ebx,mario_2 mov ebx,mario_2
mov ecx,50*65536+70 mov ecx, mario_draw_size
mov edx,[marioxy] mov edx,[marioxy]
int 0x40 int 0x40
call mario_delay call mario_delay
mov eax,7 mov eax,7
mov ebx,mario_green mov ebx,mario_green
mov ecx,50*65536+70 mov ecx, mario_draw_size
mov edx,[marioxy] mov edx,[marioxy]
int 0x40 int 0x40
call advance_mario call advance_mario
mov eax,7 mov eax,7
mov ebx,mario_3 mov ebx,mario_3
mov ecx,50*65536+70 mov ecx, mario_draw_size
mov edx,[marioxy] mov edx,[marioxy]
int 0x40 int 0x40
call mario_delay call mario_delay
mov eax,7 mov eax,7
mov ebx,mario_green mov ebx,mario_green
mov ecx,50*65536+70 mov ecx, mario_draw_size
mov edx,[marioxy] mov edx,[marioxy]
int 0x40 int 0x40
call advance_mario call advance_mario
mov eax,7 mov eax,7
mov ebx,mario_2 mov ebx,mario_2
mov ecx,50*65536+70 mov ecx, mario_draw_size
mov edx,[marioxy] mov edx,[marioxy]
int 0x40 int 0x40
call mario_delay call mario_delay
popa popa
ret ret
m_right: m_right:
@ -677,64 +679,67 @@ draw_mario:
mov eax,7 mov eax,7
mov ebx,mario_green mov ebx,mario_green
mov ecx,50*65536+70 mov ecx, mario_draw_size
mov edx,[marioxy] mov edx,[marioxy]
int 0x40 int 0x40
call advance_mario call advance_mario
mov eax,7 mov eax,7
mov ebx,mario_4 mov ebx,mario_4
mov ecx,50*65536+70 mov ecx, mario_draw_size
mov edx,[marioxy] mov edx,[marioxy]
int 0x40 int 0x40
call mario_delay call mario_delay
mov eax,7 mov eax,7
mov ebx,mario_green mov ebx,mario_green
mov ecx,50*65536+70 mov ecx, mario_draw_size
mov edx,[marioxy] mov edx,[marioxy]
int 0x40 int 0x40
call advance_mario call advance_mario
mov eax,7 mov eax,7
mov ebx,mario_5 mov ebx,mario_5
mov ecx,50*65536+70 mov ecx, mario_draw_size
mov edx,[marioxy] mov edx,[marioxy]
int 0x40 int 0x40
call mario_delay call mario_delay
mov eax,7 mov eax,7
mov ebx,mario_green mov ebx,mario_green
mov ecx,50*65536+70 mov ecx, mario_draw_size
mov edx,[marioxy] mov edx,[marioxy]
int 0x40 int 0x40
call advance_mario call advance_mario
mov eax,7 mov eax,7
mov ebx,mario_6 mov ebx,mario_6
mov ecx,50*65536+70 mov ecx, mario_draw_size
mov edx,[marioxy] mov edx,[marioxy]
int 0x40 int 0x40
call mario_delay call mario_delay
mov eax,7 mov eax,7
mov ebx,mario_green mov ebx,mario_green
mov ecx,50*65536+70 mov ecx, mario_draw_size
mov edx,[marioxy] mov edx,[marioxy]
int 0x40 int 0x40
call advance_mario call advance_mario
mov eax,7 mov eax,7
mov ebx,mario_5 mov ebx,mario_5
mov ecx,50*65536+70 mov ecx, mario_draw_size
mov edx,[marioxy] mov edx,[marioxy]
int 0x40 int 0x40
call mario_delay call mario_delay
popa popa
ret ret
draw_window: draw_window:
pusha pusha
@ -744,9 +749,9 @@ draw_window:
int 0x40 int 0x40
mov eax,0 ; define and draw window mov eax,0 ; define and draw window
mov ebx,80*65536+480+1 mov ebx, (wnd_pos_x shl 16) + wnd_width ;80*65536+480+1
mov ecx,20*65536+382 mov ecx, (wnd_pos_y shl 16) + wnd_height ;20*65536+382
mov edx,0x5466AA88 mov edx,0x5466AA88 ; 4 type window + title + no draw work space
mov edi,title mov edi,title
int 0x40 int 0x40
@ -761,9 +766,6 @@ draw_window:
; DATA SECTION ; DATA SECTION
filename:
db 'MARIOALLBMP'
title: title:
db 'SUPER MARIO - USE ARROW KEYS', 0 db 'SUPER MARIO - USE ARROW KEYS', 0
@ -778,6 +780,7 @@ field:
db '1 1' db '1 1'
db '1 1' db '1 1'
db '222222222222' db '222222222222'
.end:
xxyy dd 0x0 xxyy dd 0x0
@ -789,9 +792,33 @@ leftright dd 0x0
velocity dd 0x0 velocity dd 0x0
align 16
loadp:
file 'MARIOALL.BMP'
I_END: I_END:
align 0x1000
empty: rb block_img_size
build_1: rb block_img_size
build_2: rb block_img_size
build_3: rb block_img_size
align 0x1000
mario_1: rb mario_img_size
mario_2: rb mario_img_size
mario_3: rb mario_img_size
mario_4: rb mario_img_size
mario_5: rb mario_img_size
mario_6: rb mario_img_size
mario_green: rb mario_img_size
rb 4096
STACKTOP:
MEM:

View File

@ -20,21 +20,14 @@ CK_UP2 equ 72
CK_DOWN2 equ 80 CK_DOWN2 equ 80
use32 use32
org 0x0
;org 0x0
;
;db 'MENUET00' ; 8 byte id
;dd 38 ; required os
;dd START ; program start
;dd I_END ; program image size
;dd 0x2000 ; required amount of memory
;dd 0x00000000 ; reserved=no extended header
db 'MENUET01' db 'MENUET01'
dd 1 dd 1 ; version
dd START dd START ; program start
dd I_END dd I_END ; program image size
dd MEM dd MEM ; size memory for program
dd STACKTOP dd STACKTOP ; pointer on stack
dd 0 dd 0
dd 0 dd 0

View File

@ -465,7 +465,9 @@ struct process_information
dw ? ; +52 dw ? ; +52
client_box BOX ; +54 client_box BOX ; +54
wnd_state db ? ; +70 wnd_state db ? ; +70
rb (1024-71) event_mask dd ? ; +71
keyboard_mode db ? ; +75
rb (1024-76)
ends ends
struct system_colors struct system_colors

File diff suppressed because it is too large Load Diff

View File

@ -1,164 +1,164 @@
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
context_menu_start: context_menu_start:
mcall 40,00100111b mcall 40, EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE ;00100111b
mov ecx, [ctx_menu_PID] mov ecx, [ctx_menu_PID]
mcall 18,21 mcall 18,21
mov ecx, eax mov ecx, eax
mcall 18,3 mcall 18,3
call draw_ctx_menu call draw_ctx_menu
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
ctx_menu_still: ctx_menu_still:
mcall 10 mcall 10
cmp eax, 2 cmp eax, EV_KEY
jz ctx_menu_key jz ctx_menu_key
cmp eax, 3 cmp eax, EV_BUTTON
jz ctx_menu_button jz ctx_menu_button
cmp eax, 6 cmp eax, EV_MOUSE
jz ctx_menu_mouse jz ctx_menu_mouse
call draw_ctx_menu call draw_ctx_menu
jmp ctx_menu_still jmp ctx_menu_still
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
ctx_menu_mouse: ctx_menu_mouse:
mcall 37,2 mcall 37,2
xchg eax,ecx ; …᫨ ­¥ ®¤­  ¨§ ª­®¯®ª ­¥ ­ ¦ â  ¢®§¢à é ¥¬áï xchg eax,ecx ; …᫨ ­¥ ®¤­  ¨§ ª­®¯®ª ­¥ ­ ¦ â  ¢®§¢à é ¥¬áï
; ¢ £« ¢­ë© 横« ¯®â®ª  ; ¢ £« ¢­ë© 横« ¯®â®ª 
jecxz ctx_menu_still jecxz ctx_menu_still
mcall 37,1 mcall 37,1
cmp ax, 0 ; ’ã⠯஢¥à塞 ¯à®¨§®èñ«-«¨ ª«¨ª §  ¯à¥¤¥« ¬¨ ®ª­  ª®­â¥ªáâ­®£® cmp ax, 0 ; ’ã⠯஢¥à塞 ¯à®¨§®èñ«-«¨ ª«¨ª §  ¯à¥¤¥« ¬¨ ®ª­  ª®­â¥ªáâ­®£®
jb ctx_menu_exit ; ¬¥­î, ¥á«¨ §  ¯à¥¤¥« ¬¨ â® § ªà뢠¥¬ ª®­â¥ªáâ­®¥ ¬¥­î jb ctx_menu_exit ; ¬¥­î, ¥á«¨ §  ¯à¥¤¥« ¬¨ â® § ªà뢠¥¬ ª®­â¥ªáâ­®¥ ¬¥­î
cmp ax, 60 ; 41 cmp ax, 60 ; 41
ja ctx_menu_exit ja ctx_menu_exit
shr eax, 16 shr eax, 16
cmp ax, 0 cmp ax, 0
jb ctx_menu_exit jb ctx_menu_exit
cmp ax, 133 cmp ax, 133
ja ctx_menu_exit ja ctx_menu_exit
jmp ctx_menu_still jmp ctx_menu_still
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
ctx_menu_key: ctx_menu_key:
mcall 2 mcall 2
;-------------------------------------- ;--------------------------------------
align 4 align 4
ctx_menu_button: ctx_menu_button:
mcall 17 mcall 17
cmp ah, 1 cmp ah, 1
jne @f jne @f
; mov eax, 18 ; mov eax, 18
; mov ebx, 2 ; mov ebx, 2
; mov ecx, [n_slot] ; mov ecx, [n_slot]
; jmp .lllxxx ; jmp .lllxxx
mcall 18,3,[n_slot] mcall 18,3,[n_slot]
mcall 72,1,3,1 mcall 72,1,3,1
mcall 68,1 mcall 68,1
jmp ctx_menu_exit jmp ctx_menu_exit
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
cmp ah, 2 cmp ah, 2
jne ctx_menu_still jne ctx_menu_still
mov eax, 18 mov eax, 18
mov ebx, 22 mov ebx, 22
mov edx, [n_slot] mov edx, [n_slot]
xor ecx, ecx xor ecx, ecx
test [procinfo_for_detect+70],byte 2 test [procinfo_for_detect.wnd_state],byte 2
setnz cl setnz cl
add cl, cl add cl, cl
;-------------------------------------- ;--------------------------------------
align 4 align 4
.lllxxx: .lllxxx:
mcall mcall
jmp ctx_menu_exit jmp ctx_menu_exit
;-------------------------------------- ;--------------------------------------
align 4 align 4
ctx_menu_exit: ctx_menu_exit:
or eax,-1 or eax,-1
mcall mcall
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
;func draw_ctx_menu ;func draw_ctx_menu
draw_ctx_menu: draw_ctx_menu:
mcall 12, 1 mcall 12, 1
xor eax, eax xor eax, eax
movzx ebx, [x_coord] movzx ebx, [x_coord]
shl ebx, 16 shl ebx, 16
add ebx, 133 add ebx, 133
movzx ecx, [y_coord] movzx ecx, [y_coord]
sub ecx, 60 ; 41 sub ecx, 60 ; 41
shl ecx, 16 shl ecx, 16
add ecx, 60 ; 41 add ecx, 60 ; 41
mov esi, [system_colours + 4] ; sc.grab mov esi, [system_colours.grab] ; sc.grab
or esi, 0x81000000 or esi, 0x81000000
mcall ,,,[system_colours + 20],,[system_colours+8] mcall ,,,[system_colours.work],,[system_colours.work_dark]
mcall 8,<0,133>,<22,17>,0x40000001 mcall 8,<0,133>,<22,17>,0x40000001
inc edx inc edx
mcall ,,<40,17> mcall ,,<40,17>
mov ecx, [system_colours + 16] ; sc.grab_text mov ecx, [system_colours.grab_text] ; sc.grab_text
or ecx, 0x10000000 or ecx, 0x10000000
mcall 4,<32,4>,,ctx_menu_title,ctx_menu_title_end - ctx_menu_title mcall 4,<32,4>,,ctx_menu_title,ctx_menu_title_end - ctx_menu_title
add ebx, 1 * 65536 add ebx, 1 * 65536
mcall mcall
mov ecx, [system_colours + 32] ; sc.work_text mov ecx, [system_colours.work_text] ; sc.work_text
or ecx, 0x80000000 or ecx, 0x80000000
mcall ,<4,28>,,ctx_menu_text mcall ,<4,28>,,ctx_menu_text
mov edx, ctx_menu_text2 mov edx, ctx_menu_text2
test byte [procinfo_for_detect+70], 2 test byte [procinfo_for_detect.wnd_state], 2
jz @f jz @f
mov edx, ctx_menu_text3 mov edx, ctx_menu_text3
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
add bx, 18 add bx, 18
mcall mcall
mcall 12,2 mcall 12,2
ret ret
;endf ;endf
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
x_coord rw 1 x_coord rw 1
y_coord rw 1 y_coord rw 1
n_slot rd 1 n_slot rd 1
ctx_menu_PID rd 1 ctx_menu_PID rd 1
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
lsz ctx_menu_text,\ lsz ctx_menu_text,\
ru, <"X ‡ ªàëâì Alt + F4",0>,\ ru, <"X ‡ ªàëâì Alt + F4",0>,\
en, <"X Close Alt + F4",0>,\ en, <"X Close Alt + F4",0>,\
et, <"X Sulge Alt + F4",0>,\ et, <"X Sulge Alt + F4",0>,\
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
lsz ctx_menu_text2,\ lsz ctx_menu_text2,\
ru, <25," ‘¢¥à­ãâì ",0>,\ ru, <25," ‘¢¥à­ãâì ",0>,\
en, <25," Minimize ",0>,\ en, <25," Minimize ",0>,\
et, <25," Minimeeri ",0>,\ et, <25," Minimeeri ",0>,\
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
lsz ctx_menu_text3,\ lsz ctx_menu_text3,\
ru, <24," ‚®ááâ ­®¢¨âì ",0>,\ ru, <24," ‚®ááâ ­®¢¨âì ",0>,\
en, <24," Restore ",0>,\ en, <24," Restore ",0>,\
et, <24," Taasta ",0> et, <24," Taasta ",0>
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
ctx_menu_title: ctx_menu_title:
db 'KolibriOS' db 'KolibriOS'
ctx_menu_title_end: ctx_menu_title_end:
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------

View File

@ -1,229 +1,229 @@
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
draw_running_applications: draw_running_applications:
pusha pusha
cmp [run_appl],dword 0 cmp [run_appl],dword 0
je .exit je .exit
call calculate_applications call calculate_applications
cmp edi,[running_applications] cmp edi,[running_applications]
jne .noret jne .noret
popa popa
ret ret
;-------------------------------------- ;--------------------------------------
align 4 align 4
.noret: .noret:
call draw_window call draw_window
mov [running_applications],edi mov [running_applications],edi
call redraw_window_tabs call redraw_window_tabs
;-------------------------------------- ;--------------------------------------
align 4 align 4
.exit: .exit:
popa popa
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
need_window_tab: need_window_tab:
; in: ebx->process info ; in: ebx->process info
; out: ZF set <=> do not draw ; out: ZF set <=> do not draw
cmp byte [ebx+10], '@' cmp byte [ebx + process_information.process_name], '@'
jz .nodraw jz .nodraw
; do not draw undefined (zero-sized) windows ; do not draw undefined (zero-sized) windows
cmp dword [ebx+42], 0 cmp dword [ebx + process_information.box.width], 0
jnz @f jnz @f
cmp dword [ebx+46], 0 cmp dword [ebx + process_information.box.height], 0
jz .nodraw jz .nodraw
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
; do not draw OpenDialog windows ; do not draw OpenDialog windows
push edi push edi
mov edi, dword [ebx+10] mov edi, dword [ebx + process_information.process_name]
or edi, 0x20202020 or edi, 0x20202020
cmp edi, 'open' cmp edi, 'open'
jne @f jne @f
mov edi, dword [ebx+14] mov edi, dword [ebx + process_information.process_name + 4]
or edi, 0x20202020 or edi, 0x20202020
cmp dword [ebx+14], 'dial' cmp edi, 'dial'
jne @f jne @f
pop edi pop edi
jmp .nodraw jmp .nodraw
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
pop edi pop edi
cmp dword [ebx+10], 'ICON' cmp dword [ebx + process_information.process_name], 'ICON'
jnz @f jnz @f
cmp [ebx+42], dword 51 cmp [ebx + process_information.box.width], dword 51
jnz @f jnz @f
cmp [ebx+46], dword 51 cmp [ebx + process_information.box.height], dword 51
jz .nodraw jz .nodraw
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
cmp [ebx+10], dword ' ' cmp dword[ebx + process_information.process_name], ' '
;-------------------------------------- ;--------------------------------------
align 4 align 4
.nodraw: .nodraw:
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
calculate_applications: calculate_applications:
mov eax,[max_applications] mov eax,[max_applications]
mul [page_list] mul [page_list]
test eax,eax test eax,eax
je @f je @f
inc eax inc eax
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
mov [draw_start_position],eax mov [draw_start_position],eax
mov edi,app_list mov edi,app_list
mov ecx,20 ; show max 20 application ???!!! mov ecx,20 ; show max 20 application ???!!!
mov eax,-1 mov eax,-1
cld cld
rep stosd rep stosd
mov edi,0 mov edi,0
mov ecx,2 mov ecx,2
;-------------------------------------- ;--------------------------------------
align 4 align 4
cnewpr: cnewpr:
mcall 9,procinfo_window_tabs mcall 9,procinfo_window_tabs
call need_window_tab call need_window_tab
jz cnorpl jz cnorpl
sub [draw_start_position], 1 sub [draw_start_position], 1
jg cnorpl jg cnorpl
mov [app_list+edi*4],ecx mov [app_list+edi*4],ecx
inc edi inc edi
;-------------------------------------- ;--------------------------------------
align 4 align 4
cnorpl: cnorpl:
inc ecx inc ecx
cmp eax,ecx cmp eax,ecx
jge cnewpr jge cnewpr
mov [app_tab_count], edi mov [app_tab_count], edi
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
redraw_window_tabs: redraw_window_tabs:
xor edi, edi xor edi, edi
mov [contrast], 0 mov [contrast], 0
push ebp push ebp
mcall 18,7 mcall 18,7
mov ebp,eax mov ebp,eax
call calculate_offset_X call calculate_offset_X
;-------------------------------------- ;--------------------------------------
align 4 align 4
.loop: .loop:
mov ecx,[app_list+edi*4] mov ecx,[app_list+edi*4]
cmp ecx,-1 cmp ecx,-1
jz .done jz .done
mov [active_slot_number],ecx mov [active_slot_number],ecx
mcall 9,procinfo_window_tabs mcall 9,procinfo_window_tabs
imul ebx, edi, TAB_SIZE imul ebx, edi, TAB_SIZE
add ebx,[offset_X] add ebx,[offset_X]
add ebx,2 add ebx,2
shl ebx,16 shl ebx,16
add ebx,TAB_SIZE-2 ;54 add ebx,TAB_SIZE-2 ;54
push edi push edi
mov edx,[system_colours.work_button] mov edx,[system_colours.work_button]
xor edi,edi xor edi,edi
cmp ebp,[active_slot_number] ;ecx ; ecx=active slot number cmp ebp,[active_slot_number] ;ecx ; ecx=active slot number
jnz @f jnz @f
mov edx,[wcolor] mov edx,[wcolor]
inc edi inc edi
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
mov esi,[current_alt_tab_app] mov esi,[current_alt_tab_app]
cmp esi,-1 cmp esi,-1
jz @f jz @f
cmp ecx,[alt_tab_list+esi*8] cmp ecx,[alt_tab_list+esi*8]
jnz @f jnz @f
mov edx,[AltTab_color] ;0xFF8000 ; current select for ALT+Tab mov edx,[AltTab_color] ;0xFF8000 ; current select for ALT+Tab
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
call calculate_button_y_coordinate_and_size call calculate_button_y_coordinate_and_size
mov esi,[wcolor] mov esi,[wcolor]
call draw_appl_button call draw_appl_button
pop edi pop edi
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
add ebx,4 shl 16 add ebx,4 shl 16
mov bx,cx ;[height] mov bx,cx ;[height]
shr bx,1 shr bx,1
sub bx,4 sub bx,4
shr ecx,16 shr ecx,16
add bx,cx add bx,cx
mov edx, procinfo_window_tabs+10 mov edx, procinfo_window_tabs.process_name
mcall 4,,[system_colours.work_button_text],,11 mcall 4,,[system_colours.work_button_text],, sizeof.process_information.process_name
;-------------------------------------- ;--------------------------------------
align 4 align 4
.nodraw: .nodraw:
inc edi inc edi
cmp edi, [max_applications] cmp edi, [max_applications]
jb .loop jb .loop
mov ecx,[app_list+edi*4] mov ecx,[app_list+edi*4]
cmp ecx,-1 cmp ecx,-1
jz .done jz .done
xor eax,eax xor eax,eax
cmp [page_list],eax cmp [page_list],eax
jne @f jne @f
inc eax inc eax
cmp [page_list_enable],eax cmp [page_list_enable],eax
je @f je @f
mov [page_list_enable],eax mov [page_list_enable],eax
mov [redraw_window_flag],eax mov [redraw_window_flag],eax
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
pop ebp pop ebp
ret ret
;-------------------------------------- ;--------------------------------------
align 4 align 4
.done: .done:
xor eax,eax xor eax,eax
cmp [page_list],eax cmp [page_list],eax
jne @f jne @f
cmp [page_list_enable],eax cmp [page_list_enable],eax
je @f je @f
mov [page_list_enable],eax mov [page_list_enable],eax
inc eax inc eax
mov [redraw_window_flag],eax mov [redraw_window_flag],eax
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
pop ebp pop ebp
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------

View File

@ -4,439 +4,439 @@
; *************************************************** ; ***************************************************
align 4 align 4
draw_window: draw_window:
pusha pusha
mov [running_applications],-1 mov [running_applications],-1
mcall 12,1 mcall 12,1
mcall 48,3,system_colours,10*4 mcall 48,3,system_colours, sizeof.system_colors
mov eax, [system_colours+4*6] mov eax, [system_colours.work_button]
mov edx,[system_colours+4*6] mov edx,[system_colours.work_button]
mov eax,COLOR_CHANGE_MAGNITUDE mov eax,COLOR_CHANGE_MAGNITUDE
call subtract_color_change_magnitude call subtract_color_change_magnitude
mov [wcolor], edx mov [wcolor], edx
mcall 14 ; get screen max x & max y mcall 14 ; get screen max x & max y
cmp [width],dword 0 cmp [width],dword 0
je no_def_width je no_def_width
and eax,0xffff and eax,0xffff
mov ebx,[width] mov ebx,[width]
shl ebx,16 shl ebx,16
add eax,ebx add eax,ebx
;-------------------------------------- ;--------------------------------------
align 4 align 4
no_def_width: no_def_width:
mov ebx,eax mov ebx,eax
mov [screenxy],ebx mov [screenxy],ebx
shr ebx,16 shr ebx,16
mov ecx,eax mov ecx,eax
cmp [place_attachment],1 cmp [place_attachment],1
je @f je @f
xor ecx,ecx xor ecx,ecx
mov cx,[height] mov cx,[height]
dec cx dec cx
jmp .attachment_selected jmp .attachment_selected
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
sub ecx,[height] sub ecx,[height]
inc ecx inc ecx
shl ecx,16 shl ecx,16
mov cx,[height] mov cx,[height]
dec cx dec cx
;-------------------------------------- ;--------------------------------------
align 4 align 4
.attachment_selected: .attachment_selected:
xor eax,eax ; DEFINE AND DRAW WINDOW xor eax,eax ; DEFINE AND DRAW WINDOW
mov edx, [wcolor] mov edx, [wcolor]
or edx, 0x01000000 ; do not draw the window or edx, 0x01000000 ; do not draw the window
mov esi, [wcolor] mov esi, [wcolor]
or esi, 0x01000000 ; unmovable window or esi, 0x01000000 ; unmovable window
mov edi, [wcolor] mov edi, [wcolor]
mov [panel_x_pos], ebx mov [panel_x_pos], ebx
mov [panel_y_pos], ecx ; Ïîêà ÷òî òàê. mov [panel_y_pos], ecx ; Ïîêà ÷òî òàê.
mcall mcall
movzx eax,word [screenxy+2] movzx eax,word [screenxy+2]
mov [max_x],eax mov [max_x],eax
call fill_window call fill_window
call minimize_left_button call minimize_left_button
call minimize_right_button call minimize_right_button
call draw_menu_and_clean_desktop call draw_menu_and_clean_desktop
mov [ptime],0 mov [ptime],0
call draw_tray call draw_tray
call draw_application_buttons call draw_application_buttons
mov [redraw_window_flag],0 mov [redraw_window_flag],0
mcall 12,2 mcall 12,2
popa popa
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
fill_window: fill_window:
movzx ebx,word [screenxy+2] movzx ebx,word [screenxy+2]
xor ecx,ecx xor ecx,ecx
mov edx,[wcolor] mov edx,[wcolor]
mov eax,COLOR_CHANGE_MAGNITUDE_0 mov eax,COLOR_CHANGE_MAGNITUDE_0
imul eax,dword [soften_height] imul eax,dword [soften_height]
call subtract_color_change_magnitude call subtract_color_change_magnitude
cmp [soften_up],dword 0 cmp [soften_up],dword 0
je no_su je no_su
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
mov eax,COLOR_CHANGE_MAGNITUDE_0 mov eax,COLOR_CHANGE_MAGNITUDE_0
call add_color_change_magnitude call add_color_change_magnitude
; draw soften_up - the width of 5 pixels ; draw soften_up - the width of 5 pixels
and edx,0x00FFFFFF and edx,0x00FFFFFF
mcall 38 mcall 38
add ecx,1*65536+1 add ecx,1*65536+1
cmp cx,[soften_height] ;5 cmp cx,[soften_height] ;5
jb @r jb @r
;-------------------------------------- ;--------------------------------------
align 4 align 4
no_su: no_su:
cmp [soften_down],dword 0 cmp [soften_down],dword 0
je no_sd je no_sd
; draw soften_down - the width of 5 pixels ; draw soften_down - the width of 5 pixels
pusha pusha
mov esi,[soften_height] mov esi,[soften_height]
mov ecx,[height] mov ecx,[height]
dec ecx dec ecx
shl ecx,16 shl ecx,16
add ecx,[height] add ecx,[height]
dec ecx dec ecx
mov edx,[wcolor] mov edx,[wcolor]
mov eax,COLOR_CHANGE_MAGNITUDE_0 mov eax,COLOR_CHANGE_MAGNITUDE_0
imul eax,dword [soften_height] imul eax,dword [soften_height]
call subtract_color_change_magnitude call subtract_color_change_magnitude
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
mov eax,COLOR_CHANGE_MAGNITUDE_0 mov eax,COLOR_CHANGE_MAGNITUDE_0
call add_color_change_magnitude call add_color_change_magnitude
and edx,0x00FFFFFF and edx,0x00FFFFFF
mcall 38 mcall 38
sub ecx,1*65536+1 sub ecx,1*65536+1
dec esi dec esi
jnz @r jnz @r
popa popa
;-------------------------------------- ;--------------------------------------
align 4 align 4
no_sd: no_sd:
movzx ebx,word [screenxy+2] movzx ebx,word [screenxy+2]
xor ecx,ecx xor ecx,ecx
cmp [soften_up],dword 0 cmp [soften_up],dword 0
je @f je @f
add ecx,[soften_height] add ecx,[soften_height]
rol ecx,16 rol ecx,16
add ecx,[soften_height] add ecx,[soften_height]
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
mov edx,[wcolor] mov edx,[wcolor]
;-------------------------------------- ;--------------------------------------
align 4 align 4
newline3: newline3:
and edx,0x00FFFFFF and edx,0x00FFFFFF
mov eax,[height] mov eax,[height]
cmp [soften_up],dword 0 cmp [soften_up],dword 0
je @f je @f
sub eax,[soften_height] sub eax,[soften_height]
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
cmp [soften_down],dword 0 cmp [soften_down],dword 0
je @f je @f
sub eax,[soften_height] sub eax,[soften_height]
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
mov cx,ax mov cx,ax
inc ebx inc ebx
mcall 13 mcall 13
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
minimize_left_button: minimize_left_button:
cmp [minimize_left],dword 0 cmp [minimize_left],dword 0
je .exit je .exit
mov ecx,1 *65536 mov ecx,1 *65536
add ecx,[height] add ecx,[height]
dec ecx dec ecx
mov edx,101 mov edx,101
or edx,0x40000000 or edx,0x40000000
mcall 8,<0,9>,,,[wcolor] ; ABS LEFT mcall 8,<0,9>,,,[wcolor] ; ABS LEFT
mov ebx,2*65536 ;+6 mov ebx,2*65536 ;+6
mov bx,[height] mov bx,[height]
shr bx,1 shr bx,1
sub bx,3 sub bx,3
mov edx,[wcolor] mov edx,[wcolor]
mov eax,COLOR_CHANGE_MAGNITUDE_2 mov eax,COLOR_CHANGE_MAGNITUDE_2
call add_color_change_magnitude call add_color_change_magnitude
mov ecx,edx mov ecx,edx
mcall 4,,,hidetext,1 ; HIDE TEXT mcall 4,,,hidetext,1 ; HIDE TEXT
;-------------------------------------- ;--------------------------------------
align 4 align 4
.exit: .exit:
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
minimize_right_button: minimize_right_button:
cmp [minimize_right],dword 0 cmp [minimize_right],dword 0
je .exit je .exit
mov eax,[max_x] mov eax,[max_x]
sub eax,77 sub eax,77
shl eax,16 shl eax,16
mov ebx,eax mov ebx,eax
add ebx,67 add ebx,67
mov ecx,1 *65536 mov ecx,1 *65536
add ecx,[height] add ecx,[height]
dec ecx dec ecx
add ebx,68*65536 add ebx,68*65536
mov bx,10 ;9 mov bx,10 ;9
mov edx,102 mov edx,102
or edx,0x40000000 or edx,0x40000000
mcall 8,,,,[wcolor] ; ABS RIGHT mcall 8,,,,[wcolor] ; ABS RIGHT
mov ebx,[max_x] mov ebx,[max_x]
sub ebx,6 sub ebx,6
shl ebx,16 shl ebx,16
mov bx,[height] mov bx,[height]
shr bx,1 shr bx,1
sub bx,3 sub bx,3
mov edx,[wcolor] mov edx,[wcolor]
mov eax,COLOR_CHANGE_MAGNITUDE_2 mov eax,COLOR_CHANGE_MAGNITUDE_2
call add_color_change_magnitude call add_color_change_magnitude
mov ecx,edx mov ecx,edx
mov esi,1 mov esi,1
mcall 4,,,hidetext+1 mcall 4,,,hidetext+1
;-------------------------------------- ;--------------------------------------
align 4 align 4
.exit: .exit:
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
draw_menu_and_clean_desktop: draw_menu_and_clean_desktop:
pusha pusha
; check draw for menu ; check draw for menu
cmp [menu_enable],dword 0 cmp [menu_enable],dword 0
je no_menu je no_menu
; calculate and draw menu ; calculate and draw menu
mov ebx, (0 shl 16) + MENU_SIZE-3 mov ebx, (0 shl 16) + MENU_SIZE-3
; check for left minimize button enabled ; check for left minimize button enabled
cmp [minimize_left],dword 0 cmp [minimize_left],dword 0
je @f je @f
add ebx, ML_SIZE shl 16 add ebx, ML_SIZE shl 16
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
mov ecx, [height] mov ecx, [height]
mov edx, 0x60d1ff01 mov edx, 0x60d1ff01
mcall 8,,,,[wcolor] ; MENU BUTTON mcall 8,,,,[wcolor] ; MENU BUTTON
mov eax,ebx mov eax,ebx
shr eax,16 shr eax,16
mov [menu_button_x.start],eax mov [menu_button_x.start],eax
mov eax,ebx mov eax,ebx
and eax,0xffff and eax,0xffff
mov [menu_button_x.size],eax mov [menu_button_x.size],eax
mov eax,ecx mov eax,ecx
shr eax,16 shr eax,16
mov [menu_button_y.start],eax mov [menu_button_y.start],eax
mov eax,ecx mov eax,ecx
and eax,0xffff and eax,0xffff
mov [menu_button_y.size],eax mov [menu_button_y.size],eax
call calculate_button_y_coordinate_and_size call calculate_button_y_coordinate_and_size
mov edx,[MenuButton_color] ;0x44aa44 mov edx,[MenuButton_color] ;0x44aa44
mov esi,[wcolor] mov esi,[wcolor]
add ebx,3 shl 16 - 5 add ebx,3 shl 16 - 5
call draw_appl_button call draw_appl_button
add ebx, 4*65536 add ebx, 4*65536
mov bx,[height] mov bx,[height]
shr bx,1 shr bx,1
sub bx,7 sub bx,7
mov ecx,[PanelText_color] mov ecx,[PanelText_color]
or ecx,0x10000000 or ecx,0x10000000
if lang eq et if lang eq et
mcall 4,,,m_text,5 mcall 4,,,m_text,5
else else
mcall 4,,,m_text,4 mcall 4,,,m_text,4
end if end if
;-------------------------------------- ;--------------------------------------
align 4 align 4
no_menu: no_menu:
; check draw for clean desktop button ; check draw for clean desktop button
cmp [clean_desktop_enable],dword 0 cmp [clean_desktop_enable],dword 0
je .exit je .exit
; calculate and draw clean desktop button ; calculate and draw clean desktop button
mov ebx, (0 shl 16) + CLD_SIZE-5 mov ebx, (0 shl 16) + CLD_SIZE-5
; check for left minimize button enabled ; check for left minimize button enabled
cmp [minimize_left],dword 0 cmp [minimize_left],dword 0
je @f je @f
add ebx, ML_SIZE shl 16 add ebx, ML_SIZE shl 16
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
; check for menu button enabled ; check for menu button enabled
cmp [menu_enable],dword 0 cmp [menu_enable],dword 0
je @f je @f
add ebx, MENU_SIZE shl 16 add ebx, MENU_SIZE shl 16
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
; Inserted code for drawing buttons 103, 104, 105 (Clean, Restore, Exchange windows) ; Inserted code for drawing buttons 103, 104, 105 (Clean, Restore, Exchange windows)
mov esi, dword [system_colours+24] ; drawing buttons mov esi, dword [system_colours.work_button] ; drawing buttons
and esi, 0x00ffffff and esi, 0x00ffffff
mov edx, 0x60000000 + 103 mov edx, 0x60000000 + 103
mov ecx, [height] mov ecx, [height]
mcall 8 ;,,<3,13> mcall 8 ;,,<3,13>
call calculate_button_y_coordinate_and_size call calculate_button_y_coordinate_and_size
mov edx,[CleanDesktopButton_color] ;time_bgr_color mov edx,[CleanDesktopButton_color] ;time_bgr_color
mov esi,[wcolor] mov esi,[wcolor]
call draw_appl_button call draw_appl_button
mov ecx,[PanelText_color] mov ecx,[PanelText_color]
add ebx,5 shl 16 add ebx,5 shl 16
mov bx,[height] mov bx,[height]
shr bx,1 shr bx,1
sub bx,2 sub bx,2
mcall 4,,,page_clean_but,1 mcall 4,,,page_clean_but,1
sub bx,2 sub bx,2
mcall ,,,page_clean_but+1 mcall ,,,page_clean_but+1
;-------------------------------------- ;--------------------------------------
align 4 align 4
.exit: .exit:
popa popa
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
draw_application_buttons: draw_application_buttons:
pusha pusha
cmp [run_appl],dword 0 ; do not draw application buttons cmp [run_appl],dword 0 ; do not draw application buttons
je .exit je .exit
call calculate_offset_X call calculate_offset_X
mov eax,[screenxy] mov eax,[screenxy]
shr eax,16 shr eax,16
sub eax,[offset_X] sub eax,[offset_X]
; check for left minimize button enabled ; check for left minimize button enabled
cmp [minimize_right],dword 0 cmp [minimize_right],dword 0
je @f je @f
sub eax, MR_SIZE sub eax, MR_SIZE
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
cmp [clock_enable],dword 0 cmp [clock_enable],dword 0
je @f je @f
sub eax,CLOCK_SIZE sub eax,CLOCK_SIZE
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
cmp [cpu_usage_enable],dword 0 cmp [cpu_usage_enable],dword 0
je @f je @f
sub eax,CPU_USAGE_SIZE sub eax,CPU_USAGE_SIZE
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
cmp [chlang_enable],dword 0 cmp [chlang_enable],dword 0
je @f je @f
sub eax,CHLANG_SIZE sub eax,CHLANG_SIZE
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
cmp [page_list_enable],dword 0 cmp [page_list_enable],dword 0
je @f je @f
sub eax,PAGE_LIST_SIZE sub eax,PAGE_LIST_SIZE
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
mov ebx, TAB_SIZE mov ebx, TAB_SIZE
xor edx,edx xor edx,edx
div ebx div ebx
mov [max_applications], eax mov [max_applications], eax
xor edi,edi xor edi,edi
;-------------------------------------- ;--------------------------------------
align 4 align 4
.nb: .nb:
mov ebx,edi mov ebx,edi
imul ebx,TAB_SIZE imul ebx,TAB_SIZE
add ebx,[offset_X] add ebx,[offset_X]
shl ebx,16 shl ebx,16
mov bx, TAB_SIZE-1 mov bx, TAB_SIZE-1
mov edx,edi mov edx,edi
add edx,52 add edx,52
or edx,0x60000000 or edx,0x60000000
mov ecx, [height] mov ecx, [height]
mcall 8,,,,[wcolor] mcall 8,,,,[wcolor]
inc edi inc edi
cmp edi,[max_applications] cmp edi,[max_applications]
jb .nb jb .nb
;-------------------------------------- ;--------------------------------------
align 4 align 4
.exit: .exit:
popa popa
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
calculate_offset_X: calculate_offset_X:
push eax push eax
xor eax,eax xor eax,eax
; check for left minimize button enabled ; check for left minimize button enabled
cmp [minimize_left],dword 0 cmp [minimize_left],dword 0
je @f je @f
add eax, ML_SIZE add eax, ML_SIZE
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
; check for menu button enabled ; check for menu button enabled
cmp [menu_enable],dword 0 cmp [menu_enable],dword 0
je @f je @f
add eax, MENU_SIZE add eax, MENU_SIZE
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
; check for clean desktop button enabled ; check for clean desktop button enabled
cmp [clean_desktop_enable],dword 0 cmp [clean_desktop_enable],dword 0
je @f je @f
add eax, CLD_SIZE add eax, CLD_SIZE
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
mov [offset_X],eax mov [offset_X],eax
pop eax pop eax
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------

View File

@ -1,109 +1,106 @@
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
last_active_window rd 1 last_active_window rd 1
prev_active_window rd 1 prev_active_window rd 1
active_window_changed rd 1 active_window_changed rd 1
app_tab_count rd 1 app_tab_count rd 1
alt_tab_list_size rd 1 alt_tab_list_size rd 1
panel_x_pos rd 1 panel_x_pos rd 1
panel_y_pos rd 1 panel_y_pos rd 1
offset_X rd 1 offset_X rd 1
offset_x_tray rd 1 offset_x_tray rd 1
pos_x_clock rd 1 pos_x_clock rd 1
pos_x_cpu_usage rd 1 pos_x_cpu_usage rd 1
pos_x_cpu_chlang rd 1 pos_x_cpu_chlang rd 1
pos_x_page_list rd 1 pos_x_page_list rd 1
active_slot_number rd 1 active_slot_number rd 1
my_active_slot rd 1 my_active_slot rd 1
current_active_slot rd 1 current_active_slot rd 1
screen_size: screen_size:
.height rw 1 .height rw 1
.width rw 1 .width rw 1
draw_flag_certainly rb 1 draw_flag_certainly rb 1
start_menu_flag rb 1 start_menu_flag rb 1
win_key_flag rb 1 win_key_flag rb 1
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
system_colours system_colors ; rd 10 system_colours system_colors
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
app_list rd 50 app_list rd 50
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
alt_tab_list rd 256*2 alt_tab_list rd 256*2
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
path: path:
rb 1024 rb 1024
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
align 4 align 4
library_path: library_path:
process_info_buffer: process_info_buffer process_information
rb 1024
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
procinfo_for_detect: procinfo_for_detect process_information
rb 1024
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
procinfo_window_tabs: procinfo_window_tabs process_information
rb 1024
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
align 4 align 4
bootparam: bootparam:
rb 256 rb 256
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
tictable: tictable:
rd 256 rd 256
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
end_name: end_name:
rb 64 rb 64
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
menu_name: menu_name:
rb 64 rb 64
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
run_name: run_name:
rb 64 rb 64
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
printscreen_name: printscreen_name:
rb 64 rb 64
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
calendar_name: calendar_name:
rb 64 rb 64
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
sysmeter_name: sysmeter_name:
rb 64 rb 64
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
mousemul_name: mousemul_name:
rb 64 rb 64
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
rb 256 rb 256
detect_stack: detect_stack:
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
rb 256 rb 256
ctx_menu_stack: ctx_menu_stack:
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
rb 1024 rb 1024
stack_top: stack_top:
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------

View File

@ -9,15 +9,18 @@
; ;
use32 use32
org 0x0 org 0x0
db 'MENUET00' ; 8 byte id db 'MENUET01'
dd 38 ; required os dd 1 ; version
dd STARTAPP ; program start dd STARTAPP ; program start
dd I_END ; program image size dd I_END ; program image size
dd 0x100000 ; required amount of memory dd MEM ; size memory for program
dd 0x00000000 ; reserved=no extended header dd STACKTOP ; base stack pointer
dd 0
dd 0
include '../../../macros.inc'
include "ASPAPI.INC" include "ASPAPI.INC"
N_KEYCOLOR equ 0x00677889 ; Normal button color N_KEYCOLOR equ 0x00677889 ; Normal button color
@ -26,30 +29,28 @@ L_KEYCOLOR equ 0x00258778 ; Lock button color
TEXTCOLOR equ 0x00FFFFFF ; Button caption color TEXTCOLOR equ 0x00FFFFFF ; Button caption color
ASCII_KEYMAP_SIZE equ 128 ASCII_KEYMAP_SIZE equ 128
PROCINFO_SIZE equ 1024
PROCINFO_BUFF equ ascii_keymap + ASCII_KEYMAP_SIZE
STARTAPP: STARTAPP:
mov ecx, 1 ; to send scancodes. mov ecx, 1 ; to send scancodes.
call set_keyboard_mode call set_keyboard_mode
call reload_ascii_keymap call reload_ascii_keymap
call draw_window call draw_window
jmp get_zkey_window_slot_number jmp get_zkey_window_slot_number
draw_window: draw_window:
test byte [red_type], 1 test byte [red_type], 1
jnz @f jnz @f
test byte [red_type], 2 test byte [red_type], 2
jnz .draw_switch_button jnz .draw_switch_button
start_draw_window 100,370,600,210,0x14224466,labelt start_draw_window 100,370,600,210,0x14224466,labelt
stdcall draw_button, 15,50,23,20,2,N_KEYCOLOR,keyText,3,TEXTCOLOR ; Esc stdcall draw_button, 15,50,23,20,2,N_KEYCOLOR,keyText,3,TEXTCOLOR ; Esc
stdcall draw_button, 70,50,23,20,3,N_KEYCOLOR,keyText+3,2,TEXTCOLOR ; F1 stdcall draw_button, 70,50,23,20,3,N_KEYCOLOR,keyText+3,2,TEXTCOLOR ; F1
stdcall draw_button, 95,50,23,20,4,N_KEYCOLOR,keyText+5,2,TEXTCOLOR ; F2 stdcall draw_button, 95,50,23,20,4,N_KEYCOLOR,keyText+5,2,TEXTCOLOR ; F2
stdcall draw_button, 120,50,23,20,5,N_KEYCOLOR,keyText+7,2,TEXTCOLOR ; F3 stdcall draw_button, 120,50,23,20,5,N_KEYCOLOR,keyText+7,2,TEXTCOLOR ; F3
stdcall draw_button, 145,50,23,20,6,N_KEYCOLOR,keyText+9,2,TEXTCOLOR ; F4 stdcall draw_button, 145,50,23,20,6,N_KEYCOLOR,keyText+9,2,TEXTCOLOR ; F4
stdcall draw_button, 183,50,23,20,7,N_KEYCOLOR,keyText+11,2,TEXTCOLOR ; F5 stdcall draw_button, 183,50,23,20,7,N_KEYCOLOR,keyText+11,2,TEXTCOLOR ; F5
stdcall draw_button, 208,50,23,20,8,N_KEYCOLOR,keyText+13,2,TEXTCOLOR ; F6 stdcall draw_button, 208,50,23,20,8,N_KEYCOLOR,keyText+13,2,TEXTCOLOR ; F6
@ -77,7 +78,7 @@ draw_window:
stdcall draw_button, 340,80,23,20,28,N_KEYCOLOR,ascii_keymap+43,1,TEXTCOLOR ;keyText+56,2,TEXTCOLOR ; \| stdcall draw_button, 340,80,23,20,28,N_KEYCOLOR,ascii_keymap+43,1,TEXTCOLOR ;keyText+56,2,TEXTCOLOR ; \|
stdcall draw_button, 365,80,30,20,29,N_KEYCOLOR,keyText+58,4,TEXTCOLOR ; bksp stdcall draw_button, 365,80,30,20,29,N_KEYCOLOR,keyText+58,4,TEXTCOLOR ; bksp
stdcall draw_button, 15 ,103,33,20,30,N_KEYCOLOR,keyText+62,3,TEXTCOLOR ; Tab stdcall draw_button, 15 ,103,33,20,30,N_KEYCOLOR,keyText+62,3,TEXTCOLOR ; Tab
stdcall draw_button, 50 ,103,23,20,31,N_KEYCOLOR,ascii_keymap+16,1,TEXTCOLOR ;keyText+65,2,TEXTCOLOR ; Q‰ stdcall draw_button, 50 ,103,23,20,31,N_KEYCOLOR,ascii_keymap+16,1,TEXTCOLOR ;keyText+65,2,TEXTCOLOR ; Q‰
stdcall draw_button, 75 ,103,23,20,32,N_KEYCOLOR,ascii_keymap+17,1,TEXTCOLOR ;keyText+67,2,TEXTCOLOR ; W stdcall draw_button, 75 ,103,23,20,32,N_KEYCOLOR,ascii_keymap+17,1,TEXTCOLOR ;keyText+67,2,TEXTCOLOR ; W
stdcall draw_button, 100,103,23,20,33,N_KEYCOLOR,ascii_keymap+18,1,TEXTCOLOR ;keyText+69,2,TEXTCOLOR ; E“ stdcall draw_button, 100,103,23,20,33,N_KEYCOLOR,ascii_keymap+18,1,TEXTCOLOR ;keyText+69,2,TEXTCOLOR ; E“
@ -90,9 +91,9 @@ draw_window:
stdcall draw_button, 275,103,23,20,40,N_KEYCOLOR,ascii_keymap+25,1,TEXTCOLOR ;keyText+83,2,TEXTCOLOR ; P‡ stdcall draw_button, 275,103,23,20,40,N_KEYCOLOR,ascii_keymap+25,1,TEXTCOLOR ;keyText+83,2,TEXTCOLOR ; P‡
stdcall draw_button, 300,103,23,20,41,N_KEYCOLOR,ascii_keymap+26,1,TEXTCOLOR ;keyText+85,3,TEXTCOLOR ; [{• stdcall draw_button, 300,103,23,20,41,N_KEYCOLOR,ascii_keymap+26,1,TEXTCOLOR ;keyText+85,3,TEXTCOLOR ; [{•
stdcall draw_button, 325,103,23,20,42,N_KEYCOLOR,ascii_keymap+27,1,TEXTCOLOR ;keyText+88,3,TEXTCOLOR ; ]}š stdcall draw_button, 325,103,23,20,42,N_KEYCOLOR,ascii_keymap+27,1,TEXTCOLOR ;keyText+88,3,TEXTCOLOR ; ]}š
stdcall draw_button, 350,103,45,43,43,N_KEYCOLOR,keyText+91,5,TEXTCOLOR ; Enter stdcall draw_button, 350,103,45,43,43,N_KEYCOLOR,keyText+91,5,TEXTCOLOR ; Enter
stdcall draw_button, 15 ,126,43,20,44,L_KEYCOLOR,keyText+96 ,4,TEXTCOLOR ; lock stdcall draw_button, 15 ,126,43,20,44,L_KEYCOLOR,keyText+96 ,4,TEXTCOLOR ; lock
stdcall draw_button, 60 ,126,23,20,45,N_KEYCOLOR,ascii_keymap+30,1,TEXTCOLOR ;keyText+100,2,TEXTCOLOR ; A” stdcall draw_button, 60 ,126,23,20,45,N_KEYCOLOR,ascii_keymap+30,1,TEXTCOLOR ;keyText+100,2,TEXTCOLOR ; A”
stdcall draw_button, 85 ,126,23,20,46,N_KEYCOLOR,ascii_keymap+31,1,TEXTCOLOR ;keyText+102,2,TEXTCOLOR ; S stdcall draw_button, 85 ,126,23,20,46,N_KEYCOLOR,ascii_keymap+31,1,TEXTCOLOR ;keyText+102,2,TEXTCOLOR ; S
stdcall draw_button, 110,126,23,20,47,N_KEYCOLOR,ascii_keymap+32,1,TEXTCOLOR ;keyText+104,2,TEXTCOLOR ; D stdcall draw_button, 110,126,23,20,47,N_KEYCOLOR,ascii_keymap+32,1,TEXTCOLOR ;keyText+104,2,TEXTCOLOR ; D
@ -105,7 +106,7 @@ draw_window:
stdcall draw_button, 285,126,23,20,54,N_KEYCOLOR,ascii_keymap+39,1,TEXTCOLOR ;keyText+118,3,TEXTCOLOR ; ;:† stdcall draw_button, 285,126,23,20,54,N_KEYCOLOR,ascii_keymap+39,1,TEXTCOLOR ;keyText+118,3,TEXTCOLOR ; ;:†
stdcall draw_button, 310,126,23,20,55,N_KEYCOLOR,ascii_keymap+40,1,TEXTCOLOR ;keyText+121,3,TEXTCOLOR ; '"<22> stdcall draw_button, 310,126,23,20,55,N_KEYCOLOR,ascii_keymap+40,1,TEXTCOLOR ;keyText+121,3,TEXTCOLOR ; '"<22>
stdcall draw_button, 15 ,149,53,20,56,C_KEYCOLOR,keyText+124,5,TEXTCOLOR ; Shift stdcall draw_button, 15 ,149,53,20,56,C_KEYCOLOR,keyText+124,5,TEXTCOLOR ; Shift
stdcall draw_button, 70 ,149,23,20,57,N_KEYCOLOR,ascii_keymap+44,1,TEXTCOLOR ;keyText+129,2,TEXTCOLOR ; ZŸ stdcall draw_button, 70 ,149,23,20,57,N_KEYCOLOR,ascii_keymap+44,1,TEXTCOLOR ;keyText+129,2,TEXTCOLOR ; ZŸ
stdcall draw_button, 95 ,149,23,20,58,N_KEYCOLOR,ascii_keymap+45,1,TEXTCOLOR ;keyText+131,2,TEXTCOLOR ; X— stdcall draw_button, 95 ,149,23,20,58,N_KEYCOLOR,ascii_keymap+45,1,TEXTCOLOR ;keyText+131,2,TEXTCOLOR ; X—
stdcall draw_button, 120,149,23,20,59,N_KEYCOLOR,ascii_keymap+46,1,TEXTCOLOR ;keyText+133,2,TEXTCOLOR ; C stdcall draw_button, 120,149,23,20,59,N_KEYCOLOR,ascii_keymap+46,1,TEXTCOLOR ;keyText+133,2,TEXTCOLOR ; C
@ -117,61 +118,61 @@ draw_window:
stdcall draw_button, 270,149,23,20,65,N_KEYCOLOR,ascii_keymap+52,1,TEXTCOLOR ;keyText+146,3,TEXTCOLOR ; .>ž stdcall draw_button, 270,149,23,20,65,N_KEYCOLOR,ascii_keymap+52,1,TEXTCOLOR ;keyText+146,3,TEXTCOLOR ; .>ž
stdcall draw_button, 295,149,23,20,66,N_KEYCOLOR,ascii_keymap+53,1,TEXTCOLOR ;keyText+149,2,TEXTCOLOR ; /? stdcall draw_button, 295,149,23,20,66,N_KEYCOLOR,ascii_keymap+53,1,TEXTCOLOR ;keyText+149,2,TEXTCOLOR ; /?
test byte [red_type], 1 test byte [red_type], 1
jnz @f jnz @f
stdcall draw_button, 320,149,75,20,67,C_KEYCOLOR,keyText+151,5,TEXTCOLOR ; Shift stdcall draw_button, 320,149,75,20,67,C_KEYCOLOR,keyText+151,5,TEXTCOLOR ; Shift
stdcall draw_button, 15 ,172,30,20,68,C_KEYCOLOR,keyText+156,4,TEXTCOLOR ; Ctrl stdcall draw_button, 15 ,172,30,20,68,C_KEYCOLOR,keyText+156,4,TEXTCOLOR ; Ctrl
stdcall draw_button, 47 ,172,30,20,69,C_KEYCOLOR,keyText+160,3,TEXTCOLOR ; Win stdcall draw_button, 47 ,172,30,20,69,C_KEYCOLOR,keyText+160,3,TEXTCOLOR ; Win
stdcall draw_button, 79 ,172,30,20,70,C_KEYCOLOR,keyText+163,3,TEXTCOLOR ; Alt stdcall draw_button, 79 ,172,30,20,70,C_KEYCOLOR,keyText+163,3,TEXTCOLOR ; Alt
stdcall draw_button, 111,172,156,20,71,N_KEYCOLOR,keyText+166,1,TEXTCOLOR ; Space stdcall draw_button, 111,172,156,20,71,N_KEYCOLOR,keyText+166,1,TEXTCOLOR ; Space
stdcall draw_button, 269,172,30,20,72,C_KEYCOLOR,keyText+167,3,TEXTCOLOR ; Alt stdcall draw_button, 269,172,30,20,72,C_KEYCOLOR,keyText+167,3,TEXTCOLOR ; Alt
stdcall draw_button, 301,172,30,20,73,C_KEYCOLOR,keyText+170,3,TEXTCOLOR ; Win stdcall draw_button, 301,172,30,20,73,C_KEYCOLOR,keyText+170,3,TEXTCOLOR ; Win
stdcall draw_button, 333,172,30,20,74,C_KEYCOLOR,keyText+173,3,TEXTCOLOR ; [=] stdcall draw_button, 333,172,30,20,74,C_KEYCOLOR,keyText+173,3,TEXTCOLOR ; [=]
stdcall draw_button, 365,172,30,20,75,C_KEYCOLOR,keyText+176,4,TEXTCOLOR ; Ctrl stdcall draw_button, 365,172,30,20,75,C_KEYCOLOR,keyText+176,4,TEXTCOLOR ; Ctrl
stdcall draw_button, 405,50 ,23,20,76,N_KEYCOLOR,keyText+180,3,TEXTCOLOR ; psc stdcall draw_button, 405,50 ,23,20,76,N_KEYCOLOR,keyText+180,3,TEXTCOLOR ; psc
stdcall draw_button, 430,50 ,23,20,77,L_KEYCOLOR,keyText+183,3,TEXTCOLOR ; slk stdcall draw_button, 430,50 ,23,20,77,L_KEYCOLOR,keyText+183,3,TEXTCOLOR ; slk
stdcall draw_button, 455,50 ,23,20,78,N_KEYCOLOR,keyText+186,3,TEXTCOLOR ; brk stdcall draw_button, 455,50 ,23,20,78,N_KEYCOLOR,keyText+186,3,TEXTCOLOR ; brk
stdcall draw_button, 405,80 ,23,20,79,N_KEYCOLOR,keyText+189,3,TEXTCOLOR ; Ins stdcall draw_button, 405,80 ,23,20,79,N_KEYCOLOR,keyText+189,3,TEXTCOLOR ; Ins
stdcall draw_button, 430,80 ,23,20,80,N_KEYCOLOR,keyText+192,2,TEXTCOLOR ; Hm stdcall draw_button, 430,80 ,23,20,80,N_KEYCOLOR,keyText+192,2,TEXTCOLOR ; Hm
stdcall draw_button, 455,80 ,23,20,81,N_KEYCOLOR,keyText+194,3,TEXTCOLOR ; Pup stdcall draw_button, 455,80 ,23,20,81,N_KEYCOLOR,keyText+194,3,TEXTCOLOR ; Pup
stdcall draw_button, 405,103 ,23,20,82,N_KEYCOLOR,keyText+197,3,TEXTCOLOR ; Del stdcall draw_button, 405,103 ,23,20,82,N_KEYCOLOR,keyText+197,3,TEXTCOLOR ; Del
stdcall draw_button, 430,103 ,23,20,83,N_KEYCOLOR,keyText+200,3,TEXTCOLOR ; End stdcall draw_button, 430,103 ,23,20,83,N_KEYCOLOR,keyText+200,3,TEXTCOLOR ; End
stdcall draw_button, 455,103 ,23,20,84,N_KEYCOLOR,keyText+203,3,TEXTCOLOR ; Pdn stdcall draw_button, 455,103 ,23,20,84,N_KEYCOLOR,keyText+203,3,TEXTCOLOR ; Pdn
stdcall draw_button, 430,149,23,20,85,C_KEYCOLOR,keyText+206,1,TEXTCOLOR ; ^ stdcall draw_button, 430,149,23,20,85,C_KEYCOLOR,keyText+206,1,TEXTCOLOR ; ^
stdcall draw_button, 405,172,23,20,86,C_KEYCOLOR,keyText+207,1,TEXTCOLOR ; v stdcall draw_button, 405,172,23,20,86,C_KEYCOLOR,keyText+207,1,TEXTCOLOR ; v
stdcall draw_button, 430,172,23,20,87,C_KEYCOLOR,keyText+208,1,TEXTCOLOR ; < stdcall draw_button, 430,172,23,20,87,C_KEYCOLOR,keyText+208,1,TEXTCOLOR ; <
stdcall draw_button, 455,172,23,20,88,C_KEYCOLOR,keyText+209,2,TEXTCOLOR ; > stdcall draw_button, 455,172,23,20,88,C_KEYCOLOR,keyText+209,2,TEXTCOLOR ; >
stdcall draw_button, 488,80 ,23,20,89,L_KEYCOLOR,keyText+211,3,TEXTCOLOR ; nlk stdcall draw_button, 488,80 ,23,20,89,L_KEYCOLOR,keyText+211,3,TEXTCOLOR ; nlk
stdcall draw_button, 513,80 ,23,20,90,N_KEYCOLOR,keyText+214,1,TEXTCOLOR ; / stdcall draw_button, 513,80 ,23,20,90,N_KEYCOLOR,keyText+214,1,TEXTCOLOR ; /
stdcall draw_button, 538,80 ,23,20,91,N_KEYCOLOR,keyText+215,1,TEXTCOLOR ; * stdcall draw_button, 538,80 ,23,20,91,N_KEYCOLOR,keyText+215,1,TEXTCOLOR ; *
stdcall draw_button, 563,80 ,23,20,92,N_KEYCOLOR,keyText+216,1,TEXTCOLOR ; - stdcall draw_button, 563,80 ,23,20,92,N_KEYCOLOR,keyText+216,1,TEXTCOLOR ; -
stdcall draw_button, 488,103 ,23,20,93,N_KEYCOLOR,keyText+217,1,TEXTCOLOR ; 7 stdcall draw_button, 488,103 ,23,20,93,N_KEYCOLOR,keyText+217,1,TEXTCOLOR ; 7
stdcall draw_button, 513,103 ,23,20,94,N_KEYCOLOR,keyText+218,1,TEXTCOLOR ; 8 stdcall draw_button, 513,103 ,23,20,94,N_KEYCOLOR,keyText+218,1,TEXTCOLOR ; 8
stdcall draw_button, 538,103 ,23,20,95,N_KEYCOLOR,keyText+219,1,TEXTCOLOR ; 9 stdcall draw_button, 538,103 ,23,20,95,N_KEYCOLOR,keyText+219,1,TEXTCOLOR ; 9
stdcall draw_button, 488,126,23,20,96,N_KEYCOLOR,keyText+220,1,TEXTCOLOR ; 4 stdcall draw_button, 488,126,23,20,96,N_KEYCOLOR,keyText+220,1,TEXTCOLOR ; 4
stdcall draw_button, 513,126,23,20,97,N_KEYCOLOR,keyText+221,1,TEXTCOLOR ; 5 stdcall draw_button, 513,126,23,20,97,N_KEYCOLOR,keyText+221,1,TEXTCOLOR ; 5
stdcall draw_button, 538,126,23,20,98,N_KEYCOLOR,keyText+222,1,TEXTCOLOR ; 6 stdcall draw_button, 538,126,23,20,98,N_KEYCOLOR,keyText+222,1,TEXTCOLOR ; 6
stdcall draw_button, 488,149,23,20,99,N_KEYCOLOR,keyText+223,1,TEXTCOLOR ; 1 stdcall draw_button, 488,149,23,20,99,N_KEYCOLOR,keyText+223,1,TEXTCOLOR ; 1
stdcall draw_button, 513,149,23,20,100,N_KEYCOLOR,keyText+224,1,TEXTCOLOR ; 2 stdcall draw_button, 513,149,23,20,100,N_KEYCOLOR,keyText+224,1,TEXTCOLOR ; 2
stdcall draw_button, 538,149,23,20,101,N_KEYCOLOR,keyText+225,1,TEXTCOLOR ; 3 stdcall draw_button, 538,149,23,20,101,N_KEYCOLOR,keyText+225,1,TEXTCOLOR ; 3
stdcall draw_button, 488,172,48,20,102,N_KEYCOLOR,keyText+226,1,TEXTCOLOR ; 0 stdcall draw_button, 488,172,48,20,102,N_KEYCOLOR,keyText+226,1,TEXTCOLOR ; 0
stdcall draw_button, 538,172,23,20,103,N_KEYCOLOR,keyText+227,1,TEXTCOLOR ; . stdcall draw_button, 538,172,23,20,103,N_KEYCOLOR,keyText+227,1,TEXTCOLOR ; .
stdcall draw_button, 563,103 ,23,43,104,N_KEYCOLOR,keyText+228,1,TEXTCOLOR ; + stdcall draw_button, 563,103 ,23,43,104,N_KEYCOLOR,keyText+228,1,TEXTCOLOR ; +
stdcall draw_button, 563,149,23,43,105,N_KEYCOLOR,keyText+229,3,TEXTCOLOR ; Ent stdcall draw_button, 563,149,23,43,105,N_KEYCOLOR,keyText+229,3,TEXTCOLOR ; Ent
.draw_switch_button: .draw_switch_button:
mov eax, 6 mov eax, 6
mul byte [keyboard_mode] mul byte [keyboard_mode]
add eax, SwitchText add eax, SwitchText
stdcall draw_button, 513,28,46,20,106,0x00700000,eax,6,TEXTCOLOR ; Scan/ASCII switch stdcall draw_button, 513,28,46,20,106,0x00700000,eax,6,TEXTCOLOR ; Scan/ASCII switch
xor al, al xor al, al
xchg al, [red_type] xchg al, [red_type]
test al, 2 test al, 2
jnz .skip_end_draw_window ; if we draw switch button without redraw window then end_draw_window not need jnz .skip_end_draw_window ; if we draw switch button without redraw window then end_draw_window not need
@@: @@:
.draw_indicators_area: .draw_indicators_area:
@ -183,124 +184,125 @@ draw_window:
ret ret
get_zkey_window_slot_number: get_zkey_window_slot_number:
mov eax, 18 mov eax, 18
mov ebx, 7 mov ebx, 7
int 0x40 int 0x40
mov [zkey_window], eax mov [zkey_window], eax
set_event_mask: set_event_mask:
mov eax, 40 mov eax, 40
mov ebx, 39 mov ebx, EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE ; 39 ; 100111b
int 0x40 int 0x40
still: still:
call get_receiver_window_slot_number call get_receiver_window_slot_number
call get_receiver_window_keyboard_mode ; return in ecx keyboard_mode for set_keyboard_mode call get_receiver_window_keyboard_mode ; return in ecx keyboard_mode for set_keyboard_mode
call set_keyboard_mode call set_keyboard_mode
; delete_switch_button ; delete_switch_button
mov eax, 8 mov eax, 8
mov edx, 0x80700000 mov edx, BT_DEL + 0x00700000
int 0x40 int 0x40
mov byte [red_type], 2
call draw_window.draw_switch_button mov byte [red_type], 2
call draw_window.draw_switch_button
mov eax, 10 ; Wait for an event in the queue. mov eax, 10 ; Wait for an event in the queue.
int 0x40 int 0x40
cmp al,1 ; redraw request ? cmp al, EV_REDRAW ; redraw request ?
jz red jz red
cmp al,2 ; key in buffer ? cmp al, EV_KEY ; key in buffer ?
jz key jz key
cmp al,3 ; button in buffer ? cmp al, EV_BUTTON ; button in buffer ?
jz button jz button
jmp still jmp still
red: red:
call draw_window call draw_window
jmp still jmp still
key: key:
mov eax, 2 mov eax, 2
int 0x40 int 0x40
; push ax ; push ax
call get_control_keys_state call get_control_keys_state
cmp [locks], ax cmp [locks], ax
je @f je @f
.reload: .reload:
call reload_ascii_keymap call reload_ascii_keymap
mov byte [red_type], 1 mov byte [red_type], 1
call draw_window call draw_window
@@: @@:
; pop dx ; pop dx
; jmp button.select_key_code ; jmp button.select_key_code
jmp still jmp still
button: button:
mov eax, 17 ; Get pressed button code mov eax, 17 ; Get pressed button code
int 0x40 int 0x40
cmp ah, 1 ; Test x button cmp ah, 1 ; Test x button
je close_app je close_app
cmp ah, 106 ; Test Scan/ASCII switch button cmp ah, 106 ; Test Scan/ASCII switch button
jne .keyboard_keys jne .keyboard_keys
mov cl, 1 mov cl, 1
sub cl, byte [keyboard_mode] sub cl, byte [keyboard_mode]
call set_keyboard_mode call set_keyboard_mode
mov byte [red_type], 2 mov byte [red_type], 2
jmp red jmp red
.keyboard_keys: .keyboard_keys:
cmp ah, 2 ; Test if pressed buttons cmp ah, 2 ; Test if pressed buttons
jb still ; is a ZKEY keyboard key... jb still ; is a ZKEY keyboard key...
cmp ah, 106 cmp ah, 106
jnb still ; ...so, if not then still, jnb still ; ...so, if not then still,
mov [butt], ah ; if yes then save pressed button ID mov [butt], ah ; if yes then save pressed button ID
.test_slot: .test_slot:
mov eax, [zkey_window] ; Test is receiver ZKEY window mov eax, [zkey_window] ; Test is receiver ZKEY window
mov ecx, [receiver_window] mov ecx, [receiver_window]
cmp eax, ecx cmp eax, ecx
je still ; if yes still. je still ; if yes still.
.activate_receiver_window: .activate_receiver_window:
mov eax, 18 mov eax, 18
mov ebx, 3 mov ebx, 3
int 0x40 int 0x40
call reload_ascii_keymap call reload_ascii_keymap
.read_key_scancode: .read_key_scancode:
xor edx, edx xor edx, edx
movzx si, byte [butt] ; Read scan code of the key from the table. movzx si, byte [butt] ; Read scan code of the key from the table.
sub si, 2 sub si, 2
mov dl, [keyCodes+si] ; Set dl = scancode of the key corresponding to the pressed button. mov dl, [keyCodes+si] ; Set dl = scancode of the key corresponding to the pressed button.
cmp dl, 0xA0 cmp dl, 0xA0
jb .select_key_code ; If not extended key then select ascii or scan to send and then send it to the receiver. jb .select_key_code ; If not extended key then select ascii or scan to send and then send it to the receiver.
cmp dl, 0xA6 ; Test if it's extended2 key cmp dl, 0xA6 ; Test if it's extended2 key
jne .read_ext_key ; if not go to prepare to send simply extended key. jne .read_ext_key ; if not go to prepare to send simply extended key.
mov dl, 0xE1 ; Send extended2 scancode... mov dl, 0xE1 ; Send extended2 scancode...
call send_key call send_key
mov dl, 0x1D ; ...and extended scancode, mov dl, 0x1D ; ...and extended scancode,
call send_key ; call send_key ;
mov dl, [keyCodes.ext2] ; (There is only one ext2 key - 'Break') mov dl, [keyCodes.ext2] ; (There is only one ext2 key - 'Break')
jmp .send_key_code ; so... send it's normal scan code. jmp .send_key_code ; so... send it's normal scan code.
.read_ext_key: .read_ext_key:
sub dl, 0xA0 ; Read extended key scan code from the table. sub dl, 0xA0 ; Read extended key scan code from the table.
movzx si, dl movzx si, dl
mov dl, [keyCodes.ext+si] mov dl, [keyCodes.ext+si]
.send_ext: .send_ext:
push dx ; Send extended scancode to the receiver's window. push dx ; Send extended scancode to the receiver's window.
mov dl, 0xE0 mov dl, 0xE0
call send_key call send_key
pop dx pop dx
; jmp .send_key_code ; jmp .send_key_code
.select_key_code: ; Select what to send ASCII or scan. .select_key_code: ; Select what to send ASCII or scan.
cmp [keyboard_mode], 0 ; Test if ZKEY must send ASCII. cmp [keyboard_mode], 0 ; Test if ZKEY must send ASCII.
jne .send_key_code jne .send_key_code
; mov esi, ext0 ; Set esi to the beginning of the ext0 table. ; mov esi, ext0 ; Set esi to the beginning of the ext0 table.
and edx, 0x7F and edx, 0x7F
; @@: ; @@:
; cmp dl, byte [esi] ; cmp dl, byte [esi]
; je .send_key_code ; je .send_key_code
@ -308,24 +310,24 @@ button:
; cmp esi, ext0end ; cmp esi, ext0end
; jng @b ; jng @b
.read_ascii: .read_ascii:
mov dl, byte [ascii_keymap+edx] ; Read ASCII from the keymap table. mov dl, byte [ascii_keymap+edx] ; Read ASCII from the keymap table.
.send_key_code: .send_key_code:
call send_key ; Finally send the key to the receiver's window. call send_key ; Finally send the key to the receiver's window.
.wait: .wait:
mov eax, 5 mov eax, 5
mov ebx, 1 ; Wait 0.01 second. mov ebx, 1 ; Wait 0.01 second.
int 0x40 int 0x40
.activate_zkey_window: .activate_zkey_window:
mov eax, 18 mov eax, 18
mov ebx, 3 mov ebx, 3
mov ecx, [zkey_window] mov ecx, [zkey_window]
int 0x40 int 0x40
jmp still jmp still
close_app: close_app:
mov eax,-1 ; close this program mov eax,-1 ; close this program
int 0x40 int 0x40
@ -334,16 +336,16 @@ close_app:
;********************************** ;**********************************
set_keyboard_mode: set_keyboard_mode:
mov eax, 66 mov eax, 66
mov ebx, 1 ; Set keyboard mode mov ebx, 1 ; Set keyboard mode
int 0x40 int 0x40
mov [keyboard_mode], cl mov [keyboard_mode], cl
ret ret
get_control_keys_state: ; This routine works only in Scan keyboard mode. get_control_keys_state: ; This routine works only in Scan keyboard mode.
mov eax, 66 mov eax, 66
mov ebx, 3 mov ebx, 3
int 0x40 int 0x40
ret ret
@ -352,65 +354,65 @@ ret
;********************************** ;**********************************
get_keyboard_map: get_keyboard_map:
mov eax, 26 mov eax, 26
mov ebx, 2 mov ebx, 2
mov edx, ascii_keymap mov edx, ascii_keymap
int 0x40 int 0x40
ret ret
reload_ascii_keymap: reload_ascii_keymap:
call get_control_keys_state call get_control_keys_state
mov ecx, 1 mov ecx, 1
test ax, 3 ; Shift pressed ? test ax, 3 ; Shift pressed ?
jnz @f jnz @f
test ax, 0x40 ; Caps Lock on ? test ax, 0x40 ; Caps Lock on ?
jz .load_ascii_keymap jz .load_ascii_keymap
@@: @@:
mov ecx, 2 mov ecx, 2
.load_ascii_keymap: .load_ascii_keymap:
call get_keyboard_map call get_keyboard_map
ret ret
get_receiver_window_slot_number: get_receiver_window_slot_number:
mov eax, 18 mov eax, 18
mov ebx, 7 mov ebx, 7
int 0x40 int 0x40
mov ebx, [zkey_window] mov ebx, [zkey_window]
cmp eax, ebx cmp eax, ebx
je @f je @f
mov [receiver_window], eax mov [receiver_window], eax
@@: @@:
ret ret
get_receiver_window_keyboard_mode: get_receiver_window_keyboard_mode:
mov eax, 9 mov eax, 9
mov ebx, PROCINFO_BUFF mov ebx, PROCINFO_BUFF
mov ecx, [receiver_window] mov ecx, [receiver_window]
int 0x40 int 0x40
movzx ecx, byte [ebx + 75] movzx ecx, byte [ebx + process_information.keyboard_mode]
ret ret
;************************************ ;************************************
;* input: edx = code of the key * ;* input: edx = code of the key *
;************************************ ;************************************
send_key: send_key:
mov eax, 72 mov eax, 72
mov ebx, 1 mov ebx, 1
mov ecx, 2 mov ecx, 2
int 0x40 int 0x40
ret ret
lights_on: lights_on:
bar 491,51,95,15,0 ; indicators area bar 491,51,95,15,0 ; indicators area
rectangle 490,50,96,16,TEXTCOLOR rectangle 490,50,96,16,TEXTCOLOR
call get_control_keys_state call get_control_keys_state
mov [locks], ax mov [locks], ax
test ax, 0x40 test ax, 0x40
jz @f jz @f
;stdcall bar, 532, 53, 10, 11, 0x0000FF00 ;stdcall bar, 532, 53, 10, 11, 0x0000FF00
@ -437,29 +439,29 @@ SwitchText db ' ASCII SCAN '
;Button names ;Button names
keyText db 'EscF1F2F3F4F5F6F7F8F9F10F11F12' keyText db 'EscF1F2F3F4F5F6F7F8F9F10F11F12'
db '~ð1!2@3#4$5%6^7&8*9(0)-_=+\|bksp' db '~ð1!2@3#4$5%6^7&8*9(0)-_=+\|bksp'
db 'TabQ‰WE“RŠT…Y<E280A6>UƒI˜O™P‡{[•}]šEnter' db 'TabQ‰WE“RŠT…Y<E280A6>UƒI˜O™P‡{[•}]šEnter'
db 'lockA”SDF€G<E282AC>H<EFBFBD>JŽKL„;:†''"<22>' db 'lockA”SDF€G<E282AC>H<EFBFBD>JŽKL„;:†''"<22>'
db 'ShiftZŸX—CVŒBˆNMœ,<<3C>.>ž/?Shift' db 'ShiftZŸX—CVŒBˆNMœ,<<3C>.>ž/?Shift'
db 'CtrlWinAlt AltWin[=]Ctrl' db 'CtrlWinAlt AltWin[=]Ctrl'
db 'pscslkbrkInsHmPupDelEndPdn^<v >' db 'pscslkbrkInsHmPupDelEndPdn^<v >'
db 'nlk/*-7894561230.+Ent' db 'nlk/*-7894561230.+Ent'
;Key scan codes ;Key scan codes
keyCodes: keyCodes:
db 0x01, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, 0x57, 0x58 db 0x01, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, 0x57, 0x58
db 0x29, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x2B, 0x0E db 0x29, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x2B, 0x0E
db 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C db 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C
db 0x3A, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28 db 0x3A, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28
db 0x2A, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36 db 0x2A, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36
db 0x1D, 0xA0, 0x38, 0x39, 0xA1, 0xA2, 0xA3, 0xA4 db 0x1D, 0xA0, 0x38, 0x39, 0xA1, 0xA2, 0xA3, 0xA4
db 0xA5, 0x46, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0 db 0xA5, 0x46, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0
db 0x45, 0xB1, 0x37, 0x4A, 0x47, 0x48, 0x49, 0x4B, 0x4C, 0x4D, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x4E, 0xB2 db 0x45, 0xB1, 0x37, 0x4A, 0x47, 0x48, 0x49, 0x4B, 0x4C, 0x4D, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x4E, 0xB2
.ext: .ext:
db 0x5B, 0x38, 0x5C, 0x5D, 0x1D db 0x5B, 0x38, 0x5C, 0x5D, 0x1D
db 0x37, 0x00, 0x52, 0x47, 0x49, 0x53, 0x4F, 0x51, 0x48, 0x4B, 0x50, 0x4D db 0x37, 0x00, 0x52, 0x47, 0x49, 0x53, 0x4F, 0x51, 0x48, 0x4B, 0x50, 0x4D
db 0x35, 0x1C db 0x35, 0x1C
.ext2 db 0x45 ; Just Break :) .ext2 db 0x45 ; Just Break :)
;ext0: ;ext0:
; db 0x1D, 0x29, 0x2A, 0x36, 0x37, 0x38, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40 ; db 0x1D, 0x29, 0x2A, 0x36, 0x37, 0x38, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40
@ -467,14 +469,21 @@ keyCodes:
; db 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x57, 0x58 ; db 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x57, 0x58
;ext0end: ;ext0end:
receiver_window dd 0 ; Slot number of the receiver receiver_window dd 0 ; Slot number of the receiver
zkey_window dd 0 ; Slot number of ZKEY zkey_window dd 0 ; Slot number of ZKEY
butt db 0 ; Pressed button ID butt db 0 ; Pressed button ID
locks dw 0 ; NumLock, CapsLock, ScrollLock lights mask locks dw 0 ; NumLock, CapsLock, ScrollLock lights mask
keyboard_mode db 0 ; Scan or ASCII keys to send ? 0 - ASCII , 1 - Scan keyboard_mode db 0 ; Scan or ASCII keys to send ? 0 - ASCII , 1 - Scan
red_type db 0 ; Type of window redraw. 0 - default , 1 - on ASCII_keymap change , 2 - Switch button pressed. red_type db 0 ; Type of window redraw. 0 - default , 1 - on ASCII_keymap change , 2 - Switch button pressed.
I_END: ; End of application code and data marker I_END: ; End of application code and data marker
ascii_keymap: rb ASCII_KEYMAP_SIZE
PROCINFO_BUFF process_information
rb 4096
STACKTOP:
MEM:
ascii_keymap: