From 94e7e92eb70b10e631a2267b01b5bfffb5c3a3a1 Mon Sep 17 00:00:00 2001 From: "Alexey Teplov (" Date: Thu, 24 Jul 2008 06:26:36 +0000 Subject: [PATCH] add new version editbox in programs git-svn-id: svn://kolibrios.org@833 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/config.inc | 2 +- programs/media/scrshoot/macros.inc | 298 +++++------ programs/media/scrshoot/scrshoot.asm | 681 ++++++++++++------------ programs/system/rdsave/trunk/rdsave.asm | 15 +- programs/system/run/trunk/run.asm | 3 +- 5 files changed, 500 insertions(+), 499 deletions(-) diff --git a/programs/config.inc b/programs/config.inc index dc70bf9760..927ba73927 100644 --- a/programs/config.inc +++ b/programs/config.inc @@ -1 +1 @@ -__CPU_type fix p5 +__CPU_type fix p6 diff --git a/programs/media/scrshoot/macros.inc b/programs/media/scrshoot/macros.inc index 707f626185..5ab3c7d465 100644 --- a/programs/media/scrshoot/macros.inc +++ b/programs/media/scrshoot/macros.inc @@ -3,28 +3,28 @@ include '..\..\develop\examples\editbox\trunk\editbox.inc' include 'txtbut.inc' ;include 'gp.inc' include 'label.inc' -;include '..\..\develop\examples\checkbox\trunk\checkbox.inc' +;include '..\..\develop\examples\checkbox\trunk\check.inc' include 'check.inc' include 'file_sys.inc' include 'textwork.inc' ;include 'ini.inc' -__CPU_type equ p5 -SYSENTER_VAR equ 0 +__CPU_type equ p5 +SYSENTER_VAR equ 0 macro movr reg,val { if val < 65536 - push val - pop reg + push val + pop reg else - mov reg,val + mov reg,val end if } macro mcall a,b,c,d,e,f { ; mike.dld, updated by Ghost for Fast System Calls - local ..ret_point + local ..ret_point __mov eax,a __mov ebx,b __mov ecx,c @@ -33,31 +33,31 @@ macro mcall a,b,c,d,e,f { ; mike.dld, updated by Ghost for Fast System Calls __mov edi,f if __CPU_type eq p5 - int 0x40 + int 0x40 else if __CPU_type eq p6 - push ebp - mov ebp, esp - push ..ret_point ; it may be 2 or 5 byte - sysenter + push ebp + mov ebp, esp + push ..ret_point ; it may be 2 or 5 byte + sysenter ..ret_point: - pop edx - pop ecx + pop edx + pop ecx else if __CPU_type eq k6 - push ecx - syscall - pop ecx + push ecx + syscall + pop ecx else - display 'ERROR : unknown CPU type' - int 0x40 + display 'ERROR : unknown CPU type' + int 0x40 end if end if end if } -macro __mov reg,a,b { ; mike.dld +macro __mov reg,a,b { ; mike.dld if (~a eq)&(~b eq) mpack reg,a,b else if (~a eq)&(b eq) @@ -69,24 +69,24 @@ macro __mov reg,a,b { ; mike.dld ;--- заголовок --- macro meos_header par_buf,cur_dir_buf { - use32 - org 0x0 + use32 + org 0x0 - db 'MENUET01' - dd 0x01 - dd __app_start - dd __app_end - dd __app_end - dd __app_end + db 'MENUET01' + dd 0x01 + dd __app_start + dd __app_end + dd __app_end + dd __app_end if eq <> - dd 0x0 + dd 0x0 else - dd par_buf + dd par_buf end if if eq <> - dd 0x0 + dd 0x0 else - dd cur_dir_buf + dd cur_dir_buf end if } @@ -100,9 +100,9 @@ __app_start: macro app_end stack_size { if eq <> - rb 1024 + rb 1024 else - rb stack_size + rb stack_size end if __app_end: } @@ -110,224 +110,224 @@ __app_end: ;--- завершить текущий поток --- macro app_close { - xor eax,eax - dec eax - int 0x40 + xor eax,eax + dec eax + int 0x40 } ;--- получить код нажатой клавиши --- macro get_key { - ;mov eax,2 - push 2 - pop eax - int 0x40 + ;mov eax,2 + push 2 + pop eax + int 0x40 } ;--- получить код нажатой кнопки --- macro get_pressed_button { - ;mov eax,17 - push 17 - pop eax - int 0x40 + ;mov eax,17 + push 17 + pop eax + int 0x40 } ;--- сообщить системе о начале перерисовки окна --- macro start_draw_window { - ;mov eax,12 - push 12 - pop eax - xor ebx,ebx - inc ebx - int 0x40 + ;mov eax,12 + push 12 + pop eax + xor ebx,ebx + inc ebx + int 0x40 } ;--- сообщить системе о завершении перерисовки окна --- macro stop_draw_window { - ;mov eax,12 - push 12 - pop eax - ;mov ebx,2 - push 2 - pop ebx - int 0x40 + ;mov eax,12 + push 12 + pop eax + ;mov ebx,2 + push 2 + pop ebx + int 0x40 } ;--- установить маску ожидаемых событий --- macro set_events_mask mask { - ;mov eax,40 - push 40 - pop eax - ;mov ebx,mask - push mask - pop ebx - int 0x40 + ;mov eax,40 + push 40 + pop eax + ;mov ebx,mask + push mask + pop ebx + int 0x40 } ;--- получить информацию о процессе --- macro get_procinfo proc_inf_buf,slot_num { - ;mov eax,9 - push 9 - pop eax - ;mov ebx,proc_inf_buf - push proc_inf_buf - pop ebx + ;mov eax,9 + push 9 + pop eax + ;mov ebx,proc_inf_buf + push proc_inf_buf + pop ebx if eq <> - xor ecx,ecx - dec ecx + xor ecx,ecx + dec ecx else - ;mov ecx,slot_num - push slot_num - pop ecx + ;mov ecx,slot_num + push slot_num + pop ecx end if - int 0x40 + int 0x40 } macro get_sys_colors col_buf { - ;mov eax,48 - push 48 - pop eax - ;mov ebx,3 - push 3 - pop ebx - ;mov ecx,col_buf - push col_buf - pop ecx - ;mov edx,40 - push 40 - pop edx - int 0x40 + ;mov eax,48 + push 48 + pop eax + ;mov ebx,3 + push 3 + pop ebx + ;mov ecx,col_buf + push col_buf + pop ecx + ;mov edx,40 + push 40 + pop edx + int 0x40 } macro get_grab_area { - movr eax,48 - movr ebx,7 - int 0x40 + movr eax,48 + movr ebx,7 + int 0x40 } macro get_skin_height { - movr eax,48 - movr ebx,4 - int 0x40 + movr eax,48 + movr ebx,4 + int 0x40 } macro min_window { - movr eax,18 - movr ebx,10 - int 0x40 + movr eax,18 + movr ebx,10 + int 0x40 } macro activ_window slot_n { - movr eax,18 - movr ebx,3 + movr eax,18 + movr ebx,3 if eq <> else - movr ecx,slot_n + movr ecx,slot_n end if - int 0x40 + int 0x40 } macro get_active_window { - movr eax,18 - movr ebx,7 - int 0x40 + movr eax,18 + movr ebx,7 + int 0x40 } macro delay time { - movr eax,5 + movr eax,5 if