2010-04-15 19:50:49 +04:00
|
|
|
|
;<3B><><EFBFBD><E0AEAC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>୮<EFBFBD><E0ADAE><EFBFBD> Maxxxx32, Diamond, Heavyiron
|
|
|
|
|
;<3B> <20><>㣨<EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC><EFBFBD>⠬, <20> ⠪<><E2A0AA>
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<Lrz> www.lrz.land.ru)
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use32
|
|
|
|
|
org 0x0
|
2010-04-15 19:50:49 +04:00
|
|
|
|
db 'MENUET01' ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20>ᯮ<EFBFBD><E1AFAE>塞<EFBFBD><EFA5AC><EFBFBD> 䠩<><E4A0A9> <20>ᥣ<EFBFBD><E1A5A3> 8 <20><><EFBFBD><EFBFBD>
|
2009-12-29 02:19:20 +03:00
|
|
|
|
dd 0x01
|
|
|
|
|
dd start
|
2010-04-15 19:50:49 +04:00
|
|
|
|
dd i_end ; ࠧ<><E0A0A7><EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-12-29 02:19:20 +03:00
|
|
|
|
dd mem
|
|
|
|
|
dd stacktop
|
2010-04-15 19:50:49 +04:00
|
|
|
|
dd file_name ; command line
|
2009-12-29 02:19:20 +03:00
|
|
|
|
dd sys_path
|
|
|
|
|
|
|
|
|
|
MAX_COLOR_WORD_LEN equ 40
|
|
|
|
|
maxChars equ 100002 ;(...+2)
|
2010-04-29 22:27:40 +04:00
|
|
|
|
BUF_SIZE equ 1000 ;buffer for copy|paste
|
|
|
|
|
maxSyntaxFileSize equ 410000
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
2010-04-15 19:50:49 +04:00
|
|
|
|
include '../../proc32.inc'
|
2009-12-29 02:19:20 +03:00
|
|
|
|
include '../../macros.inc'
|
2010-06-10 00:06:03 +04:00
|
|
|
|
include 'mem.inc'
|
2010-02-05 14:17:26 +03:00
|
|
|
|
include '../../develop/libraries/box_lib/load_lib.mac'
|
2010-04-15 19:50:49 +04:00
|
|
|
|
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
|
2009-12-30 22:07:50 +03:00
|
|
|
|
include 'lang.inc'
|
2010-05-27 18:46:37 +04:00
|
|
|
|
|
2009-12-29 02:19:20 +03:00
|
|
|
|
include 't_data.inc'
|
|
|
|
|
include 'strlen.inc'
|
|
|
|
|
include 't_draw.inc' ;draw main window functions
|
2010-04-29 22:27:40 +04:00
|
|
|
|
include 't_button.inc' ;text work functions
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
2010-06-10 00:06:03 +04:00
|
|
|
|
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,0
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
2010-04-22 23:39:39 +04:00
|
|
|
|
align 4
|
2009-12-29 02:19:20 +03:00
|
|
|
|
start:
|
2010-04-22 23:39:39 +04:00
|
|
|
|
mcall 48,3,sc,sizeof.system_colors
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
|
|
|
|
mcall 68,11
|
|
|
|
|
or eax,eax
|
|
|
|
|
jz button.exit
|
|
|
|
|
|
|
|
|
|
mcall 66,1,1 ;scan code
|
|
|
|
|
;mcall 26,2,1,conv_tabl
|
2010-04-22 23:39:39 +04:00
|
|
|
|
mcall 40,0x27
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
2010-04-22 23:39:39 +04:00
|
|
|
|
mov esi,file_name
|
|
|
|
|
call strlen
|
|
|
|
|
mov ecx,eax
|
2010-05-27 18:46:37 +04:00
|
|
|
|
mov edi,openfile_path
|
2010-04-22 23:39:39 +04:00
|
|
|
|
rep movsb ;<3B><><EFBFBD><EFBFBD><EFBFBD>㥬 <20><><EFBFBD> 䠩<><E4A0A9> <20> <20><><EFBFBD><EFBFBD><EFBFBD> edit1
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
2010-04-22 23:39:39 +04:00
|
|
|
|
load_libraries l_libs_start,load_lib_end
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
2011-08-22 19:58:27 +04:00
|
|
|
|
;<3B><EFBFBD>ઠ <20><> <>쪮 㤠筮 <20><><EFBFBD>㧨<EFBFBD><E3A7A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD>
|
2010-04-22 23:39:39 +04:00
|
|
|
|
mov ebp,lib0
|
|
|
|
|
cmp dword [ebp+ll_struc_size-4],0
|
|
|
|
|
jz @f
|
|
|
|
|
mcall -1 ;exit not correct
|
|
|
|
|
@@:
|
|
|
|
|
mov ebp,lib1 ;
|
|
|
|
|
cmp dword [ebp+ll_struc_size-4],0
|
|
|
|
|
jz @f
|
|
|
|
|
mcall -1 ;exit not correct
|
|
|
|
|
@@:
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
2011-08-22 19:58:27 +04:00
|
|
|
|
cmp dword[version_text_edit],3
|
|
|
|
|
jge @f
|
|
|
|
|
stdcall [mb_create],msgbox_10,thread
|
|
|
|
|
mcall -1
|
|
|
|
|
@@:
|
|
|
|
|
|
2010-04-22 23:39:39 +04:00
|
|
|
|
;---------------------------------------------------------------------
|
2010-08-25 13:12:42 +04:00
|
|
|
|
stdcall [ted_init], tedit0
|
|
|
|
|
stdcall dword[tl_data_init], tree1
|
2010-05-27 18:46:37 +04:00
|
|
|
|
|
|
|
|
|
; OpenDialog initialisation
|
2010-08-25 13:12:42 +04:00
|
|
|
|
stdcall [OpenDialog_Init],OpenDialog_data
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
|
|
|
|
; init bmp file
|
|
|
|
|
mov ecx,1200*18
|
2010-06-10 00:06:03 +04:00
|
|
|
|
stdcall mem.Alloc,ecx
|
2009-12-29 02:19:20 +03:00
|
|
|
|
mov [bmp_icon],eax
|
|
|
|
|
|
2010-02-05 14:17:26 +03:00
|
|
|
|
copy_path fn_icon,sys_path,file_name,0x0
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
|
|
|
|
mov eax,70 ;load icon file
|
2010-05-17 20:49:58 +04:00
|
|
|
|
mov [run_file_70.Function], 0
|
|
|
|
|
mov [run_file_70.Position], 54
|
|
|
|
|
mov [run_file_70.Flags], 0
|
|
|
|
|
mov [run_file_70.Count], 1200*18
|
|
|
|
|
m2m [run_file_70.Buffer], [bmp_icon]
|
|
|
|
|
mov byte[run_file_70+20], 0
|
|
|
|
|
mov [run_file_70.FileName], file_name
|
2009-12-29 02:19:20 +03:00
|
|
|
|
mov ebx,run_file_70
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
cmp ebx,-1
|
|
|
|
|
mov [err_ini0],1
|
|
|
|
|
je @f ;if open file
|
|
|
|
|
mov [err_ini0],0
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
;---------------------------------------------------------------------
|
2010-04-15 19:50:49 +04:00
|
|
|
|
; <20><>⠥<EFBFBD> bmp 䠩<> <20> <20><><EFBFBD><EFBFBD><EFBFBD>ࠬ<EFBFBD> <20> <20><><EFBFBD><EFBFBD>ﬨ
|
2010-02-05 14:17:26 +03:00
|
|
|
|
copy_path fn_icon_tl_sys,sys_path,file_name,0x0
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
|
|
|
|
mov ecx,3*256*13
|
2010-06-10 00:06:03 +04:00
|
|
|
|
stdcall mem.Alloc,ecx
|
2009-12-29 02:19:20 +03:00
|
|
|
|
mov dword[tree1.data_img_sys],eax
|
|
|
|
|
|
2010-05-17 20:49:58 +04:00
|
|
|
|
;mov [run_file_70.Function], 0
|
|
|
|
|
;mov [run_file_70.Position], 54
|
|
|
|
|
;mov [run_file_70.Flags], 0
|
|
|
|
|
mov [run_file_70.Count], 3*256*13
|
|
|
|
|
mov [run_file_70.Buffer], eax
|
|
|
|
|
;mov byte[run_file_70+20], 0
|
|
|
|
|
;mov [run_file_70.FileName], file_name
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
|
|
|
|
mov eax,70 ;load icon file
|
|
|
|
|
mov ebx,run_file_70
|
|
|
|
|
int 0x40
|
|
|
|
|
cmp ebx,0
|
|
|
|
|
jg @f
|
|
|
|
|
mov dword[tree1.data_img_sys],0
|
|
|
|
|
@@:
|
|
|
|
|
;---------------------------------------------------------------------
|
2010-04-15 19:50:49 +04:00
|
|
|
|
; <20><>⠥<EFBFBD> bmp 䠩<> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㧫<><E3A7AB>
|
2010-02-05 14:17:26 +03:00
|
|
|
|
copy_path fn_icon_tl_nod,sys_path,file_name,0x0
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
|
|
|
|
mov ecx,3*256*2
|
2010-06-10 00:06:03 +04:00
|
|
|
|
stdcall mem.Alloc,ecx
|
2009-12-29 02:19:20 +03:00
|
|
|
|
mov dword[tree1.data_img],eax
|
|
|
|
|
|
2010-05-17 20:49:58 +04:00
|
|
|
|
; mov [run_file_70.Function], 0
|
|
|
|
|
; mov [run_file_70.Position], 54
|
|
|
|
|
; mov [run_file_70.Flags], 0
|
|
|
|
|
mov [run_file_70.Count], 3*256*2
|
|
|
|
|
mov [run_file_70.Buffer], eax
|
|
|
|
|
; mov byte[run_file_70+20], 0
|
|
|
|
|
; mov [run_file_70.FileName], file_name
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
|
|
|
|
mov eax,70 ;load icon file
|
|
|
|
|
mov ebx,run_file_70
|
|
|
|
|
int 0x40
|
|
|
|
|
cmp ebx,0
|
|
|
|
|
jg @f
|
|
|
|
|
mov dword[tree1.data_img],0
|
|
|
|
|
@@:
|
|
|
|
|
;------------------------------------------------------------------------------
|
2010-04-15 19:50:49 +04:00
|
|
|
|
copy_path fn_syntax_dir,sys_path,file_name,0x0 ;<3B><>६ <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20> 䠩<><E4A0A9><EFBFBD><EFBFBD> ᨭ⠪<E1A8AD><E2A0AA><EFBFBD><EFBFBD>
|
2009-12-29 02:19:20 +03:00
|
|
|
|
mov eax,70
|
|
|
|
|
mov ebx,tree_file_struct
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
cmp ebx,-1
|
|
|
|
|
je .end_dir_init
|
|
|
|
|
|
|
|
|
|
mov eax,dir_mem
|
|
|
|
|
add eax,32+4+1+3+4*6+8
|
|
|
|
|
mov ecx,ebx
|
|
|
|
|
@@:
|
2010-04-15 19:50:49 +04:00
|
|
|
|
cmp byte[eax],'.' ;䨫<><E4A8AB><EFBFBD>㥬 䠩<><E4A0A9> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '.' <20> '..'
|
2009-12-29 02:19:20 +03:00
|
|
|
|
je .filter
|
2010-04-22 23:39:39 +04:00
|
|
|
|
;0x10000 ;1*2^16 - <20><><EFBFBD> 1 <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
stdcall dword[tl_node_add], eax,0x10000, tree1
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
2010-04-22 23:39:39 +04:00
|
|
|
|
stdcall dword[tl_cur_next], tree1
|
2009-12-29 02:19:20 +03:00
|
|
|
|
.filter:
|
|
|
|
|
add eax,304
|
|
|
|
|
loop @b
|
2011-08-22 19:58:27 +04:00
|
|
|
|
stdcall dword[tl_cur_beg],tree1 ;<3B>⠢<EFBFBD><E2A0A2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><>砫<EFBFBD> ᯨ᪠
|
2009-12-29 02:19:20 +03:00
|
|
|
|
.end_dir_init:
|
|
|
|
|
|
|
|
|
|
;--- load color option file ---
|
2010-04-29 22:27:40 +04:00
|
|
|
|
mov ebx,dword[fn_col_option]
|
|
|
|
|
copy_path ebx,fn_syntax_dir,file_name_rez,0x0
|
|
|
|
|
copy_path file_name_rez,sys_path,file_name,0x0
|
|
|
|
|
stdcall [ted_init_syntax_file], tedit0,run_file_70,file_name
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
|
|
|
|
;--- get cmd line ---
|
2010-05-27 18:46:37 +04:00
|
|
|
|
cmp byte[openfile_path+3],0 ;openfile_path
|
2009-12-29 02:19:20 +03:00
|
|
|
|
je @f ;if file names exist
|
2010-05-27 18:46:37 +04:00
|
|
|
|
mov esi,openfile_path
|
2009-12-29 02:19:20 +03:00
|
|
|
|
call strlen ;eax=strlen
|
|
|
|
|
mov [edit1.size],eax
|
2010-04-22 23:39:39 +04:00
|
|
|
|
call but_no_msg_OpenFile
|
2009-12-29 02:19:20 +03:00
|
|
|
|
@@:
|
|
|
|
|
|
2010-04-22 23:39:39 +04:00
|
|
|
|
align 4
|
2009-12-29 02:19:20 +03:00
|
|
|
|
red_win:
|
2010-05-27 18:46:37 +04:00
|
|
|
|
call draw_window
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
still:
|
2011-08-26 18:09:59 +04:00
|
|
|
|
mcall 10
|
|
|
|
|
|
|
|
|
|
cmp al,1 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
jz red_win
|
|
|
|
|
cmp al,2
|
|
|
|
|
jz key
|
|
|
|
|
cmp al,3
|
|
|
|
|
jz button
|
|
|
|
|
cmp al,6 ;<3B><><EFBFBD><EFBFBD>
|
|
|
|
|
jne @f
|
|
|
|
|
mcall 9,procinfo,-1
|
|
|
|
|
cmp ax,word[procinfo+4]
|
|
|
|
|
jne @f ;<3B><><EFBFBD><EFBFBD> <20><> <20><>⨢<EFBFBD><E2A8A2>
|
|
|
|
|
jmp mouse
|
|
|
|
|
@@:
|
|
|
|
|
jmp still
|
2010-05-27 18:46:37 +04:00
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
draw_window:
|
2011-08-26 18:09:59 +04:00
|
|
|
|
mcall 12,1
|
|
|
|
|
|
|
|
|
|
mov edx,[sc.work]
|
|
|
|
|
or edx,0x73000000
|
|
|
|
|
mov edi,hed
|
|
|
|
|
mcall 0,(10 shl 16)+485,(10 shl 16)+320
|
|
|
|
|
|
|
|
|
|
mcall 9,procinfo,-1
|
|
|
|
|
mov edi,tedit0 ;<3B><><EFBFBD>祭<EFBFBD><E7A5AD> edi <20>㦭<EFBFBD> <20><><EFBFBD> EvSize <20> ted_wnd_t
|
|
|
|
|
call EvSize
|
|
|
|
|
|
|
|
|
|
mov eax,13 ;<3B><><EFBFBD>孨<EFBFBD> <20><>אַ㣮<EFACAE>쭨<EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD>⪨ <20><><EFBFBD>孥<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
xor ebx,ebx
|
|
|
|
|
mov ecx,ted_wnd_t
|
|
|
|
|
mov bx,word[procinfo.client_box.width]
|
|
|
|
|
inc bx
|
|
|
|
|
int 0x40
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
2010-05-27 18:46:37 +04:00
|
|
|
|
mov eax,4
|
|
|
|
|
mov ebx,185*65536+9
|
|
|
|
|
mov ecx,[sc.work_text]
|
|
|
|
|
or ecx,0x80000000
|
|
|
|
|
mov edx,txtFile
|
|
|
|
|
int 0x40
|
|
|
|
|
|
2010-04-15 19:50:49 +04:00
|
|
|
|
stdcall [edit_box_draw], dword edit1
|
|
|
|
|
stdcall [menu_bar_draw], dword menu_data_1
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
|
|
|
|
call draw_but_toolbar
|
|
|
|
|
|
|
|
|
|
cmp [err_ini0],1
|
|
|
|
|
jne @f
|
|
|
|
|
mov eax,4
|
2010-04-15 19:50:49 +04:00
|
|
|
|
mov ebx,ted_wnd_l
|
|
|
|
|
add ebx,ted_rec_l
|
2009-12-29 02:19:20 +03:00
|
|
|
|
shl ebx,16
|
2010-04-15 19:50:49 +04:00
|
|
|
|
add ebx,ted_wnd_t
|
|
|
|
|
add ebx,ted_rec_t
|
2009-12-29 02:19:20 +03:00
|
|
|
|
mov ecx,0x80ff0000
|
|
|
|
|
mov edx,txtErrIni0
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
add ebx,10 ;move <--y-->
|
|
|
|
|
mov ecx,0x80ff0080
|
|
|
|
|
mov edx,file_name
|
|
|
|
|
int 0x40
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
cmp [err_ini0],1
|
|
|
|
|
je @f
|
2010-04-29 22:27:40 +04:00
|
|
|
|
stdcall [ted_draw], tedit0
|
2009-12-29 02:19:20 +03:00
|
|
|
|
@@:
|
|
|
|
|
|
2009-12-30 22:07:50 +03:00
|
|
|
|
mcall 12,2
|
2010-05-27 18:46:37 +04:00
|
|
|
|
ret
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
2010-04-22 23:39:39 +04:00
|
|
|
|
align 4
|
2009-12-29 02:19:20 +03:00
|
|
|
|
mouse:
|
2011-08-26 18:09:59 +04:00
|
|
|
|
stdcall [edit_box_mouse], dword edit1
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
2011-08-26 18:09:59 +04:00
|
|
|
|
test word [edit1.flags],10b ;ed_focus ;<3B> <20><> <20> 䮪<><E4AEAA><EFBFBD>, <20><>室<EFBFBD><E5AEA4>
|
|
|
|
|
jne still
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
2011-08-26 18:09:59 +04:00
|
|
|
|
stdcall [ted_mouse], tedit0
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
2011-08-26 18:09:59 +04:00
|
|
|
|
cmp byte[tedit0.panel_id],TED_PANEL_FIND ;if not panel
|
|
|
|
|
jne @f
|
|
|
|
|
stdcall [edit_box_mouse], dword edit2
|
|
|
|
|
@@:
|
|
|
|
|
cmp byte[tedit0.panel_id],TED_PANEL_SYNTAX ;if not panel
|
|
|
|
|
jne .menu_bar_1 ;@f
|
|
|
|
|
stdcall [tl_mouse], tree1
|
2009-12-29 02:19:20 +03:00
|
|
|
|
;-----------------------------------------------
|
|
|
|
|
.menu_bar_1:
|
2011-08-26 18:09:59 +04:00
|
|
|
|
mov [menu_data_1.get_mouse_flag],1
|
2009-12-29 02:19:20 +03:00
|
|
|
|
; mouse event for Menu 1
|
2011-08-26 18:09:59 +04:00
|
|
|
|
stdcall [menu_bar_mouse],dword menu_data_1
|
|
|
|
|
cmp dword[menu_data_1.click],1
|
|
|
|
|
jne .mnu_1
|
|
|
|
|
cmp dword[menu_data_1.cursor_out],4
|
|
|
|
|
je button.exit
|
|
|
|
|
cmp dword[menu_data_1.cursor_out],3
|
|
|
|
|
jne @f
|
|
|
|
|
stdcall [ted_but_save_file], tedit0,run_file_70,[edit1.text]
|
|
|
|
|
@@:
|
|
|
|
|
cmp dword[menu_data_1.cursor_out],2
|
|
|
|
|
jne @f
|
|
|
|
|
call ted_but_open_file
|
|
|
|
|
@@:
|
|
|
|
|
cmp dword[menu_data_1.cursor_out],1
|
|
|
|
|
jne @f
|
|
|
|
|
call ted_but_new_file
|
|
|
|
|
@@:
|
2009-12-29 02:19:20 +03:00
|
|
|
|
.mnu_1:
|
2011-08-26 18:09:59 +04:00
|
|
|
|
jmp still
|
2009-12-29 02:19:20 +03:00
|
|
|
|
;---------------------------------------------------------------------
|
|
|
|
|
|
2010-04-22 23:39:39 +04:00
|
|
|
|
;output:
|
|
|
|
|
; ah = symbol
|
|
|
|
|
align 4
|
|
|
|
|
proc KeyConvertToASCII, table:dword
|
|
|
|
|
push ebx
|
|
|
|
|
mov ebx,dword[table] ;convert scan to ascii
|
2009-12-29 02:19:20 +03:00
|
|
|
|
ror ax,8
|
|
|
|
|
xor ah,ah
|
|
|
|
|
add bx,ax
|
|
|
|
|
mov ah,byte[ebx]
|
2010-04-22 23:39:39 +04:00
|
|
|
|
pop ebx
|
2009-12-29 02:19:20 +03:00
|
|
|
|
ret
|
2010-04-22 23:39:39 +04:00
|
|
|
|
endp
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
2010-04-22 23:39:39 +04:00
|
|
|
|
align 4
|
2009-12-29 02:19:20 +03:00
|
|
|
|
key:
|
2010-04-22 23:39:39 +04:00
|
|
|
|
mcall 66,3 ;66.3 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ﭨ<EFBFBD> <20><>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-04-29 22:27:40 +04:00
|
|
|
|
xor esi,esi
|
2010-04-22 23:39:39 +04:00
|
|
|
|
mov ecx,1
|
2009-12-29 02:19:20 +03:00
|
|
|
|
test al,0x03 ;[Shift]
|
|
|
|
|
jz @f
|
2010-04-22 23:39:39 +04:00
|
|
|
|
mov cl,2
|
2010-04-29 22:27:40 +04:00
|
|
|
|
or esi,KM_SHIFT
|
2009-12-29 02:19:20 +03:00
|
|
|
|
@@:
|
|
|
|
|
test al,0x0c ;[Ctrl]
|
|
|
|
|
jz @f
|
2010-04-29 22:27:40 +04:00
|
|
|
|
or esi,KM_CTRL
|
2009-12-29 02:19:20 +03:00
|
|
|
|
@@:
|
|
|
|
|
test al,0x30 ;[Alt]
|
|
|
|
|
jz @f
|
2010-04-22 23:39:39 +04:00
|
|
|
|
mov cl,3
|
2010-04-29 22:27:40 +04:00
|
|
|
|
or esi,KM_ALT
|
2009-12-29 02:19:20 +03:00
|
|
|
|
@@:
|
|
|
|
|
test al,0x80 ;[NumLock]
|
|
|
|
|
jz @f
|
2010-04-29 22:27:40 +04:00
|
|
|
|
or esi,KM_NUMLOCK
|
2009-12-29 02:19:20 +03:00
|
|
|
|
@@:
|
2010-04-29 22:27:40 +04:00
|
|
|
|
|
2010-04-22 23:39:39 +04:00
|
|
|
|
mcall 26,2,,conv_tabl ;26.2 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>᪫<EFBFBD><E1AAAB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mcall 2 ;<3B><><EFBFBD><EFBFBD>砥<EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>⮩ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-05-03 19:12:50 +04:00
|
|
|
|
stdcall [tl_key], tree1
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
|
|
|
|
test word [edit1.flags],10b;ed_focus ; <20> <20><> <20> 䮪<><E4AEAA><EFBFBD>, <20><>室<EFBFBD><E5AEA4>
|
|
|
|
|
je @f
|
|
|
|
|
cmp ah,0x80 ;if key up
|
|
|
|
|
ja still
|
|
|
|
|
cmp ah,42 ;[Shift] (left)
|
|
|
|
|
je still
|
|
|
|
|
cmp ah,54 ;[Shift] (right)
|
|
|
|
|
je still
|
|
|
|
|
cmp ah,56 ;[Alt]
|
|
|
|
|
je still
|
|
|
|
|
cmp ah,29 ;[Ctrl]
|
|
|
|
|
je still
|
|
|
|
|
cmp ah,69 ;[Pause Break]
|
|
|
|
|
je still
|
|
|
|
|
|
2010-04-22 23:39:39 +04:00
|
|
|
|
stdcall KeyConvertToASCII, dword conv_tabl
|
|
|
|
|
stdcall [edit_box_key], dword edit1
|
2009-12-29 02:19:20 +03:00
|
|
|
|
jmp still
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
test word [edit2.flags],10b;ed_focus ; <20> <20><> <20> 䮪<><E4AEAA><EFBFBD>, <20><>室<EFBFBD><E5AEA4>
|
|
|
|
|
je @f
|
|
|
|
|
cmp ah,0x80 ;if key up
|
|
|
|
|
ja still
|
|
|
|
|
cmp ah,42 ;[Shift] (left)
|
|
|
|
|
je still
|
|
|
|
|
cmp ah,54 ;[Shift] (right)
|
|
|
|
|
je still
|
|
|
|
|
cmp ah,56 ;[Alt]
|
|
|
|
|
je still
|
|
|
|
|
cmp ah,29 ;[Ctrl]
|
|
|
|
|
je still
|
|
|
|
|
cmp ah,69 ;[Pause Break]
|
|
|
|
|
je still
|
|
|
|
|
|
2010-04-22 23:39:39 +04:00
|
|
|
|
stdcall KeyConvertToASCII, dword conv_tabl
|
2010-04-15 19:50:49 +04:00
|
|
|
|
stdcall [edit_box_key], dword edit2
|
2009-12-29 02:19:20 +03:00
|
|
|
|
jmp still
|
|
|
|
|
@@:
|
|
|
|
|
|
2010-04-29 22:27:40 +04:00
|
|
|
|
stdcall [ted_key], tedit0, conv_tabl,esi
|
2009-12-29 02:19:20 +03:00
|
|
|
|
jmp still
|
|
|
|
|
|
2010-04-29 22:27:40 +04:00
|
|
|
|
align 4
|
2009-12-29 02:19:20 +03:00
|
|
|
|
button:
|
2010-04-15 19:50:49 +04:00
|
|
|
|
; cmp [menu_active],1 ;<3B> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><> ᭠砫<E1ADA0> ॠ<><E0A5A0><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
|
2009-12-29 02:19:20 +03:00
|
|
|
|
; jne @f ;mouse.menu_bar_1
|
|
|
|
|
; mov [menu_active],0
|
|
|
|
|
; jmp still
|
|
|
|
|
; @@:
|
|
|
|
|
|
2010-04-15 19:50:49 +04:00
|
|
|
|
mcall 17 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>⮩ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-12-29 02:19:20 +03:00
|
|
|
|
cmp ah,3
|
|
|
|
|
jne @f
|
2010-04-29 22:27:40 +04:00
|
|
|
|
call ted_but_new_file
|
2009-12-29 02:19:20 +03:00
|
|
|
|
@@:
|
|
|
|
|
cmp ah,4
|
|
|
|
|
jne @f
|
2010-04-29 22:27:40 +04:00
|
|
|
|
call ted_but_open_file
|
2009-12-29 02:19:20 +03:00
|
|
|
|
@@:
|
|
|
|
|
cmp ah,5
|
|
|
|
|
jne @f
|
2010-04-29 22:27:40 +04:00
|
|
|
|
stdcall [ted_but_save_file], tedit0,run_file_70,[edit1.text]
|
2009-12-29 02:19:20 +03:00
|
|
|
|
@@:
|
|
|
|
|
cmp ah,6
|
2010-04-22 23:39:39 +04:00
|
|
|
|
jne @f
|
2010-04-29 22:27:40 +04:00
|
|
|
|
stdcall [ted_but_select_word], tedit0
|
2010-04-22 23:39:39 +04:00
|
|
|
|
@@:
|
2009-12-29 02:19:20 +03:00
|
|
|
|
cmp ah,7
|
2010-04-22 23:39:39 +04:00
|
|
|
|
jne @f
|
2010-04-29 22:27:40 +04:00
|
|
|
|
stdcall [ted_but_cut], tedit0
|
2010-04-22 23:39:39 +04:00
|
|
|
|
@@:
|
2009-12-29 02:19:20 +03:00
|
|
|
|
cmp ah,8
|
|
|
|
|
jne @f
|
2010-04-29 22:27:40 +04:00
|
|
|
|
stdcall [ted_but_copy], tedit0
|
2009-12-29 02:19:20 +03:00
|
|
|
|
@@:
|
|
|
|
|
cmp ah,9
|
2010-04-22 23:39:39 +04:00
|
|
|
|
jne @f
|
2010-04-29 22:27:40 +04:00
|
|
|
|
stdcall [ted_but_paste], tedit0
|
2010-04-22 23:39:39 +04:00
|
|
|
|
@@:
|
2009-12-29 02:19:20 +03:00
|
|
|
|
cmp ah,10
|
2010-04-15 19:50:49 +04:00
|
|
|
|
jne @f
|
2010-04-29 22:27:40 +04:00
|
|
|
|
call ted_but_find
|
2010-04-15 19:50:49 +04:00
|
|
|
|
@@:
|
2009-12-29 02:19:20 +03:00
|
|
|
|
cmp ah,11
|
2010-04-22 23:39:39 +04:00
|
|
|
|
jne @f
|
|
|
|
|
call but_replace
|
|
|
|
|
@@:
|
2009-12-29 02:19:20 +03:00
|
|
|
|
cmp ah,12
|
2010-04-22 23:39:39 +04:00
|
|
|
|
jne @f
|
|
|
|
|
call but_find_key_w
|
|
|
|
|
@@:
|
2009-12-29 02:19:20 +03:00
|
|
|
|
cmp ah,13
|
2010-04-22 23:39:39 +04:00
|
|
|
|
jne @f
|
2010-04-29 22:27:40 +04:00
|
|
|
|
stdcall [ted_but_sumb_upper], tedit0
|
2010-04-22 23:39:39 +04:00
|
|
|
|
@@:
|
2009-12-29 02:19:20 +03:00
|
|
|
|
cmp ah,14
|
2010-04-22 23:39:39 +04:00
|
|
|
|
jne @f
|
2010-04-29 22:27:40 +04:00
|
|
|
|
stdcall [ted_but_sumb_lover], tedit0
|
2010-04-22 23:39:39 +04:00
|
|
|
|
@@:
|
2009-12-29 02:19:20 +03:00
|
|
|
|
cmp ah,15
|
2010-04-22 23:39:39 +04:00
|
|
|
|
jne @f
|
2010-04-29 22:27:40 +04:00
|
|
|
|
stdcall [ted_but_reverse], tedit0
|
2010-04-22 23:39:39 +04:00
|
|
|
|
@@:
|
2009-12-29 02:19:20 +03:00
|
|
|
|
cmp ah,16
|
2010-04-22 23:39:39 +04:00
|
|
|
|
jne @f
|
2010-04-29 22:27:40 +04:00
|
|
|
|
stdcall [ted_but_undo], tedit0
|
2010-04-22 23:39:39 +04:00
|
|
|
|
@@:
|
2009-12-29 02:19:20 +03:00
|
|
|
|
cmp ah,17
|
2010-04-22 23:39:39 +04:00
|
|
|
|
jne @f
|
2010-04-29 22:27:40 +04:00
|
|
|
|
stdcall [ted_but_redo], tedit0
|
2010-04-22 23:39:39 +04:00
|
|
|
|
@@:
|
2009-12-29 02:19:20 +03:00
|
|
|
|
cmp ah,18
|
2010-04-22 23:39:39 +04:00
|
|
|
|
jne @f
|
|
|
|
|
stdcall but_sumb_invis, tedit0
|
|
|
|
|
@@:
|
2009-12-29 02:19:20 +03:00
|
|
|
|
cmp ah,19
|
2010-04-22 23:39:39 +04:00
|
|
|
|
jne @f
|
|
|
|
|
stdcall but_k_words_show, tedit0
|
|
|
|
|
@@:
|
2009-12-29 02:19:20 +03:00
|
|
|
|
cmp ah,20
|
2010-04-15 19:50:49 +04:00
|
|
|
|
jne @f
|
|
|
|
|
stdcall but_synt_show, tedit0
|
|
|
|
|
@@:
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
|
|
|
|
cmp ah,200
|
|
|
|
|
jne @f
|
2010-04-22 23:39:39 +04:00
|
|
|
|
stdcall ted_but_open_syntax, tedit0
|
2009-12-29 02:19:20 +03:00
|
|
|
|
@@:
|
|
|
|
|
cmp ah,201
|
|
|
|
|
jne @f
|
2010-04-29 22:27:40 +04:00
|
|
|
|
stdcall [ted_but_find_next], tedit0
|
2009-12-29 02:19:20 +03:00
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
cmp ah,1
|
|
|
|
|
jne still
|
|
|
|
|
.exit:
|
2010-04-29 22:27:40 +04:00
|
|
|
|
stdcall [ted_can_save], tedit0
|
2009-12-29 02:19:20 +03:00
|
|
|
|
cmp al,1
|
|
|
|
|
jne @f
|
2010-04-22 23:39:39 +04:00
|
|
|
|
stdcall [mb_create],msgbox_8,thread ;message: save changes in file?
|
2009-12-29 02:19:20 +03:00
|
|
|
|
jmp still
|
|
|
|
|
@@:
|
2010-06-10 00:06:03 +04:00
|
|
|
|
stdcall mem.Free,[bmp_icon]
|
2010-04-22 23:39:39 +04:00
|
|
|
|
|
2010-04-29 22:27:40 +04:00
|
|
|
|
stdcall [ted_delete], tedit0
|
2010-04-22 23:39:39 +04:00
|
|
|
|
stdcall dword[tl_data_clear], tree1
|
2010-04-15 19:50:49 +04:00
|
|
|
|
mcall -1 ;<3B><>室 <20><> <20>ணࠬ<E0AEA3><E0A0AC>
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
txtErrIni0 db '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0
|
|
|
|
|
err_ini0 db 0
|
|
|
|
|
|
2010-05-27 18:46:37 +04:00
|
|
|
|
edit1 edit_box 250, 220, 5, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 4090, openfile_path, mouse_dd, 0
|
2010-04-29 22:27:40 +04:00
|
|
|
|
edit2 edit_box TED_PANEL_WIDTH-1, 0, 20, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 300, buf_find, mouse_dd, 0
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
|
|
|
|
buf_find db 302 dup(0)
|
|
|
|
|
|
2009-12-30 22:07:50 +03:00
|
|
|
|
if lang eq ru
|
|
|
|
|
head_f_i0:
|
|
|
|
|
head_f_l0 db '<27><><EFBFBD>⥬<EFBFBD><E2A5AC><EFBFBD> <20>訡<EFBFBD><E8A8A1>',0
|
2010-08-25 13:12:42 +04:00
|
|
|
|
err_message_found_lib0 db '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> ',39,'box_lib.obj',39,0
|
|
|
|
|
err_message_import0 db '<27>訡<EFBFBD><E8A8A1> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> ',39,'box_lib.obj',39,0
|
|
|
|
|
err_message_found_lib1 db '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> ',39,'msgbox.obj',39,0
|
|
|
|
|
err_message_import1 db '<27>訡<EFBFBD><E8A8A1> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> ',39,'msgbox.obj',39,0
|
|
|
|
|
err_message_found_lib2 db '<27><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> ',39,'proc_lib.obj',39,0
|
|
|
|
|
err_message_import2 db '<27>訡<EFBFBD><E8A8A1> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> ',39,'proc_lib.obj',39,0
|
2009-12-30 22:07:50 +03:00
|
|
|
|
else
|
|
|
|
|
head_f_i0:
|
|
|
|
|
head_f_l0 db 'System error',0
|
2010-08-25 13:12:42 +04:00
|
|
|
|
err_message_found_lib0 db 'Sorry I cannot found library ',39,'box_lib.obj',39,0
|
|
|
|
|
err_message_import0 db 'Error on load import library ',39,'box_lib.obj',39,0
|
|
|
|
|
err_message_found_lib1 db 'Sorry I cannot found library ',39,'msgbox.obj',39,0
|
|
|
|
|
err_message_import1 db 'Error on load import library ',39,'msgbox.obj',39,0
|
|
|
|
|
err_message_found_lib2 db 'Sorry I cannot found library ',39,'proc_lib.obj',39,0
|
|
|
|
|
err_message_import2 db 'Error on load import library ',39,'proc_lib.obj',39,0
|
2009-12-30 22:07:50 +03:00
|
|
|
|
end if
|
2009-12-29 02:19:20 +03:00
|
|
|
|
|
|
|
|
|
;library structures
|
|
|
|
|
l_libs_start:
|
2010-11-17 02:25:56 +03:00
|
|
|
|
lib0 l_libs lib0_name, sys_path, file_name, system_dir0, err_message_found_lib0, head_f_l0, boxlib_import,err_message_import0, head_f_i0
|
|
|
|
|
lib1 l_libs lib1_name, sys_path, file_name, system_dir1, err_message_found_lib1, head_f_l0, msgbox_lib_import, err_message_import1, head_f_i0
|
|
|
|
|
lib2 l_libs lib2_name, sys_path, file_name, system_dir2, err_message_found_lib2, head_f_l0, proclib_import, err_message_import2, head_f_i0
|
2009-12-29 02:19:20 +03:00
|
|
|
|
load_lib_end:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
i_end:
|
2010-05-27 18:46:37 +04:00
|
|
|
|
rb 1024
|
|
|
|
|
align 16
|
|
|
|
|
procinfo process_information
|
|
|
|
|
rb 1024
|
2010-11-17 02:25:56 +03:00
|
|
|
|
thread:
|
|
|
|
|
rb 1024
|
2009-12-29 02:19:20 +03:00
|
|
|
|
stacktop:
|
2010-11-17 02:25:56 +03:00
|
|
|
|
sys_path:
|
|
|
|
|
rb 4096
|
|
|
|
|
file_name:
|
|
|
|
|
rb 4096
|
|
|
|
|
file_name_rez:
|
|
|
|
|
rb 4096
|
|
|
|
|
plugin_path:
|
|
|
|
|
rb 4096
|
|
|
|
|
openfile_path:
|
|
|
|
|
rb 4096
|
|
|
|
|
filename_area:
|
|
|
|
|
rb 256
|
|
|
|
|
file_info:
|
|
|
|
|
rb 40
|
2009-12-29 02:19:20 +03:00
|
|
|
|
mem:
|