Subversion Repositories Kolibri OS

Rev

Rev 3377 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. ;=============================================================================
  2. ; Kolibri Graphics Benchmark 0.7
  3. ;--------------------------------------
  4. ; MGB - Menuet Graphics Benchmark 0.3
  5. ; Compile with FASM
  6. ;
  7. ;=============================================================================
  8. ; version:      0.7
  9. ; last update:  05/04/2013
  10. ; written by:   Marat Zakiyanov aka Mario79, aka Mario
  11. ; changes:      benchmark GS selector - read screen area
  12. ;---------------------------------------------------------------------
  13. ; version:      0.6
  14. ; last update:  14/03/2013
  15. ; written by:   Marat Zakiyanov aka Mario79, aka Mario
  16. ; changes:      benchmark f36 - read screen area
  17. ;---------------------------------------------------------------------
  18. ; version:      0.5
  19. ; last update:  05/03/2013
  20. ; written by:   Marat Zakiyanov aka Mario79, aka Mario
  21. ; changes:      benchmark f73-blitter
  22. ;---------------------------------------------------------------------
  23. ; version:      0.4
  24. ; last update:  18/09//2010
  25. ; written by:   Marat Zakiyanov aka Mario79, aka Mario
  26. ; changes:      select path with OpenDialog,
  27. ;               use of Box_Lib and Proc_Lib,
  28. ;               support start with path for *.mgb file
  29. ;               optimization code and size of use memory
  30. ;---------------------------------------------------------------------
  31. ; Original author and copyrights holder:
  32. ;     Mikhail Lisovin a.k.a. Mihasik
  33. ;     lisovin@26.ru
  34. ;
  35. ; Disassembled with IDA 5.0.0.879:
  36. ;     http://www.datarescue.com/
  37. ; With use of 'ida.int' and 'kloader.ldw':
  38. ;     Eugene Grechnikov a.k.a. diamond
  39. ;     diamondz@land.ru
  40. ;     http://diamondz.land.ru/
  41. ;
  42. ; Modified for version 0.3:
  43. ;     Mike Semenako a.k.a mike.dld
  44. ;     mike.dld@gmail.com
  45. ;     http://www.mikedld.com/
  46. ;
  47. ;=============================================================================
  48.  
  49. org 0x0
  50. use32
  51.  
  52.         db 'MENUET01'
  53.         dd 1
  54.         dd start
  55.         dd IM_END
  56.         dd I_END        ;0x200000
  57.         dd stacktop     ;0x07FFF0
  58.         dd fname_buf
  59.         dd cur_dir_path
  60.  
  61. include '../../../config.inc'           ;for nightbuild
  62. include '..\..\..\macros.inc'
  63. include '..\..\..\proc32.inc'
  64. ;include '..\..\..\debug.inc'
  65. include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
  66. include '../../../develop/libraries/box_lib/load_lib.mac'
  67.         @use_library
  68. ;---------------------------------------------------------------------
  69. start:
  70.         mcall   68,11
  71.  
  72. load_libraries l_libs_start,end_l_libs
  73.  
  74.         cmp     eax,-1
  75.         jz      close
  76. ;---------------------------------------------------------------------
  77.         mov     edi,filename_area
  78.         mov     esi,start_temp_file_name
  79.         call    copy_str_1
  80.  
  81.         mov     edi,comment_string_1
  82.         mov     esi,aComment1
  83.         call    copy_str_1
  84.  
  85.         mov     edi,comment_string_2
  86.         mov     esi,aComment2
  87.         call    copy_str_1
  88.  
  89.         mov     edi,fname_buf
  90.         cmp     [edi],byte 0
  91.         jne     @f
  92.         mov     esi,path4
  93.         call    copy_str_1
  94.         jmp     .OpenDialog
  95. @@:
  96.         call    locLoadFile
  97.         xor     dword [wFlags],1
  98. .OpenDialog:
  99. ;OpenDialog     initialisation
  100.         push    dword OpenDialog_data
  101.         call    [OpenDialog_Init]
  102. ;---------------------------------------------------------------------
  103.         mcall   40,0x27
  104. red:
  105.         call    draw_window
  106. still:
  107.         mcall   10
  108.         cmp     eax,1
  109.         jz      red
  110.         cmp     eax,2
  111.         jz      key
  112.         cmp     eax,3
  113.         jz      button
  114.         jmp     still
  115. ;---------------------------------------------------------------------
  116. copy_str_1:
  117.         xor     eax,eax
  118.         cld
  119. @@:
  120.         lodsb
  121.         stosb
  122.         test    eax,eax
  123.         jnz     @b
  124.         ret
  125. ;---------------------------------------------------------------------
  126. key:
  127.         mcall   2
  128.         cmp     ah,'t'
  129.         jz      ActionTest
  130.         cmp     ah,'c'
  131.         jz      ActionComment
  132.         cmp     ah,'p'
  133.         jz      ActionPattern
  134.         cmp     ah,'o'
  135.         jz      ActionOpen
  136.         cmp     ah,'s'
  137.         jz      ActionSave
  138.         jmp     still
  139. ;---------------------------------------------------------------------
  140. button:
  141.         mcall   17
  142.         cmp     ah,1
  143.         jnz     NotClose
  144. close:
  145.         mcall   -1
  146. NotClose:
  147.         cmp     ah,2
  148.         jnz     locNotTest
  149. ActionTest:
  150.         test    dword [wFlags],1
  151.         jnz     still
  152.         mcall   51,1,TestWndProc,thread_stack1
  153.         jmp     still
  154. ;---------------------------------------------------------------------
  155. locNotTest:
  156.         cmp     ah,3
  157.         jnz     NotComment
  158. ActionComment:
  159.         test    dword [wFlags],1
  160.         jnz     still
  161.         mcall   51,1,thread_comment,thread_stack2
  162.         jmp     still
  163. ;---------------------------------------------------------------------
  164. NotComment:
  165.         cmp     ah,4
  166.         jnz     NotPattern
  167. ActionPattern:
  168.         test    dword [wFlags],1
  169.         jnz     still
  170.         mov     esi,results_table
  171.         cld
  172. @@:
  173.         lodsd
  174.         mov     [esi],eax
  175.         add     esi,TEST_REC_SIZE-4
  176.         cmp     dword [esi+TEST_REC_SIZE-4],0
  177.         jne     @b
  178.         mov     esi,comment_string_1
  179.         mov     edi,comment_string_2
  180.         call    copy_str_1
  181.         call    DrawBars
  182.         jmp     still
  183. ;---------------------------------------------------------------------
  184. NotPattern:
  185.         cmp     ah,5
  186.         jnz     NotOpen
  187. ActionOpen:
  188.         test    dword [wFlags],1
  189.         jnz     still
  190.         mov     [OpenDialog_data.type],0 ; open
  191.         call    OpenDialog_Start_1
  192.         jne     still
  193.         call    locLoadFile
  194.         call    DrawBars
  195. .1:
  196.         xor     dword [wFlags],1
  197.         jmp     still
  198. ;---------------------------------------------------------------------
  199. OpenDialog_Start_1:
  200.         push    dword OpenDialog_data
  201.         call    [OpenDialog_Start]
  202.         cmp     [OpenDialog_data.status],1
  203.         ret
  204. ;---------------------------------------------------------------------
  205. NotOpen:
  206.         cmp     ah,6
  207.         jnz     still
  208. ActionSave:
  209.         test    dword [wFlags],1
  210.         jnz     still
  211.         mov     [OpenDialog_data.type],1 ; save
  212.         call    OpenDialog_Start_1
  213.         jne     still
  214.         call    locSaveFile
  215.         jmp     ActionOpen.1
  216. ;---------------------------------------------------------------------
  217. TestWndProc:
  218.         mcall   68,12,90*123*3
  219.         mov     [area_for_f36],eax
  220.         or      dword [wFlags],1
  221.         mov     esi,results_table+8
  222. align 4
  223. .next_test:
  224.         xor     edi,edi
  225.         mcall    26,9
  226.         inc     eax
  227.         mov     ecx,eax
  228.         add     eax,100
  229.         mov     [dwTestEndTime],eax
  230. align 4
  231. @@:
  232.         mcall    26
  233.         cmp     eax,ecx
  234.         jb      @r
  235. align 4
  236. @@:
  237.         push    esi
  238.         call    dword [esi]
  239.         pop     esi
  240.         inc     edi
  241.         mcall   26,9
  242.         cmp     eax,[dwTestEndTime]
  243.         jb      @b
  244.         mov     [esi-8],edi
  245.  
  246.         add     esi,TEST_REC_SIZE
  247.         cmp     dword [esi],0
  248.         jnz     .next_test
  249.         xor     dword [wFlags],1
  250.         mcall   68,13,[area_for_f36]
  251.         mcall   -1
  252. ;---------------------------------------------------------------------
  253. draw_window:
  254.         mcall   12,1
  255.         mcall   48,4
  256.         mov     ebx,100*65536+72*5+14
  257.         mov     ecx,80*65536+TESTS_NUM*LINE_HEIGHT+15+20+35
  258.         add     cx,ax
  259.         xor     eax,eax
  260.         xor     esi,esi
  261.         mcall   ,,,34000000h,,aCaption
  262.  
  263.         mov     eax,8
  264.         mov     ebx,050036h+12
  265.         mov     ecx,5*65536+20
  266.         mov     edx,2
  267.         mov     esi,0x00007F7F
  268. @@:
  269.         mcall
  270.         add     ebx,72*65536
  271.         inc     edx
  272.         cmp     edx,7
  273.         jb      @r
  274.  
  275.         mov     ecx,31
  276.         mov     edx,0x00007F7F
  277.         mov     esi,(72*5)/2
  278.         call    drawSeparator
  279.  
  280.         mcall   4,<27,12>,0x80DDEEFF,aButtonsText
  281.         call    DrawBars
  282.  
  283.         mov     ecx,TESTS_NUM*LINE_HEIGHT+15+21
  284.         mov     edx,0x00007F7F
  285.         mov     esi,(72*5)/2
  286.         call    drawSeparator
  287.         mcall   12,2
  288.         ret
  289. ;---------------------------------------------------------------------
  290. drawSeparator:
  291.         mov     eax,1
  292.         mov     ebx,3
  293. @@:
  294.         mcall
  295.         add     ebx,2
  296.         dec     esi
  297.         jnz     @b
  298.         ret
  299. ;---------------------------------------------------------------------
  300. align 4
  301. testDrawWindow:
  302.         xor     eax,eax
  303.         mcall   ,640145h,4F0190h,3000000h
  304.         ret
  305. ;---------------------------------------------------------------------
  306. align 4
  307. testDrawBar:
  308.         mcall   13,0A0064h,1E00FAh,6A73D0h
  309.         ret
  310. ;---------------------------------------------------------------------
  311. align 4
  312. testDrawPicture:
  313. ;       xor     ebx,ebx
  314.         mcall   7,[area_for_f36],<90,123>,<15,33>
  315.         ret
  316. ;---------------------------------------------------------------------
  317. align 4
  318. testDrawPicture_f73:
  319.         xor     ebx,ebx
  320.         mcall   73,,params_f73
  321.         ret
  322. ;---------------------------------------------------------------------
  323. align 4
  324. testGetScreen_f36:
  325.         xor     ebx,ebx
  326.         mcall   36,[area_for_f36],<90,123>,<15,33>
  327.         ret
  328. ;---------------------------------------------------------------------
  329. align 4
  330. testGetScreen_GS:
  331.         push    edi
  332.         mov     [start_x],15
  333.         mov     [start_y],33
  334.         mov     [size_x],90
  335.         mov     [size_y],123
  336.         mov     edi,[area_for_f36]
  337.  
  338.         mcall   61,2
  339.         cmp     eax,24
  340.         je      get_area_with_GS_24
  341. ;-----------------------------------------------------------------------------
  342. align 4
  343. get_area_with_GS_32:   
  344.         mcall   61,1
  345.         shr     eax,16
  346.         shl     eax,2
  347.         mov     [offset_x],eax
  348.  
  349.         mov     esi,[start_y]
  350.         imul    esi,eax
  351.        
  352.         mov     eax,[start_x]
  353.         shl     eax,2
  354.         add     esi,eax
  355.  
  356.         mov     eax,[size_x]
  357.         shl     eax,2
  358.         sub     [offset_x],eax
  359.        
  360.         mov     edx,[size_y]
  361.         mov     ebx,[offset_x]
  362.         sub     esi,ebx
  363.         mov     ebp,[size_x]
  364. ;--------------------------------------
  365. align 4
  366. .start_y:
  367.         add     esi,ebx
  368.         mov     ecx,ebp
  369. ;--------------------------------------
  370. align 4
  371. .start_x:      
  372.         mov     eax,[gs:esi]
  373.         mov     [edi],eax
  374.         add     esi,4
  375.         add     edi,3
  376.        
  377.         dec     ecx
  378.         jnz     .start_x
  379.        
  380.         dec     edx
  381.         jnz     .start_y
  382.        
  383.         pop     edi
  384.         ret
  385. ;-----------------------------------------------------------------------------
  386. align 4
  387. get_area_with_GS_24:   
  388.         mcall   61,1
  389.         shr     eax,16
  390.         lea     eax,[eax*3]
  391.         mov     [offset_x],eax
  392.        
  393.         mov     esi,[start_y]
  394.         imul    esi,eax
  395.        
  396.         mov     eax,[start_x]
  397.         lea     eax,[eax*3]
  398.         add     esi,eax
  399.        
  400.         mov     eax,[size_x]
  401.         lea     eax,[eax*3]
  402.         sub     [offset_x],eax
  403.        
  404.         mov     edx,[size_y]
  405.         mov     ebx,[offset_x]
  406.         sub     esi,ebx
  407.         mov     ebp,[size_x]
  408. ;--------------------------------------
  409. align 4
  410. .start_y:
  411.         add     esi,ebx
  412.         mov     ecx,ebp
  413. ;--------------------------------------
  414. align 4
  415. .start_x:      
  416.         mov     eax,[gs:esi]
  417.         mov     [edi],eax
  418.         add     esi,3
  419.         add     edi,3
  420.  
  421.         dec     ecx
  422.         jnz     .start_x
  423.        
  424.         dec     edx
  425.         jnz     .start_y
  426.  
  427.         pop     edi
  428.         ret
  429. ;-----------------------------------------------------------------------------
  430. align 4
  431. testDrawVertLine:
  432.         mcall   38,<300,300>,<30,380>,1090207Fh
  433.         ret
  434. ;---------------------------------------------------------------------
  435. align 4
  436. testDrawHorzLine:
  437.         mcall   38,<30,300>,<380,380>,1090207Fh
  438.         ret
  439. ;---------------------------------------------------------------------
  440. align 4
  441. testDrawFreeLine:
  442.         mcall   38,<30,300>,<380,30>,1090207Fh
  443.         ret
  444. ;---------------------------------------------------------------------
  445. align 4
  446. testDrawText1:
  447.         mcall   4,0C012Ch,0AA66h,aTestText,34
  448.         ret
  449. ;---------------------------------------------------------------------
  450. align 4
  451. testDrawText2:
  452.         mcall   4,1B013Bh,10E7B850h,aTestText,34
  453.         ret
  454. ;---------------------------------------------------------------------
  455. align 4
  456. testDrawNumber:
  457.         mcall   47,80000h,12345678,2A014Ah,0E0B27Bh
  458.         ret
  459. ;---------------------------------------------------------------------
  460. align 4
  461. testDrawPixel:
  462.         mcall   1,100,100,0FFFFFFh
  463.         ret
  464. ;---------------------------------------------------------------------
  465. DrawBars:
  466.         mov     edi,results_table
  467.         mov     ebx,30+7
  468. .next_result:
  469.         cmp     dword[edi+TEST_REC_SIZE-4],0
  470.         je      .exit
  471.  
  472.         push    ebx
  473.         movzx   ecx,bx
  474.         add     ecx,-2
  475.         shl     ecx,16
  476.         mov     cx,LINE_HEIGHT
  477.         mov     ebx,0*65536+72*5+5
  478.         xor     edx,edx
  479.         mcall   13
  480.         pop     ebx
  481.  
  482.         and     ebx,0x0000FFFF
  483.         or      ebx,5*65536
  484.         mov     edx,[edi+TEST_REC_SIZE-4]
  485.         mcall   4,,0x8000CCCC
  486.  
  487.         push    '=' 0x00FFFF00 0x00FFFF7F 0x00FFFF7F
  488.         mov     eax,[edi+0]
  489.         cmp     eax,[edi+4]
  490.         je      @f
  491.         jb      .lp1
  492.         mov     dword[esp+0],0x007FFF7F
  493.         mov     dword[esp+4],0x00FF7F7F
  494.         mov     dword[esp+8],0x0000FF00
  495.         mov     byte[esp+12],'>'
  496. .lp1:
  497.         ja      @f
  498.         mov     dword[esp+0],0x00FF7F7F
  499.         mov     dword[esp+4],0x007FFF7F
  500.         mov     dword[esp+8],0x00FF0000
  501.         mov     byte[esp+12],'<'
  502. @@:
  503.         pop     ecx
  504.         call    int2str
  505.         add     ebx,(72*5-6*8*2-6-10-5)*65536 ; 196
  506.         mcall   4,,,textarea,8
  507.  
  508.         pop     ecx
  509.         mov     eax,[edi+4]
  510.         call    int2str
  511.         add     ebx,(6*8+6+10)*65536
  512.         mcall   4
  513.  
  514.         pop     ecx
  515.         add     ebx,(-6-5)*65536
  516.         mov     edx,esp
  517.         mov     esi,1
  518.         mcall
  519.         add     esp,4
  520.  
  521.         add     edi,TEST_REC_SIZE
  522.         add     bx,LINE_HEIGHT
  523.         jmp     .next_result
  524. .exit:
  525.         mov     ebx, 0*65536+72*5+5
  526.         mov     ecx, (TESTS_NUM*LINE_HEIGHT+15+25)*65536+26
  527.         xor     edx, edx
  528.         mcall   13
  529.  
  530.         mov     ebx, 5*65536+(TESTS_NUM*LINE_HEIGHT+15+27)
  531.         mcall   4,,0x8000CCCC,aLeft
  532.  
  533.         add     ebx, (6*10)*65536
  534.         mcall   ,,0x80FFFF00,comment_string_1
  535.  
  536.         mov     ebx, 5*65536+(TESTS_NUM*LINE_HEIGHT+15+27+12)
  537.         mcall   ,,0x8000CCCC,aRight
  538.  
  539.         add     ebx, (6*10)*65536
  540.         mcall   ,,0x80FFFF00,comment_string_2
  541.         ret
  542. ;---------------------------------------------------------------------
  543. int2str:
  544.         push    eax ecx edx edi
  545.         mov     edi,textarea+7
  546.         mov     dword[textarea+0],'    '
  547.         mov     dword[textarea+4],'    '
  548.         mov     ecx,10
  549. @@:
  550.         xor     edx,edx
  551.         div     ecx
  552.         add     dl,'0'
  553.         mov     [edi],dl
  554.         dec     edi
  555.         or      eax,eax
  556.         jnz     @b
  557.         pop     edi edx ecx eax
  558.         ret
  559. ;---------------------------------------------------------------------
  560. thread_comment:
  561.         or      dword [wFlags],1
  562.         mcall   40,0x27
  563.         mov     esi,comment_string_1
  564.         cld
  565. @@:
  566.         lodsb
  567.         test    al,al
  568.         jne     @r
  569.         sub     esi,comment_string_1
  570.         mov     eax,esi
  571.         dec     eax
  572.         mov     edi, edit1
  573.         mov     [edi+48], eax   ;ed_size
  574.         mov     [edi+52], eax   ;ed_pos
  575. ;---------------------------------------------------------------------
  576. .red:
  577.         call .draw_window
  578. .still:
  579.         mcall   10      ; wait here for event
  580.         cmp     eax,1   ; redraw request ?
  581.         je      .red
  582.         cmp     eax,2   ; key in buffer ?
  583.         je      .key
  584.         cmp     eax,3   ; button in buffer ?
  585.         je      .button
  586.  
  587.         push    dword name_editboxes
  588.         call    [edit_box_mouse]
  589.         jmp     .still
  590. ;---------------------------------------------------------------------
  591. .key:           ; key
  592.         mcall   2
  593.         cmp     ah,13
  594.         je      .close  ;.close_with_open_file
  595.         cmp     ah,27
  596.         je      .close
  597.        
  598.         push    dword name_editboxes
  599.         call    [edit_box_key]
  600.         jmp     .still
  601. ;---------------------------------------------------------------------
  602. .button:                ; button
  603.         mcall   17
  604.         cmp     ah,1    ; button id=1 ?
  605.         jne     .still
  606. .close:
  607.         xor     dword [wFlags],1
  608.         mcall   -1
  609. ;---------------------------------------------------------------------
  610. .draw_window:
  611.         mcall   12,1
  612.         xor     eax,eax
  613.         xor     esi,esi
  614.         mcall   ,<100,300>,<100,80>,0x34780078,,aComment
  615.         push    dword name_editboxes
  616.         call    [edit_box_draw]
  617.         mcall   12,2
  618.         ret
  619. ;---------------------------------------------------------------------
  620. locLoadFile:
  621.         mov     [stFileInfoBlock], 0
  622.         or      dword [wFlags],1
  623.         mcall   70,stFileInfoBlock
  624.         mov     esi,mgb_data
  625.         mov     edi,results_table+4
  626.         cld
  627. @@:
  628.         cmp     dword[edi+TEST_REC_SIZE-8],0
  629.         je      @f
  630.         movsd
  631.         add     edi,TEST_REC_SIZE-4
  632.         jmp     @b
  633. @@:
  634.         mov     edi,comment_string_2
  635.         mov     ecx,44
  636.         rep     movsb
  637.         ret
  638. ;---------------------------------------------------------------------
  639. locSaveFile:
  640.         mov     [stFileInfoBlock], 2
  641.         or      dword [wFlags],1
  642.         mov     esi,results_table+4
  643.         mov     edi,mgb_data
  644.         cld
  645. @@:
  646.         cmp     dword[esi+TEST_REC_SIZE-8],0
  647.         je      @f
  648.         movsd
  649.         add     esi,TEST_REC_SIZE-4
  650.         jmp     @b
  651. @@:
  652.         mov     esi,comment_string_2
  653.         mov     ecx,44
  654.         rep     movsb
  655.         mcall   70,stFileInfoBlock
  656.         ret
  657. ;---------------------------------------------------------------------
  658. align 4
  659. stFileInfoBlock dd 0,0,0
  660. dwDataSize      dd TESTS_NUM*4+44       ;1
  661.                 dd mgb_data
  662.                 db 0
  663.                 dd fname_buf
  664. ;---------------------------------------------------------------------
  665. wFlags          dd 0
  666. ;---------------------------------------------------------------------
  667. align 4
  668. results_table dd \
  669.         ?,?,testDrawWindow,aDrawingWindow,\
  670.         ?,?,testDrawBar,aDrawingBar,\
  671.         ?,?,testGetScreen_f36,aGetScreenF36,\
  672.         ?,?,testGetScreen_GS,aGetScreen_GS,\
  673.         ?,?,testDrawPicture,aDrawingPicture,\
  674.         ?,?,testDrawPicture_f73,aDrawingPictF73,\
  675.         ?,?,testDrawVertLine,aDrawingVLine,\
  676.         ?,?,testDrawHorzLine,aDrawingHLine,\
  677.         ?,?,testDrawFreeLine,aDrawingFLine,\
  678.         ?,?,testDrawText1,aDrawingText1,\
  679.         ?,?,testDrawText2,aDrawingText2,\
  680.         ?,?,testDrawNumber,aDrawingNumber,\
  681.         ?,?,testDrawPixel,aDrawingPixel,\
  682.         0,0,0,0
  683. ;---------------------------------------------------------------------
  684. LINE_HEIGHT   = 13
  685. TEST_REC_SIZE = 16
  686. TESTS_NUM     = ($ - results_table) / TEST_REC_SIZE - 1
  687. ;---------------------------------------------------------------------
  688. aDrawingWindow  db 'Window Of Type #3, 325x400 px',0
  689. aDrawingBar     db 'Filled Rectangle, 100x250 px',0
  690. aDrawingPicture db 'Picture, 90x123, px',0
  691. aDrawingPictF73 db 'Picture for Blitter, 90x123, px',0
  692. aGetScreenF36   db 'Get a piece of screen f.36, 90x123, px',0
  693. aGetScreen_GS   db 'Get a piece of screen GS, 90x123, px',0
  694. aDrawingVLine   db 'Vertical Line, 350 px',0
  695. aDrawingHLine   db 'Horizontal Line, 270 px',0
  696. aDrawingFLine   db 'Free-angled Line, 350 px',0
  697. aDrawingText1   db 'Fixed-width Text, 34 chars',0
  698. aDrawingText2   db 'Proportional Text, 34 chars',0
  699. aDrawingNumber  db 'Decimal Number, 8 digits',0
  700. aDrawingPixel   db 'Single Pixel',0
  701.  
  702. aTestText       db 'This is a 34-charachters test text'
  703. aButtonsText    db 'Test      Comment+    Pattern+      Open        Save',0
  704. aCaption        db 'Kolibri Graphical Benchmark 0.7',0
  705.  
  706. aLeft   db 'Left    :',0
  707. aRight  db 'Right   :',0
  708.  
  709. aComment1       db 'current',0
  710. aComment2       db 'no pattern',0
  711. aComment        db 'Comment',0
  712. ;---------------------------------------------------------------------
  713. system_dir_Boxlib       db '/sys/lib/box_lib.obj',0
  714. system_dir_ProcLib      db '/sys/lib/proc_lib.obj',0
  715. ;---------------------------------------------------------------------
  716. head_f_i:
  717. head_f_l        db 'System error',0
  718.  
  719. err_message_found_lib1  db 'box_lib.obj - Not found!',0
  720. err_message_found_lib2  db 'proc_lib.obj - Not found!',0
  721.  
  722. err_message_import1     db 'box_lib.obj - Wrong import!',0
  723. err_message_import2     db 'proc_lib.obj - Wrong import!',0
  724. ;---------------------------------------------------------------------
  725. align 4
  726. l_libs_start:
  727.  
  728. library01  l_libs system_dir_Boxlib+9, cur_dir_path, library_path, system_dir_Boxlib, \
  729. err_message_found_lib1, head_f_l, Box_lib_import, err_message_import1, head_f_i
  730.  
  731. library02  l_libs system_dir_ProcLib+9, cur_dir_path, library_path, system_dir_ProcLib, \
  732. err_message_found_lib2, head_f_l, ProcLib_import, err_message_import2, head_f_i
  733.  
  734. end_l_libs:
  735. ;---------------------------------------------------------------------
  736. align 4
  737. OpenDialog_data:
  738. .type                   dd 1    ; Save
  739. .procinfo               dd procinfo     ;+4
  740. .com_area_name          dd communication_area_name      ;+8
  741. .com_area               dd 0    ;+12
  742. .opendir_pach           dd temp_dir_pach        ;+16
  743. .dir_default_pach       dd communication_area_default_pach      ;+20
  744. .start_path             dd open_dialog_path     ;+24
  745. .draw_window            dd draw_window  ;+28
  746. .status                 dd 0    ;+32
  747. .openfile_pach          dd fname_buf    ;+36
  748. .filename_area          dd filename_area        ;+40
  749. .filter_area            dd Filter
  750. .x:
  751. .x_size                 dw 420 ;+48 ; Window X size
  752. .x_start                dw 10 ;+50 ; Window X position
  753. .y:
  754. .y_size                 dw 320 ;+52 ; Window y size
  755. .y_start                dw 10 ;+54 ; Window Y position
  756.  
  757. communication_area_name:
  758.         db 'FFFFFFFF_open_dialog',0
  759. open_dialog_path:
  760. if __nightbuild eq yes
  761.         db '/sys/MANAGERS/opendial',0
  762. else
  763.         db '/sys/File Managers/opendial',0
  764. end if
  765. communication_area_default_pach:
  766.         db '/rd0/1/',0
  767.  
  768. Filter:
  769. dd      Filter.end - Filter
  770. .1:
  771. db      'MGB',0
  772. .end:
  773. db      0
  774.  
  775. start_temp_file_name:   db 'pattern.mgb',0
  776.  
  777. path4   db '/rd/1/pattern.mgb',0
  778. ;---------------------------------------------------------------------
  779. align 4
  780. params_f73:
  781. ; destination
  782. .offset_X_dest  dd 0    ; +0
  783. .offset_Y_dest  dd 0    ; +4
  784. .width_dest     dd 90   ; +8
  785. .height_dest    dd 123  ; +12
  786. ; source
  787. .offset_X_src   dd 0    ; +16
  788. .offset_Y_src   dd 0    ; +20
  789. .width_src      dd 90   ; +24
  790. .height_src     dd 123  ; +28
  791. ; other
  792. .pointer        dd 0    ; 90*4  ; +32
  793. .row_size       dd 90*4 ; +36
  794. ;---------------------------------------------------------------------
  795. align 4
  796. ProcLib_import:
  797. OpenDialog_Init         dd aOpenDialog_Init
  798. OpenDialog_Start        dd aOpenDialog_Start
  799. ;OpenDialog__Version    dd aOpenDialog_Version
  800.         dd 0
  801.         dd 0
  802. aOpenDialog_Init        db 'OpenDialog_init',0
  803. aOpenDialog_Start       db 'OpenDialog_start',0
  804. ;aOpenDialog_Version    db 'Version_OpenDialog',0
  805. ;---------------------------------------------------------------------
  806. align 4
  807. Box_lib_import:
  808. ;init_lib               dd a_init
  809. ;version_lib            dd a_version
  810.  
  811.  
  812. edit_box_draw           dd aEdit_box_draw
  813. edit_box_key            dd aEdit_box_key
  814. edit_box_mouse          dd aEdit_box_mouse
  815. ;version_ed             dd aVersion_ed
  816.  
  817. ;check_box_draw         dd aCheck_box_draw
  818. ;check_box_mouse        dd aCheck_box_mouse
  819. ;version_ch             dd aVersion_ch
  820.  
  821. ;option_box_draw        dd aOption_box_draw
  822. ;option_box_mouse       dd aOption_box_mouse
  823. ;version_op             dd aVersion_op
  824.  
  825. ;scrollbar_ver_draw     dd aScrollbar_ver_draw
  826. ;scrollbar_ver_mouse    dd aScrollbar_ver_mouse
  827. ;scrollbar_hor_draw     dd aScrollbar_hor_draw
  828. ;scrollbar_hor_mouse    dd aScrollbar_hor_mouse
  829. ;version_scrollbar      dd aVersion_scrollbar
  830.  
  831. ;dinamic_button_draw    dd aDbutton_draw
  832. ;dinamic_button_mouse   dd aDbutton_mouse
  833. ;version_dbutton        dd aVersion_dbutton
  834.  
  835. ;menu_bar_draw          dd aMenu_bar_draw
  836. ;menu_bar_mouse         dd aMenu_bar_mouse
  837. ;menu_bar_activate      dd aMenu_bar_activate
  838. ;version_menu_bar       dd aVersion_menu_bar
  839.  
  840. ;FileBrowser_draw       dd aFileBrowser_draw
  841. ;FileBrowser_mouse      dd aFileBrowser_mouse
  842. ;FileBrowser_key        dd aFileBrowser_key
  843. ;Version_FileBrowser    dd aVersion_FileBrowser
  844.  
  845. ;PathShow_prepare       dd sz_PathShow_prepare
  846. ;PathShow_draw          dd sz_PathShow_draw
  847. ;Version_path_show      dd szVersion_path_show
  848.                         dd 0
  849.                         dd 0
  850.  
  851. ;a_init                 db 'lib_init',0
  852. ;a_version              db 'version',0
  853.  
  854. aEdit_box_draw          db 'edit_box',0
  855. aEdit_box_key           db 'edit_box_key',0
  856. aEdit_box_mouse         db 'edit_box_mouse',0
  857. ;aVersion_ed            db 'version_ed',0
  858.  
  859. ;aCheck_box_draw        db 'check_box_draw',0
  860. ;aCheck_box_mouse       db 'check_box_mouse',0
  861. ;aVersion_ch            db 'version_ch',0
  862.  
  863. ;aOption_box_draw       db 'option_box_draw',0
  864. ;aOption_box_mouse      db 'option_box_mouse',0
  865. ;aVersion_op            db 'version_op',0
  866.  
  867. ;aScrollbar_ver_draw    db 'scrollbar_v_draw',0
  868. ;aScrollbar_ver_mouse   db 'scrollbar_v_mouse',0
  869. ;aScrollbar_hor_draw    db 'scrollbar_h_draw',0
  870. ;aScrollbar_hor_mouse   db 'scrollbar_h_mouse',0
  871. ;aVersion_scrollbar     db 'version_scrollbar',0
  872.  
  873. ;aDbutton_draw          db 'dbutton_draw',0
  874. ;aDbutton_mouse         db 'dbutton_mouse',0
  875. ;aVersion_dbutton       db 'version_dbutton',0
  876.  
  877. ;aMenu_bar_draw         db 'menu_bar_draw',0
  878. ;aMenu_bar_mouse                db 'menu_bar_mouse',0
  879. ;aMenu_bar_activate     db 'menu_bar_activate',0
  880. ;aVersion_menu_bar      db 'version_menu_bar',0
  881.  
  882. ;aFileBrowser_draw      db 'FileBrowser_draw',0
  883. ;aFileBrowser_mouse     db 'FileBrowser_mouse',0
  884. ;aFileBrowser_key       db 'FileBrowser_key',0
  885. ;aVersion_FileBrowser   db 'version_FileBrowser',0
  886.  
  887. ;sz_PathShow_prepare    db 'PathShow_prepare',0
  888. ;sz_PathShow_draw       db 'PathShow_draw',0
  889. ;szVersion_path_show    db 'version_PathShow',0
  890. ;---------------------------------------------------------------------
  891. ; for EDITBOX
  892. align 4
  893. name_editboxes:
  894. edit1 edit_box 200,10,30,0xffffff,0xbbddff,0,0,0,255,comment_string_1,mouse_dd,ed_focus+ed_always_focus,0
  895. name_editboxes_end:
  896. ;---------------------------------------------------------------------
  897.  
  898. IM_END:
  899. align 4
  900. mouse_dd        rd 1
  901. area_for_f36    rd 1
  902. dwTestEndTime   rd 1
  903. dwMainPID       rd 1
  904. ;-----------------------------------------------------------------------------
  905. start_x         rd 1
  906. start_y         rd 1
  907. size_x          rd 1
  908. size_y          rd 1
  909. offset_x        rd 1
  910. ;---------------------------------------------------------------------
  911. textarea:
  912.         rb 8
  913. ;---------------------------------------------------------------------
  914. comment_string_1:
  915.         rb 44
  916. ;---------------------------------------------------------------------
  917. comment_string_2:
  918.         rb 44
  919. ;---------------------------------------------------------------------
  920. mgb_data:
  921.         rb 100
  922. ;---------------------------------------------------------------------
  923. procinfo:
  924.         rb 1024
  925. ;---------------------------------------------------------------------
  926. cur_dir_path:
  927.         rb 4096
  928. ;---------------------------------------------------------------------
  929. library_path:
  930.         rb 4096
  931. ;---------------------------------------------------------------------
  932. temp_dir_pach:
  933.         rb 4096
  934. ;---------------------------------------------------------------------
  935. fname_buf:
  936.         rb 4096
  937. ;---------------------------------------------------------------------
  938. filename_area:
  939.         rb 256
  940. ;---------------------------------------------------------------------
  941.         rb 4096
  942. thread_stack2:
  943. ;---------------------------------------------------------------------
  944.         rb 4096
  945. thread_stack1:
  946. ;---------------------------------------------------------------------
  947.         rb 4096
  948.         rb 0x2884       ; for F73 image size 123*90*4
  949. stacktop:
  950. I_END: