forked from KolibriOS/kolibrios
move some apps to the programs/testing folder
git-svn-id: svn://kolibrios.org@7899 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
if tup.getconfig("NO_FASM") ~= "" then return end
|
||||
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > lang.inc", {"lang.inc"})
|
||||
tup.rule({"fspeed.asm", extra_inputs = {"lang.inc"}}, "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "fspeed")
|
@@ -1,6 +0,0 @@
|
||||
@erase lang.inc
|
||||
@echo lang fix en >lang.inc
|
||||
@fasm fspeed.asm fspeed
|
||||
@kpack fspeed
|
||||
@erase lang.inc
|
||||
@pause
|
@@ -1,6 +0,0 @@
|
||||
@erase lang.inc
|
||||
@echo lang fix ru >lang.inc
|
||||
@fasm fspeed.asm fspeed
|
||||
@kpack fspeed
|
||||
@erase lang.inc
|
||||
@pause
|
@@ -1,353 +0,0 @@
|
||||
;*****************************************************************************
|
||||
; File Speed - for Kolibri OS
|
||||
; Copyright (c) 2014, Marat Zakiyanov aka Mario79, aka Mario
|
||||
; All rights reserved.
|
||||
;
|
||||
; Redistribution and use in source and binary forms, with or without
|
||||
; modification, are permitted provided that the following conditions are met:
|
||||
; * Redistributions of source code must retain the above copyright
|
||||
; notice, this list of conditions and the following disclaimer.
|
||||
; * Redistributions in binary form must reproduce the above copyright
|
||||
; notice, this list of conditions and the following disclaimer in the
|
||||
; documentation and/or other materials provided with the distribution.
|
||||
; * Neither the name of the <organization> nor the
|
||||
; names of its contributors may be used to endorse or promote products
|
||||
; derived from this software without specific prior written permission.
|
||||
;
|
||||
; THIS SOFTWARE IS PROVIDED BY Marat Zakiyanov ''AS IS'' AND ANY
|
||||
; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
; DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
|
||||
; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
;*****************************************************************************
|
||||
;-----------------------------------------------------------------------------
|
||||
use32
|
||||
org 0x0
|
||||
db 'MENUET01'
|
||||
dd 0x01
|
||||
dd START
|
||||
dd IM_END
|
||||
dd I_END
|
||||
dd STACK_TOP
|
||||
dd 0x0
|
||||
dd cur_dir_path
|
||||
;-----------------------------------------------------------------------------
|
||||
include 'lang.inc'
|
||||
include '../../macros.inc'
|
||||
define __DEBUG__ 1
|
||||
define __DEBUG_LEVEL__ 1
|
||||
include '../../debug-fdo.inc'
|
||||
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
|
||||
include '../../develop/libraries/box_lib/load_lib.mac'
|
||||
@use_library
|
||||
;-----------------------------------------------------------------------------
|
||||
struct RESULT_SLOT
|
||||
text dd ?
|
||||
read_speed dd ?
|
||||
write_speed dd ?
|
||||
chunk_size dd ?
|
||||
ends
|
||||
;-----------------------------------------------------------------------------
|
||||
START:
|
||||
DEBUGF 1,'FSPEED: start of programm\n'
|
||||
;-----------------------------------------------------------------------------
|
||||
mcall 68,11
|
||||
test eax,eax
|
||||
jz exit
|
||||
;-----------------------------------------------------------------------------
|
||||
load_libraries l_libs_start,end_l_libs
|
||||
;if return code =-1 then exit, else nornary work
|
||||
inc eax
|
||||
test eax,eax
|
||||
jz exit
|
||||
;-----------------------------------------------------------------------------
|
||||
;OpenDialog initialisation
|
||||
push dword OpenDialog_data
|
||||
call [OpenDialog_Init]
|
||||
|
||||
push check1
|
||||
call [init_checkbox]
|
||||
|
||||
mcall 40,0x27
|
||||
;-----------------------------------------------------------------------------
|
||||
red:
|
||||
call draw_window
|
||||
;-----------------------------------------------------------------------------
|
||||
still:
|
||||
mcall 10
|
||||
cmp eax,1
|
||||
je red
|
||||
|
||||
cmp eax,2
|
||||
je key
|
||||
|
||||
cmp eax,3
|
||||
je button
|
||||
|
||||
push dword check1
|
||||
call [check_box_mouse]
|
||||
|
||||
jmp still
|
||||
;-----------------------------------------------------------------------------
|
||||
key:
|
||||
mcall 2
|
||||
jmp still
|
||||
;-----------------------------------------------------------------------------
|
||||
button:
|
||||
mcall 17
|
||||
|
||||
cmp ah,2
|
||||
je select_file
|
||||
|
||||
cmp ah,3
|
||||
je testing
|
||||
|
||||
cmp ah,1
|
||||
jne still
|
||||
;--------------------------------------
|
||||
exit:
|
||||
mcall -1
|
||||
;-----------------------------------------------------------------------------
|
||||
select_file:
|
||||
; invoke OpenDialog
|
||||
mov [OpenDialog_data.type],dword 0
|
||||
push dword OpenDialog_data
|
||||
call [OpenDialog_Start]
|
||||
cmp [OpenDialog_data.status],1
|
||||
jne still
|
||||
; prepare for PathShow
|
||||
push dword PathShow_data
|
||||
call [PathShow_prepare]
|
||||
|
||||
call draw_PathShow
|
||||
jmp still
|
||||
;-----------------------------------------------------------------------------
|
||||
draw_PathShow:
|
||||
mcall 13,<5,400-20>,<5,15>,0xffffff
|
||||
; draw for PathShow
|
||||
push dword PathShow_data
|
||||
call [PathShow_draw]
|
||||
ret
|
||||
;-----------------------------------------------------------------------------
|
||||
draw_window:
|
||||
mcall 48,3,app_colours,4*10 ; get current colors
|
||||
|
||||
mcall 12,1
|
||||
xor esi,esi
|
||||
xor ebp,ebp
|
||||
mov edx,[w_work] ; color of work area RRGGBB,8->color
|
||||
or edx,0x34000000
|
||||
mcall 0,<100,400>,<100,300>,,,title
|
||||
|
||||
call draw_PathShow
|
||||
mov eax,[w_work_text]
|
||||
or eax,0x80000000
|
||||
mov [check1.text_color],eax
|
||||
push dword check1
|
||||
call [check_box_draw]
|
||||
|
||||
mcall 8,<5,80>,<25,15>,2,[w_work_button]
|
||||
mcall ,<400-65,50>,,3
|
||||
mov ecx,[w_work_button_text]
|
||||
or ecx,0x80000000
|
||||
mcall 4,<5+10,25+4>,,s_text
|
||||
mcall ,<400-65+10,25+4>,,r_text
|
||||
mov ecx,[w_work_text]
|
||||
or ecx,0x80000000
|
||||
mcall ,<10,47>,,check_box_warning_text
|
||||
mcall ,<10,65>,,result_table_text
|
||||
|
||||
mov edx,ecx
|
||||
and edx,0xffffff
|
||||
mcall 38,<5,400-15>,<59,59>
|
||||
; draw result table
|
||||
mov ebx,10 shl 16+77
|
||||
mov ebp,result_table
|
||||
mov ecx,18
|
||||
;--------------------------------------
|
||||
@@:
|
||||
push ecx
|
||||
mov ecx,[w_work_text]
|
||||
or ecx,0x80000000
|
||||
mcall 4,,,[ebp+RESULT_SLOT.text]
|
||||
push ebx
|
||||
mov edx,ebx
|
||||
add edx,(11*6) shl 16
|
||||
mov ebx,0x800a0000
|
||||
mcall 47,,[ebp+RESULT_SLOT.read_speed],,[w_work_text]
|
||||
add edx,(16*6) shl 16
|
||||
mcall ,,[ebp+RESULT_SLOT.write_speed]
|
||||
pop ebx
|
||||
add ebx,6+5
|
||||
add ebp,sizeof.RESULT_SLOT
|
||||
pop ecx
|
||||
dec ecx
|
||||
jnz @b
|
||||
|
||||
mcall 12,2
|
||||
ret
|
||||
;-----------------------------------------------------------------------------;-----------------------------------------------------------------------------
|
||||
testing:
|
||||
mcall 70,fileinfo
|
||||
test eax,eax
|
||||
jz @f
|
||||
|
||||
DEBUGF 1,'FSPEED: file not found %s\n',fname
|
||||
jmp still
|
||||
;--------------------------------------
|
||||
@@:
|
||||
DEBUGF 1,'FSPEED: target file %s\n',fname
|
||||
mov ebp,result_table
|
||||
mov ecx,18
|
||||
;--------------------------------------
|
||||
@@:
|
||||
push ecx
|
||||
call read_chunk
|
||||
|
||||
pusha
|
||||
call draw_window
|
||||
popa
|
||||
|
||||
call write_chunk
|
||||
|
||||
pusha
|
||||
call draw_window
|
||||
popa
|
||||
|
||||
pop ecx
|
||||
add ebp,sizeof.RESULT_SLOT
|
||||
|
||||
dec ecx
|
||||
jnz @b
|
||||
|
||||
jmp still
|
||||
;-----------------------------------------------------------------------------
|
||||
read_chunk:
|
||||
mov eax,[file_info+32] ; file size
|
||||
cmp [ebp+RESULT_SLOT.chunk_size],eax
|
||||
jb @f
|
||||
|
||||
xor eax,eax ; small file size for current chunk size
|
||||
mov [ebp+RESULT_SLOT.read_speed],eax
|
||||
ret
|
||||
;--------------------------------------
|
||||
@@:
|
||||
mcall 68,12,[ebp+RESULT_SLOT.chunk_size]
|
||||
mov [fileread.return],eax
|
||||
xor eax,eax
|
||||
mov [fileread.offset],eax ; zero current offset
|
||||
mcall 26,9 ; get start time
|
||||
add eax,1600 ; 16 sec for iterations
|
||||
mov esi,eax
|
||||
mov ecx,1
|
||||
mov eax,[ebp+RESULT_SLOT.chunk_size]
|
||||
mov [fileread.size],eax
|
||||
;--------------------------------------
|
||||
.loop:
|
||||
mcall 70,fileread
|
||||
|
||||
mcall 26,9 ; check current time
|
||||
cmp esi,eax
|
||||
jbe .end
|
||||
; correct offset
|
||||
mov edx,[ebp+RESULT_SLOT.chunk_size]
|
||||
add [fileread.offset],edx ; current offset
|
||||
; check offset and file size
|
||||
mov edx,[file_info+32] ; file size
|
||||
sub edx,[ebp+RESULT_SLOT.chunk_size]
|
||||
cmp [fileread.offset],edx
|
||||
jbe @f
|
||||
|
||||
xor edx,edx
|
||||
mov [fileread.offset],edx ; zero current offset
|
||||
;--------------------------------------
|
||||
@@:
|
||||
inc ecx
|
||||
jmp .loop
|
||||
;--------------------------------------
|
||||
.end:
|
||||
mov eax,[ebp+RESULT_SLOT.chunk_size]
|
||||
xor edx,edx
|
||||
mul ecx
|
||||
shr eax,10+4 ;div 1024 ; div 16
|
||||
shl edx,18
|
||||
add eax,edx
|
||||
mov [ebp+RESULT_SLOT.read_speed],eax ; speed KB/s
|
||||
DEBUGF 1,'FSPEED: read chunk size: %s iterations: %d speed: %d KB/s\n',\
|
||||
[ebp+RESULT_SLOT.text],ecx,eax
|
||||
mcall 68,13,[fileread.return]
|
||||
ret
|
||||
;-----------------------------------------------------------------------------
|
||||
write_chunk:
|
||||
test [check1.flags],dword 10b
|
||||
jz .exit
|
||||
|
||||
mov eax,[file_info+32] ; file size
|
||||
cmp [ebp+RESULT_SLOT.chunk_size],eax
|
||||
jb @f
|
||||
;--------------------------------------
|
||||
.exit:
|
||||
xor eax,eax ; small file size for current chunk size
|
||||
mov [ebp+RESULT_SLOT.write_speed],eax
|
||||
ret
|
||||
;--------------------------------------
|
||||
@@:
|
||||
mcall 68,12,[ebp+RESULT_SLOT.chunk_size]
|
||||
mov [filewrite.data],eax
|
||||
xor eax,eax
|
||||
mov [filewrite.offset],eax ; zero current offset
|
||||
mcall 26,9 ; get start time
|
||||
add eax,1600 ; 16 sec for iterations
|
||||
mov esi,eax
|
||||
mov ecx,1
|
||||
mov eax,[ebp+RESULT_SLOT.chunk_size]
|
||||
mov [filewrite.size],eax
|
||||
;--------------------------------------
|
||||
.loop:
|
||||
mcall 70,filewrite
|
||||
|
||||
mcall 26,9 ; check current time
|
||||
cmp esi,eax
|
||||
jbe .end
|
||||
; correct offset
|
||||
mov edx,[ebp+RESULT_SLOT.chunk_size]
|
||||
add [filewrite.offset],edx ; current offset
|
||||
; check offset and file size
|
||||
mov edx,[file_info+32] ; file size
|
||||
sub edx,[ebp+RESULT_SLOT.chunk_size]
|
||||
cmp [filewrite.offset],edx
|
||||
jbe @f
|
||||
|
||||
xor edx,edx
|
||||
mov [filewrite.offset],edx ; zero current offset
|
||||
;--------------------------------------
|
||||
@@:
|
||||
inc ecx
|
||||
jmp .loop
|
||||
;--------------------------------------
|
||||
.end:
|
||||
mov eax,[ebp+RESULT_SLOT.chunk_size]
|
||||
xor edx,edx
|
||||
mul ecx
|
||||
shr eax,10+4 ;div 1024 ; div 16
|
||||
shl edx,18
|
||||
add eax,edx
|
||||
mov [ebp+RESULT_SLOT.write_speed],eax ; speed KB/s
|
||||
DEBUGF 1,'FSPEED: write chunk size: %s iterations: %d speed: %d KB/s\n',\
|
||||
[ebp+RESULT_SLOT.text],ecx,eax
|
||||
mcall 68,13,[filewrite.data]
|
||||
ret
|
||||
;-----------------------------------------------------------------------------
|
||||
include 'idata.inc'
|
||||
;-----------------------------------------------------------------------------
|
||||
IM_END:
|
||||
;-----------------------------------------------------------------------------
|
||||
include 'udata.inc'
|
||||
;-----------------------------------------------------------------------------
|
||||
I_END:
|
||||
;-----------------------------------------------------------------------------
|
@@ -1,313 +0,0 @@
|
||||
;-----------------------------------------------------------------------------
|
||||
s_text:
|
||||
if lang eq ru
|
||||
db '<27>롮<EFBFBD> 䠩<><E4A0A9>',0
|
||||
else
|
||||
db 'Select file',0
|
||||
end if
|
||||
;-----------------------------------------------------------------------------
|
||||
r_text:
|
||||
if lang eq ru
|
||||
db '<27><><EFBFBD><EFBFBD>',0
|
||||
else
|
||||
db 'Start',0
|
||||
end if
|
||||
;-----------------------------------------------------------------------------
|
||||
result_table_text:
|
||||
if lang eq ru
|
||||
db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>⥭<EFBFBD><E2A5AD> (<28><>/<2F>) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><>/<2F>)',0
|
||||
else
|
||||
db 'Size Read (KB/s) Write (KB/s)',0
|
||||
end if
|
||||
;-----------------------------------------------------------------------------
|
||||
title db 'File Speed v0.3',0
|
||||
;-----------------------------------------------------------------------------
|
||||
include_debug_strings
|
||||
;-----------------------------------------------------------------------------
|
||||
l_libs_start:
|
||||
|
||||
library01 l_libs system_dir_Boxlib+9, cur_dir_path, library_path, system_dir_Boxlib, \
|
||||
err_message_found_lib1, head_f_l, Box_lib_import, err_message_import1, head_f_i
|
||||
|
||||
library02 l_libs system_dir_ProcLib+9, cur_dir_path, library_path, system_dir_ProcLib, \
|
||||
err_message_found_lib2, head_f_l, ProcLib_import, err_message_import2, head_f_i
|
||||
|
||||
end_l_libs:
|
||||
;-----------------------------------------------------------------------------
|
||||
system_dir_Boxlib db '/sys/lib/box_lib.obj',0
|
||||
system_dir_ProcLib db '/sys/lib/proc_lib.obj',0
|
||||
|
||||
head_f_i:
|
||||
head_f_l db 'System error',0
|
||||
|
||||
err_message_found_lib1 db 'box_lib.obj - Not found!',0
|
||||
err_message_found_lib2 db 'proc_lib.obj - Not found!',0
|
||||
|
||||
err_message_import1 db 'box_lib.obj - Wrong import!',0
|
||||
err_message_import2 db 'proc_lib.obj - Wrong import!',0
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
align 4
|
||||
ProcLib_import:
|
||||
OpenDialog_Init dd aOpenDialog_Init
|
||||
OpenDialog_Start dd aOpenDialog_Start
|
||||
;OpenDialog_Version dd aOpenDialog_Version
|
||||
|
||||
;ColorDialog_Init dd aColorDialog_Init
|
||||
;ColorDialog_Start dd aColorDialog_Start
|
||||
;ColorDialog_Version dd aColorDialog_Version
|
||||
|
||||
dd 0
|
||||
dd 0
|
||||
|
||||
aOpenDialog_Init db 'OpenDialog_init',0
|
||||
aOpenDialog_Start db 'OpenDialog_start',0
|
||||
;aOpenDialog_Version db 'Version_OpenDialog',0
|
||||
|
||||
;aColorDialog_Init db 'ColorDialog_init',0
|
||||
;aColorDialog_Start db 'ColorDialog_start',0
|
||||
;aColorDialog_Version db 'Version_ColorDialog',0
|
||||
;-----------------------------------------------------------------------------
|
||||
align 4
|
||||
Box_lib_import:
|
||||
;init_lib dd a_init
|
||||
;version_lib dd a_version
|
||||
|
||||
|
||||
;edit_box_draw dd aEdit_box_draw
|
||||
;edit_box_key dd aEdit_box_key
|
||||
;edit_box_mouse dd aEdit_box_mouse
|
||||
;version_ed dd aVersion_ed
|
||||
|
||||
init_checkbox dd aInit_checkbox
|
||||
check_box_draw dd aCheck_box_draw
|
||||
check_box_mouse dd aCheck_box_mouse
|
||||
;version_ch dd aVersion_ch
|
||||
|
||||
;option_box_draw dd aOption_box_draw
|
||||
;option_box_mouse dd aOption_box_mouse
|
||||
;version_op dd aVersion_op
|
||||
|
||||
;scrollbar_ver_draw dd aScrollbar_ver_draw
|
||||
;scrollbar_ver_mouse dd aScrollbar_ver_mouse
|
||||
;scrollbar_hor_draw dd aScrollbar_hor_draw
|
||||
;scrollbar_hor_mouse dd aScrollbar_hor_mouse
|
||||
;version_scrollbar dd aVersion_scrollbar
|
||||
|
||||
;dinamic_button_draw dd aDbutton_draw
|
||||
;dinamic_button_mouse dd aDbutton_mouse
|
||||
;version_dbutton dd aVersion_dbutton
|
||||
|
||||
;menu_bar_draw dd aMenu_bar_draw
|
||||
;menu_bar_mouse dd aMenu_bar_mouse
|
||||
;menu_bar_activate dd aMenu_bar_activate
|
||||
;version_menu_bar dd aVersion_menu_bar
|
||||
|
||||
;FileBrowser_draw dd aFileBrowser_draw
|
||||
;FileBrowser_mouse dd aFileBrowser_mouse
|
||||
;FileBrowser_key dd aFileBrowser_key
|
||||
;Version_FileBrowser dd aVersion_FileBrowser
|
||||
|
||||
PathShow_prepare dd sz_PathShow_prepare
|
||||
PathShow_draw dd sz_PathShow_draw
|
||||
;Version_path_show dd szVersion_path_show
|
||||
|
||||
;Frame_draw dd sz_Frame_draw
|
||||
;Version_frame dd szVersion_frame
|
||||
|
||||
dd 0
|
||||
dd 0
|
||||
|
||||
;a_init db 'lib_init',0
|
||||
;a_version db 'version',0
|
||||
|
||||
;aEdit_box_draw db 'edit_box',0
|
||||
;aEdit_box_key db 'edit_box_key',0
|
||||
;aEdit_box_mouse db 'edit_box_mouse',0
|
||||
;aVersion_ed db 'version_ed',0
|
||||
|
||||
aInit_checkbox db 'init_checkbox2',0
|
||||
aCheck_box_draw db 'check_box_draw2',0
|
||||
aCheck_box_mouse db 'check_box_mouse2',0
|
||||
;aVersion_ch db 'version_ch2',0
|
||||
|
||||
;aOption_box_draw db 'option_box_draw',0
|
||||
;aOption_box_mouse db 'option_box_mouse',0
|
||||
;aVersion_op db 'version_op',0
|
||||
|
||||
;aScrollbar_ver_draw db 'scrollbar_v_draw',0
|
||||
;aScrollbar_ver_mouse db 'scrollbar_v_mouse',0
|
||||
;aScrollbar_hor_draw db 'scrollbar_h_draw',0
|
||||
;aScrollbar_hor_mouse db 'scrollbar_h_mouse',0
|
||||
;aVersion_scrollbar db 'version_scrollbar',0
|
||||
|
||||
;aDbutton_draw db 'dbutton_draw',0
|
||||
;aDbutton_mouse db 'dbutton_mouse',0
|
||||
;aVersion_dbutton db 'version_dbutton',0
|
||||
|
||||
;aMenu_bar_draw db 'menu_bar_draw',0
|
||||
;aMenu_bar_mouse db 'menu_bar_mouse',0
|
||||
;aMenu_bar_activate db 'menu_bar_activate',0
|
||||
;aVersion_menu_bar db 'version_menu_bar',0
|
||||
|
||||
;aFileBrowser_draw db 'FileBrowser_draw',0
|
||||
;aFileBrowser_mouse db 'FileBrowser_mouse',0
|
||||
;aFileBrowser_key db 'FileBrowser_key',0
|
||||
;aVersion_FileBrowser db 'version_FileBrowser',0
|
||||
|
||||
sz_PathShow_prepare db 'PathShow_prepare',0
|
||||
sz_PathShow_draw db 'PathShow_draw',0
|
||||
;szVersion_path_show db 'version_PathShow',0
|
||||
|
||||
;sz_Frame_draw db 'frame_draw',0
|
||||
;szVersion_frame db 'version_frame',0
|
||||
;-----------------------------------------------------------------------------
|
||||
PathShow_data:
|
||||
.type dd 0 ;+0
|
||||
.start_y dw 5+4 ;+4
|
||||
.start_x dw 5+5 ;+6
|
||||
.font_size_x dw 6 ;+8 ; 6 - for font 0, 8 - for font 1
|
||||
.area_size_x dw 400-30 ;+10
|
||||
.font_number dd 0 ;+12 ; 0 - monospace, 1 - variable
|
||||
.background_flag dd 0 ;+16
|
||||
.font_color dd 0x0 ;+20
|
||||
.background_color dd 0x0 ;+24
|
||||
.text_pointer dd fname ;+28
|
||||
.work_area_pointer dd text_work_area ;+32
|
||||
.temp_text_length dd 0 ;+36
|
||||
;-----------------------------------------------------------------------------
|
||||
check1 check_box2 (100 shl 16)+12,(27 shl 16)+12,6,0xFFFFFF,0,0xffffff,\
|
||||
check_text1,ch_flag_middle
|
||||
|
||||
check_text1:
|
||||
if lang eq ru
|
||||
db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E0AEA2><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0
|
||||
else
|
||||
db 'Use testing of write',0
|
||||
end if
|
||||
|
||||
check_box_warning_text:
|
||||
if lang eq ru
|
||||
db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>! <20><EFBFBD>ઠ <><E1AAAE><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㭨<>⮦<EFBFBD><E2AEA6><EFBFBD> ᮤ<>ন<EFBFBD><E0A6A8><EFBFBD> 䠩<><E4A0A9>!',0
|
||||
else
|
||||
db 'WARNING! Testing of write speed is destroy contents of file!',0
|
||||
end if
|
||||
;-----------------------------------------------------------------------------
|
||||
OpenDialog_data:
|
||||
.type dd 0
|
||||
.procinfo dd process_info ;+4
|
||||
.com_area_name dd communication_area_name ;+8
|
||||
.com_area dd 0 ;+12
|
||||
.opendir_pach dd temp_dir_pach ;+16
|
||||
.dir_default_pach dd communication_area_default_pach ;+20
|
||||
.start_path dd open_dialog_path ;+24
|
||||
.draw_window dd draw_window ;+28
|
||||
.status dd 0 ;+32
|
||||
.openfile_pach dd fname ;+36
|
||||
.filename_area dd filename_area ;+40
|
||||
.filter_area dd Filter
|
||||
.x:
|
||||
.x_size dw 420 ;+48 ; Window X size
|
||||
.x_start dw 10 ;+50 ; Window X position
|
||||
.y:
|
||||
.y_size dw 320 ;+52 ; Window y size
|
||||
.y_start dw 10 ;+54 ; Window Y position
|
||||
|
||||
communication_area_name:
|
||||
db 'FFFFFFFF_open_dialog2',0
|
||||
|
||||
open_dialog_path:
|
||||
if __nightbuild eq yes
|
||||
db '/sys/MANAGERS/opendial',0
|
||||
else
|
||||
db '/sys/File Managers/opendial',0
|
||||
end if
|
||||
|
||||
communication_area_default_pach:
|
||||
db '/sys',0
|
||||
|
||||
Filter:
|
||||
dd Filter.end - Filter.1
|
||||
.1:
|
||||
;db 'BIN',0
|
||||
;db 'DAT',0
|
||||
.end:
|
||||
db 0
|
||||
|
||||
start_temp_file_name:
|
||||
db 'default.dtp',0
|
||||
|
||||
default_dtp:
|
||||
db '/sys/default.dtp',0
|
||||
;-----------------------------------------------------------------------------
|
||||
sector equ 512
|
||||
;--------------------------------------
|
||||
result_table:
|
||||
dd a512b, 0, 0, sector*1
|
||||
dd a1K, 1, 1, sector*2
|
||||
dd a2K, 2, 2, sector*4
|
||||
dd a4K, 3, 3, sector*8
|
||||
dd a8K, 4, 4, sector*16
|
||||
dd a16K, 5, 5, sector*32
|
||||
dd a32K, 6, 6, sector*64
|
||||
dd a64K, 7, 7, sector*128
|
||||
dd a128K, 8, 8, sector*256
|
||||
dd a256K, 9, 9, sector*512
|
||||
dd a512K, 10, 10, sector*1024
|
||||
dd a1M, 11, 11, sector*2*1024
|
||||
dd a2M, 12, 12, sector*4*1024
|
||||
dd a4M, 13, 13, sector*8*1024
|
||||
dd a8M, 14, 14, sector*16*1024
|
||||
dd a16M, 15, 15, sector*32*1024
|
||||
dd a32M, 16, 16, sector*64*1024
|
||||
dd a64M, 17, 17, sector*128*1024
|
||||
;-----------------------------------------------------------------------------
|
||||
a512b db ' 512',0
|
||||
a1K db ' 1K',0
|
||||
a2K db ' 2K',0
|
||||
a4K db ' 4K',0
|
||||
a8K db ' 8K',0
|
||||
a16K db ' 16K',0
|
||||
a32K db ' 32K',0
|
||||
a64K db ' 64K',0
|
||||
a128K db '128K',0
|
||||
a256K db '256K',0
|
||||
a512K db '512K',0
|
||||
a1M db ' 1M',0
|
||||
a2M db ' 2M',0
|
||||
a4M db ' 4M',0
|
||||
a8M db ' 8M',0
|
||||
a16M db ' 16M',0
|
||||
a32M db ' 32M',0
|
||||
a64M db ' 64M',0
|
||||
;-----------------------------------------------------------------------------
|
||||
align 4
|
||||
fileinfo:
|
||||
.subfunction dd 5
|
||||
.offset dd 0
|
||||
.offset_1 dd 0
|
||||
.size dd 0
|
||||
.return dd file_info
|
||||
db 0
|
||||
.name: dd fname
|
||||
;-----------------------------------------------------------------------------
|
||||
align 4
|
||||
fileread:
|
||||
.subfunction dd 0
|
||||
.offset dd 0
|
||||
.offset_1 dd 0
|
||||
.size dd 0
|
||||
.return dd process_info
|
||||
db 0
|
||||
.name: dd fname
|
||||
;-----------------------------------------------------------------------------
|
||||
align 4
|
||||
filewrite:
|
||||
.subfunction dd 3
|
||||
.offset dd 0
|
||||
.offset_1 dd 0
|
||||
.size dd 0
|
||||
.data dd process_info
|
||||
db 0
|
||||
.name: dd fname
|
||||
;-----------------------------------------------------------------------------
|
@@ -1,43 +0,0 @@
|
||||
;-----------------------------------------------------------------------------
|
||||
align 4
|
||||
cur_dir_path:
|
||||
rb 4096
|
||||
;-----------------------------------------------------------------------------
|
||||
library_path:
|
||||
rb 4096
|
||||
;-----------------------------------------------------------------------------
|
||||
temp_dir_pach:
|
||||
rb 4096
|
||||
;-----------------------------------------------------------------------------
|
||||
process_info:
|
||||
rb 1024
|
||||
;-----------------------------------------------------------------------------
|
||||
fname:
|
||||
rb 4096
|
||||
;-----------------------------------------------------------------------------
|
||||
filename_area:
|
||||
rb 256
|
||||
;-----------------------------------------------------------------------------
|
||||
text_work_area:
|
||||
rb 1024
|
||||
;-----------------------------------------------------------------------------
|
||||
file_info:
|
||||
rb 40
|
||||
;-----------------------------------------------------------------------------
|
||||
align 4
|
||||
app_colours:
|
||||
w_frame dd ?
|
||||
w_grab dd ?
|
||||
w_work_dark dd ?
|
||||
w_work_light dd ?
|
||||
w_grab_text dd ?
|
||||
w_work dd ?
|
||||
w_work_button dd ?
|
||||
w_work_button_text dd ?
|
||||
w_work_text dd ?
|
||||
w_work_graph dd ?
|
||||
;-----------------------------------------------------------------------------
|
||||
align 4
|
||||
rb 256
|
||||
STACK_TOP:
|
||||
;-----------------------------------------------------------------------------
|
Reference in New Issue
Block a user