Add new programm 'kol_f_edit'

Details view in 'readme.htm'

git-svn-id: svn://kolibrios.org@1698 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA 2010-11-11 21:47:18 +00:00
parent 8a4afd01d4
commit be5947897e
17 changed files with 3463 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 584 B

View File

@ -0,0 +1,17 @@
if not exist bin mkdir bin
@fasm.exe -m 16384 ced_view.asm bin\ced_view.kex
@kpack bin\ced_view.kex
@fasm.exe -m 16384 ob_o.asm bin\ob_o.opt
if not exist bin\tl_sys_16.png @copy tl_sys_16.png bin\tl_sys_16.png
if not exist bin\icon.bmp @copy icon.bmp bin\icon.bmp
if not exist bin\base.bmp @copy base.bmp bin\base.bmp
if not exist bin\left.bmp @copy left.bmp bin\left.bmp
if not exist bin\oper.bmp @copy oper.bmp bin\oper.bmp
if not exist bin\font6x9.bmp @copy ..\..\fs\kfar\trunk\font6x9.bmp bin\font6x9.bmp
if not exist bin\asm.syn @copy ..\..\other\t_edit\info\asm.syn bin\asm.syn
copy *.ced bin\*.ced
@fasm.exe -m 16384 ..\libraries\buf2d\trunk\buf2d.asm bin\buf2d.obj
@kpack bin\buf2d.obj
pause

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,321 @@
;
; ¢ í⮬ ä ©«¥ ᮡ࠭ë ä㭪樨 à¨áãî騥 ®ª­® ª®­áâàãªâ®à 
;
macro move_to_skin coord_x,coord_y
{
add coord_x,SKIN_W1
add coord_y,SKIN_H
}
;¯¥à¥à¨á®¢ª  ®ª­  ª®­áâàãªâ®à 
align 4
draw_constructor:
stdcall [buf2d_clear], buf_fon,0xffffff
pushad
cmp [err_ini1],1
jne @f
stdcall [buf2d_draw_text], buf_fon, buf_font,txtErrIni1,10,10,\
0xff0000 ;à¨á㥬 áâபã á ⥪á⮬
stdcall [buf2d_draw_text], buf_fon, buf_font,fp_obj_opt,10,20,\
0xff0000 ;à¨á㥬 áâபã á ⥪á⮬
jmp .end_draw
@@:
xor edx,edx
mov dl,C_WI
stdcall find_obj_in_file,edx ;eax - 㪠§ â¥«ì ­  áâàãªâãàã ®ª­ 
cmp eax,0
je .end_draw
mov dword[obj_m_win],eax
;4-width
stdcall get_obj_text_col,[obj_m_win],4 ;edx = offset
stdcall conv_str_to_int,edx
mov ecx,eax ;ecx=width
;5-height
stdcall get_obj_text_col,[obj_m_win],5 ;edx = offset
stdcall conv_str_to_int,edx
;eax=height
stdcall [buf2d_rect_by_size], buf_fon, 0,0,ecx,eax, dword[sc.frame] ;à¨á㥬 ¢­¥è­îî à ¬ªã ®ª­ 
sub eax,2
sub ecx,2
stdcall [buf2d_filled_rect_by_size], buf_fon, 1,1,ecx,eax, dword[sc.grab] ;à¨á㥬 ä®­ à ¬ª¨ ®ª­ 
sub eax,6
sub ecx,6
stdcall [buf2d_rect_by_size], buf_fon, 4,4,ecx,eax, dword[sc.frame] ;à¨á㥬 ¢­ãâ७­îî à ¬ªã ®ª­ 
sub eax,2
sub ecx,2
stdcall [buf2d_filled_rect_by_size], buf_fon, 5,5,ecx,eax, dword[sc.work] ;à¨á㥬 ä®­ ®ª­ 
;---;---;---
;jmp .end_skin
;---;---;---
stdcall get_obj_text_col,[obj_m_win],1
stdcall conv_str_to_int,edx ;eax = window style
cmp eax,3
jl .end_skin
stdcall [buf2d_bit_blt], buf_fon, 0,0, buf_skin1 ;«¥¢ë© ᪨­
mov edi,buf_skin1
mov eax,buf2d_w ;eax - ¯®§¨æ¨ï ¤«ï à¨á®¢ ­¨ï á।­¥£® ᪨­ 
mov edi,buf_skin2
mov ebx,buf2d_w ;ebx - è¨à¨­  «¥¢®£® ᪨­ 
sub ecx,ebx ;®â­¨¬ ¥¬ ®â è¨à¨­ë ®ª­  è¨à¨­ã á।­¥£® ᪨­ 
@@:
stdcall [buf2d_bit_blt], buf_fon, eax,0, buf_skin2 ;¯à®à¨á®¢ª  á।­¥£® ᪨­ 
add eax,ebx
cmp eax,ecx ;áà ¢­¨¢ ¥¬ ¯®§¨æ¨î á।­¥£® ᪨­  á è¨à¨­®© ®ª­ 
jl @b
;4-width
stdcall get_obj_text_col,[obj_m_win],4 ;edx = offset
stdcall conv_str_to_int,edx
mov edi,buf_skin3
sub eax,buf2d_w ;®â­¨¬ ¥¬ è¨à¨­ã ¯à ¢®£® ᪨­ 
stdcall [buf2d_bit_blt], buf_fon, eax,0, buf_skin3 ;¯à®à¨á®¢ª  ¯à ¢®£® ᪨­ 
.end_skin:
xor edx,edx ;à¨á㥬 £à ä¨ç¥áª¨¥ í«¥¬¥­âë
mov dl,C_BU
stdcall draw_arr_objects, edx,draw_obj_but
mov dl,C_ED
stdcall draw_arr_objects, edx,draw_obj_edit
mov dl,C_CB
stdcall draw_arr_objects, edx,draw_obj_check
mov dl,C_DT
stdcall draw_arr_objects, edx,draw_obj_text
mov dl,C_RE
stdcall draw_arr_objects, edx,draw_obj_rect_f13
.end_draw:
popad
ret
;äã­ªæ¨ï à¨áã¥â ¬ áá¨¢ë ®¯à¥¤¥«¥­­ëå í«¥¬¥­â®¢
align 4
proc draw_arr_objects, obj_t:dword,p_fun_draw:dword
push eax ebx
stdcall find_obj_in_file,[obj_t] ;eax - 㪠§ â¥«ì ­  áâàãªâãàã ®¡ê¥ªâ 
cmp eax,0
je .end_draw_o
mov ebx,[p_fun_draw]
stdcall ebx,eax
@@:
stdcall find_obj_in_file_next,[obj_t] ;eax - 㪠§ â¥«ì ­  áâàãªâãàã ®¡ê¥ªâ 
cmp eax,0
je .end_draw_o
stdcall ebx,eax
jmp @b
.end_draw_o:
pop ebx eax
ret
endp
;äã­ªæ¨ï à¨áã¥â ®¡ê¥ªâ ª­®¯ª¨, ¢ ®ª­¥ ª®­áâàãªâ®à 
align 4
proc draw_obj_but, p_obj:dword
locals
coor_x dd ?
coor_y dd ?
endl
pushad
mov ebx,dword[p_obj]
;1,2,3,4,5 - x,y,w,h,color
stdcall get_obj_text_col,ebx,1
stdcall conv_str_to_int,edx
mov [coor_x],eax
stdcall get_obj_text_col,ebx,2
stdcall conv_str_to_int,edx
mov [coor_y],eax
move_to_skin [coor_x],[coor_y]
stdcall get_obj_text_col,ebx,3
stdcall conv_str_to_int,edx
mov edi,eax
stdcall get_obj_text_col,ebx,4
stdcall conv_str_to_int,edx
mov ecx,eax
stdcall get_obj_text_col,ebx,5
stdcall conv_str_to_int,edx
stdcall [buf2d_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],edi,ecx,eax
popad
ret
endp
;äã­ªæ¨ï à¨áã¥â ®¡ê¥ªâ ⥪á⮢®£® ¯®«ï, ¢ ®ª­¥ ª®­áâàãªâ®à 
align 4
proc draw_obj_edit, p_obj:dword
locals
coor_x dd ?
coor_y dd ?
col_txt dd ? ;梥â ⥪âá 
endl
pushad
mov ebx,dword[p_obj]
;1,2,3,4,...,6,...8,...,10 - w,x,y,col_fon,...,col_frame,...,col_txt,...,txt
stdcall get_obj_text_col,ebx,2
stdcall conv_str_to_int,edx
mov [coor_x],eax
stdcall get_obj_text_col,ebx,3
stdcall conv_str_to_int,edx
mov [coor_y],eax
move_to_skin [coor_x],[coor_y]
stdcall get_obj_text_col,ebx,1
stdcall conv_str_to_int,edx
mov ecx,eax
stdcall get_obj_text_col,ebx,6
stdcall conv_str_to_int,edx
stdcall [buf2d_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],\
ecx,15, eax
inc dword[coor_x]
inc dword[coor_y]
sub ecx,2
stdcall get_obj_text_col,ebx,4
stdcall conv_str_to_int,edx
stdcall [buf2d_filled_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],\
ecx,13, eax
stdcall get_obj_text_col,ebx,8
stdcall conv_str_to_int,edx
mov [col_txt],eax
add [coor_x],2-1 ;ᬥ頥¬ ª®®à¤¨­ âã, çâ®-¡ë
add [coor_y],4-1 ;⥪áâ ¡ë« ¢ ¯®«¥ ¢ë஢­¥­
stdcall get_obj_text_col,ebx,10
stdcall [buf2d_draw_text], buf_fon, buf_font,edx,dword[coor_x],dword[coor_y],\
dword[col_txt] ;à¨á㥬 áâபã á ⥪á⮬
popad
ret
endp
;äã­ªæ¨ï à¨áã¥â ®¡ê¥ªâ ä« ¦ª , ¢ ®ª­¥ ª®­áâàãªâ®à 
align 4
proc draw_obj_check, p_obj:dword
locals
coor_x dd ?
coor_y dd ?
ot_txt dd ? ;®âáâ㯠¤«ï ⥪áâ 
size_wh dd ? ;à §¬¥à ª¢ ¤à â¨ª 
col_txt dd ? ;梥â ⥪âá 
endl
pushad
mov ebx,dword[p_obj]
;1,2,3, 4,5,6, 7,8 - x,y,txt, col_fon,col_frame,col_txt, w_txt,w_h
stdcall get_obj_text_col,ebx,1
stdcall conv_str_to_int,edx
mov [coor_x],eax
stdcall get_obj_text_col,ebx,2
stdcall conv_str_to_int,edx
mov [coor_y],eax
move_to_skin [coor_x],[coor_y]
stdcall get_obj_text_col,ebx,7
stdcall conv_str_to_int,edx
mov [ot_txt],eax
stdcall get_obj_text_col,ebx,8
stdcall conv_str_to_int,edx
dec eax ;à §¬¥à ¬¥­ìè¥ ­  1 ¯¨ªá¥«ì
mov [size_wh],eax
stdcall get_obj_text_col,ebx,5
stdcall conv_str_to_int,edx
stdcall [buf2d_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],\
dword[size_wh],dword[size_wh], eax
inc dword[coor_x]
inc dword[coor_y]
sub dword[size_wh],2
stdcall get_obj_text_col,ebx,4
stdcall conv_str_to_int,edx
stdcall [buf2d_filled_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],\
dword[size_wh],dword[size_wh], eax
stdcall get_obj_text_col,ebx,6
stdcall conv_str_to_int,edx
mov [col_txt],eax
mov eax,[ot_txt]
add eax,[size_wh]
add eax,2-1 ;sub dword[size_wh],2 ;inc dword[coor_x]
add [coor_x],eax ;¢ëç¨á«ï¥¬ ª®®à¤¨­ âë ¤«ï ⥪á⮢®© ¯®¤¯¨á¨
add [coor_y],5-1 ;inc dword[coor_y]
stdcall get_obj_text_col,ebx,3
stdcall [buf2d_draw_text], buf_fon, buf_font,edx,dword[coor_x],dword[coor_y],\
dword[col_txt] ;à¨á㥬 áâபã á ⥪á⮬
popad
ret
endp
;äã­ªæ¨ï à¨áã¥â ®¡ê¥ªâ ⥪á⮢®© ¯®¤¯¨á¨, ¢ ®ª­¥ ª®­áâàãªâ®à 
align 4
proc draw_obj_text, p_obj:dword
locals
coor_x dd ?
coor_y dd ?
col_txt dd ? ;梥â ⥪âá 
endl
pushad
mov ebx,dword[p_obj]
;0,1,2,3,... - txt,x,y,col_txt,...
stdcall get_obj_text_col,ebx,1
stdcall conv_str_to_int,edx
mov [coor_x],eax
stdcall get_obj_text_col,ebx,2
stdcall conv_str_to_int,edx
mov [coor_y],eax
move_to_skin [coor_x],[coor_y]
stdcall get_obj_text_col,ebx,3
stdcall conv_str_to_int,edx
mov [col_txt],eax
stdcall get_obj_text_col,ebx,0
stdcall [buf2d_draw_text], buf_fon, buf_font,edx,dword[coor_x],dword[coor_y],\
dword[col_txt] ;à¨á㥬 áâபã á ⥪á⮬
popad
ret
endp
;äã­ªæ¨ï à¨áã¥â ®¡ê¥ªâ ¯àאַ㣮«ì­¨ª  (á¨á¨â. ä. 13)
align 4
proc draw_obj_rect_f13, p_obj:dword
locals
coor_x dd ?
coor_y dd ?
color dd ? ;梥â ⥪âá 
endl
pushad
mov ebx,dword[p_obj]
;0,1,2,3,4 - color,x,y,w,h
stdcall get_obj_text_col,ebx,1
stdcall conv_str_to_int,edx
mov [coor_x],eax
stdcall get_obj_text_col,ebx,2
stdcall conv_str_to_int,edx
mov [coor_y],eax
move_to_skin [coor_x],[coor_y]
stdcall get_obj_text_col,ebx,0
stdcall conv_str_to_int,edx
mov [color],eax
stdcall get_obj_text_col,ebx,3
stdcall conv_str_to_int,edx
mov ecx,eax
stdcall get_obj_text_col,ebx,4
stdcall conv_str_to_int,edx
mov esi,eax
stdcall [buf2d_filled_rect_by_size], buf_fon,\
dword[coor_x],dword[coor_y],ecx,esi,dword[color]
popad
ret
endp

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,434 @@
align 4
draw_obj_info:
mov eax,13 ;rect
mov edx,WND_CAPT_COLOR
mov ebx,[wndObjI.left]
shl ebx,16
add ebx,[wndObjI.width]
mov ecx,[wndObjI.top]
add ecx,[recMain.top]
shl ecx,16
add ecx,[wndObjI.height]
sub ecx,[recMain.top]
mov edx,0xffffff ;0x80ffffff
int 0x40 ;¯àאַ㣮«ì­¨ª ¤«ï ®ª­ 
mov ecx,[wndObjI.top] ;draw caption
shl ecx,16
add ecx,[recMain.top]
mov edx,WND_CAPT_COLOR
int 0x40
mov edx,[foc_obj] ;init icon pointers
cmp edx,0
je .exit_fun
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
pushad
;draw caption wndObjI
mov eax,4 ;¯®¤¯¨áì - ­ §¢ ­¨¥ ®¡ê¥ªâ 
mov bl,[edx]
call find_obj_in_opt
mov edx,edi
mov ebx,[wndObjI.left]
add ebx,[recMain.left]
add ebx,4
shl ebx,16
add ebx,[wndObjI.top]
add ebx,4
mov ecx,0xc0d000ff
mov edi,WND_CAPT_COLOR
add edx,obj_opt.info-obj_opt
int 0x40
mov eax,8 ;ª­®¯ª  ¤«ï á®åà ­¥­¨ï ¨§¬¥­¥­¨©
mov ebx,125*65536+20
mov ecx,161*65536+10
mov edx,10
mov esi,0xd040
int 0x40
popad
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
stdcall [edit_box_draw], dword edit2
stdcall [edit_box_draw], dword edit3
stdcall [edit_box_draw], dword edit4
stdcall [edit_box_draw], dword edit5
stdcall [edit_box_draw], dword edit6
stdcall [edit_box_draw], dword edit7
stdcall [edit_box_draw], dword edit8
stdcall [edit_box_draw], dword edit9
xor ebx,ebx ;­®¬¥à ¯®«ï
.draw_column:
mov eax,ebx
imul eax,[recMain.height]
add eax,[recMain.top]
add eax,[wndObjI.top]
stdcall draw_icon_obj,[edx],ebx,eax
inc ebx
cmp ebx,MAX_OPT_FIELDS
jl .draw_column
.exit_fun:
ret
;®¡­®¢«¥­¨¥ ®¡ê¥ªâ®¢ ¢ tree2, ¯® §­ ç¥­¨ï¬ ⥪á⮢ëå ¯®«¥©
;äã­ªæ¨ï ®¡à â­ ï ª ¤ ­­®© on_file_object_select
align 4
but_element_change:
;foc_obj - 㪠§ â¥«ì ­  ¯®á«¥¤­¨© ¢ë¡à ­­ë© 㧥« ¢ tree2
cmp dword[foc_obj],0
je @f
pushad
stdcall get_obj_win_param, 0,edit2
stdcall get_obj_win_param, 1,edit3
stdcall get_obj_win_param, 2,edit4
stdcall get_obj_win_param, 3,edit5
stdcall get_obj_win_param, 4,edit6
stdcall get_obj_win_param, 5,edit7
stdcall get_obj_win_param, 6,edit8
stdcall get_obj_win_param, 7,edit9
popad
@@:
call draw_constructor ;®¡­®¢«ï¥¬ ®ª­® ª®­áâàãªâ®à 
call draw_window
ret
align 4
proc get_obj_win_param, col:dword, edit:dword
;pushad
stdcall get_obj_text_col, [foc_obj], [col] ;edx - ᬥ饭¨¥ ¤«ï ⥪áâ 
stdcall get_obj_text_len_col, [foc_obj], [col] ;eax - ¤«¨­­  ¯®«ï
cld
mov edi,[edit]
mov esi,ed_text
mov edi,edx
mov ecx,eax
rep movsb
ret
;popad
endp
;input:
; obj - pointer to object
; ind - column index
;output:
; edx + offset
; edx = 0 if not text
align 4
proc get_obj_text_col, obj:dword, ind:dword
mov edx,dword[obj]
inc edx ;goto text
push ebx
mov ebx,dword[ind]
cmp bx,0
je .end_fun
shl ebx,8 ;¢ bh ¯®¯ ¤ ¥â ­®¬¥à ¨áª®¬®© ª®«®­ª¨
mov bl,byte[edx-1] ;¢ bl ¯®¯ ¤ ¥â ª®¤ ®¡ê¥ªâ 
push ecx edi
call find_obj_in_opt ;¨é¥¬ áâàãªâãàã á ®¯æ¨ï¬¨ ®¡ê¥ªâ 
add edi,obj_opt.Col-obj_opt
dec bh
and ebx,0xff00
shr ebx,7 ;ᤢ¨£ ¥¬ ­  7, â.ª. ­ã¦­® §­ ç¥­¨¥ bh 㬭®¦¥­­®¥ ­  2
add edi,ebx ;+ ¡ë¢è¥¥ bh*2
xor ecx,ecx
mov cx,word[edi] ;ecx - ᤨ£ ¤«ï ¨áª®¬®£® ¯®«ï
add edx,ecx
cmp cx,0
jg @f
mov edx,0 ;not text
@@:
cmp cx,MAX_LEN_OBJ_TXT
jl @f
mov edx,0 ;not text
@@:
pop edi ecx
.end_fun:
pop ebx
ret
endp
;input:
; obj - 㪠§ â¥«ì ­  ®¡ê¥ªâ
; ind - ­®¬¥à ¯®«ï ¢­ãâਠ®¡ê¥ªâ 
;output:
; eax - ¤«¨­­  ⥪á⮢®£® ¯®«ï ¢­ãâਠ®¡ê¥ªâ 
align 4
proc get_obj_text_len_col, obj:dword, ind:dword
xor eax,eax
push ebx
mov ebx,dword[ind]
shl ebx,8 ;¢ bh ¯®¯ ¤ ¥â ­®¬¥à ¨áª®¬®© ª®«®­ª¨
mov eax,dword[obj]
mov bl,byte[eax] ;¢ bl ¯®¯ ¤ ¥â ª®¤ ®¡ê¥ªâ 
xor eax,eax
push edi
call find_obj_in_opt ;¨é¥¬ áâàãªâãàã á ®¯æ¨ï¬¨ ®¡ê¥ªâ 
add edi,obj_opt.Col-obj_opt
and ebx,0xff00
shr ebx,7 ;ᤢ¨£ ¥¬ ­  7, â.ª. ­ã¦­® §­ ç¥­¨¥ bh 㬭®¦¥­­®¥ ­  2
add edi,ebx ;+ ¡ë¢è¥¥ bh*2
mov ax,word[edi] ;eax - ᤨ£ ¤«ï á«¥¤ã饣® ¯®«ï
cmp ax,0
jg @f
mov eax,MAX_LEN_OBJ_TXT ;¯®á«¥¤­¨¥ ¯®«ï ¤«ï 㤮¡á⢠ ª®¤¨àãîâáï 0,   ­¥ MAX_LEN_OBJ_TXT, ¨á¯à ¢«ï¥¬ á¨âã æ¨î
@@:
cmp dword[ind],0
je .end_fun ;¤«ï ¯¥à¢®£® ¯®«ï ᤨ£ = 0, ¯®â®¬ã ¢ áâàãªâãॠ®­ ­¥ åà ­¨âáï, â.ª. ¨§¢¥á⥭ § à ­¥¥
sub ax,word[edi-2] ;®â­¨¬ ¥¬ ᤨ£ ¤«ï ¨áª®¬®£® ¯®«ï, ¯®«ãç ¥¬ ¤«¨­­ã ¯®«ï
cmp word[edi-2],0
jg @f
mov eax,0 ;¯®«¥ ¯ãá⮥, ­¥ ¨á¯®«ì§ã¥âáï
@@:
cmp ax,MAX_LEN_OBJ_TXT
jl @f
mov eax,0 ;not text
@@:
pop edi
.end_fun:
pop ebx
ret
endp
align 4
proc draw_icon_obj, o_type:dword,n_col:dword, coord_y:dword
pushad
xor ebx,ebx
mov bl,byte[o_type]
call find_obj_in_opt
add edi,obj_opt.img-obj_opt ;get index (+0)
mov ebx,[n_col]
shl ebx,1
add edi,ebx ;move index (+bh)
xor ecx,ecx
mov cx,[edi]
cmp cx,0
jge @f
jmp .end_fun ;error icon index
@@:
mov ebx,bmp_icon
imul ecx,0x300
add ebx,ecx
mov eax,7
mov ecx,0x100010 ;ecx - size:16*16
mov edx,[wndObjI.left]
add edx,5
shl edx,16
add edx,[coord_y]
int 0x40
.end_fun:
popad
ret
endp
align 4
proc draw_icon, ind:dword,coord_x:dword,coord_y:dword
pushad
mov ecx,[ind]
cmp ecx,0
jl .end_fun
mov ebx,bmp_icon
imul ecx,0x300
add ebx,ecx
mov eax,7
mov ecx,0x100010 ;ecx - size:16*16
mov edx,[coord_x]
shl edx,16
add edx,[coord_y]
int 0x40
.end_fun:
popad
ret
endp
;input
; bl = cod object
;output:
; edi = pointer to option struct
align 4
find_obj_in_opt:
push ecx
xor ecx,ecx ;find 'bl' in options
mov edi,obj_opt
@@:
cmp bl,[edi] ;find
je @f
inc ecx
cmp ecx,MAX_OBJ_TYPES
je @f ;not find
add edi,sizeof.ObjOpt
jmp @b
@@:
pop ecx
ret
obj_find_last dd 0 ;㪠§ â¥«ì ­  ¯®á«¥¤­¨© 㤠筮 ­ ©¤¥­­ë© ®¡ê¥ªâ,
;­ã¦¥­ ¤«ï ã᪮७¨ï ¯®á«¥¤ã饣® ¯®¨áª 
;¢ë室:
;eax - 㪠§ â¥«ì ­  áâàãªâãàã ­ ©¤¥­­®£® ®¡ê¥ªâ 
align 4
proc find_obj_in_file, o_type:dword
push ebx esi
mov ebx,[o_type]
stdcall dword[tl_node_poi_get_info], 0,tree2
pop esi
@@:
cmp esi,0
je .find_no
stdcall dword[tl_node_poi_get_data], esi,tree2
pop eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
cmp eax,0
je .find_no
cmp byte[eax],bl ;ᬮâਬ ®¯¨á ­ «¨ ¨áª®¬ë© ®¡ê¥ªâ ¢ 㧫¥
je .find_yes
stdcall dword[tl_node_poi_get_next_info], esi,tree2
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp @b
.find_yes:
mov dword[obj_find_last],esi
jmp @f
.find_no:
mov dword[obj_find_last],0
xor eax,eax
@@:
pop esi ebx
ret
endp
;¢ë室:
;eax - 㪠§ â¥«ì ­  áâàãªâãàã ­ ©¤¥­­®£® ®¡ê¥ªâ 
align 4
proc find_obj_in_file_next, o_type:dword
push ebx esi
cmp dword[obj_find_last],0
je .find_no
mov ebx,[o_type]
stdcall dword[tl_node_poi_get_next_info], dword[obj_find_last],tree2
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
@@:
cmp esi,0
je .find_no
stdcall dword[tl_node_poi_get_data], esi,tree2
pop eax ;¯®«ãç ¥¬ ¤ ­­ë¥ 㧫 
cmp eax,0
je .find_no
cmp byte[eax],bl ;ᬮâਬ ®¯¨á ­ «¨ ¨áª®¬ë© ®¡ê¥ªâ ¢ 㧫¥
je .find_yes
stdcall dword[tl_node_poi_get_next_info], esi, tree2
pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã
jmp @b
.find_yes:
mov dword[obj_find_last],esi
jmp @f
.find_no:
mov dword[obj_find_last],0
xor eax,eax
@@:
pop esi ebx
ret
endp
align 4
but_show_constructor:
mov byte[show_mode],0
stdcall [buf2d_draw], buf_fon
ret
align 4
but_show_code:
mov byte[show_mode],1
stdcall [ted_draw], tedit0
ret
;input:
; buf - 㪠§ â¥«ì ­  áâபã, ç¨á«® ¤®«¦­® ¡ëâì ¢ 10 ¨«¨ 16 à¨ç­®¬ ¢¨¤¥
;output:
; eax - ç¨á«®
align 4
proc conv_str_to_int, buf:dword
xor eax,eax
push ebx esi
xor ebx,ebx
mov esi,[buf]
cmp word[esi],'0x'
je .load_digit_16
.load_digit_10: ;áç¨â뢠­¨¥ 10-â¨ç­ëå æ¨äà
mov bl,byte[esi]
cmp bl,'0'
jl @f
cmp bl,'9'
jg @f
sub bl,'0'
imul eax,10
add eax,ebx
inc esi
jmp .load_digit_10
jmp @f
.load_digit_16: ;áç¨â뢠­¨¥ 16-à¨ç­ëå æ¨äà
add esi,2
.cycle_16:
mov bl,byte[esi]
cmp bl,'0'
jl @f
cmp bl,'f'
jg @f
cmp bl,'9'
jle .us1
cmp bl,'A'
jl @f ;®âᥨ¢ ¥¬ ᨬ¢®«ë >'9' ¨ <'A'
.us1: ;á®áâ ¢­®¥ ãá«®¢¨¥
cmp bl,'F'
jle .us2
cmp bl,'a'
jl @f ;®âᥨ¢ ¥¬ ᨬ¢®«ë >'F' ¨ <'a'
sub bl,32 ;¯¥à¥¢®¤¨¬ ᨬ¢®«ë ¢ ¢¥àå­¨© ॣ¨áâà, ¤«ï ã¯à®é¥­¨ï ¨å ¯®á«¥¤ã饩 ®¡à ¡®âª¨
.us2: ;á®áâ ¢­®¥ ãá«®¢¨¥
sub bl,'0'
cmp bl,9
jle .cor1
sub bl,7 ;convert 'A' to '10'
.cor1:
shl eax,4
add eax,ebx
inc esi
jmp .cycle_16
@@:
pop esi ebx
ret
endp

View File

@ -0,0 +1,99 @@
proc dll.Load, import_table:dword
mov esi,[import_table]
.next_lib: mov edx,[esi]
or edx,edx
jz .exit
push esi
mov esi,[esi+4]
mov edi,s_libdir.fname
@@: lodsb
stosb
or al,al
jnz @b
mcall 68,19,s_libdir
or eax,eax
jz .fail
stdcall dll.Link,eax,edx
push eax
mov eax, [eax]
cmp dword [eax], 'lib_'
pop eax
jnz @f
stdcall dll.Init,[eax+4]
@@:
pop esi
add esi,8
jmp .next_lib
.exit: xor eax,eax
ret
.fail: add esp,4
xor eax,eax
inc eax
ret
endp
proc dll.Link, exp:dword,imp:dword
push eax
mov esi,[imp]
test esi,esi
jz .done
.next: lodsd
test eax,eax
jz .done
stdcall dll.GetProcAddress,[exp],eax
or eax,eax
jz @f
mov [esi-4],eax
jmp .next
@@: mov dword[esp],0
.done: pop eax
ret
endp
proc dll.Init, dllentry:dword
pushad
mov eax,mem.Alloc
mov ebx,mem.Free
mov ecx,mem.ReAlloc
mov edx,dll.Load
stdcall [dllentry]
popad
ret
endp
proc dll.GetProcAddress, exp:dword,sz_name:dword
mov edx,[exp]
xor eax,eax
.next: or edx,edx
jz .end
cmp dword[edx],0
jz .end
stdcall strcmp,[edx],[sz_name]
test eax,eax
jz .ok
add edx,8
jmp .next
.ok: mov eax,[edx+4]
.end: ret
endp
proc strcmp, str1:dword,str2:dword
push esi edi
mov esi,[str1]
mov edi,[str2]
xor eax,eax
@@: lodsb
scasb
jne .fail
or al,al
jnz @b
jmp .ok
.fail: or eax,-1
.ok: pop edi esi
ret
endp
s_libdir:
db '/sys/lib/'
.fname rb 32

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

View File

@ -0,0 +1,48 @@
;-----------------------------------------------------------------------------
proc mem.Alloc,size ;/////////////////////////////////////////////////////////
;-----------------------------------------------------------------------------
push ebx ecx
mov ecx,[size]
;*** add ecx,4
mcall 68,12
;*** add ecx,-4
;*** mov [eax],ecx
;*** add eax,4
pop ecx ebx
ret
endp
;-----------------------------------------------------------------------------
proc mem.ReAlloc,mptr,size ;//////////////////////////////////////////////////
;-----------------------------------------------------------------------------
push ebx ecx edx
mov ecx,[size]
or ecx,ecx
jz @f
;*** add ecx,4
@@: mov edx,[mptr]
or edx,edx
jz @f
;*** add edx,-4
@@: mcall 68,20
or eax,eax
jz @f
;*** add ecx,-4
;*** mov [eax],ecx
;*** add eax,4
@@: pop edx ecx ebx
ret
endp
;-----------------------------------------------------------------------------
proc mem.Free,mptr ;//////////////////////////////////////////////////////////
;-----------------------------------------------------------------------------
push ebx ecx
mov ecx,[mptr]
or ecx,ecx
jz @f
;*** add ecx,-4
@@: mcall 68,13
pop ecx ebx
ret
endp

Binary file not shown.

View File

@ -0,0 +1,84 @@
;lang equ ru
MAX_LEN_OBJ_TXT equ 200
C_TD equ 't' ;typedef
C_AC equ 'a' ; ¢â®¬ â¨ç¥áª¨¥ ª®¤ë (auto code)
C_ST equ 's' ;struct
C_IN equ '#' ;include
C_TT equ 'd' ;¡«®ª ª®¤  (¤ ­­ëå)
C_VR equ '-' ;¯¥à¥¬¥­­ ï
C_CO equ ';' ;ª®¬¬¥­â à¨©
C_WI equ 'w' ;®ª­®
C_CB equ 'c' ;CheckBox
C_OP equ 'o' ;OptionBox
C_ED equ 'e' ;EditBox
C_BU equ 'b' ;Button
C_DT equ 'x' ;à¨á®¢ âì ⥪áâ
C_RE equ 'r' ;à¨á®¢ âì ¯àאַ㣮«ì­¨ª
C_KE equ 'k' ;ª« ¢¨ âãà 
macro ObjOpt c,bl_type,graph,info,caption,Col,img
{
db c
db bl_type
db graph
@@: db info
rb @b+30-$
@@: db caption
rb @b+MAX_LEN_OBJ_TXT-$
dw Col
dw img
}
ObjOpt C_AC, 1,0,'€¢â® ª®¤','',\
<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0>,\
<2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1>
ObjOpt C_ST, 1,0,'‘âàãªâãà ','¨¬ï áâàãªâãàë*¯ à ¬¥âàë ¤«ï ¬ ªà®á ',\
<40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0>,\
< 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1>
ObjOpt C_BU, 1,1,'Š­®¯ª ','¨¤¥­â¨ä¨ª â®à*®âáâ㯠᫥¢ *®âáâ㯠ᢥàåã*è¨à¨­ *¢ëá®â *梥â*¨¬ï ¬¥âª¨ ¯à¨ ­ ¦ â¨¨',\
<20, 40, 60, 80,100,120, 0, 0, 0, 0, 0>,\
<29, 15, 16, 26, 27, 25, -1, -1, -1, -1,-1>
ObjOpt C_ED, 1,1,'’¥ªá⮢®¥ ¯®«¥','***®âáâ㯠ᢥàåã*梥â ä®­ *梥⠢뤥«¥­¨ï ¯à¨ 㤥ন¢ ­¨¨ shift ¨«¨ ¬ë誮©*梥â à ¬ª¨*¯à¨ ­¥ ªâ¨¢­®¬ ¡®ªá¥ 梥â à ¬ª¨*梥â ⥪áâ *¬ ªá¨¬ «ì­ ï ¤«¨­  ⥪áâ *­ ç «ì­ë© ⥪áâ',\
<30, 40, 50, 60, 80,100,120,140,160,170, 0>,\
<10, 26, 15, 16, 25, 25, 25, 25, 25, -1, 4>
ObjOpt C_OP, 1,1,'<27> ¤¨® ª­®¯ª ','¨¬ï*®âáâ㯠᫥¢ *®âáâ㯠ᢥàåã*梥â ä®­  ¢­ãâà¨*梥â à ¬ª¨ ¨ ¢­ãâà. £ «®çª¨*梥â ⥪áâ *¯®¤¯¨áì*®âáâ㯠¤® ­ ¤¯¨á¨*à §¬¥à ª¢ ¤à â ',\
<40, 50, 60, 80,100,120,180,190, 0, 0, 0>,\
< 9, 15, 16, 25, 25, 25, 4, 26, 27, -1, -1>
ObjOpt C_CB, 1,1,'”« ¦®ª','***¯®¤¯¨áì*梥â ä®­  ¢­ãâà¨*梥â à ¬ª¨ ¨ ¢­ãâà. £ «®çª¨*梥â ⥪áâ *®âáâ㯠¤® ­ ¤¯¨á¨*à §¬¥à ª¢ ¤à â ',\
<40, 50, 60,120,140,160,180,190, 0, 0, 0>,\
< 8, 15, 16, 4, 25, 25, 25, 26, 27, -1, -1>
ObjOpt C_TT, 1,0,'asm ª®¤','',\
< 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0>,\
<11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1>
ObjOpt C_VR, 0,0,'<27>¥à¥¬¥­­ ï','¨¬ï ¯¥à¥¬¥­­®©*§­ ç¥­¨¥ ¯® 㬮«ç ­¨î*ª®¬¬¥­â à¨©',\
<40, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0>,\
< 0, -1, 5, -1, -1, -1, -1, -1, -1, -1, -1>
ObjOpt C_WI, 1,1,'Žª­®','**®âáâ㯠᫥¢ *®âáâ㯠ᢥàåã*è¨à¨­ *¢ëá®â *梥⠪«¨¥­â᪮© ®¡« áâ¨*梥⠧ £®«®¢ª  (¥á«¨ ¥áâì)',\
<98,100,110,120,130,150,170, 0, 0, 0, 0>,\
<12, -1, 15, 16, 26, 27, 25, 25, -1, -1, -1>
ObjOpt C_CO, 1,0,'Š®¬¬¥­â à¨©','áâப  ª®¬¬¥­â à¨ï',\
< 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0>,\
< 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1>
ObjOpt C_IN, 1,0,'‚ª«î祭¨¥ ä ©« ','¨¬ï ä ©« *ª®¬¬¥­â à¨©',\
<100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0>,\
< 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1>
ObjOpt C_TD, 0,0,'’¨¯ ¤ ­­®£®','',\
< 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0>,\
< 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1>
ObjOpt C_DT, 1,1,'<27>¨á®¢ ­¨¥ ⥪áâ ','***梥â ⥪áâ *梥â ä®­  (¥á«¨ ¥áâì)',\
<40, 50, 60, 80, 0, 0, 0, 0, 0, 0, 0>,\
< 4, 15, 16, 25, 25, -1, -1, -1, -1, -1, -1>
ObjOpt C_RE, 1,1,'<27>àאַ㣮«ì­¨ª','梥â*®âáâ㯠᫥¢ *®âáâ㯠ᢥàåã*è¨à¨­ *¢ëá®â ',\
<20, 40, 60, 80, 0, 0, 0, 0, 0, 0, 0>,\
<25, 15, 16, 26, 27, -1, -1, -1, -1, -1, -1>
ObjOpt C_KE, 1,0,'‘®¡ë⨥ ­  ª« ¢¨ âãàã','',\
< 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0>,\
<28, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1>
ObjOpt 0x0d, 1,0, '-','',\
<20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0>,\
<-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,69 @@
<html>
<head>
<title>Оглавление</title>
<meta http-equiv="content-type" content="text/html; charset=WINDOWS-1251">
<style>
body
{
font-size: 15px;
font-family: "Bookman Old Style";
color: black;
text-align: justify;
}
h1 { color: green; font-size: 23px; }
h2 { color: green; font-size: 21px; }
h3 { color: green; font-size: 19px; }
h4 { color: #803f00; font-size: 17px; }
i { color: #0099cc; }
b { color: #0099cc; }
p {
text-indent: 1em;
margin-top: 3px;
margin-bottom: 2px;
margin-left: 0px;
margin-right: 0px;
}
ol, ul, dl{
margin-top: 3px;
margin-bottom: 2px;
}
pre
{
padding: 2px;
padding-left: 20px;
margin-top: 5px;
margin-bottom: 5px;
margin-left: 0px;
margin-right: 0px;
font-family: "Courier New";
font-size: 15px;
color: #004000;
background-color: #ffd0ff;
}
table
{
font-size: 15px;
}
</style>
</head>
<body>
<h1>Kol_f_edit версия от 11.11.2010</h1>
<h2>О программе</h2>
<p>Программа для автоматизации создания интерфейса.
Многие функции программы пока еще не сделаны, потому возможности ее практического использования минимальные.
Лицензия свободная.</p>
<p><img src="about.png"></p>
<p>Внешний вид программы.</p>
<h2>Алгоритм работы с программой</h2>
<p>1) Открываем шаблон программы из файла <b>min_prog.ced</b> (<i>пока он только один, дальше планируеться добавление других шаблонов</i>)</p>
<p>2) Редактируем объекты в файле <b>min_prog.ced</b> (<i>более подробные инструкции по редактированию добавлю когда программа будет готова</i>)</p>
<p>3) Создаем <b>*.asm</b> код в текстовом окне кнопкой на панели. Сохраняем <b>*.asm</b> код на диск (<i>работоспособность получившегося файла не гарантируется, т. к. многие элементы еще доконца не запрограмированы</i>)</p>
<p>4) Редактируем получившийся <b>*.asm</b> файл любым текстовым редактором</p>
<h2>Автор</h2>
<p>Игорь А. (IgorA) - разработка программы.</p>
</body>
</html>

View File

@ -0,0 +1,45 @@
; strlen function
;
; Copyright (c) 2003 Thomas Mathys
; killer@vantage.ch
;
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
;
;%ifndef _STRLEN_INC
;%define _STRLEN_INC
;********************************************************************
; returns the length of an asciiz string
; input : esi = pointer to string
; output : eax = string length
; destroys : nothing
;********************************************************************
strlen:
push ecx
push edi
pushfd
cld ; !
mov ecx,-1
mov edi,esi ; find terminating zero
xor al,al
repne scasb
mov eax,edi ; calculate string length
sub eax,esi
dec eax
popfd
pop edi
pop ecx
ret

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB