Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. #define MEMSIZE 4096*400
  2.  
  3. #include "../lib/window.h"
  4. #include "../lib/array.h"
  5.  
  6. window win1=0;
  7. void main()
  8. {
  9.         win1.background = 0xFFFFFF;
  10.         win1.left = 200;
  11.         win1.top = 200;
  12.         win1.caption = "Stress test";
  13.         win1.ondraw = #draw_window;
  14.         win1.create();
  15. }
  16.  
  17.  
  18. void draw_window()
  19. {
  20.         dword init = 0;
  21.         dword count = 0;
  22.         dword position = 0;
  23.         dword y = 15;
  24.         init = malloc(0x1000);
  25.         count = 200000;
  26.         while (count)
  27.         {
  28.                 position = indexArray(init, count);
  29.                 DSDWORD[position] = count*2;
  30.                 count--;
  31.         }
  32.         position = indexArray(init, 123);DSDWORD[position] = 0;
  33.         position = indexArray(init, 777);DSDWORD[position] = 0;
  34.         count = 200000;
  35.         while (count)
  36.         {
  37.                 position = indexArray(init, count);
  38.                 if (DSDWORD[position] != count*2)
  39.                 {
  40.                         WriteText(15, y, 0x81, 0xFF0000, itoa(count));
  41.                         y += 25;
  42.                 }
  43.                 count--;
  44.         }
  45.        
  46. }
  47.