Rev 317 | Rev 551 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 317 | Rev 485 | ||
---|---|---|---|
Line 13... | Line 13... | ||
13 | dd 0x1000 ; memory for app |
13 | dd 0x1000 ; memory for app |
14 | dd 0x1000 ; esp |
14 | dd 0x1000 ; esp |
15 | dd 0x0 , 0x0 ; I_Param , I_Icon |
15 | dd 0x0 , 0x0 ; I_Param , I_Icon |
Line 16... | Line 16... | ||
16 | 16 | ||
17 | include 'lang.inc' |
17 | include 'lang.inc' |
Line 18... | Line 18... | ||
18 | include 'macros.inc' |
18 | include '..\..\..\macros.inc' |
19 | 19 | ||
20 | START: ; start of execution |
20 | START: ; start of execution |
Line 21... | Line 21... | ||
21 | red: |
21 | red: |
Line 22... | Line 22... | ||
22 | call draw_window |
22 | call draw_window |
23 | 23 | ||
Line 24... | Line 24... | ||
24 | still: |
24 | still: |
25 | 25 | ||
26 | mov eax,10 ; wait here for event |
26 | mov eax,10 ; wait here for event |
27 | int 0x40 |
27 | mcall |
Line 35... | Line 35... | ||
35 | 35 | ||
Line 36... | Line 36... | ||
36 | jmp still |
36 | jmp still |
37 | 37 | ||
38 | key: ; key |
38 | key: ; key |
39 | mov eax,2 ; just read it and ignore |
39 | mov eax,2 ; just read it and ignore |
40 | int 0x40 |
40 | mcall |
41 | mov [keyid],ah |
41 | mov [keyid],ah |
Line 42... | Line 42... | ||
42 | call draw_window |
42 | call draw_window |
43 | jmp still |
43 | jmp still |
44 | 44 | ||
Line 45... | Line 45... | ||
45 | button: ; button |
45 | button: ; button |
46 | mov eax,17 ; get id |
46 | mov eax,17 ; get id |
Line 47... | Line 47... | ||
47 | int 0x40 |
47 | mcall |
48 | 48 | ||
49 | cmp ah,1 ; button id=1 ? |
49 | cmp ah,1 ; button id=1 ? |
Line 50... | Line 50... | ||
50 | jne noclose |
50 | jne noclose |
Line 66... | Line 66... | ||
66 | draw_window: |
66 | draw_window: |
Line 67... | Line 67... | ||
67 | 67 | ||
68 | 68 | ||
69 | mov eax,12 ; function 12:tell os about windowdraw |
69 | mov eax,12 ; function 12:tell os about windowdraw |
Line 70... | Line 70... | ||
70 | mov ebx,1 ; 1, start of draw |
70 | mov ebx,1 ; 1, start of draw |
71 | int 0x40 |
71 | mcall |
72 | 72 | ||
73 | ; DRAW WINDOW |
73 | ; DRAW WINDOW |
74 | mov eax,0 ; function 0 : define and draw window |
74 | mov eax,0 ; function 0 : define and draw window |
75 | mov ebx,100*65536+270 ; [x start] *65536 + [x size] |
75 | mov ebx,100*65536+270 ; [x start] *65536 + [x size] |
76 | mov ecx,100*65536+80 ; [y start] *65536 + [y size] |
76 | mov ecx,100*65536+80 ; [y start] *65536 + [y size] |
Line 77... | Line 77... | ||
77 | mov edx,0x33ffffff ; color of work area RRGGBB,8->color gl |
77 | mov edx,0x33ffffff ; color of work area RRGGBB,8->color gl |
78 | mov edi,header |
78 | mov edi,title |
79 | int 0x40 |
79 | mcall |
80 | 80 | ||
81 | mov eax,4 ; function 4 : write text to window |
81 | mov eax,4 ; function 4 : write text to window |
82 | xor ecx,ecx |
82 | xor ecx,ecx |
83 | mov esi,4 |
83 | mov esi,4 |
84 | mov ebx,8*65536+8 |
84 | mov ebx,8*65536+8 |
85 | mov edx,tdec |
85 | mov edx,tdec |
Line 86... | Line 86... | ||
86 | int 0x40 |
86 | mcall |
87 | add ebx,23 |
87 | add ebx,23 |
88 | mov edx,thex |
88 | mov edx,thex |
89 | int 0x40 |
89 | mcall |
90 | 90 | ||
91 | mov ecx,[keyid] |
91 | mov ecx,[keyid] |
92 | mov eax,47 |
92 | mov eax,47 |
93 | mov ebx,3*65536 |
93 | mov ebx,3*65536 |
94 | mov edx,40*65536+8 |
94 | mov edx,40*65536+8 |
Line 95... | Line 95... | ||
95 | mov esi,0x224466 |
95 | mov esi,0x224466 |
96 | int 0x40 |
96 | mcall |
97 | add edx,23 |
97 | add edx,23 |
Line 98... | Line 98... | ||
98 | mov bh,1 |
98 | mov bh,1 |
Line 99... | Line 99... | ||
99 | int 0x40 |
99 | mcall |
Line 100... | Line 100... | ||
100 | 100 | ||
101 | mov eax,12 ; function 12:tell os about windowdraw |
101 | mov eax,12 ; function 12:tell os about windowdraw |
102 | mov ebx,2 ; 2, end of draw |
102 | mov ebx,2 ; 2, end of draw |
103 | int 0x40 |
103 | mcall |
104 | 104 |