update program

git-svn-id: svn://kolibrios.org@5917 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA 2015-11-16 17:52:12 +00:00
parent e016ecafca
commit 0319574018
4 changed files with 295 additions and 233 deletions

View File

@ -176,8 +176,8 @@ align 4
code_gen: code_gen:
stdcall [ted_clear], tedit0,1 stdcall [ted_clear], tedit0,1
pushad pushad
stdcall dword[tl_node_poi_get_info], 0,tree2 stdcall dword[tl_node_poi_get_info], tree2,0
pop esi mov esi,eax
xor bl,bl xor bl,bl
call code_gen_obj call code_gen_obj
stdcall [ted_text_add], tedit0,\ stdcall [ted_text_add], tedit0,\
@ -199,8 +199,7 @@ push eax ebx edx
cmp byte[esi+2],bl ;lev cmp byte[esi+2],bl ;lev
jl .find_no jl .find_no
stdcall dword[tl_node_poi_get_data], esi,tree2 stdcall dword[tl_node_poi_get_data], tree2,esi
pop eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
cmp eax,0 cmp eax,0
je .find_no je .find_no
@ -263,8 +262,8 @@ push eax ebx edx
stdcall get_code_key,eax ;®¡à ¡®âª  ®¡ê¥ªâ  stdcall get_code_key,eax ;®¡à ¡®âª  ®¡ê¥ªâ 
@@: @@:
stdcall dword[tl_node_poi_get_next_info], esi,tree2 stdcall dword[tl_node_poi_get_next_info], tree2,esi
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã mov esi,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp .beg_iterat jmp .beg_iterat
.find_no: .find_no:
@ -273,21 +272,19 @@ pop edx ebx eax
;¢§ïâì ª®¤ë ¤®ç¥à­¨å ®¡ê¥ªâ®¢ ;¢§ïâì ª®¤ë ¤®ç¥à­¨å ®¡ê¥ªâ®¢
align 4 align 4
proc get_code_children_objects, p_node:dword proc get_code_children_objects uses eax ebx esi, p_node:dword
push ebx esi
mov esi,[p_node] mov esi,[p_node]
mov bl,byte[esi+2] ;á®å࠭塞 ã஢¥­ì ⥪ã饣® ®¡ê¥ªâ  mov bl,byte[esi+2] ;á®å࠭塞 ã஢¥­ì ⥪ã饣® ®¡ê¥ªâ 
stdcall dword[tl_node_poi_get_next_info], esi,tree2 stdcall dword[tl_node_poi_get_next_info], tree2,esi
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã cmp eax,0 ;¥á«¨ ¤®á⨣«¨ ª®­æ  ᯨ᪠ ®¡ê¥ªâ®¢
cmp esi,0 ;¥á«¨ ¤®á⨣«¨ ª®­æ  ᯨ᪠ ®¡ê¥ªâ®¢
je @f je @f
cmp byte[esi+2],bl ;¥á«¨ ã஢¥­ì á«¥¤ãî饣® ®¡ê¥ªâ  ¡®«ìè¥ ¨«¨ à ¢¥­ ⥪ã饬ã cmp byte[eax+2],bl ;¥á«¨ ã஢¥­ì á«¥¤ãî饣® ®¡ê¥ªâ  ¡®«ìè¥ ¨«¨ à ¢¥­ ⥪ã饬ã
jle @f ;â® ¤®ç¥à­¨å 㧫®¢ ­¥â jle @f ;â® ¤®ç¥à­¨å 㧫®¢ ­¥â
mov esi,eax
mov bl,byte[esi+2] mov bl,byte[esi+2]
call code_gen_obj ;४ãàᨢ­ë© ¢ë§®¢ ¤®ç¥à­¨å ®¡ê¥ªâ®¢ call code_gen_obj ;४ãàᨢ­ë© ¢ë§®¢ ¤®ç¥à­¨å ®¡ê¥ªâ®¢
@@: @@:
pop esi ebx
ret ret
endp endp
@ -301,8 +298,7 @@ move_next_no_child_objects:
push eax ebx push eax ebx
mov bl,byte[esi+2] ;á®å࠭塞 ã஢¥­ì ⥪ã饣® ®¡ê¥ªâ  mov bl,byte[esi+2] ;á®å࠭塞 ã஢¥­ì ⥪ã饣® ®¡ê¥ªâ 
@@: @@:
stdcall dword[tl_node_poi_get_next_info], esi,tree2 stdcall dword[tl_node_poi_get_next_info], tree2,esi
pop eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
cmp eax,0 ;¥á«¨ ¤®á⨣«¨ ª®­æ  ᯨ᪠ ®¡ê¥ªâ®¢ cmp eax,0 ;¥á«¨ ¤®á⨣«¨ ª®­æ  ᯨ᪠ ®¡ê¥ªâ®¢
je @f je @f
cmp byte[eax+2],bl ;¥á«¨ ã஢¥­ì á«¥¤ãî饣® ®¡ê¥ªâ  ¡®«ìè¥ ¨«¨ à ¢¥­ ⥪ã饬ã cmp byte[eax+2],bl ;¥á«¨ ã஢¥­ì á«¥¤ãî饣® ®¡ê¥ªâ  ¡®«ìè¥ ¨«¨ à ¢¥­ ⥪ã饬ã
@ -330,8 +326,8 @@ proc get_code_auto, p_node:dword
pushad pushad
insert_nl insert_nl
mov esi,dword[p_node] mov esi,dword[p_node]
stdcall dword[tl_node_poi_get_data], esi,tree2 stdcall dword[tl_node_poi_get_data], tree2,esi
pop ebx ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫  mov ebx,eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
test_bool_prop ebx,BIT_MOD_ACI test_bool_prop ebx,BIT_MOD_ACI
jae @f jae @f
@ -402,16 +398,16 @@ endp
align 4 align 4
proc get_code_auto_m proc get_code_auto_m
pushad pushad
stdcall dword[tl_node_poi_get_info], 0,tree2 stdcall dword[tl_node_poi_get_info], tree2,0
pop esi mov esi,eax
.beg_iterat: .beg_iterat:
cmp esi,0 cmp esi,0
je .find_no je .find_no
stdcall dword[tl_node_poi_get_data], esi,tree2 stdcall dword[tl_node_poi_get_data], tree2,esi
pop ebx ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫  cmp eax,0
cmp ebx,0
je .find_no je .find_no
mov ebx,eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
cmp dword[ebx],C_EDB cmp dword[ebx],C_EDB
jne @f jne @f
@ -426,8 +422,8 @@ proc get_code_auto_m
insert_nl insert_nl
@@: @@:
stdcall dword[tl_node_poi_get_next_info], esi,tree2 stdcall dword[tl_node_poi_get_next_info], tree2,esi
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã mov esi,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp .beg_iterat jmp .beg_iterat
.find_no: .find_no:
@ -441,16 +437,16 @@ proc get_code_auto_data_el
pushad pushad
insert_nl ;®âáâ㯠¤«ï ä®à¬ â¨à®¢ ­¨ï insert_nl ;®âáâ㯠¤«ï ä®à¬ â¨à®¢ ­¨ï
stdcall dword[tl_node_poi_get_info], 0,tree2 stdcall dword[tl_node_poi_get_info], tree2,0
pop esi mov esi,eax
.beg_iterat: .beg_iterat:
cmp esi,0 cmp esi,0
je .find_no je .find_no
stdcall dword[tl_node_poi_get_data], esi,tree2 stdcall dword[tl_node_poi_get_data], tree2,esi
pop ebx ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫  cmp eax,0
cmp ebx,0
je .find_no je .find_no
mov ebx,eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
cmp dword[ebx],C_EDB cmp dword[ebx],C_EDB
jne @f jne @f
@ -513,8 +509,8 @@ proc get_code_auto_data_el
stdcall insert_text_label_data, ebx,0 stdcall insert_text_label_data, ebx,0
@@: @@:
stdcall dword[tl_node_poi_get_next_info], esi,tree2 stdcall dword[tl_node_poi_get_next_info], tree2,esi
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã mov esi,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp .beg_iterat jmp .beg_iterat
.find_no: .find_no:
@ -527,16 +523,16 @@ proc get_code_auto_data_el_cbox
pushad pushad
insert_nl ;®âáâ㯠¤«ï ä®à¬ â¨à®¢ ­¨ï insert_nl ;®âáâ㯠¤«ï ä®à¬ â¨à®¢ ­¨ï
stdcall dword[tl_node_poi_get_info], 0,tree2 stdcall dword[tl_node_poi_get_info], tree2,0
pop esi mov esi,eax
.beg_iterat: .beg_iterat:
cmp esi,0 cmp esi,0
je .find_no je .find_no
stdcall dword[tl_node_poi_get_data], esi,tree2 stdcall dword[tl_node_poi_get_data], tree2,esi
pop ebx ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫  cmp eax,0
cmp ebx,0
je .find_no je .find_no
mov ebx,eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
cmp dword[ebx],C_CHB cmp dword[ebx],C_CHB
jne .no_check jne .no_check
@ -583,8 +579,8 @@ proc get_code_auto_data_el_cbox
stdcall insert_text_label_data, ebx,0 stdcall insert_text_label_data, ebx,0
@@: @@:
stdcall dword[tl_node_poi_get_next_info], esi,tree2 stdcall dword[tl_node_poi_get_next_info], tree2,esi
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã mov esi,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp .beg_iterat jmp .beg_iterat
.find_no: .find_no:
@ -598,16 +594,16 @@ proc get_code_auto_data_libs_param
pushad pushad
insert_nl ;®âáâ㯠¤«ï ä®à¬ â¨à®¢ ­¨ï insert_nl ;®âáâ㯠¤«ï ä®à¬ â¨à®¢ ­¨ï
stdcall dword[tl_node_poi_get_info], 0,tree2 stdcall dword[tl_node_poi_get_info], tree2,0
pop esi mov esi,eax
.beg_iterat: .beg_iterat:
cmp esi,0 cmp esi,0
je .find_no je .find_no
stdcall dword[tl_node_poi_get_data], esi,tree2 stdcall dword[tl_node_poi_get_data], tree2,esi
pop ebx ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫  cmp eax,0
cmp ebx,0
je .find_no je .find_no
mov ebx,eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
cmp dword[ebx],C_LIB cmp dword[ebx],C_LIB
jne @f jne @f
@ -651,9 +647,8 @@ proc get_code_auto_data_libs_param
insert_nl insert_nl
@@: @@:
stdcall dword[tl_node_poi_get_next_info], esi,tree2 stdcall dword[tl_node_poi_get_next_info], tree2,esi
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã mov esi,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp .beg_iterat jmp .beg_iterat
.find_no: .find_no:
popad popad
@ -666,17 +661,16 @@ proc get_code_auto_data_libs_struc
pushad pushad
;insert_nl ;®âáâ㯠¤«ï ä®à¬ â¨à®¢ ­¨ï ;insert_nl ;®âáâ㯠¤«ï ä®à¬ â¨à®¢ ­¨ï
stdcall dword[tl_node_poi_get_info], 0,tree2 stdcall dword[tl_node_poi_get_info], tree2,0
pop esi mov esi,eax
.beg_iterat: .beg_iterat:
cmp esi,0 cmp esi,0
je .find_no je .find_no
stdcall dword[tl_node_poi_get_data], esi,tree2 stdcall dword[tl_node_poi_get_data], tree2,esi
pop ebx ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫  cmp eax,0
cmp ebx,0
je .find_no je .find_no
mov ebx,eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
cmp dword[ebx],C_LIB cmp dword[ebx],C_LIB
jne @f jne @f
;0,1,2,3,4,5 - l_nam,s_dir,i_met,... ;0,1,2,3,4,5 - l_nam,s_dir,i_met,...
@ -717,8 +711,8 @@ proc get_code_auto_data_libs_struc
insert_nl insert_nl
@@: @@:
stdcall dword[tl_node_poi_get_next_info], esi,tree2 stdcall dword[tl_node_poi_get_next_info], tree2,esi
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã mov esi,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp .beg_iterat jmp .beg_iterat
.find_no: .find_no:
@ -732,17 +726,16 @@ proc get_code_auto_data_libs
pushad pushad
insert_nl ;®âáâ㯠¤«ï ä®à¬ â¨à®¢ ­¨ï insert_nl ;®âáâ㯠¤«ï ä®à¬ â¨à®¢ ­¨ï
stdcall dword[tl_node_poi_get_info], 0,tree2 stdcall dword[tl_node_poi_get_info], tree2,0
pop esi mov esi,eax
.beg_iterat: .beg_iterat:
cmp esi,0 cmp esi,0
je .find_no je .find_no
stdcall dword[tl_node_poi_get_data], esi,tree2 stdcall dword[tl_node_poi_get_data], tree2,esi
pop ebx ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫  cmp eax,0
cmp ebx,0
je .find_no je .find_no
mov ebx,eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
cmp dword[ebx],C_LIB cmp dword[ebx],C_LIB
jne @f jne @f
;0,1,2,3,4,5 - l_nam,s_dir,i_met,... ;0,1,2,3,4,5 - l_nam,s_dir,i_met,...
@ -754,8 +747,8 @@ proc get_code_auto_data_libs
call get_code_lib_table call get_code_lib_table
@@: @@:
stdcall dword[tl_node_poi_get_next_info], esi,tree2 stdcall dword[tl_node_poi_get_next_info], tree2,esi
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã mov esi,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp .beg_iterat jmp .beg_iterat
.find_no: .find_no:
@ -770,23 +763,23 @@ get_code_lib_table:
pushad pushad
mov bl,byte[esi+2] mov bl,byte[esi+2]
mov edi,esi mov edi,esi
stdcall dword[tl_node_poi_get_data], esi,tree2 stdcall dword[tl_node_poi_get_data], tree2,esi
pop edx ;¯®«ã祭¨¥ ¤ ­­ëå த¨â¥«ì᪮£® ®¡ê¥ªâ  mov edx,eax ;¯®«ã祭¨¥ ¤ ­­ëå த¨â¥«ì᪮£® ®¡ê¥ªâ 
cmp edx,0 cmp eax,0
je @f je @f
@@: @@:
stdcall dword[tl_node_poi_get_next_info], esi,tree2 stdcall dword[tl_node_poi_get_next_info], tree2,esi
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã mov esi,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
cmp esi,0 cmp esi,0
je @f je @f
cmp byte[esi+2],bl ;lev cmp byte[esi+2],bl ;lev
jle @f jle @f
stdcall dword[tl_node_poi_get_data], esi,tree2 stdcall dword[tl_node_poi_get_data], tree2,esi
pop ecx ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫  cmp eax,0
cmp ecx,0
je @f je @f
cmp dword[ecx],C_IFN cmp dword[eax],C_IFN
jne @b jne @b
mov ecx,eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
;¢áâ ¢ª  㪠§ â¥«ï ­  äã­ªæ¨î ;¢áâ ¢ª  㪠§ â¥«ï ­  äã­ªæ¨î
test_bool_prop ecx,BIT_MOD_IMPORT_FUNCT_COMMENT test_bool_prop ecx,BIT_MOD_IMPORT_FUNCT_COMMENT
jae .no_com_0 jae .no_com_0
@ -803,18 +796,18 @@ pushad
stdcall insert_text, txt_dd_0_0 stdcall insert_text, txt_dd_0_0
mov esi,edi mov esi,edi
@@: @@:
stdcall dword[tl_node_poi_get_next_info], esi,tree2 stdcall dword[tl_node_poi_get_next_info], tree2,esi
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã mov esi,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
cmp esi,0 cmp esi,0
je @f je @f
cmp byte[esi+2],bl ;lev cmp byte[esi+2],bl ;lev
jle @f jle @f
stdcall dword[tl_node_poi_get_data], esi,tree2 stdcall dword[tl_node_poi_get_data], tree2,esi
pop ecx ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫  cmp eax,0
cmp ecx,0
je @f je @f
cmp dword[ecx],C_IFN cmp dword[eax],C_IFN
jne @b jne @b
mov ecx,eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
;¢áâ ¢ª  ¨¬¥­¨ ¨¬¯®àâ¨à®¢ ­­®© ä㭪樨 ;¢áâ ¢ª  ¨¬¥­¨ ¨¬¯®àâ¨à®¢ ­­®© ä㭪樨
test_bool_prop ecx,BIT_MOD_IMPORT_FUNCT_COMMENT test_bool_prop ecx,BIT_MOD_IMPORT_FUNCT_COMMENT
jae .no_com_1 jae .no_com_1
@ -839,16 +832,16 @@ proc get_code_auto_data_dop
pushad pushad
insert_nl ;®âáâ㯠¤«ï ä®à¬ â¨à®¢ ­¨ï insert_nl ;®âáâ㯠¤«ï ä®à¬ â¨à®¢ ­¨ï
stdcall dword[tl_node_poi_get_info], 0,tree2 stdcall dword[tl_node_poi_get_info], tree2,0
pop esi mov esi,eax
.beg_iterat: .beg_iterat:
cmp esi,0 cmp esi,0
je .find_no je .find_no
stdcall dword[tl_node_poi_get_data], esi,tree2 stdcall dword[tl_node_poi_get_data], tree2,esi
pop ebx ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫  cmp eax,0
cmp ebx,0
je .find_no je .find_no
mov ebx,eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
cmp dword[ebx],C_EDB cmp dword[ebx],C_EDB
jne @f jne @f
@ -907,9 +900,8 @@ proc get_code_auto_data_dop
jne @f jne @f
stdcall insert_text_label_data, ebx,9 stdcall insert_text_label_data, ebx,9
@@: @@:
stdcall dword[tl_node_poi_get_next_info], tree2,esi
stdcall dword[tl_node_poi_get_next_info], esi,tree2 mov esi,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp .beg_iterat jmp .beg_iterat
.find_no: .find_no:
@ -921,16 +913,16 @@ endp
align 4 align 4
proc get_code_auto_but proc get_code_auto_but
pushad pushad
stdcall dword[tl_node_poi_get_info], 0,tree2 stdcall dword[tl_node_poi_get_info], tree2,0
pop esi mov esi,eax
.beg_iterat: .beg_iterat:
cmp esi,0 cmp esi,0
je .find_no je .find_no
stdcall dword[tl_node_poi_get_data], esi,tree2 stdcall dword[tl_node_poi_get_data], tree2,esi
pop ebx ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫  cmp eax,0
cmp ebx,0
je .find_no je .find_no
mov ebx,eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
cmp dword[ebx],C_BUT cmp dword[ebx],C_BUT
jne @f jne @f
@ -960,8 +952,8 @@ proc get_code_auto_but
insert_nl insert_nl
@@: @@:
stdcall dword[tl_node_poi_get_next_info], esi,tree2 stdcall dword[tl_node_poi_get_next_info], tree2,esi
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã mov esi,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp .beg_iterat jmp .beg_iterat
.find_no: .find_no:
@ -973,16 +965,16 @@ endp
align 4 align 4
proc get_code_a_but_fun proc get_code_a_but_fun
pushad pushad
stdcall dword[tl_node_poi_get_info], 0,tree2 stdcall dword[tl_node_poi_get_info], tree2,0
pop esi mov esi,eax
.beg_iterat: .beg_iterat:
cmp esi,0 cmp esi,0
je .find_no je .find_no
stdcall dword[tl_node_poi_get_data], esi,tree2 stdcall dword[tl_node_poi_get_data], tree2,esi
pop ebx ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫  cmp eax,0
cmp ebx,0
je .find_no je .find_no
mov ebx,eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
cmp dword[ebx],C_BUT cmp dword[ebx],C_BUT
jne @f jne @f
@ -1000,8 +992,8 @@ proc get_code_a_but_fun
.c_fun: .c_fun:
@@: @@:
stdcall dword[tl_node_poi_get_next_info], esi,tree2 stdcall dword[tl_node_poi_get_next_info], tree2,esi
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã mov esi,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp .beg_iterat jmp .beg_iterat
.find_no: .find_no:
@ -1027,17 +1019,17 @@ endp
align 4 align 4
proc get_code_funct_key proc get_code_funct_key
pushad pushad
stdcall dword[tl_node_poi_get_info], 0,tree2 stdcall dword[tl_node_poi_get_info], tree2,0
pop esi mov esi,eax
.beg_iterat: .beg_iterat:
cmp esi,0 cmp esi,0
je .find_no je .find_no
stdcall dword[tl_node_poi_get_data], esi,tree2 stdcall dword[tl_node_poi_get_data], tree2,esi
pop ebx ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫  cmp eax,0
cmp ebx,0
je .find_no je .find_no
mov ebx,eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
cmp dword[ebx],C_EDB cmp dword[ebx],C_EDB
jne @f jne @f
stdcall insert_text, txt_std_key_ed stdcall insert_text, txt_std_key_ed
@ -1045,8 +1037,8 @@ proc get_code_funct_key
insert_nl insert_nl
@@: @@:
stdcall dword[tl_node_poi_get_next_info], esi,tree2 stdcall dword[tl_node_poi_get_next_info], tree2,esi
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã mov esi,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp .beg_iterat jmp .beg_iterat
.find_no: .find_no:
@ -1153,16 +1145,16 @@ endp
align 4 align 4
proc get_code_draw_obj proc get_code_draw_obj
pushad pushad
stdcall dword[tl_node_poi_get_info], 0,tree2 stdcall dword[tl_node_poi_get_info], tree2,0
pop esi mov esi,eax
.beg_iterat: .beg_iterat:
cmp esi,0 cmp esi,0
je .find_no je .find_no
stdcall dword[tl_node_poi_get_data], esi,tree2 stdcall dword[tl_node_poi_get_data], tree2,esi
pop ebx ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫  cmp eax,0
cmp ebx,0
je .find_no je .find_no
mov ebx,eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
cmp dword[ebx],C_EDB cmp dword[ebx],C_EDB
jne @f jne @f
@ -1314,8 +1306,8 @@ proc get_code_draw_obj
insert_nl insert_nl
.ob_draw_text: .ob_draw_text:
stdcall dword[tl_node_poi_get_next_info], esi,tree2 stdcall dword[tl_node_poi_get_next_info], tree2,esi
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã mov esi,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp .beg_iterat jmp .beg_iterat
.find_no: .find_no:

View File

@ -35,7 +35,7 @@ push eax ebx ecx edi
xor ecx,ecx xor ecx,ecx
mov cx,word[edi+obj_opt.img-obj_opt] ;cx - ¨­¤¥ªá £« ¢­®© ¨ª®­ª¨ ¤®¡ ¢«ï¥¬®£® ®¡ê¥ªâ  mov cx,word[edi+obj_opt.img-obj_opt] ;cx - ¨­¤¥ªá £« ¢­®© ¨ª®­ª¨ ¤®¡ ¢«ï¥¬®£® ®¡ê¥ªâ 
shl ecx,16 shl ecx,16
stdcall [tl_node_add], eax, ecx, tree2 ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ stdcall [tl_node_add], tree2,ecx,eax ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ
stdcall [tl_draw], tree2 stdcall [tl_draw], tree2
pop edi ecx ebx eax pop edi ecx ebx eax
ret ret
@ -62,7 +62,6 @@ but_element_change:
mov edx,dword[foc_obj] mov edx,dword[foc_obj]
mov dword[edx+u_object.typid-u_object],0 ;­  á«ãç © ¥á«¨ ­¨ç¥£® ­¥ ¢ë¡à ­® mov dword[edx+u_object.typid-u_object],0 ;­  á«ãç © ¥á«¨ ­¨ç¥£® ­¥ ¢ë¡à ­®
stdcall [tl_node_get_data],tree3 stdcall [tl_node_get_data],tree3
pop eax
cmp eax,0 cmp eax,0
je @f je @f
mov eax,dword[eax] ;¡¥à¥¬ ¯®à浪®¢ë© ­®¬¥à (¢ ¯ ¬ïâ¨) ¢ë¡à ­­®£® ®¡ê¥ªâ  mov eax,dword[eax] ;¡¥à¥¬ ¯®à浪®¢ë© ­®¬¥à (¢ ¯ ¬ïâ¨) ¢ë¡à ­­®£® ®¡ê¥ªâ 
@ -154,9 +153,8 @@ endp
;output: ;output:
; eax - ¤«¨­­  ⥪á⮢®£® ¯®«ï ¢­ãâਠ®¡ê¥ªâ  ; eax - ¤«¨­­  ⥪á⮢®£® ¯®«ï ¢­ãâਠ®¡ê¥ªâ 
align 4 align 4
proc get_obj_text_len_col, obj:dword, ind:dword proc get_obj_text_len_col uses ebx ecx edi, obj:dword, ind:dword
xor eax,eax xor eax,eax
push ebx ecx edi
mov ecx,dword[ind] mov ecx,dword[ind]
mov eax,dword[obj] mov eax,dword[obj]
mov ebx,dword[eax] ;¢ ebx ¯®¯ ¤ ¥â ª®¤ ®¡ê¥ªâ  mov ebx,dword[eax] ;¢ ebx ¯®¯ ¤ ¥â ª®¤ ®¡ê¥ªâ 
@ -187,7 +185,6 @@ push ebx ecx edi
@@: @@:
.end_fun: .end_fun:
pop edi ecx ebx
ret ret
endp endp
@ -277,23 +274,22 @@ align 4
proc find_obj_in_file, o_type:dword proc find_obj_in_file, o_type:dword
push ebx esi push ebx esi
mov ebx,[o_type] mov ebx,[o_type]
stdcall dword[tl_node_poi_get_info], 0,tree2 stdcall dword[tl_node_poi_get_info], tree2,0
pop esi mov esi,eax
@@: @@:
cmp esi,0 cmp esi,0
je .find_no je .find_no
stdcall dword[tl_node_poi_get_data], esi,tree2 stdcall dword[tl_node_poi_get_data], tree2,esi ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
pop eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
cmp eax,0 cmp eax,0
je .find_no je .find_no
cmp dword[eax],ebx ;ᬮâਬ ®¯¨á ­ «¨ ¨áª®¬ë© ®¡ê¥ªâ ¢ 㧫¥ cmp dword[eax],ebx ;ᬮâਬ ®¯¨á ­ «¨ ¨áª®¬ë© ®¡ê¥ªâ ¢ 㧫¥
je .find_yes je .find_yes
stdcall dword[tl_node_poi_get_next_info], esi,tree2 stdcall dword[tl_node_poi_get_next_info], tree2,esi
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã mov esi,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp @b jmp @b
@ -311,30 +307,28 @@ endp
;¢ë室: ;¢ë室:
;eax - 㪠§ â¥«ì ­  áâàãªâãàã ­ ©¤¥­­®£® ®¡ê¥ªâ  ;eax - 㪠§ â¥«ì ­  áâàãªâãàã ­ ©¤¥­­®£® ®¡ê¥ªâ 
align 4 align 4
proc find_obj_in_file_next, o_type:dword proc find_obj_in_file_next uses ebx esi, o_type:dword
push ebx esi
cmp dword[obj_find_last],0 cmp dword[obj_find_last],0
je .find_no je .find_no
mov ebx,dword[o_type] mov ebx,dword[o_type]
stdcall dword[tl_node_poi_get_next_info], dword[obj_find_last],tree2 stdcall dword[tl_node_poi_get_next_info], tree2,dword[obj_find_last]
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã mov esi,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
@@: @@:
cmp esi,0 cmp esi,0
je .find_no je .find_no
stdcall dword[tl_node_poi_get_data], esi,tree2 stdcall dword[tl_node_poi_get_data], tree2,esi ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
pop eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
cmp eax,0 cmp eax,0
je .find_no je .find_no
cmp dword[eax],ebx ;ᬮâਬ ®¯¨á ­ «¨ ¨áª®¬ë© ®¡ê¥ªâ ¢ 㧫¥ cmp dword[eax],ebx ;ᬮâਬ ®¯¨á ­ «¨ ¨áª®¬ë© ®¡ê¥ªâ ¢ 㧫¥
je .find_yes je .find_yes
stdcall dword[tl_node_poi_get_next_info], esi, tree2 stdcall dword[tl_node_poi_get_next_info], tree2,esi
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã mov esi,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp @b jmp @b
@ -345,7 +339,6 @@ push ebx esi
mov dword[obj_find_last],0 mov dword[obj_find_last],0
xor eax,eax xor eax,eax
@@: @@:
pop esi ebx
ret ret
endp endp

View File

@ -40,13 +40,13 @@ pushad
cmp dword[edx],C_VAR cmp dword[edx],C_VAR
jne .sel_end jne .sel_end
stdcall [tl_node_poi_get_info], 0,tree2 stdcall [tl_node_poi_get_info], tree2,0
pop edx
@@: @@:
cmp edx,0 cmp eax,0
je @f je @f
stdcall [tl_node_poi_get_data], edx,tree2 mov edx,eax
pop esi ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫  stdcall [tl_node_poi_get_data], tree2,edx
mov esi,eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
;------ ¤®¡ ¢«¥­¨¥ ®¡ê¥ªâ  ¢ ᯨ᮪ ------------------------------------------- ;------ ¤®¡ ¢«¥­¨¥ ®¡ê¥ªâ  ¢ ᯨ᮪ -------------------------------------------
mov ebx,[foc_obj] mov ebx,[foc_obj]
cmp ebx,esi cmp ebx,esi
@ -75,12 +75,12 @@ pushad
.zero: .zero:
shl ecx,16 ;¢ ecx ¨­¤¥ªá ¨ª®­ª¨ shl ecx,16 ;¢ ecx ¨­¤¥ªá ¨ª®­ª¨
stdcall dword[tl_node_add], u_object, ecx, tree3 ;áâàãªâãà  u_object ¢ ¤ ­­®¬ á«ãç ¥ ­¥ ᮡ«î¤ ¥âáï, ®­  ­ã¦­  ¯à®áâ® ª ª ¯ ¬ïâì ¤«ï ¢áâ ¢ª¨ stdcall dword[tl_node_add], tree3,ecx,u_object ;áâàãªâãà  u_object ¢ ¤ ­­®¬ á«ãç ¥ ­¥ ᮡ«î¤ ¥âáï, ®­  ­ã¦­  ¯à®áâ® ª ª ¯ ¬ïâì ¤«ï ¢áâ ¢ª¨
stdcall dword[tl_cur_next], tree3 ;¯¥à¥­®á¨¬ ªãàá®à ¢­¨§, çâ®-¡ë ­¥ ¯®¬¥­ï«áï ¯®à冷ª stdcall dword[tl_cur_next], tree3 ;¯¥à¥­®á¨¬ ªãàá®à ¢­¨§, çâ®-¡ë ­¥ ¯®¬¥­ï«áï ¯®à冷ª
.add_end: .add_end:
;------- ;-------
stdcall [tl_node_poi_get_next_info], edx,tree2 stdcall [tl_node_poi_get_next_info], tree2,edx
pop edx ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã mov edx,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp @b jmp @b
@@: @@:
@ -92,7 +92,6 @@ pushad
stdcall [tl_cur_beg],tree3 stdcall [tl_cur_beg],tree3
@@: @@:
stdcall [tl_node_get_data],tree3 stdcall [tl_node_get_data],tree3
pop eax
cmp eax,0 cmp eax,0
je .sel_end je .sel_end
cmp dword[eax],edx cmp dword[eax],edx

View File

@ -21,7 +21,7 @@ include 'obj_codes.inc'
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc, dll.Load @use_library_mem mem.Alloc,mem.Free,mem.ReAlloc, dll.Load
hed db 'kol_f_edit 17.04.13',0 hed db 'kol_f_edit 16.11.15',0
sizeof.TreeList equ 20 ;need for element 'tree_list' sizeof.TreeList equ 20 ;need for element 'tree_list'
@ -75,24 +75,22 @@ macro load_image_file path,buf,size { ;
db 0 db 0
@@: @@:
;32 - áâ ­¤ àâ­ë©  ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥­ ¡ëâì ¡ãä¥à á á¨á⥬­ë¬ ¯ã⥬ ;32 - áâ ­¤ àâ­ë©  ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥­ ¡ëâì ¡ãä¥à á á¨á⥬­ë¬ ¯ã⥬
copy_path .path_str,[32],file_name,0x0 copy_path .path_str,[32],file_name,0
else else
copy_path path,[32],file_name,0x0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®© copy_path path,[32],file_name,0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
end if end if
stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥­¨ï stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥­¨ï
mov [buf],eax mov [buf],eax
mov eax,70 ;70-ï äã­ªæ¨ï à ¡®â  á ä ©« ¬¨
mov [run_file_70.Function], 0 mov [run_file_70.Function], 0
mov [run_file_70.Position], 0 mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0 mov [run_file_70.Flags], 0
mov [run_file_70.Count], dword size mov [run_file_70.Count], dword size
m2m [run_file_70.Buffer], [buf] m2m [run_file_70.Buffer], eax
mov byte[run_file_70+20], 0 mov byte[run_file_70+20], 0
mov [run_file_70.FileName], file_name mov [run_file_70.FileName], file_name
mov ebx,run_file_70 mcall 70,run_file_70 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
cmp ebx,0xffffffff cmp ebx,0xffffffff
je @f je @f
;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥­­ë© ¡ãä¥à image_data ;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥­­ë© ¡ãä¥à image_data
@ -216,8 +214,7 @@ start:
stdcall dword[tl_data_init], tree1 stdcall dword[tl_data_init], tree1
stdcall dword[tl_data_init], tree2 stdcall dword[tl_data_init], tree2
copy_path fn_icon,sys_path,file_name,0x0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®© copy_path fn_icon,sys_path,file_name,0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
mov eax,70 ;load icon file
mov [run_file_70.Function], 0 mov [run_file_70.Function], 0
mov [run_file_70.Position], 54 mov [run_file_70.Position], 54
mov [run_file_70.Flags], 0 mov [run_file_70.Flags], 0
@ -225,8 +222,7 @@ start:
mov [run_file_70.Buffer], bmp_icon mov [run_file_70.Buffer], bmp_icon
mov [run_file_70.rezerv], 0 mov [run_file_70.rezerv], 0
mov [run_file_70.FileName], file_name mov [run_file_70.FileName], file_name
mov ebx,run_file_70 mcall 70,run_file_70
int 0x40
cmp ebx,-1 cmp ebx,-1
mov [err_ini0],1 mov [err_ini0],1
@ -265,15 +261,13 @@ start:
stdcall [buf2d_convert_text_matrix], buf_font stdcall [buf2d_convert_text_matrix], buf_font
copy_path fn_obj_opt,sys_path,fp_obj_opt,0x0 copy_path fn_obj_opt,sys_path,fp_obj_opt,0
;load options file ;load options file
mov eax,70
mov [run_file_70.Position], 0 mov [run_file_70.Position], 0
mov [run_file_70.Count], sizeof.ObjOpt*MAX_OBJ_TYPES+MAX_OBJ_CAPTIONS mov [run_file_70.Count], sizeof.ObjOpt*MAX_OBJ_TYPES+MAX_OBJ_CAPTIONS
mov [run_file_70.Buffer], obj_opt mov [run_file_70.Buffer], obj_opt
mov [run_file_70.FileName], fp_obj_opt mov [run_file_70.FileName], fp_obj_opt
mov ebx,run_file_70 mcall 70,run_file_70
int 0x40
cmp ebx,-1 cmp ebx,-1
mov [err_ini1],1 mov [err_ini1],1
@ -292,7 +286,7 @@ start:
xor cx,cx ;çâ®-¡ë ­¥ £«î稫® á ®âà¨æ â¥«ì­ë¬ ¨­¤¥ªá®¬ xor cx,cx ;çâ®-¡ë ­¥ £«î稫® á ®âà¨æ â¥«ì­ë¬ ¨­¤¥ªá®¬
.zero: .zero:
shl ecx,16 shl ecx,16
stdcall dword[tl_node_add], eax, ecx, tree1 ;¤®¡ ¢«ï¥¬ ­ §¢ ­¨¥ ®¡ê¥ªâ  stdcall dword[tl_node_add], tree1,ecx,eax ;¤®¡ ¢«ï¥¬ ­ §¢ ­¨¥ ®¡ê¥ªâ 
stdcall dword[tl_cur_next], tree1 ;¯¥à¥­®á¨¬ ªãàá®à ¢­¨§, çâ®-¡ë ­¥ ¯®¬¥­ï«áï ¯®à冷ª stdcall dword[tl_cur_next], tree1 ;¯¥à¥­®á¨¬ ªãàá®à ¢­¨§, çâ®-¡ë ­¥ ¯®¬¥­ï«áï ¯®à冷ª
add eax,sizeof.ObjOpt ;¯¥à¥å®¤ ­  á«¥¤ãî騩 ®¡ê¥ªâ add eax,sizeof.ObjOpt ;¯¥à¥å®¤ ­  á«¥¤ãî騩 ®¡ê¥ªâ
jmp @b jmp @b
@ -301,12 +295,12 @@ start:
.open_end: .open_end:
stdcall [OpenDialog_Init],OpenDialog_data ;¯®¤£®â®¢ª  ¤¨ «®£ 
stdcall [ted_init], tedit0 stdcall [ted_init], tedit0
copy_path fn_syntax,sys_path,file_name,0x0 copy_path fn_syntax,sys_path,file_name,0
; *** init syntax file *** ; *** init syntax file ***
; ¯à®¢¥à塞 à §¬¥à ä ©«  ᨭ⠪á¨á  ; ¯à®¢¥à塞 à §¬¥à ä ©«  ᨭ⠪á¨á 
mov eax,70
mov [run_file_70.Function], 5 mov [run_file_70.Function], 5
mov [run_file_70.Position], 0 mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0 mov [run_file_70.Flags], 0
@ -314,8 +308,7 @@ start:
mov dword[run_file_70.Buffer], open_b mov dword[run_file_70.Buffer], open_b
mov byte[run_file_70+20], 0 mov byte[run_file_70+20], 0
mov dword[run_file_70.FileName], file_name mov dword[run_file_70.FileName], file_name
mov ebx,run_file_70 mcall 70,run_file_70
int 0x40
cmp eax,0 cmp eax,0
jne @f jne @f
@ -488,11 +481,7 @@ pushad
cmp [err_opn],1 cmp [err_opn],1
jne @f jne @f
mov eax,4 mcall 4,10*65536+35,0x80ff0000,txtErrOpen
mov ebx,10*65536+35
mov ecx,0x80ff0000
mov edx,txtErrOpen
int 0x40
@@: @@:
stdcall [edit_box_draw], dword edit1 stdcall [edit_box_draw], dword edit1
@ -546,10 +535,12 @@ button:
cmp ah,5 cmp ah,5
jne @f jne @f
call but_open_proj call but_open_proj
jmp still
@@: @@:
cmp ah,6 cmp ah,6
jne @f jne @f
call but_save_proj call but_save_proj
jmp still
@@: @@:
;cmp ah,10 ;cmp ah,10
;jne @f ;jne @f
@ -558,60 +549,74 @@ button:
cmp ah,11 cmp ah,11
jne @f jne @f
call but_show_constructor call but_show_constructor
jmp still
@@: @@:
cmp ah,12 cmp ah,12
jne @f jne @f
call but_show_code call but_show_code
jmp still
@@: @@:
cmp ah,13 cmp ah,13
jne @f jne @f
call but_update call but_update
jmp still
@@: @@:
cmp ah,14 cmp ah,14
jne @f jne @f
call but_save_asm call but_save_asm
jmp still
@@: @@:
cmp ah,15 cmp ah,15
jne @f jne @f
call but_show_invis call but_show_invis
jmp still
@@: @@:
cmp ah,16 cmp ah,16
jne @f jne @f
call but_show_syntax call but_show_syntax
jmp still
@@: @@:
cmp ah,21 cmp ah,21
jne @f jne @f
call but_obj_move_up call but_obj_move_up
jmp still
@@: @@:
cmp ah,22 cmp ah,22
jne @f jne @f
call but_obj_move_down call but_obj_move_down
jmp still
@@: @@:
cmp ah,23 cmp ah,23
jne @f jne @f
call but_obj_copy call but_obj_copy
jmp still
@@: @@:
cmp ah,24 cmp ah,24
jne @f jne @f
call but_obj_paste call but_obj_paste
jmp still
@@: @@:
cmp ah,25 cmp ah,25
jne @f jne @f
call on_file_object_select call on_file_object_select
jmp still
@@: @@:
cmp ah,26 cmp ah,26
jne @f jne @f
stdcall [tl_info_undo], tree2 stdcall [tl_info_undo], tree2
stdcall [tl_draw], tree2 stdcall [tl_draw], tree2
jmp still
@@: @@:
cmp ah,27 cmp ah,27
jne @f jne @f
stdcall [tl_info_redo], tree2 stdcall [tl_info_redo], tree2
stdcall [tl_draw], tree2 stdcall [tl_draw], tree2
jmp still
@@: @@:
cmp ah,31 cmp ah,31
jne @f jne @f
call on_add_object call on_add_object
jmp still
@@: @@:
cmp ah,1 cmp ah,1
jne still jne still
@ -635,31 +640,50 @@ button:
@@: @@:
mcall -1 mcall -1
align 4
open_file_data dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï ®âªàëâ¨ï ä ©«®¢
open_file_size dd 0 ;à §¬¥à ®âªàë⮣® ä ©« 
align 4 align 4
but_open_proj: but_open_proj:
copy_path open_dialog_name,communication_area_default_path,file_name,0
pushad pushad
mov eax,70 mov [OpenDialog_data.type],0
stdcall [OpenDialog_Start],OpenDialog_data
cmp [OpenDialog_data.status],2
je .open_end
;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
mov [run_file_70.Function], 5
mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0
mov dword[run_file_70.Count], 0
mov dword[run_file_70.Buffer], open_b
mov byte[run_file_70+20], 0
mov dword[run_file_70.FileName], openfile_path
mcall 70,run_file_70
mov ecx,dword[open_b+32] ;+32 qword: à §¬¥à ä ©«  ¢ ¡ ©â å
mov [open_file_size],ecx
stdcall mem.ReAlloc,[open_file_data],ecx
mov [open_file_data],eax
mov [run_file_70.Function], 0 mov [run_file_70.Function], 0
mov [run_file_70.Position], 0 mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0 mov [run_file_70.Flags], 0
mov [run_file_70.Count], sizeof.object*MAX_CED_OBJECTS mov dword[run_file_70.Count], ecx
mov [run_file_70.Buffer], ced_info m2m dword[run_file_70.Buffer], eax
mov [run_file_70.rezerv], 0 mov byte[run_file_70+20], 0
push [edit1.text] mov dword[run_file_70.FileName], openfile_path
pop [run_file_70.FileName] mcall 70,run_file_70 ;§ £à㦠¥¬ ä ©«
mov ebx,run_file_70 cmp ebx,0xffffffff
int 0x40
cmp ebx,-1
mov [err_opn],1 mov [err_opn],1
je .open_end ;if open file je .open_end ;if open file
mov ecx,ced_info
add ecx,ebx
mov byte [ecx],0
mov [err_opn],0 mov [err_opn],0
stdcall [edit_box_set_text], edit1,openfile_path
stdcall dword[tl_info_clear], tree2 stdcall dword[tl_info_clear], tree2
mov eax,ced_info ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâë mov eax,[open_file_data] ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâë
@@: @@:
mov ebx,dword[eax] mov ebx,dword[eax]
cmp ebx,0 cmp ebx,0
@ -673,12 +697,12 @@ but_open_proj:
xor cx,cx ;çâ®-¡ë ­¥ £«î稫® á ®âà¨æ â¥«ì­ë¬ ¨­¤¥ªá®¬ xor cx,cx ;çâ®-¡ë ­¥ £«î稫® á ®âà¨æ â¥«ì­ë¬ ¨­¤¥ªá®¬
.zero: .zero:
shl ecx,16 ;¢ ecx ¨­¤¥ªá ¨ª®­ª¨ shl ecx,16 ;¢ ecx ¨­¤¥ªá ¨ª®­ª¨
mov cl,byte[eax++u_object.lvl-u_object] ;ã஢¥­ì ®¡ê¥ªâ  mov cl,byte[eax+u_object.lvl-u_object] ;ã஢¥­ì ®¡ê¥ªâ 
;tl_node_close_open - ­¥ ¯®¤å®¤¨â, â.ª. ¤¥©áâ¢ã¥â ­  ã§«ë ¨¬¥î騥 ¤®ç¥à­¨¥ ;tl_node_close_open - ­¥ ¯®¤å®¤¨â, â.ª. ¤¥©áâ¢ã¥â ­  ã§«ë ¨¬¥î騥 ¤®ç¥à­¨¥
mov ch,byte[eax++u_object.clo-u_object] ;§ ªàëâë©/®âªàëâë© mov ch,byte[eax+u_object.clo-u_object] ;§ ªàëâë©/®âªàëâë©
stdcall dword[tl_node_add], eax, ecx, tree2 ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ stdcall dword[tl_node_add], tree2,ecx,eax ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ
stdcall dword[tl_cur_next], tree2 ;¯¥à¥­®á¨¬ ªãàá®à ¢­¨§, çâ®-¡ë ­¥ ¯®¬¥­ï«áï ¯®à冷ª stdcall dword[tl_cur_next], tree2 ;¯¥à¥­®á¨¬ ªãàá®à ¢­¨§, çâ®-¡ë ­¥ ¯®¬¥­ï«áï ¯®à冷ª
add eax,sizeof.object ;¯¥à¥å®¤ ­  á«¥¤ãî騩 ®¡ê¥ªâ add eax,sizeof.object ;¯¥à¥å®¤ ­  á«¥¤ãî騩 ®¡ê¥ªâ
@ -697,17 +721,39 @@ but_open_proj:
;á®åà ­¥­¨¥ ä ©«  ¯à®íªâ  ­  ¤¨áª ;á®åà ­¥­¨¥ ä ©«  ¯à®íªâ  ­  ¤¨áª
align 4 align 4
but_save_proj: but_save_proj:
copy_path open_dialog_name,communication_area_default_path,file_name,0
pushad pushad
mov [OpenDialog_data.type],1
stdcall [OpenDialog_Start],OpenDialog_data
cmp [OpenDialog_data.status],2
je .end_save_file
;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
mov edi,ced_info ;¡¥à¥¬ à §¬¥à ¯ ¬ïâ¨, ­¥®¡å®¤¨¬®© ¤«ï á®åà ­¥­¨ï ä ©« 
xor ecx,ecx
stdcall [tl_node_poi_get_info], tree2,0
@@:
cmp eax,0
je @f
inc ecx
stdcall [tl_node_poi_get_next_info], tree2,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp @b
@@:
;movzx eax,word[tree2.info_size]
imul ecx,sizeof.object ;eax
add ecx,4 ;¬¥âª  ª®­æ  ä ©« 
mov [open_file_size],ecx
stdcall mem.ReAlloc,[open_file_data],ecx
mov [open_file_data],eax
stdcall [tl_node_poi_get_info], 0,tree2 mov edi,[open_file_data]
pop edx stdcall [tl_node_poi_get_info], tree2,0
mov edx,eax
@@: @@:
cmp edx,0 cmp edx,0
je @f je @f
stdcall [tl_node_poi_get_data], edx,tree2 stdcall [tl_node_poi_get_data], tree2,edx
pop esi ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫  mov esi,eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
mov bl,byte[edx+2] ;bl - ã஢¥­ì ®¡ê¥ªâ  mov bl,byte[edx+2] ;bl - ã஢¥­ì ®¡ê¥ªâ 
mov byte[esi+u_object.lvl-u_object],bl mov byte[esi+u_object.lvl-u_object],bl
@ -724,34 +770,31 @@ but_save_proj:
mov [esi+u_object.typid-u_object],eax mov [esi+u_object.typid-u_object],eax
mov eax,esi mov eax,esi
;ª®¯¨à㥬 ®¡ê¥ªâ ¢ ¯ ¬ïâì ¤«ï á®åà ­¥­¨ï ;ª®¯¨à㥬 ®¡ê¥ªâ ¢ ¯ ¬ïâì ¤«ï á®åà ­¥­¨ï
xor ecx,ecx movzx ecx,word[tree2.info_size]
mov cx,word[tree2.info_size]
cld cld
rep movsb rep movsb
;¢®ááâ ­ ¢«¨¢ ¥¬ ⨯ ®¡ê¥ªâ  ;¢®ááâ ­ ¢«¨¢ ¥¬ ⨯ ®¡ê¥ªâ 
pop dword[eax+u_object.typid-u_object] pop dword[eax+u_object.typid-u_object]
stdcall [tl_node_poi_get_next_info], edx,tree2 stdcall [tl_node_poi_get_next_info], tree2,edx
pop edx ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã mov edx,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp @b jmp @b
@@: @@:
mov dword[edi],0 ;¬¥âª  ª®­æ  ä ©«  mov dword[edi],0 ;¬¥âª  ª®­æ  ä ©« 
add edi,4 add edi,4
mov ecx,edi
sub ecx,ced_info ;ecx - à §¬¥à á®å࠭塞®£® ä ©« 
mov eax,70 stdcall [edit_box_set_text], edit1,openfile_path
mov ecx,[open_file_size] ;ecx - à §¬¥à á®å࠭塞®£® ä ©« 
mov [run_file_70.Function], 2 mov [run_file_70.Function], 2
mov [run_file_70.Position], 0 mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0 mov [run_file_70.Flags], 0
mov [run_file_70.Count], ecx mov [run_file_70.Count], ecx
mov [run_file_70.Buffer], ced_info m2m [run_file_70.Buffer], [open_file_data]
mov [run_file_70.rezerv], 0 mov [run_file_70.rezerv], 0
push [edit1.text] mov dword[run_file_70.FileName], openfile_path
pop [run_file_70.FileName] mcall 70,run_file_70
mov ebx,run_file_70
int 0x40
.end_save_file:
popad popad
ret ret
@ -759,38 +802,34 @@ but_save_proj:
;output: ;output:
; eax - ­®¬¥à ®¡ê¥ªâ  ; eax - ­®¬¥à ®¡ê¥ªâ 
align 4 align 4
proc get_obj_npp, p_obj_str:dword proc get_obj_npp uses ebx ecx, p_obj_str:dword
mov eax,2 mov ecx,2
push ebx edx
mov ebx,[p_obj_str] mov ebx,[p_obj_str]
stdcall [tl_node_poi_get_info], 0,tree2 stdcall [tl_node_poi_get_info], tree2,0
pop edx
@@: @@:
cmp edx,0 cmp eax,0
je .no_exist je .no_exist
cmp edx,ebx cmp eax,ebx
je @f je @f
inc eax inc ecx
stdcall [tl_node_poi_get_next_info], edx,tree2 stdcall [tl_node_poi_get_next_info], tree2,eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
pop edx ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp @b jmp @b
.no_exist: ;ª®£¤  ¨¤¥â áá뫪  ­  ­¥ áãé¥áâ¢ãî騩 ®¡ê¥ªâ .no_exist: ;ª®£¤  ¨¤¥â áá뫪  ­  ­¥ áãé¥áâ¢ãî騩 ®¡ê¥ªâ
xor eax,eax ;®¡­ã«ï¥¬ 㪠§ â¥«ì, çâ®-¡ë ­¥ á®åà ­ïâì ¢ ä ©« ¬ãá®à xor ecx,ecx ;®¡­ã«ï¥¬ 㪠§ â¥«ì, çâ®-¡ë ­¥ á®åà ­ïâì ¢ ä ©« ¬ãá®à
@@: @@:
pop edx ebx mov eax,ecx
ret ret
endp endp
;äã­ªæ¨ï ¤«ï á®åà ­¥­¨ï ᮧ¤ ­­®£® asm ä ©«  ;äã­ªæ¨ï ¤«ï á®åà ­¥­¨ï ᮧ¤ ­­®£® asm ä ©« 
align 4 align 4
but_save_asm: but_save_asm:
;stdcall [ted_but_save_file], tedit0,run_file_70,[edit_sav.text]
push edi push edi
mov edi, tedit0 mov edi, tedit0
stdcall [ted_but_save_file],edi,run_file_70,[edit_sav.text] stdcall [ted_save_file],edi,run_file_70,[edit_sav.text]
cmp ted_err_save,0 cmp ted_err_save,0
jne @f jne @f
stdcall [mb_create],msgbox_1,thread ;message: ” ©« ¡ë« á®åà ­¥­ stdcall [mb_create],msgbox_1,thread ;message: ” ©« ¡ë« á®åà ­¥­
@ -841,8 +880,8 @@ on_file_object_select:
jne @f jne @f
mov byte[prop_wnd_run],1 mov byte[prop_wnd_run],1
stdcall [tl_node_get_data], tree2 stdcall [tl_node_get_data], tree2
pop dword[foc_obj] mov dword[foc_obj],eax
cmp dword[foc_obj],0 cmp eax,0
je @f je @f
pushad pushad
;¢á¥ ¤¥©áâ¢¨ï ¯® ­ áâனª¥ í«¥¬¥­â®¢ ã¯à ¢«¥­¨ï ¢ë¯®«­ïîâáï ¢ ®ª­¥ ᮠ᢮©á⢠¬¨ ;¢á¥ ¤¥©áâ¢¨ï ¯® ­ áâனª¥ í«¥¬¥­â®¢ ã¯à ¢«¥­¨ï ¢ë¯®«­ïîâáï ¢ ®ª­¥ ᮠ᢮©á⢠¬¨
@ -858,7 +897,6 @@ align 4
on_add_object: on_add_object:
push eax ebx ecx push eax ebx ecx
stdcall [tl_node_get_data], tree1 stdcall [tl_node_get_data], tree1
pop eax
cmp eax,0 cmp eax,0
je @f je @f
xor ecx,ecx xor ecx,ecx
@ -874,7 +912,7 @@ push eax ebx ecx
stdcall mem_clear, u_object,sizeof.object stdcall mem_clear, u_object,sizeof.object
mov ebx,dword[eax] mov ebx,dword[eax]
mov dword[u_object.id],ebx mov dword[u_object.id],ebx
stdcall dword[tl_node_add], u_object, ecx, tree2 ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ stdcall dword[tl_node_add], tree2,ecx,u_object ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ
@@: @@:
pop ecx ebx eax pop ecx ebx eax
call draw_window call draw_window
@ -1239,14 +1277,51 @@ rb 32
.all_redraw dd 0 ;+80 .all_redraw dd 0 ;+80
.ar_offset dd 1 ;+84 .ar_offset dd 1 ;+84
;¤ ­­ë¥ ¤«ï ¤¨ «®£  ®âªàëâ¨ï ä ©«®¢
align 4
OpenDialog_data:
.type dd 0 ;0 - ®âªàëâì, 1 - á®åà ­¨âì, 2 - ¢ë¡à âì ¤â४â®à¨î
.procinfo dd procinfo ;+4
.com_area_name dd communication_area_name ;+8
.com_area dd 0 ;+12
.opendir_path dd plugin_path ;+16
.dir_default_path dd default_dir ;+20
.start_path dd file_name ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢
.draw_window dd draw_window ;+28
.status dd 0 ;+32
.openfile_path dd openfile_path ;+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
default_dir db '/rd/1',0
communication_area_name:
db 'FFFFFFFF_open_dialog',0
open_dialog_name:
db 'opendial',0
communication_area_default_path:
db '/rd/1/File managers/',0
Filter:
dd Filter.end - Filter ;.1
.1:
db 'CED',0
db 'ASM',0
.end:
db 0
data_of_code dd 0 data_of_code dd 0
sc system_colors sc system_colors
image_data dd 0 ;¯ ¬ïâì ¤«ï ¯à¥®¡à §®¢ ­¨ï ª à⨭ª¨ äã­ªæ¨ï¬¨ libimg image_data dd 0 ;¯ ¬ïâì ¤«ï ¯à¥®¡à §®¢ ­¨ï ª à⨭ª¨ äã­ªæ¨ï¬¨ libimg
ced_info object 0 ;on start == 0
rb sizeof.object*(MAX_CED_OBJECTS-1)
text_buffer db BUF_SIZE dup(0) text_buffer db BUF_SIZE dup(0)
fn_obj_opt db 'ob_o.opt',0 fn_obj_opt db 'ob_o.opt',0
obj_opt ObjOpt obj_opt ObjOpt
@ -1395,7 +1470,6 @@ import_box_lib:
tl_node_poi_get_next_info dd sz_tl_node_poi_get_next_info tl_node_poi_get_next_info dd sz_tl_node_poi_get_next_info
tl_node_poi_get_data dd sz_tl_node_poi_get_data tl_node_poi_get_data dd sz_tl_node_poi_get_data
ted_but_save_file dd sz_ted_but_save_file
ted_but_sumb_upper dd sz_ted_but_sumb_upper ted_but_sumb_upper dd sz_ted_but_sumb_upper
ted_but_sumb_lover dd sz_ted_but_sumb_lover ted_but_sumb_lover dd sz_ted_but_sumb_lover
ted_can_save dd sz_ted_can_save ted_can_save dd sz_ted_can_save
@ -1409,6 +1483,7 @@ import_box_lib:
ted_key dd sz_ted_key ted_key dd sz_ted_key
ted_mouse dd sz_ted_mouse ted_mouse dd sz_ted_mouse
ted_open_file dd sz_ted_open_file ted_open_file dd sz_ted_open_file
ted_save_file dd sz_ted_save_file
ted_text_add dd sz_ted_text_add ted_text_add dd sz_ted_text_add
ted_but_select_word dd sz_ted_but_select_word ted_but_select_word dd sz_ted_but_select_word
ted_but_cut dd sz_ted_but_cut ted_but_cut dd sz_ted_but_cut
@ -1461,7 +1536,6 @@ dd 0,0
sz_tl_node_poi_get_next_info db 'tl_node_poi_get_next_info',0 sz_tl_node_poi_get_next_info db 'tl_node_poi_get_next_info',0
sz_tl_node_poi_get_data db 'tl_node_poi_get_data',0 sz_tl_node_poi_get_data db 'tl_node_poi_get_data',0
sz_ted_but_save_file db 'ted_but_save_file',0
sz_ted_but_sumb_upper db 'ted_but_sumb_upper',0 sz_ted_but_sumb_upper db 'ted_but_sumb_upper',0
sz_ted_but_sumb_lover db 'ted_but_sumb_lover',0 sz_ted_but_sumb_lover db 'ted_but_sumb_lover',0
sz_ted_can_save db 'ted_can_save',0 sz_ted_can_save db 'ted_can_save',0
@ -1475,6 +1549,7 @@ dd 0,0
sz_ted_key db 'ted_key',0 sz_ted_key db 'ted_key',0
sz_ted_mouse db 'ted_mouse',0 sz_ted_mouse db 'ted_mouse',0
sz_ted_open_file db 'ted_open_file',0 sz_ted_open_file db 'ted_open_file',0
sz_ted_save_file db 'ted_save_file',0
sz_ted_text_add db 'ted_text_add',0 sz_ted_text_add db 'ted_text_add',0
sz_ted_but_select_word db 'ted_but_select_word',0 sz_ted_but_select_word db 'ted_but_select_word',0
sz_ted_but_cut db 'ted_but_cut',0 sz_ted_but_cut db 'ted_but_cut',0
@ -1564,13 +1639,13 @@ load_lib_end:
align 16 align 16
procinfo process_information
run_file_70 FileInfoBlock run_file_70 FileInfoBlock
open_b rb 560 open_b rb 560
IncludeIGlobals IncludeIGlobals
i_end: i_end:
IncludeUGlobals IncludeUGlobals
procinfo process_information
buf_cmd_lin rb 1024 buf_cmd_lin rb 1024
file_name rb 1024 ;icon file path file_name rb 1024 ;icon file path
fp_obj_opt rb 1024 ;obj options file patch fp_obj_opt rb 1024 ;obj options file patch
@ -1582,4 +1657,7 @@ IncludeUGlobals
stacktop: ;¢¢¥àåã á⥪ ®á­®¢­®© ¯à®£à ¬¬ë stacktop: ;¢¢¥àåã á⥪ ®á­®¢­®© ¯à®£à ¬¬ë
sys_path rb 1024 sys_path rb 1024
library_path rb 1024 library_path rb 1024
plugin_path rb 4096
openfile_path rb 4096
filename_area rb 256
mem: mem: