Subversion Repositories Kolibri OS

Rev

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

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