struct f70 func_n dd ? param1 dd ? param2 dd ? param3 dd ? param4 dd ? rezerv db ? name dd ? ends struct TexSelect x0 dd ? y0 dd ? x1 dd ? y1 dd ? ends struct TexColViv Text rb MAX_COLOR_WORD_LEN; // слово f1 dd 0 wwo db ? ; whole words only endc db ? ; символ конца выделения (wwo&4) color db ? ; номер цвета ends struct symbol c db ? ; +0 символ col db ? ; +1 цвет perv dd ? ; +2 next dd ? ; +6 указатели tc dd ? ; +10 врем. создания td dd ? ; +14 врем. удаления ends ColColor dd 1 ColWords dd 0 CURSOR_COLOR dd 0x808080 WND_CAPT_COLOR dd 0x80 WND_WORK_COLOR dd 0x0 WND_BORD_COLOR dd 0xd0d0d0 SELECT_COLOR dd 0x208080 CUR_TEXT_COLOR dd 0xff0000 WND_TEXT_COLOR dd 0xffff00 options_file dd 0 options_file_end dd 0 tex_colors dd 0 tex_help_f1 dd 0 FkPos: rd 256 Col dd 0 ;указатель на структуры ключевых слов TexColViv conv_tabl rb 128 ; таблица для конвертирования scan-кода в ascii-код keyUpr dd 0 err_opn db 0 ;ошибка открытия файла err_sav db 0 ;ошибка сохранения файла panel_id db 0 ;номер открытой панели ch_tim dd ? ; количество изменений в файле ls_tim dd ? ; время последнего сохранения co_tim dd ? ; время последней цветовой разметки tim_Undo dd ? ; количество отмененных действий gpOpt db 0 mode_colored db 1 ; режим выделения слов цветом (0-выкл. 1-вкл.) key_new db 0 ; символ, который будет добавлятся с клавиатуры tex dd 0 ;text memory pointer tex_1 dd 0 ;text first symbol pointer tex_end dd 0 ;text end memory pointer hed db 'TextEditor 05.02.10',0 ;подпись окна sc system_colors wndMain BOX 0,50,440,150 recMain BOX 30,23,7,10 curMod db 1 cur_x dd 0 cur_y dd 0 invis db 0 ;режим показа непечатаемых символов symbol_new_line db 20 ;символ завершения строки dragm db 0 ;выделение от мыши dragk db 0 ;выделение от клавиатуры sel TexSelect 0,0,0,0 ;структура выделения seln TexSelect ;дополнительная структура выделения help_id dd -1 ;идентификатор для справки fn_icon db 'te_icon.bmp',0 bmp_icon dd 0 run_file_70 f70 ;input: ; reg = index ;output: ; reg = pointer to 'tex' struct macro ConvertIndexToPointer reg { imul reg,sizeof.symbol add reg,[tex] } ;output: ; al = 1 - can save CanSave: push ecx mov ecx,[ch_tim] sub ecx,[tim_Undo] mov al,1 cmp [ls_tim],ecx jne @f dec al @@: pop ecx ret ;output: ; al = 1 - selected IsSel: push ebx xor al,al cmp [dragm],1 je @f mov al,1 mov ebx,[sel.x0] cmp ebx,[sel.x1] jne @f mov ebx,[sel.y0] cmp ebx,[sel.y1] jne @f xor al,al @@: pop ebx ret SelNormalize: push ecx esi edi mov esi,sel mov edi,seln mov ecx,sizeof.TexSelect rep movsb jmp @f .swp_f: mov ecx,[seln.x0] m2m [seln.x0],[seln.x1] mov [seln.x1],ecx mov ecx,[seln.y0] cmp ecx,[seln.y1] ;(sel.y0>sel.y1) jle .end_f m2m [seln.y0],[seln.y1] mov [seln.y1],ecx jmp .end_f @@: mov ecx,[seln.y0] cmp ecx,[seln.y1] ;(sel.y0>sel.y1) jg .swp_f cmp ecx,[seln.y1] ;(sel.y0==sel.y1) jne .end_f mov ecx,[seln.x0] cmp ecx,[seln.x1] ;(sel.x0>sel.x1) jg .swp_f .end_f: pop edi esi ecx ret SelStart: push ecx mov ecx,[cur_x] add ecx,[hScr.position] mov [sel.x0],ecx mov [sel.x1],ecx mov ecx,[cur_y] add ecx,[wScr.position] mov [sel.y0],ecx mov [sel.y1],ecx pop ecx ret align 4 SelMove: push ecx mov ecx,[cur_x] add ecx,[hScr.position] mov [sel.x1],ecx mov ecx,[cur_y] add ecx,[wScr.position] mov [sel.y1],ecx pop ecx call draw_but_toolbar ;redraw toolbar (need to button Copy) ret ;input: ; al = 1 - clear all memory Clear: mov [cur_x],0 mov [cur_y],0 mov [ch_tim],0 mov [ls_tim],0 mov [co_tim],0 mov [tim_Undo],0 mov [help_id],-1 mov [wScr.position],0 mov [wScr.max_area],100 mov [wScr.redraw],1 mov [hScr.position],0 mov [hScr.max_area],100 mov [sel.x0],0 mov [sel.y0],0 mov [sel.x1],0 mov [sel.y1],0 cmp al,0 je .exit push ecx edx mov ecx,sizeof.symbol*maxChars mov edx,[tex] @@: mov byte [edx],0 inc edx loop @b mov edx,[tex] mov dword [edx+6],1 pop edx ecx .exit: ret ;--- out_reg = Col[keyw[ind_reg]].Text[0] --- macro ColToIndexOffset ind_reg,out_reg { mov out_reg,ind_reg imul out_reg,sizeof.TexColViv add out_reg,[Col] } InitColText: push eax ebx ecx esi edi 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 mov eax,70 mov [run_file_70.func_n], 0 mov [run_file_70.param1], 0 mov [run_file_70.param2], 0 mov ebx,[options_file_end] sub ebx,[options_file] mov [run_file_70.param3], ebx m2m [run_file_70.param4], [options_file] mov [run_file_70.rezerv], 0 mov [run_file_70.name], file_name mov ebx,run_file_70 int 0x40 mov ecx,0x100 mov edi,FkPos @@: mov dword[edi],-1 add edi,4 loop @b ;init: ColColor, ColWords, ... mov dword[ColColor],1 mov dword[ColWords],0 mov dword[tex_help_f1],0 mov [help_id],-1 ;идентификатор слова для справки cmp eax,6 je @f cmp eax,0 je @f cmp ax,10 jl .zifra_0_9 mov al,'?' sub ax,48 .zifra_0_9: add ax,48 mov byte[msgbox_3.err],al push thread push msgbox_3 call [mb_create] ;message: Can-t open color options file! jmp .no_colors @@: mov esi,[options_file] mov edi,ColColor mov ecx,9*4 rep movsb mov eax,[options_file] add eax,32 mov dword[tex_colors],eax mov eax,dword[ColColor] ;init: Col (offset to key words) add eax,8 shl eax,2 add eax,[options_file] mov dword[Col],eax mov ecx,dword[ColWords] ;init: FkPos (first key positions) xor eax,eax @@: ColToIndexOffset eax,edi xor ebx,ebx mov bl,byte[edi] shl bx,2 mov esi,FkPos add esi,ebx cmp dword[esi],-1 jne .no_ch_key mov dword[esi],eax .no_ch_key: inc eax loop @b ;init: tex_help_f1 mov ecx,dword[ColWords] imul ecx,sizeof.TexColViv add ecx,dword[Col] mov dword[tex_help_f1],ecx .no_colors: pop edi esi ecx ebx eax ret ;input: ; ebx = file size OpenFile: mov [err_opn],0 push eax ;destination push ecx ;for cycle push edx ;source xor al,al call Clear mov eax,ebx mov ecx,ebx add eax,2 ConvertIndexToPointer eax mov edx,[tex] add edx,ebx push ebx @@: mov ebx,[edx] mov byte [eax],bl mov dword [eax+2],ecx inc dword [eax+2] mov dword [eax+6],ecx add dword [eax+6],3 ;mov byte[eax+1],0 ;col=0 mov dword [eax+10],-1 ;tc=-1 mov dword [eax+14],0 ;td=0 cmp ecx,0 je @f dec ecx dec edx sub eax,sizeof.symbol jmp @b @@: pop ebx add eax,2 mov dword [eax],0 ; first sumbol 'perv=0' mov edx,[tex] ; begining sumbol 'perv=0' 'next=2' mov dword [edx+2],0 mov dword [edx+6],2 add edx,sizeof.symbol mov dword [edx+6],0 ; last sumbol 'next=0' mov dword [edx+2],ebx ; last sumbol 'perv=last' inc dword [edx+2] mov edx,ebx inc edx ;2 = rezerv sumbols imul edx,sizeof.symbol add edx,[tex] mov dword [edx+6],1 ; last sumbol 'next=1' @@: ;clear memory, need if before was open big file add edx,sizeof.symbol cmp edx,[tex_end] jge @f mov dword[edx+10],0 mov dword[edx+14],0 jmp @b @@: call GetNumLines cmp eax,100 jge @f mov eax,100 @@: mov [wScr.max_area],eax ; mov [wScr.redraw],1 pop edx ecx eax call CmColored ret ;input: ; edx = pointer to symbol struct ;output: ; edx = pointer to 'perv' visible symbol struct IteratPerv: cmp [tim_Undo],0 je .else push ebx @@: call GetTexPervPos cmp edx,[tex] je @f call SymbNotVis cmp bl,1 je @b cmp byte[edx],10 ;пропуск символа с кодом 10 je @b @@: pop ebx ret .else: call GetTexPervPos cmp edx,[tex] je .endif cmp dword [edx+14],0 jne .else cmp byte[edx],10 ;пропуск символа с кодом 10 je .else .endif: ret ;input: ; edx = pointer to symbol struct ;output: ; edx = pointer to 'next' visible symbol struct IteratNext: cmp [tim_Undo],0 je .else push ebx @@: call GetTexNextPos cmp edx,[tex_1] jle @f call SymbNotVis cmp bl,1 je @b cmp byte[edx],10 ;пропуск символа с кодом 10 je @b @@: pop ebx ret .else: call GetTexNextPos cmp edx,[tex_1] jle .endif cmp dword [edx+14],0 jne .else cmp byte[edx],10 ;пропуск символа с кодом 10 je .else .endif: ret ;input: ; edx = pointer to symbol struct ; bl = symbol end of select ItPoNextUc: @@: cmp bl,byte[edx] je @f cmp edx,[tex_1] jle @f call IteratNext jmp @b @@: call IteratNext ret ;input: ; edx = pointer to symbol struct ItPervColorTag: @@: cmp byte[edx+1],0 jne @f call IteratPerv cmp edx,[tex_1] jle @f jmp @b @@: ret ;input: ; edx = pointer to symbol struct ItNextColorTag: @@: call IteratNext cmp byte[edx+1],0 jne @f cmp edx,[tex_1] jle @f jmp @b @@: ;call IteratNext ret ;input: ; edx = pointer to symbol struct ;output: ; bl = 1 if sumbol not visible ; (tex[i].td+tim_Undo<=ch_tim && tex[i].td) || (tex[i].tc>ch_tim-tim_Undo) SymbNotVis: push eax xor bl,bl cmp dword [edx+14],0 je @f mov eax,[edx+14] ;eax=tex[i].td add eax,[tim_Undo] cmp eax,[ch_tim] jg @f mov bl,1 pop eax ret @@: mov eax,[ch_tim] sub eax,[tim_Undo] cmp [edx+10],eax jle @f or bl,1 @@: pop eax ret ;input: ; bh = 1 - move cursor after text add ; bl = 1 - change time when text add ; esi = add text len ; edi = pointer to text string TextAdd: push ebp mov ebp,esp sub esp,4*2 push eax ;po_t push ecx edx edi call GetPos call GetTexPervPos call GetTexArrIndex ;eax=po_t mov dword[ebp-4],0 ;count new spaces cmp [gpOpt],2 je @f push eax ebx ;c_sp=cur[cn].x+Scroller->XPos-StrLen(cur[cn].y+Scroller->YPos); mov eax,[cur_x] add eax,[hScr.position] mov dword[ebp-4],eax mov eax,[cur_y] add eax,[wScr.position] call StrLen sub dword[ebp-4],ebx pop ebx eax @@: mov dword[ebp-8],0 ;count new lines cmp [gpOpt],0 jne @f push eax mov eax,[cur_y] add eax,[wScr.position] inc eax mov dword[ebp-8],eax call GetNumLines sub dword[ebp-8],eax pop eax @@: mov edx,sizeof.symbol shl edx,1 add edx,[tex] @@: ;for(i=2;i cur_x mov [gpOpt],1 cmp eax,ecx jge @f ; Row >= cur_y .u1_0: mov [gpOpt],0 inc ebx cmp byte [edx],13 jne @b cmp eax,ecx jge @f ; Row >= cur_y inc eax xor ebx,ebx jmp @b @@: cmp eax,ecx jne @f ; Row = cur_y inc [gpOpt] @@: cmp [gpOpt],0 jne @f mov edx,[tex_1] ;call GetTexPervPos @@: pop ebx eax ret ;input: ; eax = Row ;output: ; ebx = str len StrLen: push edx ecx ;ecx = Row, from cycle xor ebx,ebx xor ecx,ecx mov edx,[tex] @@: call IteratNext cmp edx,[tex_1] jle @f inc ebx cmp byte [edx],13 jne @b dec ebx ;lenght minus 1 sumbol to paragraph cmp eax,ecx je @f xor ebx,ebx inc ecx jmp @b @@: cmp eax,ecx je @f xor ebx,ebx @@: pop ecx edx ret ;output: ; edx = symbol position ;output: ; eax = number of line ; ebx = symbol position in line GetTexCoords: push edx xor eax,eax xor ebx,ebx @@: call IteratPerv cmp eax,0 jne .no_col_mov inc ebx .no_col_mov: cmp edx,[tex_1] jle @f cmp byte [edx],13 jne @b inc eax jmp @b @@: dec ebx pop edx ret ;output: ; eax = num lines GetNumLines: push edx mov eax,1 mov edx,[tex] @@: call IteratNext cmp edx,[tex_1] jle @f cmp byte [edx],13 jne @b inc eax jmp @b @@: ;... ;dec eax pop edx ret SetUndo: mov [dragk],0 ;заканчиваем выделение от клавиатуры cmp [tim_Undo],1 jl .no_work push eax ebx edx mov edx,[tex] call GetTexNextPos ;long i=tex[0].next; mov eax,[tim_Undo] sub [ch_tim],eax ;ch_tim-=tim_Undo; mov eax,[ch_tim] cmp [ls_tim],eax ;if(ls_tim>ch_tim) jle @f mov dword [ls_tim],0 @@: cmp edx,[tex] je @f ;if(tex[i].tc>ch_tim){ // если создание символа было отменено cmp [edx+10],eax jle .no_u1 mov dword [edx+10],0 mov dword [edx+14],0 mov ebx,[edx+2] imul ebx,sizeof.symbol add ebx,[tex];.next m2m dword [ebx+6],dword [edx+6] ;tex[tex[i].perv].next=tex[i].next; mov ebx,[edx+6] imul ebx,sizeof.symbol add ebx,[tex];.perv m2m dword [ebx+2],dword [edx+2] ;tex[tex[i].next].perv=tex[i].perv; .no_u1: ;else if(tex[i].td>ch_tim) tex[i].td=0; // если удаление символа было отменено cmp [edx+14],eax jle .no_u2 mov dword [edx+14],0 .no_u2: call GetTexNextPos jmp @b @@: mov dword [tim_Undo],0 mov eax,[co_tim] cmp [ch_tim],eax jge @f mov [co_tim],0 @@: pop edx ebx eax .no_work: ret ;input: ; ecx = Col ; edx = Row GoToPos: mov [cur_x],ecx sub edx,[wScr.position] cmp edx,[wScr.cur_area] ;[cur_y] > [.cur_area] jl @f push ebx mov ebx,edx sub ebx,[wScr.cur_area] inc ebx add [wScr.position],ebx sub edx,ebx pop ebx ; ??? redrav @@: mov [cur_y],edx ret ;input: ; bl = 1 change time when delete text ;output: ; al = 1 if delete SelTextDel: call IsSel cmp al,0 jne @f ret @@: ;call SelEnd call SelNormalize push esi edi ecx edx mov esi,[seln.x1] mov ecx,[seln.y1] call GetPosByParam mov edi,edx mov esi,[seln.x0] mov ecx,[seln.y0] call GetPosByParam cmp bl,0 je @f inc [ch_tim] @@: cmp edx,[tex] je @f cmp edx,edi ;if(i==te)break; je @f m2m dword[edx+14],dword[ch_tim] xor bl,bl ;n_tim=false; call IteratNext jmp @b @@: cmp bl,0 je @f dec [ch_tim] xor al,al @@: cmp bl,0 jne @f mov ecx,[seln.x0] mov edx,[seln.y0] call GoToPos mov [sel.x0],0 mov [sel.y0],0 mov [sel.x1],0 mov [sel.y1],0 @@: pop edx ecx edi esi ret CmColored: push eax edx mov eax,[ch_tim] sub eax,[tim_Undo] mov dword[co_tim],eax mov edx,[tex] @@: call IteratNext cmp edx,[tex_1] jle @f mov byte[edx+1],0 jmp @b @@: cmp dword[ColWords],1 jl .no_colors mov edx,[tex] @@: call TextFSColor cmp edx,[tex_1] jle .no_colors jmp @b .no_colors: pop edx eax ret ;input: ; edx = pointer to start symbol ;output: ; edx = pointer to next symbol TextFSColor: ;eax = word_n ;ecx = l_pos push ebp mov ebp,esp sub esp,10 ;2*4+2*1 ;bP = dword[ebp-4] ;eP = dword[ebp-8] ;fnd = byte[ebp-12] ;f_color = byte[ebp-13] push eax ebx ecx esi edi mov dword[ebp-4],1 mov dword[ebp-4],1 mov byte[ebp-12],0 mov byte[ebp-13],1 @@: call IteratNext cmp edx,[tex_1] jle @f xor ebx,ebx mov bl,byte[edx] ;mov byte[buf],bl ;mov byte[buf+1],0 shl bx,2 ;ebx*=4 add ebx,FkPos mov eax,dword[ebx] cmp eax,0 jl @b ;if( (word_n=FkPos[(unsigned char)tex[i].c])>-1 ){ mov ecx,eax ;while(l_posword_n && Col[keyw[l_pos-1]].Text[pos]!=tex[i].c) .wh_3b: cmp ecx,eax jle .wh_3e dec ecx ColToIndexOffset ecx,ebx inc ecx ;cmp byte[ebx+edi],byte[edx] push ax mov al,byte[ebx+edi] mov bl,al pop ax cmp bl,byte[edx] je .wh_3e dec ecx jmp .wh_3b .wh_3e: ColToIndexOffset eax,ebx cmp byte[ebx+edi],0 jne .if_0 ;if(Col[keyw[word_n]].Text[pos]==0){ mov dword[ebp-8],edx ;eP=i; ColToIndexOffset eax,esi mov bl,byte[esi+MAX_COLOR_WORD_LEN+6] mov byte[ebp-13],bl ;f_color=Col[keyw[word_n]].color; mov byte[ebp-12],1 ;... esi = Col[keyw[word_n]] mov bl,byte[esi+MAX_COLOR_WORD_LEN+4] cmp bl,0 ;if(Col[keyw[word_n]].wwo) je .if_2n push edx mov edx,dword[ebp-4] call IteratPerv ; mov bh,bl btr bx,0 ;1-1 jae .if_3e ;if(Col[keyw[word_n]].wwo&1) ;u1= !(isalnum(cont_s)||cont_s=='_') call isalnum jae .if_3e mov byte[ebp-12],0 .if_3e: btr bx,3 ;4-1 jae .if_4e ;if(Col[keyw[word_n]].wwo&8) ;u1= !isalpha(cont_s); call isalpha jae .if_4e mov byte[ebp-12],0 .if_4e: mov edx,dword[ebp-8] ; call IteratNext btr bx,1 ;2-1 jae .if_5e ;if(Col[keyw[word_n]].wwo&2) ;u1= !(isalnum(cont_s)||cont_s=='_') call isalnum jae .if_5e mov byte[ebp-12],0 .if_5e: btr bx,4 ;5-1 jae .if_6e ;if(Col[keyw[word_n]].wwo&16) ;u1= !isalpha(cont_s); call isalpha jae .if_6e mov byte[ebp-12],0 .if_6e: btr bx,2 ;3-1 jae .if_7e ;if(Col[keyw[word_n]].wwo&4) mov bl,byte[esi+MAX_COLOR_WORD_LEN+5] call ItPoNextUc cmp edx,[tex_1] jle .if_7e mov dword[ebp-8],edx .if_7e: pop edx .if_2n: ; if(i!=1){ // не конец документа ; cont_s=tex[eP].c; ; if(Col[keyw[word_n]].wwo&2) u2= !(isalnum(cont_s)||cont_s=='_'); // не букв.-числ. символ ; if(u2 && Col[keyw[word_n]].wwo&16) u2= !isalpha(cont_s); // не числ. символ ; if(Col[keyw[word_n]].wwo&4) eP=ItPoNextUc(eP,Col[keyw[word_n]].endc); cmp eax,ecx je .wh_2e ;if(word_n==l_pos) break; // do double - если слово точно последнее .if_0: cmp edx,[tex_1] jle .wh_2e ;if(i==1) break; ;while(l_pos>word_n && Col[keyw[word_n]].Text[pos]!=tex[i].c) .wh_4b: cmp ecx,eax jle .wh_4e ColToIndexOffset eax,ebx ;cmp byte[ebx+edi],byte[edx] push ax mov al,byte[ebx+edi] mov bl,al pop ax cmp bl,byte[edx] je .wh_4e inc eax jmp .wh_4b .wh_4e: cmp eax,ecx je .wh_2e;if(word_n==l_pos) break; inc edi ;pos++; jmp .wh_2b .wh_2e: cmp byte[ebp-12],1 ;if(fnd)break; je @f mov edx,dword[ebp-4];i=bP; jmp @b @@: cmp byte[ebp-12],1 jne .if_1e ;if(fnd){ // выделение найденого текста ; if(!mode_sf1 || (mode_sf1 && strlen(Col[keyw[word_n]].f1->c_str())>0)){ mov eax,dword[ebp-4] mov bl,byte[ebp-13] mov byte[eax+1],bl ;tex[bP].col=f_color; mov eax,dword[ebp-8] mov byte[eax+1],0xff ;tex[eP].col=255; ; return ItPoPerv(eP); // возвращаем позицию конца вхождения mov edx,dword[ebp-8] call GetTexPervPos jmp @f .if_1e: mov edx,[tex] @@: pop edi esi ecx ebx eax mov esp,ebp pop ebp ret ;input: ; edx = pointer to char (byte) ;output: ; cf=1 if symbol is... tab_all_num db 0,0,0,0,0,0,11111111b,11b,11111110b,0xff,0xff,111b,11111110b,0xff,0xff,111b,0,0,0,0,0,0,0,0,0,0;,0,0,0,0,0,0 - tab_alpha_0,0,0,0,0,0 tab_alpha db 0,0,0,0,0,0,0,0,11111110b,0xff,0xff,111b,11111110b,0xff,0xff,111b,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;db 0,0,0,0,0,0,11111111b,11b,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 isalnum: push eax ebx mov al,byte[edx] ;al=offset shr al,3 and eax,11111b mov ebx,tab_all_num add ebx,eax mov ah,byte[ebx] mov al,byte[edx] ;al=bit and ax,111b m2m bx,word[ebx] btr bx,ax pop ebx eax ret isalpha: push eax ebx mov al,byte[edx] ;al=offset shr al,3 and eax,11111b mov ebx,tab_alpha add ebx,eax mov ah,byte[ebx] mov al,byte[edx] ;al=bit and ax,111b m2m bx,word[ebx] btr bx,ax pop ebx eax ret ShowHelpF1: push eax edx call GetPos push edx call ItNextColorTag mov eax,edx pop edx call ItPervColorTag cmp eax,[tex] jle @f cmp edx,[tex_1] jle @f call FindHelpId @@: pop edx eax ;call draw_main_cursor call draw_help_f1 ret ;input: ; edx = position begin 'symbol' struct ; eax = position end 'symbol' struct FindHelpId: ; ecx = word_n ; ebx = l_pos mov [help_id],-1 push ebx ecx xor ebx,ebx mov bl,byte[edx] shl bx,2 ;ebx*=4 add ebx,FkPos mov ecx,dword[ebx] cmp ecx,0 jl .if_0e ;if( (word_n=FkPos[(unsigned char)tf[0]])>-1 ){ push esi edi mov ebx,ecx ;l_pos=word_n; ColToIndexOffset ecx,esi push cx mov cl,byte[esi] @@: cmp ebx,dword[ColWords] ;while(l_posword_n jle .wh_0e dec ebx ColToIndexOffset ebx,edi inc ebx cmp byte[edi+esi],dl ;&& Col[keyw[l_pos-1]].Text[pos]!=tf[i]) je .wh_0e dec ebx ;l_pos--; jmp .wh_0b .wh_0e: .wh_1b: cmp ebx,ecx ;while(l_pos>word_n jle .wh_1e ColToIndexOffset ecx,edi cmp byte[edi+esi],dl je .wh_1e inc ecx ;word_n++; jmp .wh_1b .wh_1e: pop dx cmp ecx,ebx ;if(word_n==l_pos) break; je @f call IteratNext ;pos++; cmp edx,eax ;for(...;i