Subversion Repositories Kolibri OS

Rev

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