2010-05-31 01:27:14 +04:00
|
|
|
|
|
|
|
|
|
struct TexColViv
|
2011-08-22 19:58:27 +04:00
|
|
|
|
Text rb MAX_COLOR_WORD_LEN ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
f1 dd 0 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
flags db ? ; f1+4 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
endc db ? ; f1+5 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> flags&4)
|
|
|
|
|
escc db ? ; f1+6 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> flags&4)
|
|
|
|
|
color db ? ; f1+7 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-05-31 01:27:14 +04:00
|
|
|
|
ends
|
|
|
|
|
|
|
|
|
|
count_colors_text dd 1
|
|
|
|
|
ColWords dd 0
|
|
|
|
|
color_cursor dd ?
|
|
|
|
|
color_wnd_capt dd ?
|
|
|
|
|
color_wnd_work dd ?
|
|
|
|
|
color_wnd_bord dd ?
|
|
|
|
|
color_select dd ?
|
|
|
|
|
color_cur_text dd ?
|
|
|
|
|
color_wnd_text dd ?
|
|
|
|
|
|
|
|
|
|
options_file dd 0
|
2019-01-15 15:24:51 +03:00
|
|
|
|
open_file_size dd 0
|
|
|
|
|
unpac_mem dd 0
|
2010-05-31 01:27:14 +04:00
|
|
|
|
tex_colors dd 0
|
|
|
|
|
tex_help_f1 dd 0
|
|
|
|
|
|
|
|
|
|
Col dd 0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> TexColViv
|
|
|
|
|
|
|
|
|
|
keyUpr dd 0
|
|
|
|
|
err_opn db 0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
err_sav db 0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
sc system_colors
|
|
|
|
|
|
|
|
|
|
run_file_70 FileInfoBlock
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
InitColText:
|
|
|
|
|
pushad
|
|
|
|
|
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mov ebx,[fn_col_option]
|
2010-05-31 01:27:14 +04:00
|
|
|
|
copy_path ebx,fn_syntax_dir,file_name_rez,0
|
|
|
|
|
copy_path file_name_rez,sys_path,file_name,0
|
|
|
|
|
|
2019-01-15 15:24:51 +03:00
|
|
|
|
;[fn_col_option] = '*.syn'
|
|
|
|
|
;fn_syntax_dir = 'info/'
|
|
|
|
|
;file_name_rez = 'info/*.syn'
|
|
|
|
|
|
|
|
|
|
mov [run_file_70.Function], SSF_GET_INFO
|
|
|
|
|
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], file_name
|
|
|
|
|
mcall SF_FILE,run_file_70
|
|
|
|
|
|
|
|
|
|
mov ecx,dword[open_b+32] ;+32 qword: <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
stdcall mem.ReAlloc,[options_file],ecx
|
|
|
|
|
mov [options_file],eax
|
|
|
|
|
mov [open_file_size],ecx
|
|
|
|
|
|
|
|
|
|
mov [run_file_70.Function], SSF_READ_FILE
|
2014-07-01 17:46:54 +04:00
|
|
|
|
mov [run_file_70.Position], 0
|
|
|
|
|
mov [run_file_70.Flags], 0
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mov [run_file_70.Count], ecx
|
|
|
|
|
m2m dword[run_file_70.Buffer], dword[options_file]
|
2014-07-01 17:46:54 +04:00
|
|
|
|
mov byte[run_file_70+20], 0
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mov dword[run_file_70.FileName], file_name
|
|
|
|
|
mcall SF_FILE,run_file_70 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
test eax,eax
|
|
|
|
|
jnz .no_colors
|
|
|
|
|
cmp ebx,0xffffffff
|
|
|
|
|
je .no_colors
|
2010-05-31 01:27:14 +04:00
|
|
|
|
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mcall SF_SET_CAPTION,1,file_name
|
2010-05-31 01:27:14 +04:00
|
|
|
|
|
|
|
|
|
;init: count_colors_text, ColWords, ...
|
|
|
|
|
mov dword[count_colors_text],1
|
|
|
|
|
mov dword[ColWords],0
|
|
|
|
|
mov dword[tex_help_f1],0
|
|
|
|
|
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mov edi,[options_file]
|
|
|
|
|
cmp dword[edi],'KPCK'
|
|
|
|
|
jne .end_unpack
|
|
|
|
|
;notify_window_run ...
|
|
|
|
|
mov ecx,[edi+4]
|
|
|
|
|
cmp [open_file_size],ecx
|
|
|
|
|
jge @f
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
stdcall mem.ReAlloc,edi,ecx
|
|
|
|
|
mov [options_file],eax
|
|
|
|
|
mov [open_file_size],ecx
|
|
|
|
|
@@:
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
stdcall mem.ReAlloc,[unpac_mem],ecx
|
|
|
|
|
mov [unpac_mem],eax
|
|
|
|
|
|
|
|
|
|
stdcall unpack,[options_file],eax
|
|
|
|
|
mov edi,[options_file]
|
|
|
|
|
mov esi,[unpac_mem]
|
|
|
|
|
mov ecx,[edi+4]
|
|
|
|
|
cld
|
|
|
|
|
rep movsb
|
|
|
|
|
.end_unpack:
|
2010-05-31 01:27:14 +04:00
|
|
|
|
mov esi,[options_file]
|
|
|
|
|
mov edi,count_colors_text
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mov ecx,9
|
|
|
|
|
rep movsd
|
2010-05-31 01:27:14 +04:00
|
|
|
|
|
|
|
|
|
mov eax,[options_file]
|
|
|
|
|
add eax,32
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mov [tex_colors],eax
|
2010-05-31 01:27:14 +04:00
|
|
|
|
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mov eax,[count_colors_text] ;init: Col (offset to key words)
|
2010-05-31 01:27:14 +04:00
|
|
|
|
add eax,8
|
|
|
|
|
shl eax,2
|
|
|
|
|
add eax,[options_file]
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mov [Col],eax
|
2010-05-31 01:27:14 +04:00
|
|
|
|
|
|
|
|
|
;init: tex_help_f1
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mov ecx,[ColWords]
|
2010-05-31 01:27:14 +04:00
|
|
|
|
imul ecx,sizeof.TexColViv
|
2019-01-15 15:24:51 +03:00
|
|
|
|
add ecx,[Col]
|
|
|
|
|
mov [tex_help_f1],ecx
|
2010-05-31 01:27:14 +04:00
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
stdcall [ted_clear], tedit0,1
|
|
|
|
|
|
|
|
|
|
stdcall print_capt,capt_header
|
|
|
|
|
|
|
|
|
|
stdcall print_capt,col_1
|
|
|
|
|
stdcall print_color,[color_cursor]
|
|
|
|
|
stdcall print_capt,col_2
|
|
|
|
|
stdcall print_color,[color_wnd_capt]
|
|
|
|
|
stdcall print_capt,col_3
|
|
|
|
|
stdcall print_color,[color_wnd_work]
|
|
|
|
|
stdcall print_capt,col_4
|
|
|
|
|
stdcall print_color,[color_wnd_bord]
|
|
|
|
|
stdcall print_capt,col_5
|
|
|
|
|
stdcall print_color,[color_select]
|
|
|
|
|
stdcall print_capt,col_6
|
|
|
|
|
stdcall print_color,[color_cur_text]
|
|
|
|
|
|
|
|
|
|
stdcall print_capt,col_7
|
|
|
|
|
mov ecx,[count_colors_text] ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov eax,[tex_colors]
|
|
|
|
|
@@:
|
|
|
|
|
stdcall print_capt,capt_type_dd
|
|
|
|
|
stdcall print_color,[eax]
|
|
|
|
|
add eax,4
|
|
|
|
|
loop @b
|
|
|
|
|
|
|
|
|
|
stdcall print_capt,capt_lbl_wo
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mov ecx,[ColWords]
|
2010-05-31 01:27:14 +04:00
|
|
|
|
mov eax,[Col]
|
|
|
|
|
xor ebx,ebx
|
2019-01-15 15:24:51 +03:00
|
|
|
|
@@: ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-05-31 01:27:14 +04:00
|
|
|
|
inc ebx
|
|
|
|
|
stdcall print_word,eax,ebx
|
|
|
|
|
add eax,sizeof.TexColViv
|
|
|
|
|
loop @b
|
|
|
|
|
|
|
|
|
|
stdcall print_capt,capt_lbl_f1
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mov ecx,[ColWords]
|
2010-05-31 01:27:14 +04:00
|
|
|
|
mov eax,[Col]
|
|
|
|
|
xor ebx,ebx
|
2019-01-15 15:24:51 +03:00
|
|
|
|
@@: ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-05-31 01:27:14 +04:00
|
|
|
|
inc ebx
|
|
|
|
|
stdcall print_word_f1,eax,ebx
|
|
|
|
|
add eax,sizeof.TexColViv
|
|
|
|
|
loop @b
|
|
|
|
|
|
2019-01-15 15:24:51 +03:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> PathShow
|
|
|
|
|
stdcall [PathShow_prepare], PathShow_data_1
|
2011-08-20 23:11:46 +04:00
|
|
|
|
call draw_window
|
2010-05-31 01:27:14 +04:00
|
|
|
|
|
|
|
|
|
.no_colors:
|
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
proc print_color, color:dword
|
|
|
|
|
pushad
|
|
|
|
|
mov eax,dword[color]
|
|
|
|
|
|
|
|
|
|
mov ebx,eax ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> red <EFBFBD> blue
|
|
|
|
|
shr ebx,16
|
|
|
|
|
xchg al,bl
|
|
|
|
|
and eax,0xffff
|
|
|
|
|
and ebx,0xff
|
|
|
|
|
shl ebx,16
|
|
|
|
|
or eax,ebx
|
|
|
|
|
|
|
|
|
|
ror al,4
|
|
|
|
|
ror eax,8
|
|
|
|
|
ror al,4
|
|
|
|
|
ror eax,8
|
|
|
|
|
ror al,4
|
|
|
|
|
rol eax,16
|
|
|
|
|
mov edi,text_buffer
|
|
|
|
|
mov word[edi],'0x'
|
|
|
|
|
add edi,2
|
|
|
|
|
mov ecx,6
|
|
|
|
|
@@:
|
|
|
|
|
mov ebx,eax
|
|
|
|
|
and ebx,0xf
|
|
|
|
|
cmp bx,9
|
|
|
|
|
jle .cifra
|
|
|
|
|
add bx,39
|
|
|
|
|
.cifra:
|
|
|
|
|
add bx,48
|
|
|
|
|
mov byte[edi],bl
|
|
|
|
|
inc edi
|
|
|
|
|
shr eax,4
|
|
|
|
|
loop @b
|
|
|
|
|
mov byte[edi],13
|
|
|
|
|
mov ebx,ted_opt_ed_change_time+ted_opt_ed_move_cursor
|
|
|
|
|
stdcall [ted_text_add], tedit0,text_buffer,9,ebx
|
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
proc print_capt, capt:dword
|
|
|
|
|
pushad
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mov esi,[capt]
|
2010-05-31 01:27:14 +04:00
|
|
|
|
stdcall str_len,esi
|
|
|
|
|
stdcall [ted_text_add], tedit0,esi,eax,ted_opt_ed_change_time+ted_opt_ed_move_cursor
|
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
proc print_word, text:dword, index:dword
|
|
|
|
|
pushad
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mov edi,text_buffer
|
|
|
|
|
mov byte[edi],0
|
|
|
|
|
stdcall str_cat,edi,capt_beg_word
|
|
|
|
|
stdcall str_len,edi
|
|
|
|
|
add edi,eax
|
2010-05-31 01:27:14 +04:00
|
|
|
|
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mov ecx,[text]
|
|
|
|
|
stdcall code_string,ecx,edi ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
stdcall str_cat,edi,capt_end_word
|
2010-05-31 01:27:14 +04:00
|
|
|
|
|
2019-01-15 15:24:51 +03:00
|
|
|
|
cmp dword[ecx+TexColViv.f1],0
|
2010-05-31 01:27:14 +04:00
|
|
|
|
je @f
|
2019-01-15 15:24:51 +03:00
|
|
|
|
stdcall str_cat_value,edi,[index]
|
2010-05-31 01:27:14 +04:00
|
|
|
|
@@:
|
|
|
|
|
|
2019-01-15 15:24:51 +03:00
|
|
|
|
stdcall str_len,edi
|
|
|
|
|
add edi,eax
|
|
|
|
|
mov word[edi],','
|
|
|
|
|
inc edi
|
|
|
|
|
movzx eax,byte[ecx+TexColViv.flags]
|
2010-05-31 01:27:14 +04:00
|
|
|
|
stdcall str_cat_value,edi,eax
|
|
|
|
|
stdcall str_len,edi
|
|
|
|
|
add edi,eax
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mov word[edi],','
|
2010-05-31 01:27:14 +04:00
|
|
|
|
inc edi
|
|
|
|
|
|
2019-01-15 15:24:51 +03:00
|
|
|
|
movzx eax,word[ecx+TexColViv.endc] ;(escc shl 8)+endc
|
|
|
|
|
or eax,eax ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
jz @f
|
2010-05-31 01:27:14 +04:00
|
|
|
|
stdcall str_cat_value,edi,eax
|
|
|
|
|
stdcall str_len,edi
|
|
|
|
|
add edi,eax
|
|
|
|
|
@@:
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mov word[edi],','
|
2010-05-31 01:27:14 +04:00
|
|
|
|
inc edi
|
|
|
|
|
|
2019-01-15 15:24:51 +03:00
|
|
|
|
movzx eax,byte[ecx+TexColViv.color]
|
2010-05-31 01:27:14 +04:00
|
|
|
|
stdcall str_cat_value,edi,eax
|
|
|
|
|
stdcall str_len,edi
|
|
|
|
|
add edi,eax
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mov word[edi],13
|
2010-05-31 01:27:14 +04:00
|
|
|
|
|
|
|
|
|
mov esi,text_buffer
|
|
|
|
|
stdcall str_len,esi
|
2019-01-15 15:24:51 +03:00
|
|
|
|
stdcall [ted_text_add], tedit0,esi,eax,ted_opt_ed_change_time+ted_opt_ed_move_cursor
|
2010-05-31 01:27:14 +04:00
|
|
|
|
|
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
proc print_word_f1, text:dword, index:dword
|
|
|
|
|
pushad
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mov edi,[text]
|
|
|
|
|
mov esi,[edi+TexColViv.f1]
|
2010-05-31 01:27:14 +04:00
|
|
|
|
cmp esi,0
|
|
|
|
|
je @f
|
|
|
|
|
mov ebx,text_buffer
|
|
|
|
|
mov byte[ebx],0
|
|
|
|
|
stdcall str_cat,ebx,capt_point
|
|
|
|
|
stdcall str_cat_value,ebx,[index]
|
|
|
|
|
stdcall str_cat,ebx,capt_beg_db
|
|
|
|
|
stdcall str_len,ebx
|
|
|
|
|
add ebx,eax
|
|
|
|
|
|
2019-01-15 15:24:51 +03:00
|
|
|
|
add esi,[tex_help_f1]
|
2010-05-31 01:27:14 +04:00
|
|
|
|
stdcall code_string,esi,ebx ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
stdcall str_cat,ebx,capt_end_word_f1
|
|
|
|
|
|
|
|
|
|
mov ebx,text_buffer
|
|
|
|
|
stdcall str_len,ebx
|
|
|
|
|
stdcall [ted_text_add], tedit0,ebx,eax,ted_opt_ed_move_cursor
|
|
|
|
|
@@:
|
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
2019-01-15 15:24:51 +03:00
|
|
|
|
;description:
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-05-31 01:27:14 +04:00
|
|
|
|
align 4
|
|
|
|
|
proc code_string, text:dword, out_text:dword
|
|
|
|
|
pushad
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mov esi,[text]
|
2010-05-31 01:27:14 +04:00
|
|
|
|
stdcall str_len,esi
|
|
|
|
|
mov ecx,eax
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mov edi,[out_text]
|
2020-05-04 14:55:42 +03:00
|
|
|
|
or ecx,ecx
|
|
|
|
|
jz .end_copy ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-05-31 01:27:14 +04:00
|
|
|
|
|
|
|
|
|
.copy:
|
|
|
|
|
mov al,byte[esi]
|
|
|
|
|
inc esi
|
|
|
|
|
cmp al,9
|
|
|
|
|
je @f
|
|
|
|
|
cmp al,13
|
|
|
|
|
je @f
|
|
|
|
|
cmp al,39
|
|
|
|
|
je @f
|
|
|
|
|
mov byte[edi],al
|
|
|
|
|
inc edi
|
|
|
|
|
loop .copy
|
|
|
|
|
jmp .end_copy
|
|
|
|
|
@@:
|
|
|
|
|
mov byte[edi],39
|
|
|
|
|
mov byte[edi+1],','
|
|
|
|
|
add edi,2
|
|
|
|
|
and eax,0xff
|
|
|
|
|
mov dword[edi],0
|
2019-01-15 15:24:51 +03:00
|
|
|
|
stdcall convert_int_to_str,4
|
2010-05-31 01:27:14 +04:00
|
|
|
|
stdcall str_len,edi
|
|
|
|
|
add edi,eax
|
|
|
|
|
mov byte[edi],','
|
|
|
|
|
mov byte[edi+1],39
|
|
|
|
|
add edi,2
|
|
|
|
|
loop .copy
|
|
|
|
|
.end_copy:
|
|
|
|
|
mov byte[edi],0
|
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
proc mem_clear, mem:dword, len:dword
|
|
|
|
|
push eax ecx edi
|
|
|
|
|
cld
|
|
|
|
|
xor al,al
|
|
|
|
|
mov edi, dword[mem]
|
|
|
|
|
mov ecx, dword[len]
|
|
|
|
|
repne stosb
|
|
|
|
|
pop edi ecx eax
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
proc str_cat, str1:dword, str2:dword
|
|
|
|
|
push eax ecx edi esi
|
|
|
|
|
mov esi,dword[str2]
|
|
|
|
|
stdcall str_len,esi
|
|
|
|
|
mov ecx,eax
|
|
|
|
|
inc ecx
|
|
|
|
|
mov edi,dword[str1]
|
|
|
|
|
stdcall str_len,edi
|
|
|
|
|
add edi,eax
|
|
|
|
|
cld
|
|
|
|
|
repne movsb
|
|
|
|
|
pop esi edi ecx eax
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
proc str_cat_value, str1:dword, value:dword
|
|
|
|
|
pushad
|
|
|
|
|
mov edi,[str1]
|
|
|
|
|
stdcall str_len,edi
|
|
|
|
|
add edi,eax
|
|
|
|
|
mov eax,[value]
|
2019-01-15 15:24:51 +03:00
|
|
|
|
stdcall convert_int_to_str,12
|
2010-05-31 01:27:14 +04:00
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
;output:
|
|
|
|
|
; eax = strlen
|
|
|
|
|
align 4
|
|
|
|
|
proc str_len, str1:dword
|
|
|
|
|
mov eax,[str1]
|
|
|
|
|
@@:
|
|
|
|
|
cmp byte[eax],0
|
|
|
|
|
je @f
|
|
|
|
|
inc eax
|
|
|
|
|
jmp @b
|
|
|
|
|
@@:
|
|
|
|
|
sub eax,[str1]
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
;input:
|
2019-01-15 15:24:51 +03:00
|
|
|
|
; eax - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; edi - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; len - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;output:
|
2010-05-31 01:27:14 +04:00
|
|
|
|
align 4
|
2019-01-15 15:24:51 +03:00
|
|
|
|
proc convert_int_to_str uses eax ecx edx edi esi, len:dword
|
|
|
|
|
mov esi,[len]
|
|
|
|
|
add esi,edi
|
|
|
|
|
dec esi
|
2010-05-31 01:27:14 +04:00
|
|
|
|
call .str
|
|
|
|
|
ret
|
2019-01-15 15:24:51 +03:00
|
|
|
|
endp
|
2010-05-31 01:27:14 +04:00
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
.str:
|
2019-01-15 15:24:51 +03:00
|
|
|
|
mov ecx,10
|
|
|
|
|
cmp eax,ecx
|
2010-05-31 01:27:14 +04:00
|
|
|
|
jb @f
|
2019-01-15 15:24:51 +03:00
|
|
|
|
xor edx,edx
|
|
|
|
|
div ecx
|
|
|
|
|
push edx
|
|
|
|
|
;dec edi ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
call .str
|
2010-05-31 01:27:14 +04:00
|
|
|
|
pop eax
|
2019-01-15 15:24:51 +03:00
|
|
|
|
@@:
|
|
|
|
|
cmp edi,esi
|
|
|
|
|
jge @f
|
|
|
|
|
or al,0x30
|
|
|
|
|
stosb
|
|
|
|
|
mov byte[edi],0 ;<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0, <EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
@@:
|
2010-05-31 01:27:14 +04:00
|
|
|
|
ret
|