Subversion Repositories Kolibri OS

Rev

Rev 9568 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. ;CNC CONTROL
  2. ;Igor Afanasyev (aka IgorA) and Sergey Efremenkov (aka theonlymirage), 2020
  3.  
  4. ;02.10.18 - Only prototype UI
  5. ;08.10.18 - Add ComboBox (Button + KMenu), small text
  6.  
  7. format binary as ""
  8. use32
  9.         org 0
  10.         db 'MENUET01'
  11.         dd 1,start,i_end,mem,stacktop,file_name,sys_path
  12.  
  13. include '../../macros.inc'
  14. include '../../proc32.inc'
  15. include '../../KOSfuncs.inc'
  16. include '../../load_img.inc'
  17. include '../../load_lib.mac'
  18. include '../../develop/libraries/libs-dev/libimg/libimg.inc'
  19. include '../../develop/libraries/box_lib/trunk/box_lib.mac'
  20. include 'lang.inc'
  21. include 'cnc_control.inc'
  22. include '../../develop/info3ds/info_fun_float.inc'
  23.  
  24. KMENUITEM_NORMAL equ 0
  25. KMENUITEM_SUBMENU equ 1
  26. KMENUITEM_SEPARATOR equ 2
  27.  
  28. @use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
  29. caption db 'CNC Control 18.12.20',0 ;¯®¤¯¨áì ®ª­ 
  30.  
  31. run_file_70 FileInfoBlock
  32.  
  33. offs_last_timer dd 0 ;¯®á«¥¤­¨© ᤢ¨£ ¯®ª § ­ë© ¢ ä㭪樨 â ©¬¥à 
  34.  
  35. IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
  36. image_data_toolbar dd 0 ;㪠§ â¥«ì ­  ¢à¥¬¥­­ãî ¯ ¬ïâì. ¤«ï ­ã¦¥­ ¯à¥®¡à §®¢ ­¨ï ¨§®¡à ¦¥­¨ï
  37. icon_tl_sys dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï åà ­¥­¨ï á¨á⥬­ëå ¨ª®­®ª
  38. icon_toolbar dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï åà ­¥­¨ï ¨ª®­®ª ®¡ê¥ªâ®¢
  39.  
  40. align 4
  41. start:
  42.         ;--- copy cmd line ---
  43.         mov esi,file_name
  44.         mov edi,openfile_path
  45. @@:
  46.         lodsd
  47.         or eax,eax
  48.         jz @f ;¢ë室, ¥á«¨ 0
  49.         stosd
  50.         jmp @b
  51. @@:
  52.         stosd
  53.  
  54.         load_libraries l_libs_start,l_libs_end
  55.         ;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ¡¨¡«¨®â¥ª 
  56.         mov     ebp,lib_0
  57.         cmp     dword [ebp+ll_struc_size-4],0
  58.         jz      @f
  59.                 mcall SF_TERMINATE_PROCESS
  60.         @@:
  61.         mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
  62.         mcall SF_SET_EVENTS_MASK,0xC0000027
  63.         stdcall [OpenDialog_Init],OpenDialog_data ;¯®¤£®â®¢ª  ¤¨ «®£ 
  64.  
  65.         stdcall [buf2d_create], buf_0 ;ᮧ¤ ­¨¥ ¡ãä¥à 
  66.  
  67.         ;èà¨äâ ¤¥« ¥¬ ¤® ᮧ¤ ­¨ï ¯ ­¥«¨ (¤«ï íª®­®¬¨¨ 㪠§ â¥«ï image_data_toolbar)
  68.         include_image_file '..\..\fs\kfar\trunk\font6x9.bmp', image_data_toolbar, buf_1.w,buf_1.h
  69.         stdcall [buf2d_create_f_img], buf_1,[image_data_toolbar] ;ᮧ¤ ¥¬ ¡ãä¥à
  70.         stdcall mem.Free,[image_data_toolbar] ;®á¢®¡®¦¤ ¥¬ ¯ ¬ïâì
  71.         stdcall [buf2d_conv_24_to_8], buf_1,1 ;¤¥« ¥¬ ¡ãä¥à ¯à®§à ç­®á⨠8 ¡¨â
  72.         stdcall [buf2d_convert_text_matrix], buf_1
  73.         mov eax,[buf_1.h]
  74.         shr eax,8
  75.         mov [font_h],eax
  76.  
  77.         include_image_file 'toolbar.png', image_data_toolbar
  78.  
  79.         ;*** ãáâ ­®¢ª  ¢à¥¬¥­¨ ¤«ï â ©¬¥à 
  80.         mcall SF_SYSTEM_GET,SSF_TIME_COUNT
  81.         mov [last_time],eax
  82.  
  83.         ;call but_new_file
  84.         option_boxes_set_sys_color sc,opt_grlist1
  85.  
  86.         ;progress bar
  87.         mov    [pb.left],           dword  50
  88.         mov    [pb.top],            dword  30
  89.         mov    [pb.width],          dword  350
  90.         mov    [pb.height],         dword  17
  91.         mov    [pb.max],            dword  100;599
  92.         mov    [pb.min],            dword  0 ;-397
  93.         mov    [pb.value],          dword  0 ;-397
  94.         mov    [pb.back_color],     dword 00C8D0D4h
  95.         mov    [pb.progress_color], dword 8072B7EBh
  96.         mov    [pb.frame_color],    dword 00406175h
  97.  
  98.         ;port menu
  99.         stdcall [kmenu_init], sc    ;kmenu initialisation
  100.         ;stdcall [ksubmenu_new]
  101.         ;mov [main_menu], eax
  102.  
  103.         stdcall [ksubmenu_new]
  104.         mov [port_menu], eax
  105.         stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_COMport, 110
  106.         stdcall [ksubmenu_add], [port_menu], eax
  107.         stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_USBport, 111
  108.         stdcall [ksubmenu_add], [port_menu], eax
  109.         ;stdcall [kmenuitem_new], KMENUITEM_SEPARATOR, 0, 0
  110.         ;stdcall [ksubmenu_add], [port_menu], eax
  111.         ;stdcall [kmenuitem_new], KMENUITEM_NORMAL, sz_OTHERport, 112
  112.         ;stdcall [ksubmenu_add], [port_menu], eax
  113.         stdcall [kmenuitem_new], KMENUITEM_SUBMENU, sz_PortMenu, [port_menu]
  114.         ;stdcall [ksubmenu_add], [main_menu], eax
  115.  
  116.         ;open file from cmd line
  117.         cmp dword[openfile_path],0
  118.         je @f
  119.                 call but_open_file.no_dlg
  120.         @@:
  121.  
  122. align 4
  123. red_win:
  124.         call draw_window
  125.  
  126. align 4
  127. still:
  128.         mcall SF_SYSTEM_GET,SSF_TIME_COUNT
  129.         mov ebx,[last_time]
  130.         add ebx,10 ;§ ¤¥à¦ª 
  131.         cmp ebx,eax
  132.         jge @f
  133.                 mov ebx,eax
  134.         @@:
  135.         sub ebx,eax
  136.         mcall SF_WAIT_EVENT_TIMEOUT
  137.         cmp eax,0
  138.         jne @f
  139.                 call timer_funct
  140.                 jmp still
  141.         @@:
  142.  
  143.         cmp al,1
  144.         jz red_win
  145.         cmp al,2
  146.         jz key
  147.         cmp al,3
  148.         jz button
  149.         cmp al,6
  150.         jne @f
  151.                 mcall SF_THREAD_INFO,procinfo,-1
  152.                 cmp ax,word[procinfo.window_stack_position]
  153.                 jne @f ;®ª­® ­¥  ªâ¨¢­®
  154.                 call mouse
  155.         @@:
  156.         jmp still
  157.  
  158. align 4
  159. mouse:
  160.         stdcall [option_box_mouse], opt_grlist1
  161.         stdcall [edit_box_mouse], editFileName
  162.         stdcall [edit_box_mouse], editCommand
  163.         stdcall [kmainmenu_dispatch_cursorevent], [port_menu] ;[main_menu]
  164.  
  165.         push eax ebx ecx
  166.         mcall SF_MOUSE_GET,SSF_BUTTON_EXT
  167.         bt eax,8
  168.         jnc @f
  169.                 ;mouse l. but. press
  170.                 call mouse_left_d
  171.                 jmp .end_l
  172.         @@:
  173.         bt eax,16
  174.         jnc .end_l
  175.                 ;mouse l. but. up
  176.                 call mouse_left_u
  177.                 ;jmp .end_l
  178.         .end_l:
  179.  
  180.  
  181.         call buf_get_mouse_coord
  182.         cmp eax,-1
  183.         je .end0
  184.                 shl eax,1
  185.                 sub eax,[buf_0.w]
  186.                 sar eax,1
  187.                 mov [mouse_prop_x],eax
  188.                 mov ecx,ObjData
  189.                 shl ebx,1
  190.                 sub ebx,[buf_0.h]
  191.                 sar ebx,1
  192.                 mov [mouse_prop_y],ebx
  193.  
  194.                 mcall SF_MOUSE_GET,SSF_SCROLL_DATA
  195.                 test ax,ax
  196.                 jz .end0
  197.                 finit
  198.                 fld qword[zoom_plus]
  199.                 fld1
  200.                 fsubp
  201.                 fld st0 ;for Y coord
  202.  
  203.                 ;for X coord
  204.                 fild dword[mouse_prop_x]
  205.                 fmulp st1,st0
  206.  
  207.                 mov ebx,eax
  208.                 test ax,0x8000
  209.                 jnz .decr
  210.                         ;㢥«¨ç¥­¨¥ ¬ áèâ ¡ 
  211.                         fchs
  212.                         fild dword[ecx+Figure.MCentrX] ;add old value
  213.                         fmul qword[zoom_plus]
  214.                         faddp
  215.  
  216.                         fld qword[ecx+Figure.MScale]
  217.                         fmul qword[zoom_plus]
  218.                         ;if (Figure.MScale>16.0)
  219.                         ;...
  220.                         jmp @f
  221.                 .decr:
  222.                         ;㬥­ì襭¨¥ ¬ áèâ ¡ 
  223.                         fild dword[ecx+Figure.MCentrX] ;add old value
  224.                         fdiv qword[zoom_plus]
  225.                         faddp
  226.  
  227.                         fld qword[ecx+Figure.MScale]
  228.                         fdiv qword[zoom_plus]
  229.                         fld1
  230.                         fcomp
  231.                         fstsw ax
  232.                         sahf
  233.                         jbe @f
  234.                                 ;if (Figure.MScale<1.0)
  235.                                 ffree st0
  236.                                 fincstp
  237.                                 ffree st0
  238.                                 fincstp
  239.                                 fldz ;default Figure.MCentrX
  240.                                 fld1 ;default Figure.MScale
  241.                                 mov dword[ecx+Figure.MCentrY],0
  242.                 @@:
  243.                 fstp qword[ecx+Figure.MScale]
  244.                 fistp dword[ecx+Figure.MCentrX]
  245.  
  246.                 ;for Y coord
  247.                 fild dword[mouse_prop_y]
  248.                 fmulp st1,st0
  249.                 test bx,0x8000
  250.                 jnz .decr_y
  251.                         ;㢥«¨ç¥­¨¥ ¬ áèâ ¡ 
  252.                         fild dword[ecx+Figure.MCentrY] ;add old value
  253.                         fmul qword[zoom_plus]
  254.                         faddp
  255.                         jmp @f
  256.                 .decr_y:
  257.                         ;㬥­ì襭¨¥ ¬ áèâ ¡ 
  258.                         fchs
  259.                         fild dword[ecx+Figure.MCentrY] ;add old value
  260.                         fdiv qword[zoom_plus]
  261.                         faddp
  262.                 @@:
  263.                 fistp dword[ecx+Figure.MCentrY]
  264.  
  265.                 mov dword[offs_last_timer],0
  266.         .end0:
  267.  
  268.         pop ecx ebx eax
  269.         ret
  270.  
  271. ;output:
  272. ; eax - buffer coord X (¥á«¨ ªãàá®à §  ¡ãä¥à®¬ -1)
  273. ; ebx - buffer coord Y (¥á«¨ ªãàá®à §  ¡ãä¥à®¬ -1)
  274. align 4
  275. proc buf_get_mouse_coord
  276.         mcall SF_MOUSE_GET,SSF_WINDOW_POSITION
  277.         cmp ax,word[buf_0.t]
  278.         jl .no_buf ;­¥ ¯®¯ «¨ ¢ ®ª­® ¡ãä¥à  ¯® ®á¨ y
  279.         mov ebx,eax
  280.         shr ebx,16
  281.         cmp bx,word[buf_0.l]
  282.         jl .no_buf ;­¥ ¯®¯ «¨ ¢ ®ª­® ¡ãä¥à  ¯® ®á¨ x
  283.  
  284.         and eax,0xffff ;®áâ ¢«ï¥¬ ª®®à¤¨­ âã y
  285.         sub ax,word[buf_0.t]
  286.         cmp eax,[buf_0.h]
  287.         jg .no_buf
  288.         sub bx,word[buf_0.l]
  289.         cmp ebx,[buf_0.w]
  290.         jg .no_buf
  291.         xchg eax,ebx
  292.         jmp .end_f
  293.         .no_buf:
  294.                 xor eax,eax
  295.                 not eax
  296.                 xor ebx,ebx
  297.                 not ebx
  298.         .end_f:
  299.         ret
  300. endp
  301.  
  302. align 4
  303. proc timer_funct uses eax ebx
  304.         mcall SF_SYSTEM_GET,SSF_TIME_COUNT
  305.         mov [last_time],eax
  306.  
  307.         cmp dword[offs_last_timer],ObjData
  308.         je @f
  309.                 mov dword[offs_last_timer],ObjData
  310.                 stdcall draw_obj2d,ObjData
  311.                 stdcall [buf2d_draw], buf_0
  312.         @@:
  313.         ret
  314. endp
  315.  
  316. WINDOW_WIDTH  = 775
  317. WINDOW_HEIGHT = 445
  318.  
  319. align 4
  320. draw_window:
  321. pushad
  322.         mcall SF_REDRAW,SSF_BEGIN_DRAW
  323.  
  324.         ; *** à¨á®¢ ­¨¥ £« ¢­®£® ®ª­  (¢ë¯®«­ï¥âáï 1 à § ¯à¨ § ¯ã᪥) ***
  325.         mov edx,[sc.work]
  326.         or  edx,0x33000000
  327.         mov edi,caption
  328.         mcall SF_CREATE_WINDOW,(20 shl 16)+WINDOW_WIDTH,(20 shl 16)+WINDOW_HEIGHT
  329.  
  330.         mov ecx,[ObjData.FigCount]
  331.         or ecx,ecx
  332.         jz .end0
  333.                 mov eax,[ObjData.FigData]
  334.                 xor edx,edx
  335.                 .cycle0:
  336.                         stdcall FigCalculateSizes,[eax+4*edx],0
  337.                         inc edx
  338.                         loop .cycle0
  339.                 stdcall ObjCalculateScale,ObjData
  340.                 mov dword[offs_last_timer],0
  341.                 call timer_funct
  342.         .end0:
  343.  
  344.         stdcall [edit_box_draw], editFileName
  345.         stdcall [edit_box_draw], editCommand
  346.  
  347.         stdcall [option_box_draw], opt_grlist1
  348.         push   pb
  349.         call   [progressbar_draw]
  350.  
  351.         ; *** ᮧ¤ ­¨¥ ª­®¯®ª ­  ¯ ­¥«ì ***
  352.         mcall SF_DEFINE_BUTTON,(731 shl 16)+20,(75 shl 16)+20,3, [sc.work_button]
  353.         mcall , (15 shl 16)+20,(27 shl 16)+20,4 ;restore
  354.         mcall ,(538 shl 16)+20,,5 ;connect
  355.         mcall ,(563 shl 16)+20,,6 ;close connect
  356.         mcall ,(437 shl 16)+86,(378 shl 16)+20,7 ;cancel
  357.         mcall ,(616 shl 16)+136,(378 shl 16)+20,8 ;run
  358.  
  359.         ; ***
  360.         mov ecx,[sc.work_text]
  361.         or ecx,0x80000000 ;0x81000000
  362.         textYcoord = 13;5
  363.         mcall SF_DRAW_TEXT,(15 shl 16)+textYcoord,,txt_preview
  364.         mcall ,(424 shl 16)+textYcoord,,txt_port
  365.         mov ecx,[sc.work_button_text]
  366.         or ecx,0x81000000
  367.         mcall ,(440 shl 16)+381,,txt_but_cancel
  368.         mcall ,(619 shl 16)+381,,txt_but_run
  369.  
  370.         ; *** à¨á®¢ ­¨¥ ¨ª®­®ª ­  ª­®¯ª å ***
  371.         mcall SF_PUT_IMAGE,[image_data_toolbar],(16 shl 16)+16,(733 shl 16)+77 ;icon open
  372.  
  373.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  374.         mcall ,,,(17 shl 16)+29 ;restore scale
  375.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  376.         mcall ,,,(540 shl 16)+29 ;connect
  377.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  378.         mcall ,,,(565 shl 16)+29 ;close connect
  379.         ;;add ebx,IMAGE_TOOLBAR_ICON_SIZE
  380.         ;;mcall ,,,(439 shl 16)+380 ;cancel
  381.         add ebx,IMAGE_TOOLBAR_ICON_SIZE
  382.         mcall ,,,((638+97) shl 16)+380 ;run
  383.  
  384.         stdcall [buf2d_draw], buf_0
  385.  
  386.         ;delete port button, if it exist
  387.         mov edx, 0x80000008
  388.         mcall SF_DEFINE_BUTTON
  389.         ;draw button PORT
  390.         buttonPortX = 433
  391.         buttonPortY = 27 ;50
  392.         buttonPortTextXoffset = 5
  393.         mov esi, 0x00AABBCC       ;color button
  394.         mcall SF_DEFINE_BUTTON, buttonPortX*65536 + 95, buttonPortY*65536 + 20, 8
  395.         ;draw text for button PORT
  396.         mov     ebx, (buttonPortX+buttonPortTextXoffset) * 65536 + (buttonPortY+6)    ;(x, y)
  397.         mov     esi, 11
  398.         mcall SF_DRAW_TEXT,, 0xFFFFFF, sz_PortMenu
  399.         ;stdcall [kmainmenu_draw], [main_menu]
  400.         ;mov word[coord.x], 0
  401.         ;mov word[coord.y], 0
  402.         ;stdcall [ksubmenu_draw], [port_menu], coord
  403.  
  404.         mcall SF_REDRAW,SSF_END_DRAW
  405. popad
  406.         ret
  407.  
  408. align 4
  409. key:
  410.         mcall SF_GET_KEY
  411.        
  412.         stdcall [edit_box_key], editFileName
  413.         stdcall [edit_box_key], editCommand
  414.        
  415.         mov ecx,eax
  416.         mcall SF_KEYBOARD,SSF_GET_CONTROL_KEYS
  417.         bt eax,2 ;left Ctrl
  418.         jc .key_Ctrl
  419.         bt eax,3 ;right Ctrl
  420.         jc .key_Ctrl
  421.         jmp .end0
  422.         .key_Ctrl:
  423.                 cmp ch,15 ;111 ;Ctrl+O
  424.                 jne @f
  425.                         call but_open_file
  426.                 @@:
  427.         .end0:
  428.         jmp still
  429.  
  430. align 4
  431. button:
  432.         mcall SF_GET_BUTTON
  433.  
  434.         cmp ah,3
  435.         jne @f
  436.                 call but_open_file
  437.                 jmp still
  438.         @@:
  439.         cmp ah,4
  440.         jne @f
  441.                 call but_restore_zoom
  442.                 jmp still
  443.         @@:
  444.         cmp ah, 8
  445.         jne @f
  446.                 push eax ebx ecx
  447.                 mcall SF_THREAD_INFO, pi, -1 ;get window coord
  448.  
  449.                 mov eax, dword[pi+34]
  450.                 add eax, buttonPortX + 5
  451.                 mov word[coord.x], ax
  452.  
  453.                 mov eax, dword[pi+38]
  454.                 add eax, buttonPortY + 42
  455.                 mov word[coord.y], ax
  456.  
  457.                 stdcall [ksubmenu_draw], [port_menu], coord
  458.                 pop ecx ebx eax
  459.         @@:
  460.         ;cmp ah,5
  461.         ;jne @f
  462.                 ;call but_...
  463.                 ;jmp still
  464.         ;@@:
  465.         cmp ah,1
  466.         jne still
  467. .exit:
  468.         stdcall [buf2d_delete],buf_0
  469.         stdcall mem.Free,[image_data_toolbar]
  470.         stdcall mem.Free,[open_file_data]
  471.         mcall SF_TERMINATE_PROCESS
  472.  
  473.  
  474.  
  475. align 4
  476. open_file_data dd 0 ;㪠§ â¥«ì ­  ¯ ¬ïâì ¤«ï ®âªàëâ¨ï ä ©«®¢
  477. open_file_size dd 0 ;à §¬¥à ®âªàë⮣® ä ©« 
  478.  
  479. align 4
  480. but_open_file:
  481.         copy_path open_dialog_name,communication_area_default_path,file_name,0
  482.         pushad
  483.         mov [OpenDialog_data.type],0
  484.         stdcall [OpenDialog_Start],OpenDialog_data
  485.         cmp [OpenDialog_data.status],2
  486.         je .end_open_file
  487.         ;ª®¤ ¯à¨ 㤠筮¬ ®âªàë⨨ ¤¨ «®£ 
  488.         jmp .end0
  489. .no_dlg: ;¥á«¨ ¬¨­ã¥¬ ¤¨ «®£ ®âªàëâ¨ï ä ©« 
  490.                 pushad
  491.                 mov esi,openfile_path
  492.                 stdcall str_len,esi
  493.                 add esi,eax
  494.                 @@: ;横« ¤«ï ¯®¨áª  ­ ç «  ¨¬¥­¨ ä ©« 
  495.                         dec esi
  496.                         cmp byte[esi],'/'
  497.                         je @f
  498.                         cmp byte[esi],0x5c ;'\'
  499.                         je @f
  500.                         cmp esi,openfile_path
  501.                         jg @b
  502.                 @@:
  503.                 inc esi
  504.                 stdcall [OpenDialog_Set_file_name],OpenDialog_data,esi ;ª®¯¨à㥬 ¨¬ï ä ©«  ¢ ¤¨ «®£ á®åà ­¥­¨ï
  505.         .end0:
  506.         push eax ebx ecx edx    ;copy file name path from OpenDialog
  507.         mov eax, openfile_path
  508.         mov ebx, fileNameBuffer ;.data
  509.         mov ecx, 0
  510.       @@:
  511.         mov dl, byte[eax]
  512.         cmp dl, 0 ;byte[eax], 0
  513.         je @f
  514.         mov byte[ebx], dl
  515.         inc eax
  516.         inc ebx
  517.         inc ecx
  518.         jmp @b
  519.       @@:
  520.         mov byte[ebx], 0
  521.         mov dword[fileNameBuffer.size], ecx
  522.         mov dword[editFileName.size], ecx
  523.         mov dword[editFileName.pos], ecx
  524.         pop edx ecx ebx eax
  525.  
  526.         mov [run_file_70.Function], SSF_GET_INFO
  527.         mov [run_file_70.Position], 0
  528.         mov [run_file_70.Flags], 0
  529.         mov dword[run_file_70.Count], 0
  530.         mov dword[run_file_70.Buffer], open_b
  531.         mov byte[run_file_70+20], 0
  532.         mov dword[run_file_70.FileName], openfile_path
  533.         mcall SF_FILE,run_file_70
  534.  
  535.         mov ecx,dword[open_b+32] ;+32 qword: à §¬¥à ä ©«  ¢ ¡ ©â å
  536.         inc ecx ;for text files
  537.         stdcall mem.ReAlloc,[open_file_data],ecx
  538.         mov [open_file_data],eax
  539.         dec ecx ;for text files
  540.         mov byte[eax+ecx],0 ;for text files
  541.  
  542.         mov [run_file_70.Function], SSF_READ_FILE
  543.         mov [run_file_70.Position], 0
  544.         mov [run_file_70.Flags], 0
  545.         mov dword[run_file_70.Count], ecx
  546.         m2m dword[run_file_70.Buffer], dword[open_file_data]
  547.         mov byte[run_file_70+20], 0
  548.         mov dword[run_file_70.FileName], openfile_path
  549.         mcall SF_FILE,run_file_70 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
  550.         test eax,eax
  551.         jnz .end_open_file
  552.         cmp ebx,0xffffffff
  553.         je .end_open_file
  554.                 mov [open_file_size],ebx
  555.                 mcall SF_SET_CAPTION,1,openfile_path
  556.  
  557.                 stdcall FileInit,[open_file_data],[open_file_size]
  558.                 stdcall [buf2d_clear], buf_0, [buf_0.color] ;ç¨á⨬ ¡ãä¥à
  559.                 stdcall [buf2d_draw], buf_0 ;®¡­®¢«ï¥¬ ¡ãä¥à ­  íªà ­¥
  560.         .end_open_file:
  561.         popad
  562.         ret
  563.  
  564. ;output:
  565. ; ecx - memory size for save file
  566. align 4
  567. proc get_file_save_size uses eax ebx edx esi
  568.         mov ecx,100 ;title
  569.         mov ebx,ObjData
  570.         add ecx,50 ;object
  571.         mov edx,[ebx+Object.FigCount]
  572.         or edx,edx
  573.         jz .cycle1end
  574.         mov esi,[ebx+Object.FigData]
  575. align 4
  576.         .cycle1: ; 横« ¯® 䨣ãà ¬
  577.                 add ecx,80 ;figure
  578.                 mov eax,[esi]
  579.                 or eax,eax
  580.                 jz @f
  581.                         mov eax,[eax+Figure.PoiCount]
  582.                         imul eax,70
  583.                         add ecx,eax ;points
  584.                 @@:
  585.                 add esi,4
  586.                 dec edx
  587.                 jnz .cycle1
  588.         .cycle1end:
  589.         ret
  590. endp
  591.  
  592. align 4
  593. proc but_restore_zoom
  594.         finit
  595.         fld1
  596.         fstp qword[ObjData.MScale]
  597.         mov dword[ObjData.MCentrX],0
  598.         mov dword[ObjData.MCentrY],0
  599.         mov dword[offs_last_timer],0
  600.         ret
  601. endp
  602.  
  603. ;input:
  604. ; buf - 㪠§ â¥«ì ­  áâபã, ç¨á«® ¤®«¦­® ¡ëâì ¢ 10 ¨«¨ 16 à¨ç­®¬ ¢¨¤¥
  605. ;output:
  606. ; eax - ç¨á«®
  607. align 4
  608. proc conv_str_to_int uses ebx ecx esi, buf:dword
  609.         xor eax,eax
  610.         xor ebx,ebx
  611.         mov esi,[buf]
  612.  
  613.         ;­  á«ãç © ¥á«¨ ¯¥à¥¤ ç¨á«®¬ ­ å®¤ïâáï ¯à®¡¥«ë
  614.         @@:
  615.         cmp byte[esi],' '
  616.         jne @f
  617.                 inc esi
  618.                 jmp @b
  619.         @@:
  620.  
  621.         ;®¯à¥¤¥«¥­¨¥ ®âà¨æ â¥«ì­ëå ç¨á¥«
  622.         xor ecx,ecx
  623.         inc ecx
  624.         cmp byte[esi],'-'
  625.         jne @f
  626.                 dec ecx
  627.                 inc esi
  628.         @@:
  629.  
  630.         cmp word[esi],'0x'
  631.         je .load_digit_16
  632.  
  633.         .load_digit_10: ;áç¨â뢠­¨¥ 10-â¨ç­ëå æ¨äà
  634.                 mov bl,byte[esi]
  635.                 cmp bl,'0'
  636.                 jl @f
  637.                 cmp bl,'9'
  638.                 jg @f
  639.                         sub bl,'0'
  640.                         imul eax,10
  641.                         add eax,ebx
  642.                         inc esi
  643.                         jmp .load_digit_10
  644.         jmp @f
  645.  
  646.         .load_digit_16: ;áç¨â뢠­¨¥ 16-à¨ç­ëå æ¨äà
  647.                 add esi,2
  648.         .cycle_16:
  649.                 mov bl,byte[esi]
  650.                 cmp bl,'0'
  651.                 jl @f
  652.                 cmp bl,'f'
  653.                 jg @f
  654.                 cmp bl,'9'
  655.                 jle .us1
  656.                         cmp bl,'A'
  657.                         jl @f ;®âᥨ¢ ¥¬ ᨬ¢®«ë >'9' ¨ <'A'
  658.                 .us1: ;á®áâ ¢­®¥ ãá«®¢¨¥
  659.                 cmp bl,'F'
  660.                 jle .us2
  661.                         cmp bl,'a'
  662.                         jl @f ;®âᥨ¢ ¥¬ ᨬ¢®«ë >'F' ¨ <'a'
  663.                         sub bl,32 ;¯¥à¥¢®¤¨¬ ᨬ¢®«ë ¢ ¢¥àå­¨© ॣ¨áâà, ¤«ï ã¯à®é¥­¨ï ¨å ¯®á«¥¤ã饩 ®¡à ¡®âª¨
  664.                 .us2: ;á®áâ ¢­®¥ ãá«®¢¨¥
  665.                         sub bl,'0'
  666.                         cmp bl,9
  667.                         jle .cor1
  668.                                 sub bl,7 ;convert 'A' to '10'
  669.                         .cor1:
  670.                         shl eax,4
  671.                         add eax,ebx
  672.                         inc esi
  673.                         jmp .cycle_16
  674.         @@:
  675.         or ecx,ecx ;¥á«¨ ç¨á«® ®âà¨æ â¥«ì­®¥
  676.         jnz @f
  677.                 sub ecx,eax
  678.                 mov eax,ecx
  679.         @@:
  680.         ret
  681. endp
  682.  
  683.  
  684. ;¤ ­­ë¥ ¤«ï ¤¨ «®£  ®âªàëâ¨ï ä ©«®¢
  685. align 4
  686. OpenDialog_data:
  687. .type                   dd 0 ;0 - ®âªàëâì, 1 - á®åà ­¨âì, 2 - ¢ë¡à âì ¤â४â®à¨î
  688. .procinfo               dd procinfo     ;+4
  689. .com_area_name          dd communication_area_name      ;+8
  690. .com_area               dd 0    ;+12
  691. .opendir_path           dd plugin_path  ;+16
  692. .dir_default_path       dd default_dir ;+20
  693. .start_path             dd file_name ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢
  694. .draw_window            dd draw_window  ;+28
  695. .status                 dd 0    ;+32
  696. .openfile_path          dd openfile_path        ;+36 ¯ãâì ª ®âªà뢠¥¬®¬ã ä ©«ã
  697. .filename_area          dd filename_area        ;+40
  698. .filter_area            dd Filter
  699. .x:
  700. .x_size                 dw 420 ;+48 ; Window X size
  701. .x_start                dw 10 ;+50 ; Window X position
  702. .y:
  703. .y_size                 dw 320 ;+52 ; Window y size
  704. .y_start                dw 10 ;+54 ; Window Y position
  705.  
  706. default_dir db '/sys',0
  707.  
  708. communication_area_name:
  709.         db 'FFFFFFFF_open_dialog',0
  710. open_dialog_name:
  711.         db 'opendial',0
  712. communication_area_default_path:
  713.         db '/sys/File managers/',0
  714.  
  715. Filter:
  716. dd Filter.end - Filter ;.1
  717. .1:
  718. db 'NC',0
  719. db 'PNG',0
  720. .end:
  721. db 0
  722.  
  723.  
  724. ;[
  725. ;for test
  726. main_menu dd 0
  727. port_menu dd 0
  728.  
  729. sz_PortMenu  db 'COM 12     ',0
  730. sz_COMport   db 'COM port 12',0
  731. sz_USBport   db 'USB port   ',0
  732. sz_OTHERport db 'Other port ',0
  733.  
  734. coord:
  735.   .x dw 100
  736.   .y dw 200
  737. ;]
  738.  
  739. align 4
  740. system_dir_0 db '/sys/lib/'
  741. lib_name_0 db 'proc_lib.obj',0
  742. system_dir_1 db '/sys/lib/'
  743. lib_name_1 db 'libimg.obj',0
  744. system_dir_2 db '/sys/lib/'
  745. lib_name_2 db 'buf2d.obj',0
  746. system_dir_3 db '/sys/lib/'
  747. lib_name_3 db 'box_lib.obj',0
  748. system_dir_4 db '/sys/lib/'
  749. lib_name_4 db 'kmenu.obj',0
  750.  
  751. align 4
  752. l_libs_start:
  753.         lib_0 l_libs lib_name_0, file_name, system_dir_0, import_proclib
  754.         lib_1 l_libs lib_name_1, file_name, system_dir_1, import_libimg
  755.         lib_2 l_libs lib_name_2, file_name, system_dir_2, import_buf2d
  756.         lib_3 l_libs lib_name_3, file_name, system_dir_3, import_box_lib
  757.         lib_4 l_libs lib_name_4, file_name, system_dir_4, import_libkmenu
  758. l_libs_end:
  759.  
  760. align 4
  761. import_libimg:
  762.         dd alib_init1
  763.         img_is_img  dd aimg_is_img
  764.         img_info    dd aimg_info
  765.         img_from_file dd aimg_from_file
  766.         img_to_file dd aimg_to_file
  767.         img_from_rgb dd aimg_from_rgb
  768.         img_to_rgb  dd aimg_to_rgb
  769.         img_to_rgb2 dd aimg_to_rgb2
  770.         img_decode  dd aimg_decode
  771.         img_encode  dd aimg_encode
  772.         img_create  dd aimg_create
  773.         img_destroy dd aimg_destroy
  774.         img_destroy_layer dd aimg_destroy_layer
  775.         img_count   dd aimg_count
  776.         img_lock_bits dd aimg_lock_bits
  777.         img_unlock_bits dd aimg_unlock_bits
  778.         img_flip    dd aimg_flip
  779.         img_flip_layer dd aimg_flip_layer
  780.         img_rotate  dd aimg_rotate
  781.         img_rotate_layer dd aimg_rotate_layer
  782.         img_draw    dd aimg_draw
  783.  
  784.         dd 0,0
  785.         alib_init1   db 'lib_init',0
  786.         aimg_is_img  db 'img_is_img',0 ;®¯à¥¤¥«ï¥â ¯® ¤ ­­ë¬, ¬®¦¥â «¨ ¡¨¡«¨®â¥ª  ᤥ« âì ¨§ ­¨å ¨§®¡à ¦¥­¨¥
  787.         aimg_info    db 'img_info',0
  788.         aimg_from_file db 'img_from_file',0
  789.         aimg_to_file db 'img_to_file',0
  790.         aimg_from_rgb db 'img_from_rgb',0
  791.         aimg_to_rgb  db 'img_to_rgb',0 ;¯à¥®¡à §®¢ ­¨¥ ¨§®¡à ¦¥­¨ï ¢ ¤ ­­ë¥ RGB
  792.         aimg_to_rgb2 db 'img_to_rgb2',0
  793.         aimg_decode  db 'img_decode',0 ; ¢â®¬ â¨ç¥áª¨ ®¯à¥¤¥«ï¥â ä®à¬ â £à ä¨ç¥áª¨å ¤ ­­ëå
  794.         aimg_encode  db 'img_encode',0
  795.         aimg_create  db 'img_create',0
  796.         aimg_destroy db 'img_destroy',0
  797.         aimg_destroy_layer db 'img_destroy_layer',0
  798.         aimg_count   db 'img_count',0
  799.         aimg_lock_bits db 'img_lock_bits',0
  800.         aimg_unlock_bits db 'img_unlock_bits',0
  801.         aimg_flip    db 'img_flip',0
  802.         aimg_flip_layer db 'img_flip_layer',0
  803.         aimg_rotate  db 'img_rotate',0
  804.         aimg_rotate_layer db 'img_rotate_layer',0
  805.         aimg_draw    db 'img_draw',0
  806.  
  807. align 4
  808. import_proclib:
  809.         OpenDialog_Init dd aOpenDialog_Init
  810.         OpenDialog_Start dd aOpenDialog_Start
  811.         OpenDialog_Set_file_name dd aOpenDialog_Set_file_name
  812.         ;OpenDialog_Set_file_ext dd aOpenDialog_Set_file_ext
  813. dd 0,0
  814.         aOpenDialog_Init db 'OpenDialog_init',0
  815.         aOpenDialog_Start db 'OpenDialog_start',0
  816.         aOpenDialog_Set_file_name db 'OpenDialog_set_file_name',0
  817.         ;aOpenDialog_Set_file_ext db 'OpenDialog_set_file_ext',0
  818.  
  819. align 4
  820. import_buf2d:
  821.         init dd sz_init
  822.         buf2d_create dd sz_buf2d_create
  823.         buf2d_create_f_img dd sz_buf2d_create_f_img
  824.         buf2d_clear dd sz_buf2d_clear
  825.         buf2d_draw dd sz_buf2d_draw
  826.         buf2d_delete dd sz_buf2d_delete
  827.         buf2d_resize dd sz_buf2d_resize
  828.         buf2d_line dd sz_buf2d_line
  829.         buf2d_line_sm dd sz_buf2d_line_sm
  830.         buf2d_rect_by_size dd sz_buf2d_rect_by_size
  831.         buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
  832.         buf2d_circle dd sz_buf2d_circle
  833.         buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2
  834.         buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2
  835.         buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
  836.         buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32
  837.         buf2d_bit_blt dd sz_buf2d_bit_blt
  838.         buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
  839.         buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
  840.         buf2d_curve_bezier dd sz_buf2d_curve_bezier
  841.         buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
  842.         buf2d_draw_text dd sz_buf2d_draw_text
  843.         buf2d_crop_color dd sz_buf2d_crop_color
  844.         buf2d_flip_h dd sz_buf2d_flip_h
  845.         buf2d_flip_v dd sz_buf2d_flip_v
  846.         buf2d_offset_h dd sz_buf2d_offset_h
  847.         buf2d_flood_fill dd sz_buf2d_flood_fill
  848.         buf2d_set_pixel dd sz_buf2d_set_pixel
  849.         dd 0,0
  850.         sz_init db 'lib_init',0
  851.         sz_buf2d_create db 'buf2d_create',0
  852.         sz_buf2d_create_f_img db 'buf2d_create_f_img',0
  853.         sz_buf2d_clear db 'buf2d_clear',0
  854.         sz_buf2d_draw db 'buf2d_draw',0
  855.         sz_buf2d_delete db 'buf2d_delete',0
  856.         sz_buf2d_resize db 'buf2d_resize',0
  857.         sz_buf2d_line db 'buf2d_line',0
  858.         sz_buf2d_line_sm db 'buf2d_line_sm',0
  859.         sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0
  860.         sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
  861.         sz_buf2d_circle db 'buf2d_circle',0
  862.         sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0
  863.         sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0
  864.         sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
  865.         sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0
  866.         sz_buf2d_bit_blt db 'buf2d_bit_blt',0
  867.         sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0
  868.         sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0
  869.         sz_buf2d_curve_bezier db 'buf2d_curve_bezier',0
  870.         sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
  871.         sz_buf2d_draw_text db 'buf2d_draw_text',0
  872.         sz_buf2d_crop_color db 'buf2d_crop_color',0
  873.         sz_buf2d_flip_h db 'buf2d_flip_h',0
  874.         sz_buf2d_flip_v db 'buf2d_flip_v',0
  875.         sz_buf2d_offset_h db 'buf2d_offset_h',0
  876.         sz_buf2d_flood_fill db 'buf2d_flood_fill',0
  877.         sz_buf2d_set_pixel db 'buf2d_set_pixel',0
  878.  
  879. align 4
  880. import_box_lib:
  881.         dd sz_init1
  882.  
  883.         init_checkbox   dd sz_Init_checkbox
  884.         check_box_draw  dd sz_Check_box_draw
  885.         check_box_mouse dd sz_Check_box_mouse
  886.         ;version_ch     dd sz_Version_ch
  887.  
  888.         option_box_draw  dd sz_Option_box_draw
  889.         option_box_mouse dd sz_Option_box_mouse
  890.         ;version_op      dd sz_Version_op
  891.  
  892.         edit_box_draw      dd sz_edit_box_draw
  893.         edit_box_key       dd sz_edit_box_key
  894.         edit_box_mouse     dd sz_edit_box_mouse
  895.         edit_box_set_text  dd sz_edit_box_set_text
  896.         scrollbar_ver_draw dd sz_scrollbar_ver_draw
  897.         scrollbar_hor_draw dd sz_scrollbar_hor_draw
  898.  
  899.         progressbar_draw     dd sz_progressbar_draw
  900.         progressbar_progress dd sz_progressbar_progress
  901.  
  902.         dd 0,0
  903.         sz_init1 db 'lib_init',0
  904.  
  905.         sz_Init_checkbox   db 'init_checkbox2',0
  906.         sz_Check_box_draw  db 'check_box_draw2',0
  907.         sz_Check_box_mouse db 'check_box_mouse2',0
  908.         ;sz_Version_ch     db 'version_ch2',0
  909.  
  910.         sz_Option_box_draw      db 'option_box_draw',0
  911.         sz_Option_box_mouse     db 'option_box_mouse',0
  912.         ;sz_Version_op      db 'version_op',0
  913.  
  914.         sz_edit_box_draw      db 'edit_box_draw',0
  915.         sz_edit_box_key       db 'edit_box_key',0
  916.         sz_edit_box_mouse     db 'edit_box_mouse',0
  917.         sz_edit_box_set_text  db 'edit_box_set_text',0
  918.         sz_scrollbar_ver_draw db 'scrollbar_v_draw',0
  919.         sz_scrollbar_hor_draw db 'scrollbar_h_draw',0
  920.  
  921.         sz_progressbar_draw     db 'progressbar_draw', 0
  922.         sz_progressbar_progress db 'progressbar_progress', 0
  923.  
  924. align 4
  925. import_libkmenu:
  926.         kmenu_init      dd akmenu_init
  927.         kmainmenu_draw  dd akmainmenu_draw
  928.         kmainmenu_dispatch_cursorevent dd akmainmenu_dispatch_cursorevent
  929.         ksubmenu_new    dd aksubmenu_new
  930.         ksubmenu_delete dd aksubmenu_delete
  931.         ksubmenu_draw   dd aksubmenu_draw
  932.         ksubmenu_add    dd aksubmenu_add
  933.         kmenuitem_new   dd akmenuitem_new
  934.         kmenuitem_delete dd akmenuitem_delete
  935.         kmenuitem_draw  dd akmenuitem_draw
  936. dd 0,0
  937.         akmenu_init     db 'kmenu_init',0
  938.         akmainmenu_draw db 'kmainmenu_draw',0
  939.         akmainmenu_dispatch_cursorevent db 'kmainmenu_dispatch_cursorevent',0
  940.         aksubmenu_new   db 'ksubmenu_new',0
  941.         aksubmenu_delete db 'ksubmenu_delete',0
  942.         aksubmenu_draw  db 'ksubmenu_draw',0
  943.         aksubmenu_add   db 'ksubmenu_add',0
  944.         akmenuitem_new  db 'kmenuitem_new',0
  945.         akmenuitem_delete db 'kmenuitem_delete',0
  946.         akmenuitem_draw  db 'kmenuitem_draw',0
  947.  
  948. button_press  dd 0     ;for kmenu
  949.  
  950. align 4
  951. mouse_dd dd 0
  952. last_time dd 0
  953.  
  954. align 16
  955. sc system_colors
  956.  
  957. align 16
  958. procinfo process_information
  959.  
  960. align 4
  961. buf_0: dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
  962. .l: dw 15 ;+4 left
  963. .t: dw 50 ;+6 top
  964. .w: dd 384 ;+8 w
  965. .h: dd 350 ;+12 h
  966. .color: dd 0xffffd0 ;+16 color
  967.         db 24 ;+20 bit in pixel
  968.  
  969. align 4
  970. buf_1:
  971.         dd 0 ;㪠§ â¥«ì ­  ¡ãä¥à ¨§®¡à ¦¥­¨ï
  972.         dd 0 ;+4 left,top
  973. .w: dd 0
  974. .h: dd 0,0,24 ;+12 color,bit in pixel
  975.  
  976. font_h dd 0 ;¢ëá®â  èà¨äâ 
  977.  
  978. ;input:
  979. ; eax - ç¨á«®
  980. ; edi - ¡ãä¥à ¤«ï áâப¨
  981. ; len - ¤«¨­­  ¡ãä¥à 
  982. ;output:
  983. align 4
  984. proc convert_int_to_str uses eax ecx edx edi esi, len:dword
  985.         mov esi,[len]
  986.         add esi,edi
  987.         dec esi
  988.         call .str
  989.         ret
  990. endp
  991.  
  992. align 4
  993. .str:
  994.         mov ecx,10
  995.         cmp eax,ecx
  996.         jb @f
  997.                 xor edx,edx
  998.                 div ecx
  999.                 push edx
  1000.                 ;dec edi  ;ᬥ饭¨¥ ­¥®¡å®¤¨¬®¥ ¤«ï § ¯¨á¨ á ª®­æ  áâப¨
  1001.                 call .str
  1002.                 pop eax
  1003.         @@:
  1004.         cmp edi,esi
  1005.         jge @f
  1006.                 or al,0x30
  1007.                 stosb
  1008.                 mov byte[edi],0 ;¢ ª®­¥æ áâப¨ áâ ¢¨¬ 0, çâ®-¡ë ­¥ ¢ë« §¨« ¬ãá®à
  1009.         @@:
  1010.         ret
  1011.  
  1012. align 4
  1013. proc mem_copy uses ecx esi edi, destination:dword, source:dword, len:dword
  1014.         cld
  1015.         mov esi, [source]
  1016.         mov edi, [destination]
  1017.         mov ecx, [len]
  1018.         rep movsb
  1019.         ret
  1020. endp
  1021.  
  1022. edMaxSize = 511
  1023. edMax = 0 ;max, size, pos
  1024.  
  1025. align 4
  1026. editFileName  edit_box 270,450,78, 0xffffff, 0x6a9480, 0, 0xAABBCC, 0, edMaxSize, fileNameBuffer.data, mouse_dd, 0, edMax, edMax
  1027. editCommand   edit_box 150,450,121, 0xffffff, 0x6a9480, 0, 0xAABBCC, 0, edMaxSize, commandBuffer.data, mouse_dd, 0, edMax, edMax
  1028.  
  1029. opt1 option_box opt_gr1, 433,64, 6,12,0xd0d0ff, 0xff, 0x80ff,txt_filename,txt_filename.end-txt_filename
  1030. opt2 option_box opt_gr1, 433,107,6,12,0xd0d0ff, 0xff, 0x80ff,txt_command,txt_command.end-txt_command
  1031. opt_gr1 dd opt1
  1032. align 4
  1033. opt_grlist1 dd opt1,opt2,0 ;end option group
  1034.  
  1035. pb:
  1036. .value          dd 0
  1037. .left           dd 0
  1038. .top            dd 0
  1039. .width          dd 0
  1040. .height         dd 0
  1041. .style          dd 0
  1042. .min            dd 0
  1043. .max            dd 0
  1044. .back_color     dd 0
  1045. .progress_color dd 0
  1046. .frame_color    dd 0
  1047.  
  1048. fileNameBuffer:
  1049. .data: rb 512
  1050. .size: rd 1
  1051. fileNameBufferEnd:
  1052.  
  1053. commandBuffer:
  1054. .data: rb 512
  1055. .size: rd 1
  1056. commandBufferEnd:
  1057.  
  1058. align 16
  1059. i_end:
  1060.         rb 2048
  1061. thread_coords:
  1062.         rb 2048
  1063. thread_scale:
  1064.         rb 2048
  1065. thread_n_file:
  1066.         rb 2048
  1067. stacktop:
  1068.         sys_path rb 1024
  1069.         file_name rb 2048
  1070.         plugin_path rb 4096
  1071.         openfile_path rb 4096
  1072.         filename_area rb 256
  1073.         pi rb 1024
  1074. mem:
  1075.  
  1076.