Rev 4250 | Rev 4267 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4250 | Rev 4266 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ; KolibriOS Team 2005-2013 |
3 | ; KolibriOS Team 2005-2013 |
4 | ; |
4 | ; |
5 | ; |
5 | ; |
6 | ; and if we know that high 24 bits of eax are zero, we can use 1st form |
6 | ; and if we know that high 24 bits of eax are zero, we can use 1st form |
7 | ; the same about ebx,ecx,edx |
7 | ; the same about ebx,ecx,edx |
- | 8 | fade equ 0 |
|
Line 8... | Line 9... | ||
8 | 9 | ||
9 | use32 ; âêëþ÷èòü 32-áèòíûé ðåæèì àññåìáëåðà |
10 | use32 ; ¢ª«îç¨âì 32-¡¨âë© à¥¦¨¬ áᥬ¡«¥à |
Line 10... | Line 11... | ||
10 | org 0x0 ; àäðåñàöèÿ ñ íóëÿ |
11 | org 0x0 ; ¤à¥á æ¨ï á ã«ï |
11 | 12 | ||
12 | db 'MENUET01' ; 8-áàéòíûé èäåíòèôèêàòîð MenuetOS |
13 | db 'MENUET01' ; 8-¡ ©âë© ¨¤¥â¨ä¨ª â®à MenuetOS |
13 | dd 0x01 ; âåðñèÿ çàãîëîâêà (âñåãäà 1) |
14 | dd 0x01 ; ¢¥àá¨ï § £®«®¢ª (¢á¥£¤ 1) |
14 | dd START ; àäðåñ ïåðâîé êîìàíäû |
15 | dd START ; ¤à¥á ¯¥à¢®© ª®¬ ¤ë |
15 | dd IM_END ; ðàçìåð ïðîãðàììû |
16 | dd IM_END ; à §¬¥à ¯à®£à ¬¬ë |
16 | dd I_END ; êîëè÷åñòâî ïàìÿòè |
17 | dd I_END ; ª®«¨ç¥á⢮ ¯ ¬ï⨠|
17 | dd stacktop ; àäðåñ âåðøèíû ñòåêà |
18 | dd stacktop ; ¤à¥á ¢¥àè¨ë á⥪ |
Line 18... | Line 19... | ||
18 | dd 0x0 ; àäðåñ áóôåðà äëÿ ïàðàìåòðîâ |
19 | dd 0x0 ; ¤à¥á ¡ãä¥à ¤«ï ¯ à ¬¥â஢ |
19 | dd cur_dir_path |
20 | dd cur_dir_path |
20 | 21 | ||
Line 109... | Line 110... | ||
109 | 110 | ||
110 | restart_kernel: |
111 | restart_kernel: |
Line 111... | Line 112... | ||
111 | push 4 |
112 | push 4 |
- | 113 | ||
- | 114 | mcall_and_close: |
|
- | 115 | if fade=1 |
|
- | 116 | ; === FADE IN === |
|
- | 117 | mov eax, color1 |
|
- | 118 | @@: |
|
- | 119 | mov ebx, [eax + 32] |
|
- | 120 | mov [eax], ebx |
|
- | 121 | add eax, 4 |
|
- | 122 | cmp eax, color21 |
|
- | 123 | jne @b |
|
- | 124 | ||
- | 125 | call draw_window |
|
- | 126 | else |
|
- | 127 | mov al,4 |
|
- | 128 | mcall ,<50,110> ,0x80000000,label7 ;eax=4 - write text |
|
112 | 129 | end if |
|
113 | mcall_and_close: |
130 | |
114 | invoke ini_set_int,ini_file,asettings,aautosave,[autosave] |
131 | invoke ini_set_int,ini_file,asettings,aautosave,[autosave] |
115 | cmp [autosave],1 |
132 | cmp [autosave],1 |
116 | jne no_save |
133 | jne no_save |
Line 133... | Line 150... | ||
133 | je no_save |
150 | je no_save |
134 | jmp @b |
151 | jmp @b |
135 | no_save: |
152 | no_save: |
136 | pop ecx |
153 | pop ecx |
137 | mcall 18,9 |
154 | mcall 18,9 |
138 | ret |
- | |
Line 139... | Line 155... | ||
139 | 155 | ||
140 | checkbox: |
156 | checkbox: |
141 | btc dword [check1.flags],1 |
157 | btc dword [check1.flags],1 |
142 | jc .1 |
158 | jc .1 |
Line 159... | Line 175... | ||
159 | shr eax,17 |
175 | shr eax,17 |
160 | shl eax,16 |
176 | shl eax,16 |
161 | lea ebx,[eax-110 shl 16+222] |
177 | lea ebx,[eax-110 shl 16+222] |
162 | shr ecx,1 |
178 | shr ecx,1 |
163 | shl ecx,16 |
179 | shl ecx,16 |
164 | lea ecx,[ecx-70 shl 16+117] |
180 | lea ecx,[ecx-70 shl 16+122] |
Line 165... | Line 181... | ||
165 | 181 | ||
166 | xor eax,eax |
182 | xor eax,eax |
Line 167... | Line 183... | ||
167 | mcall , , ,0x019098b0,0x01000000 ;define and draw window |
183 | mcall , , ,[color1],0x01000000 ;define and draw window |
168 | 184 | ||
169 | mov al,13 |
185 | mov al,13 |
170 | mcall ,<0,223> ,<0,118> |
186 | mcall ,<0,223> ,<0,123> |
Line 171... | Line 187... | ||
171 | mcall ,<1,221>,<1,116>,0xffffff |
187 | mcall ,<1,221>,<1,121>,[color2] |
172 | mcall ,<2,220>,<2,115>,0xe4dfe1 |
188 | mcall ,<2,220>,<2,120>, [color3] |
173 | 189 | ||
174 | mov al,8 |
190 | mov al,8 |
175 | mcall ,<16,90> ,<20,27>,4,0x990022 ;eax=8 - draw buttons |
191 | mcall ,<16,90> ,<20,27>,4,[color4] ;eax=8 - draw buttons |
Line 176... | Line 192... | ||
176 | mcall ,<113,90>, ,2,0xaa7700 |
192 | mcall ,<113,90>, ,2,[color5] |
177 | mcall , ,<54,27>,1,0x777777 |
193 | mcall , ,<54,27>,1,[color6] |
178 | mcall ,<16,90> , ,3,0x007700 |
194 | mcall ,<16,90> , ,3,[color7] |
179 | 195 | ||
180 | mov al,4 |
196 | mov al,4 |
Line 181... | Line 197... | ||
181 | mcall ,<27,24> ,0x90ffffff,label2 ;eax=4 - write text |
197 | mcall ,<27,24> ,[color8],label2 ;eax=4 - write text |
Line 190... | Line 206... | ||
190 | mcall ,2 |
206 | mcall ,2 |
191 | ret |
207 | ret |
192 | ;--------------------------------------------------------------------- |
208 | ;--------------------------------------------------------------------- |
193 | ;data |
209 | ;data |
194 | include 'data.inc' |
210 | include 'data.inc' |
195 | - | ||
196 | ;--------------------------------------------------------------------- |
211 | ;--------------------------------------------------------------------- |
197 | IM_END: |
212 | IM_END: |
198 | ;--------------------------------------------------------------------- |
213 | ;--------------------------------------------------------------------- |
199 | align 4 |
214 | align 4 |
Line 209... | Line 224... | ||
209 | rb 4096 |
224 | rb 4096 |
210 | ;--------------------------------------------------------------------- |
225 | ;--------------------------------------------------------------------- |
211 | align 32 |
226 | align 32 |
212 | rb 4096 |
227 | rb 4096 |
213 | stacktop: |
228 | stacktop: |
214 | I_END: ; ìåòêà êîíöà ïðîãðàììû41,71>47,37>23,58>27,24>16,90>54,27>113,90>20,27>16,90>2,115>2,220>1,116>1,221>0,118>0,223> |
- | |
215 | 229 | I_END: ; ¬¥âª ª®æ ¯à®£à ¬¬ë41,71>47,37>23,58>27,24>16,90>54,27>113,90>20,27>16,90>2,120>2,220>1,121>1,221>0,123>0,223>50,110> |
|
- | 230 | ||
216 | 231 |