Rev 529 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 529 | Rev 748 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | ; END |
2 | ; END |
3 | ; |
3 | ; |
4 | ; |
4 | ; |
5 | ; and if we know that high 24 bits of eax are zero, we can use 1st form |
5 | ; and if we know that high 24 bits of eax are zero, we can use 1st form |
6 | ; the same about ebx,ecx,edx |
6 | ; the same about ebx,ecx,edx |
- | 7 | ; |
|
- | 8 | ; 15.02.2007 merge old END with new one (fron Veliant & Leency) by Heavyiron |
|
Line 7... | Line -... | ||
7 | - | ||
8 | include "lang.inc" |
9 | |
Line 9... | Line 10... | ||
9 | include "..\..\..\macros.inc" |
10 | include "..\..\..\macros.inc" |
10 | 11 | ||
Line 11... | Line 12... | ||
11 | meos_app_start |
12 | meos_app_start |
12 | code |
- | |
13 | - | ||
14 | do_draw: |
- | |
15 | - | ||
16 | mov eax,48 |
- | |
17 | mov ebx,3 |
- | |
Line 18... | Line 13... | ||
18 | mov ecx,sc |
13 | code |
19 | mov edx,sizeof.system_colors |
14 | |
20 | mcall |
15 | draw: |
Line 21... | Line 16... | ||
21 | 16 | ||
22 | mov al,12 ; eax=12 - tell os about redraw start |
17 | mov al,12 ; eax=12 - tell os about redraw start |
Line 23... | Line 18... | ||
23 | mov bl,1 |
18 | mov ebx,1 |
24 | mcall |
- | |
25 | - | ||
26 | mov al,14 ; eax=14 - get screen max x & max y |
19 | mcall |
27 | mcall |
- | |
28 | - | ||
29 | movzx ecx,ax |
20 | |
- | 21 | mov al,14 ; eax=14 - get screen max x & max y |
|
- | 22 | mcall |
|
- | 23 | ||
- | 24 | movzx ecx, ax |
|
- | 25 | shr eax, 16 |
|
- | 26 | shr ecx, 1 |
|
30 | 27 | shr eax, 1 |
|
31 | shr eax,17 |
28 | sub eax, 157 |
Line 32... | Line 29... | ||
32 | shl eax,16 |
29 | sub ecx, 100 |
33 | lea ebx,[eax-110*10000h+220] |
30 | mov ebx, eax |
34 | - | ||
35 | shr ecx,1 |
- | |
36 | shl ecx,16 |
31 | shl ebx, 16 |
Line 37... | Line -... | ||
37 | sub ecx,50*10000h - 120 |
- | |
38 | 32 | add ebx, 253 |
|
39 | xor eax,eax ; define and draw window |
- | |
40 | mov edx,[sc.work] |
- | |
41 | mov esi,edx |
- | |
42 | mov edi,edx |
33 | shl ecx, 16 |
43 | mcall |
34 | add ecx, 154 |
44 | 35 | ||
45 | mov edx,0x444444 |
36 | xor eax,eax ; define and draw window |
46 | mov al,13 |
- | |
Line 47... | Line 37... | ||
47 | mcall ,18 shl 16+90,29 shl 16+27 |
37 | mov edx,0x41ffffff |
48 | push ebx |
38 | mcall |
- | 39 | ||
49 | mcall ,121 shl 16+90 |
40 | mov al, 7 |
50 | xchg ebx,[esp] |
- | |
51 | mcall ,,63 shl 16+27 |
- | |
52 | pop ebx |
41 | mov ebx, background |
53 | mcall |
42 | mov ecx, 254 shl 16 + 155 |
54 | mcall ,179 shl 16+30,99 shl 16+15 |
43 | xor edx, edx |
55 | 44 | mcall |
|
56 | xor edx,edx |
45 | |
57 | mov al,8 |
46 | |
58 | inc edx |
- | |
59 | mcall ,15 shl 16+87,26 shl 16+24,,0xbb0055 |
- | |
60 | inc edx |
- | |
61 | mcall ,118 shl 16+87,,,0xaaaa ;cccc |
- | |
62 | inc edx |
- | |
63 | mcall ,15 shl 16+87,60 shl 16+24,,0x9900 |
- | |
64 | inc edx |
- | |
65 | mcall ,118 shl 16+87,,,0xaaaaaa ;cccccc |
- | |
66 | inc edx |
- | |
67 | mcall ,175 shl 16+30,95 shl 16+15,,[sc.work_button] |
- | |
68 | - | ||
69 | mov al,4 ; 0x00000004 = write text |
- | |
70 | mov ebx,75*65536+10 |
- | |
71 | mov ecx,[sc.work_text] ; 8b window nro - RR GG BB color |
- | |
72 | or ecx,0x90000000 |
- | |
73 | mov edx,label1 ; pointer to text beginning |
- | |
74 | mcall |
- | |
75 | - | ||
76 | mov ebx,15*65536+101 |
- | |
77 | mov edx,label4 |
- | |
78 | mcall |
- | |
79 | - | ||
80 | mov ecx,0x90eeeeee ; 8b window nro - RR GG BB color |
47 | mov al,8 |
81 | mov ebx,25*65536+30 |
- | |
82 | mov edx,label2 ; pointer to text beginning |
- | |
83 | mcall |
- | |
84 | - | ||
85 | mov ebx,20*65536+64 |
- | |
86 | mov edx,label3 |
- | |
Line 87... | Line 48... | ||
87 | mcall |
48 | mcall ,58 shl 16 + 32,59 shl 16 + 34, 1 shl 30 + 1 |
88 | 49 | inc edx |
|
89 | mov ebx,45*65536+41 |
50 | mcall ,110 shl 16 + 32,54 shl 16 + 32 |
Line 102... | Line 63... | ||
102 | 63 | ||
103 | mov eax,10 ; wait here for event |
64 | mov eax,10 ; wait here for event |
Line 104... | Line 65... | ||
104 | mcall |
65 | mcall |
105 | 66 | ||
106 | dec eax |
67 | dec eax |
107 | jz do_draw |
68 | jz draw |
108 | dec eax |
69 | dec eax |
109 | jnz button |
70 | jnz button |
110 | key: |
71 | key: |
Line 124... | Line 85... | ||
124 | button: |
85 | button: |
125 | mov al,17 ; now eax=17 - get pressed button id |
86 | mov al,17 ; now eax=17 - get pressed button id |
126 | mcall |
87 | mcall |
127 | xchg al,ah |
88 | xchg al,ah |
128 | dec eax |
89 | dec eax |
129 | jz power_off |
- | |
130 | dec eax |
- | |
131 | jz restart_kernel |
90 | jz restart_kernel |
132 | dec eax |
91 | dec eax |
- | 92 | jz power_off |
|
- | 93 | dec eax |
|
133 | jz restart |
94 | jz restart |
134 | dec eax |
95 | dec eax |
135 | jnz run_rdsave |
96 | jnz run_rdsave |
136 | ; we have only one button left, this is close button |
97 | ; we have only one button left, this is close button |
137 | ; dec eax |
98 | ; dec eax |
Line 160... | Line 121... | ||
160 | mov ebx,rdsave |
121 | mov ebx,rdsave |
161 | mcall |
122 | mcall |
162 | jmp still |
123 | jmp still |
Line 163... | Line 124... | ||
163 | 124 | ||
164 | data |
- | |
165 | - | ||
166 | if lang eq ru |
- | |
167 | label1: |
- | |
168 | db ' è ¢ë¡®à:',0 |
- | |
169 | label2: |
- | |
170 | db '몫îç¨âì ¤à®',0 |
- | |
171 | label3: |
- | |
172 | db '¥à¥§ ¯ã᪠⬥ ',0 |
- | |
173 | label4: |
- | |
174 | db '®åà ¨âì áâனª¨',0 |
- | |
175 | - | ||
176 | else if lang eq en |
- | |
177 | label1: |
- | |
178 | db ' SELECT:',0 |
- | |
179 | label2: |
- | |
180 | db 'POWER OFF KERNEL',0 |
- | |
181 | label3: |
- | |
182 | db ' RESTART CANCEL',0 |
- | |
183 | label4: |
- | |
184 | db 'Save settings',0 |
- | |
185 | - | ||
186 | else if lang eq et |
- | |
187 | label1: |
- | |
188 | db ' VALI:',0 |
- | |
189 | label2: |
- | |
190 | db 'LÜLITA VÄLJA KERNEL',0 |
- | |
191 | label3: |
- | |
192 | db ' RESTART TÜHISTA',0 |
- | |
193 | label4: |
- | |
194 | db 'Save settings',0 |
- | |
195 | - | ||
196 | else |
- | |
197 | label1: |
- | |
198 | db 'WAEHLEN:',0 |
- | |
199 | label2: |
- | |
200 | db ' BEENDEN KERNEL',0 |
- | |
201 | label3: |
- | |
202 | db ' NEUSTART ABBRECHEN',0 |
- | |
203 | label4: |
125 | data |
204 | db 'Save settings',0 |
- | |
205 | - | ||
206 | end if |
- | |
207 | label5: |
- | |
208 | db '(End) (Home)',0 |
- | |
209 | label6: |
- | |
210 | db '(Enter) (Esc)',0 |
- | |
211 | 126 | background file 'back.raw' |
|
212 | rdsave: |
127 | rdsave: |
213 | dd 7 |
128 | dd 7 |
214 | dd 0 |
129 | dd 0 |
215 | dd 0 |
130 | dd 0 |
216 | dd 0 |
131 | dd 0 |
217 | dd 0 |
132 | dd 0 |
218 | db '/sys/rdsave',0 |
133 | db '/sys/rdsave',0 |
219 | udata |
- | |
Line 220... | Line 134... | ||
220 | sc system_colors |
134 | udata |