upgrade a programme

git-svn-id: svn://kolibrios.org@308 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Alexey Teplov ( 2007-02-01 11:31:34 +00:00
parent a17b90b7b3
commit 7038d7bc41
3 changed files with 152 additions and 156 deletions

View File

@ -1,7 +1,14 @@
;--- ¤à㣨¥ ¬ ªà®áë --- ;--- ¤à㣨¥ ¬ ªà®áë ---
include 'editbox.inc' include 'editbox.inc'
include 'txtbut.inc' include 'txtbut.inc'
include 'lang.inc' ;include 'gp.inc'
;include 'label.inc'
;include 'checkbox.inc'
;include 'file_sys.inc'
;include 'textwork.inc'
;include 'ini.inc'
lang fix ru;en
;--- § £®«®¢®ª --- ;--- § £®«®¢®ª ---
macro meos_header par_buf,cur_dir_buf macro meos_header par_buf,cur_dir_buf
@ -121,7 +128,7 @@ macro get_grab_area
int 0x40 int 0x40
} }
macro get_scin_height macro get_skin_height
{ {
mov eax,48 mov eax,48
mov ebx,4 mov ebx,4

View File

@ -1,6 +1,9 @@
window_y=88 ; 01.02.07 - ®¡­®¢«ñ­ editbox
; 31.01.07 - ¨á¯à ¢«¥­  ­¥ª®àà¥ªâ­ ï ®âà¨á®¢ª  ¯à¨ ¡®«ì讬 §­ ç¥­¨¨ ¢ëá®âë ᪨­ 
; ¢ëà ¢­¨¢ ­¨¥ á­¨§ã ®â­®á¨â¥«ì­® à ¡®ç¥© ®¡« á⨠íªà ­ 
window_y=67
;window_x=320 ;window_x=320
window_x=450 window_x=640
include 'macros.inc' include 'macros.inc'
meos_header par meos_header par
use_edit_box use_edit_box
@ -100,10 +103,10 @@ copy_par:
mov ebx,file_info mov ebx,file_info
int 0x40 int 0x40
;cmp eax,0 cmp eax,0
;jg error jl error
bt eax,31 mov [status],run_ok
je error call draw_status
jmp still jmp still
close: close:
app_close app_close
@ -115,14 +118,10 @@ macro cmp_err code,text_ptr
cmp al,code cmp al,code
jne @f jne @f
mov [status],text_ptr mov [status],text_ptr
;jmp .draw_status
@@: @@:
} }
neg eax neg eax
;test al,al
;jz close
cmp_err 3,bad_file_sys cmp_err 3,bad_file_sys
cmp_err 5,file_not_find cmp_err 5,file_not_find
@ -139,40 +138,51 @@ macro cmp_err code,text_ptr
cmp_err 32,many_processes cmp_err 32,many_processes
.draw_status:
call draw_status call draw_status
jmp still jmp still
draw_window: draw_window:
push 48
pop eax
mov ebx,5
int 0x40
mov si,bx
start_draw_window start_draw_window
get_skin_height
mov dx,ax
get_screen_size get_screen_size
mov cx,ax xor ecx,ecx
sub cx,window_y+20 sub cx,window_y+2
sub cx,dx
add cx,si
shl ecx,16 shl ecx,16
mov cx,window_y mov cx,dx
add cx,window_y
shr eax,16 shr eax,16
mov bx,ax mov bx,ax
sub bx,window_x sub bx,window_x
shl ebx,15 shl ebx,15
mov bx,window_x mov bx,window_x
mov edx,[sc.work] mov edx,[sc.work]
or edx,0xb3000000 or edx,0x33000000
xor eax,eax xor eax,eax
mov esi,[sc.grab_text] xor esi,esi
mov edi,hed mov edi,grab_text
int 0x40 int 0x40
get_procinfo app get_procinfo app
mov ax,[app.width] mov eax,[app.width]
sub ax,20 sub eax,20
mov [input_fn.width],eax mov [input_fn.width],eax
mov [run_but.width],ax mov [run_but.width],ax
mov ebx,10000 xor bx,bx
shl ebx,16
mov bx,ax mov bx,ax
add bx,10 add bx,10
mov cx,47 mov cx,45
push cx push cx
shl ecx,16 shl ecx,16
pop cx pop cx
@ -189,8 +199,9 @@ draw_window:
ret ret
draw_status: draw_status:
mov ebx,5*65536+(window_x-5-10) mov ebx,[app.width]
mov ecx,(window_y-39)*65536+12 sub bx,10
mov ecx,(50)*65536+12
mov edx,[sc.work] mov edx,[sc.work]
mov eax,13 mov eax,13
int 0x40 int 0x40
@ -203,22 +214,17 @@ draw_status_text:
inc esi inc esi
jmp @b jmp @b
@@: @@:
mov eax,4 mov ebx,5*65536+(50)
mov ebx,6*65536+(window_y-37)
mov ecx,[sc.work_text] mov ecx,[sc.work_text]
mov eax,4
int 0x40 int 0x40
ret ret
run_but txt_button 0,5,15,30,2,0,0,run_but_text, run_but txt_button 0,5,15,25,2,0,0,run_but_text,
if lang eq ru
run_but_text db '‡€<E280A1>ˆœ',0 run_but_text db '‡€<E280A1>ˆœ',0
else input_fn edit_box 0,5,5,0xffffff,0,0xaaaaaa,0,511,fn,ed_focus+\
run_but_text db 'RUN',0
end if
input_fn edit_box 0,5,10,0xffffff,0,0xaaaaaa,0,511,fn,ed_focus+\
ed_always_focus ed_always_focus
if lang eq ru
hello db '‚¢¥¤¨â¥ ¯®«­ë© ¯ãâì ª ä ©«ã ¨ ­ ¦¬¨â¥ Enter',0 hello db '‚¢¥¤¨â¥ ¯®«­ë© ¯ãâì ª ä ©«ã ¨ ­ ¦¬¨â¥ Enter',0
bad_file_sys db '<27>¥¨§¢¥áâ­ ï ä ©«®¢ ï á¨á⥬ ',0 ; 3 bad_file_sys db '<27>¥¨§¢¥áâ­ ï ä ©«®¢ ï á¨á⥬ ',0 ; 3
file_not_find db '” ©« ­¥ ­ ©¤¥­',0 ; 5 file_not_find db '” ©« ­¥ ­ ©¤¥­',0 ; 5
@ -228,23 +234,9 @@ device_error db '
out_of_memory db '<27>¥¤®áâ â®ç­® ¯ ¬ïâ¨',0 ; 30 out_of_memory db '<27>¥¤®áâ â®ç­® ¯ ¬ïâ¨',0 ; 30
file_not_executable db '” ©« ­¥ ï¥âáï ¨á¯®«­ï¥¬ë¬',0 ; 31 file_not_executable db '” ©« ­¥ ï¥âáï ¨á¯®«­ï¥¬ë¬',0 ; 31
many_processes db '‘«¨èª®¬ ¬­®£® ¯à®æ¥áᮢ',0 ; 32 many_processes db '‘«¨èª®¬ ¬­®£® ¯à®æ¥áᮢ',0 ; 32
else run_ok db '<27>ணࠬ¬  ãᯥ譮 § ¯ã饭 ',0
hello db 'Enter full path to file and press <Enter>',0 grab_text db '‡€<E280A1>Š <20><>Žƒ<C5BD>€ŒŒ',0
bad_file_sys db 'Unknown file system',0 ; 3
file_not_find db 'File not found',0 ; 5
bad_fat_table db 'FAT table corrupted',0 ; 9
acces_denyied db 'Access denied',0 ; 10
device_error db 'Device error',0 ; 11
out_of_memory db 'Out of memory',0 ; 30
file_not_executable db 'File is not executable',0 ; 31
many_processes db 'Too many processes',0 ; 32
end if
if lang eq ru
hed db 'RUN ®â ¯¥à¢®£® ”¥¢à «ï 2007 £®¤ ',0
else
hed db 'RUN of the first of FEBRUARY 2007 year',0
end if
status dd hello status dd hello
file_info: file_info:

View File

@ -1,13 +1,10 @@
<Lrz> 01.02.2007 „®¡ ¢¨« ¬®¤¥à­¨§¨à®¢ ­­ë© ª®¬¯®­¥­â edit_box,
ã«ãç訫 ¨ ¯¥à¥¯¨á « ç áâì ª®¤ .
RUN - § ¯ã᪠«ª  ¯à®£à ¬¬ ¢ Š®«¨¡à¨Ž‘ ç¥à¥§ 70-î äã­ªæ¨î. RUN - § ¯ã᪠«ª  ¯à®£à ¬¬ ¢ Š®«¨¡à¨Ž‘ ç¥à¥§ 70-î äã­ªæ¨î.
‡ ¯ã᪠¯à®£à ¬¬ ‡ ¯ã᪠¯à®£à ¬¬
‚¢¥¤¨â¥ ¯®«­ë© ¯ãâì ª ¨á¯®«­ï¥¬®¬ã ä ©«ã ¨ ­ ¦¬¨â¥ ª­®¯ªã "‡€<E280A1>ˆœ" ¨«¨ ‚¢¥¤¨â¥ ¯®«­ë© ¯ãâì ª ¨á¯®«­ï¥¬®¬ã ä ©«ã ¨ ­ ¦¬¨â¥ ª­®¯ªã "‡€<E280A1>ˆœ" ¨«¨
ª« ¢¨èã Enter. ª« ¢¨èã Enter.
‡ ¯ã᪠¯à®£à ¬¬ á ¯ à ¬¥âà ¬¨ ‡ ¯ã᪠¯à®£à ¬¬ á ¯ à ¬¥âà ¬¨
<20>®áâ ¢ì⥠¯à®¡¥« ¯®á«¥ ¯ã⨠ª ä ©«ã ¨ ¢¢®¤¨â¥ ¯ à ¬¥âàë. …᫨ ¢ ¯ã⨠ª ä ©«ã <20>®á⠢⥠¯à®¡¥« ¯®á«¥ ¯ã⨠ª ä ©«ã ¨ ¢¢®¤¨â¥ ¯ à ¬¥âàë. …᫨ ¢ ¯ã⨠ª ä ©«ã
¥áâì ¯à®¡¥«ë, ¥£® ­¥®¡å®¤¨¬® ¢ë¤¥«¨âì ª ¢ë窠¬¨ (⮣¤  ¯à®¡¥«®¬ à §¤¥«ïâì ¥áâì ¯à®¡¥«ë, ¥£® ­¥®¡å®¤¨¬® ¢ë¤¥«¨âì ª ¢ë窠¬¨ (⮣¤  ¯à®¡¥«®¬ à §¤¥«ïâì
­¥®¡ï§ â¥«ì­®). ­¥®¡ï§ â¥«ì­®).
<20>ਬ¥àë <20>ਬ¥àë