Rev 6160 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6160 | Rev 9451 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | ;Used assumptions: |
6 | ;Used assumptions: |
7 | ; 1) Screen resolution does not change while app is running |
7 | ; 1) Screen resolution does not change while app is running |
8 | ; 2) Screen width bigger than height |
8 | ; 2) Screen width bigger than height |
9 | ; 3) Screen width and height are even (2*k) |
9 | ; 3) Screen width and height are even (2*k) |
Line -... | Line 10... | ||
- | 10 | ||
- | 11 | use32 |
|
- | 12 | org 0 |
|
- | 13 | db 'MENUET01' |
|
- | 14 | dd 0x01,__start,__end,__memory,__stack,param,0 |
|
10 | 15 | ||
Line 11... | Line 16... | ||
11 | include '../../../macros.inc' |
16 | include '../../../macros.inc' |
12 | 17 | ||
Line 13... | Line 18... | ||
13 | background_cl = 0x000000 |
18 | background_cl = 0x000000 |
Line 14... | Line 19... | ||
14 | foreground_cl = 0xFFFFFF |
19 | foreground_cl = 0xFFFFFF |
Line 15... | Line 20... | ||
15 | 20 | ||
Line 16... | Line 21... | ||
16 | delay = 4 |
21 | delay = 4 |
- | 22 | ||
- | 23 | ; debug = 1 |
|
- | 24 | ||
- | 25 | ;KOS_APP_START |
|
- | 26 | ||
- | 27 | CODE |
|
17 | 28 | cmp dword [param], '@ss' |
|
18 | ; debug = 1 |
29 | setz [screensaver] |
19 | 30 | mov ebx, EVM_REDRAW + EVM_KEY + EVM_BUTTON |
|
Line 20... | Line 31... | ||
20 | MEOS_APP_START |
31 | cmovz ebx, EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE |
Line 42... | Line 53... | ||
42 | 53 | ||
43 | ;Demand memory |
54 | ;Demand memory |
44 | mcall 68, 11 ; Init heap |
55 | mcall 68, 11 ; Init heap |
45 | test eax, eax ; Is heap successfully inited? |
56 | test eax, eax ; Is heap successfully inited? |
46 | jnz @f |
57 | jnz @f |
47 | mcall -1 ; Netu pamjati?! Nu i nahuj vas |
58 | jmp exit ; Netu pamjati?! Nu i nahuj vas |
48 | @@: |
59 | @@: |
49 | movzx ecx, [y_max] |
60 | movzx ecx, [y_max] |
50 | inc ecx |
61 | inc ecx |
51 | movzx eax, [x_max] |
62 | movzx eax, [x_max] |
52 | imul ecx, eax ;[Remember to left here space for 1-2 emergency lines at bottom] |
63 | imul ecx, eax ;[Remember to left here space for 1-2 emergency lines at bottom] |
53 | add ecx, edx ;And add space for line_coords_array |
64 | add ecx, edx ;And add space for line_coords_array |
54 | mcall 68, 12, |
65 | mcall 68, 12, |
55 | test eax, eax ; Did we get something non zero? |
66 | test eax, eax ; Did we get something non zero? |
56 | jnz @f |
67 | jnz @f |
57 | mcall -1 |
68 | jmp exit |
58 | @@: |
69 | @@: |
59 | mov [line_coords_array_pointer], eax |
70 | mov [line_coords_array_pointer], eax |
60 | add eax, edx |
71 | add eax, edx |
Line 356... | Line 367... | ||
356 | jne wait_event |
367 | jne wait_event |
Line 357... | Line 368... | ||
357 | 368 | ||
358 | ; button pressed; we have only one button, close |
369 | ; button pressed; we have only one button, close |
359 | ; also seems to handle Alt+F4 |
370 | ; also seems to handle Alt+F4 |
- | 371 | exit: |
|
- | 372 | cmp [screensaver], 0 |
|
- | 373 | jz @f |
|
- | 374 | mcall 70, f70 |
|
360 | exit: |
375 | @@: |
Line 361... | Line 376... | ||
361 | mcall -1 |
376 | mcall -1 |
362 | 377 | ||
Line 416... | Line 431... | ||
416 | start_y_offset = 4 |
431 | start_y_offset = 4 |
417 | end_y_offset = 6 |
432 | end_y_offset = 6 |
418 | line_start_pointer_offset = 8 |
433 | line_start_pointer_offset = 8 |
419 | line_coords_element_size = 12 |
434 | line_coords_element_size = 12 |
Line -... | Line 435... | ||
- | 435 | ||
- | 436 | __params: |
|
- | 437 | param rb 40 |
|
- | 438 | ||
- | 439 | f70: ; run |
|
- | 440 | dd 7, 0, 0, 0, 0 |
|
- | 441 | db '/sys/@SS',0 |
|
- | 442 | ||
- | 443 | screensaver db ? |
|
420 | 444 | ||
421 | MEOS_APP_END0,0>>> |
445 | MEOS_APP_END0,0>>> |