Rev 1728 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1728 | Rev 1741 | ||
---|---|---|---|
1 | ; <--- description ---> |
1 | ; <--- description ---> |
2 | ; compiler: FASM 1.50 |
2 | ; compiler: FASM 1.50 |
3 | ; name: Display Test |
3 | ; name: Display Test |
4 | ; version: 0.4 |
4 | ; version: 0.4 |
5 | ; author: barsuk |
5 | ; author: barsuk |
6 | 6 | ||
7 | 7 | ||
8 | ; <--- include all MeOS stuff ---> |
8 | ; <--- include all MeOS stuff ---> |
9 | include "lang.inc" |
9 | include "lang.inc" |
10 | include "..\..\..\MACROS.INC" |
10 | include "../../../macros.inc" |
11 | 11 | ||
12 | ; <--- start of MenuetOS application ---> |
12 | ; <--- start of MenuetOS application ---> |
13 | MEOS_APP_START |
13 | MEOS_APP_START |
14 | 14 | ||
15 | ;include "..\..\..\debug.inc" |
15 | ;include "..\..\..\debug.inc" |
16 | 16 | ||
17 | 17 | ||
18 | ; <--- start of code ---> |
18 | ; <--- start of code ---> |
19 | CODE |
19 | CODE |
20 | mov eax, 37 |
20 | mov eax, 37 |
21 | mov ebx, 4 |
21 | mov ebx, 4 |
22 | mov edx, 2 |
22 | mov edx, 2 |
23 | mov ecx, cursor |
23 | mov ecx, cursor |
24 | int 0x40 |
24 | int 0x40 |
25 | or eax, eax |
25 | or eax, eax |
26 | jz exit |
26 | jz exit |
27 | mov [cursorID], eax |
27 | mov [cursorID], eax |
28 | 28 | ||
29 | call draw_window ; at first create and draw the window |
29 | call draw_window ; at first create and draw the window |
30 | 30 | ||
31 | wait_event: ; main cycle |
31 | wait_event: ; main cycle |
32 | xor ebx, ebx |
32 | xor ebx, ebx |
33 | mov eax, 10 |
33 | mov eax, 10 |
34 | int 0x40 |
34 | int 0x40 |
35 | 35 | ||
36 | cmp eax, 1 ; if event == 1 |
36 | cmp eax, 1 ; if event == 1 |
37 | je redraw ; jump to redraw handler |
37 | je redraw ; jump to redraw handler |
38 | cmp eax, 2 ; else if event == 2 |
38 | cmp eax, 2 ; else if event == 2 |
39 | je key ; jump to key handler |
39 | je key ; jump to key handler |
40 | cmp eax, 3 ; else if event == 3 |
40 | cmp eax, 3 ; else if event == 3 |
41 | je button ; jump to button handler |
41 | je button ; jump to button handler |
42 | 42 | ||
43 | jmp wait_event ; else return to the start of main cycle |
43 | jmp wait_event ; else return to the start of main cycle |
44 | 44 | ||
45 | 45 | ||
46 | redraw: ; redraw event handler |
46 | redraw: ; redraw event handler |
47 | call draw_window |
47 | call draw_window |
48 | jmp wait_event |
48 | jmp wait_event |
49 | 49 | ||
50 | 50 | ||
51 | key: ; key event handler |
51 | key: ; key event handler |
52 | mov eax, 2 ; get key code |
52 | mov eax, 2 ; get key code |
53 | int 0x40 |
53 | int 0x40 |
54 | 54 | ||
55 | cmp ah, 27 |
55 | cmp ah, 27 |
56 | jz exit |
56 | jz exit |
57 | 57 | ||
58 | cmp ah, 0x20 |
58 | cmp ah, 0x20 |
59 | jz next_test |
59 | jz next_test |
60 | 60 | ||
61 | cmp ah, 179 ; -> |
61 | cmp ah, 179 ; -> |
62 | jz next_test |
62 | jz next_test |
63 | 63 | ||
64 | cmp ah, 176 ; <- |
64 | cmp ah, 176 ; <- |
65 | jz prev_test |
65 | jz prev_test |
66 | 66 | ||
67 | cmp ah, 'i' |
67 | cmp ah, 'i' |
68 | jz toggle_info |
68 | jz toggle_info |
69 | 69 | ||
70 | cmp ah, 'I' ; ¢¤à㣠ã 祫 )) |
70 | cmp ah, 'I' ; ¢¤à㣠ã 祫 )) |
71 | jz toggle_info |
71 | jz toggle_info |
72 | 72 | ||
73 | cmp ah, 'c' |
73 | cmp ah, 'c' |
74 | jz toggle_cursor |
74 | jz toggle_cursor |
75 | 75 | ||
76 | cmp ah, 'C' |
76 | cmp ah, 'C' |
77 | jz toggle_cursor |
77 | jz toggle_cursor |
78 | 78 | ||
79 | cmp ah, 'd' |
79 | cmp ah, 'd' |
80 | jz redraw |
80 | jz redraw |
81 | 81 | ||
82 | cmp ah, 'D' |
82 | cmp ah, 'D' |
83 | jz redraw |
83 | jz redraw |
84 | 84 | ||
85 | jmp wait_event |
85 | jmp wait_event |
86 | 86 | ||
87 | next_test: |
87 | next_test: |
88 | cmp dword [test_done], 1 |
88 | cmp dword [test_done], 1 |
89 | jz wait_event |
89 | jz wait_event |
90 | 90 | ||
91 | inc dword [test_num] |
91 | inc dword [test_num] |
92 | call draw_window |
92 | call draw_window |
93 | jmp wait_event |
93 | jmp wait_event |
94 | 94 | ||
95 | prev_test: |
95 | prev_test: |
96 | cmp dword [test_num], ebx |
96 | cmp dword [test_num], ebx |
97 | jz wait_event |
97 | jz wait_event |
98 | 98 | ||
99 | dec dword [test_num] |
99 | dec dword [test_num] |
100 | mov dword [test_done], ebx |
100 | mov dword [test_done], ebx |
101 | call draw_window |
101 | call draw_window |
102 | jmp wait_event |
102 | jmp wait_event |
103 | 103 | ||
104 | 104 | ||
105 | toggle_info: |
105 | toggle_info: |
106 | xor dword [show_info], 1 |
106 | xor dword [show_info], 1 |
107 | call draw_window |
107 | call draw_window |
108 | jmp wait_event |
108 | jmp wait_event |
109 | 109 | ||
110 | toggle_cursor: |
110 | toggle_cursor: |
111 | mov eax, cursorVisible |
111 | mov eax, cursorVisible |
112 | cmp dword [eax], 0 |
112 | cmp dword [eax], 0 |
113 | jz .no_cursor |
113 | jz .no_cursor |
114 | 114 | ||
115 | mov dword [eax], 0 |
115 | mov dword [eax], 0 |
116 | mov ecx, [cursorID] |
116 | mov ecx, [cursorID] |
117 | jmp .set |
117 | jmp .set |
118 | .no_cursor: |
118 | .no_cursor: |
119 | mov dword [eax], 1 |
119 | mov dword [eax], 1 |
120 | xor ecx, ecx |
120 | xor ecx, ecx |
121 | .set: |
121 | .set: |
122 | mov eax, 37 |
122 | mov eax, 37 |
123 | mov ebx, 5 |
123 | mov ebx, 5 |
124 | int 0x40 |
124 | int 0x40 |
125 | mov eax, 18 |
125 | mov eax, 18 |
126 | mov ebx, 15 |
126 | mov ebx, 15 |
127 | int 0x40 ; çâ®¡ë ®¡®¢¨«áï |
127 | int 0x40 ; çâ®¡ë ®¡®¢¨«áï |
128 | jmp wait_event |
128 | jmp wait_event |
129 | 129 | ||
130 | button: ; button event handler |
130 | button: ; button event handler |
131 | mov eax, 17 ; get button identifier |
131 | mov eax, 17 ; get button identifier |
132 | int 0x40 |
132 | int 0x40 |
133 | 133 | ||
134 | cmp ah, 1 |
134 | cmp ah, 1 |
135 | jne wait_event ; return if button id != 1 |
135 | jne wait_event ; return if button id != 1 |
136 | 136 | ||
137 | exit: |
137 | exit: |
138 | or eax, -1 ; exit application |
138 | or eax, -1 ; exit application |
139 | int 0x40 |
139 | int 0x40 |
140 | 140 | ||
141 | 141 | ||
142 | draw_window: |
142 | draw_window: |
143 | mov eax, 12 ; start drawing |
143 | mov eax, 12 ; start drawing |
144 | mov ebx, 1 |
144 | mov ebx, 1 |
145 | int 0x40 |
145 | int 0x40 |
146 | 146 | ||
147 | ; ªãàá®à |
147 | ; ªãàá®à |
148 | ;mov eax, 37 |
148 | ;mov eax, 37 |
149 | ;mov ebx, 5 |
149 | ;mov ebx, 5 |
150 | ;mov ecx, cursorID |
150 | ;mov ecx, cursorID |
151 | ;int 0x40 |
151 | ;int 0x40 |
152 | 152 | ||
153 | mov eax, 14 ; screen size |
153 | mov eax, 14 ; screen size |
154 | int 0x40 |
154 | int 0x40 |
155 | mov ebx, eax |
155 | mov ebx, eax |
156 | shr ebx, 16 |
156 | shr ebx, 16 |
157 | mov ecx, eax |
157 | mov ecx, eax |
158 | and ecx, 0xffff |
158 | and ecx, 0xffff |
159 | mov [screenx], ebx |
159 | mov [screenx], ebx |
160 | mov [screeny], ecx |
160 | mov [screeny], ecx |
161 | 161 | ||
162 | inc ebx |
162 | inc ebx |
163 | inc ecx |
163 | inc ecx |
164 | mov eax, 0 ; create and draw the window |
164 | mov eax, 0 ; create and draw the window |
165 | mov edx, 0x01000000 |
165 | mov edx, 0x01000000 |
166 | mov esi, edx |
166 | mov esi, edx |
167 | int 0x40 |
167 | int 0x40 |
168 | 168 | ||
169 | ; áâ¥à¥âì £à ¨æë ®ª |
169 | ; áâ¥à¥âì £à ¨æë ®ª |
170 | 170 | ||
171 | mov eax, 13 ; £àã¡® â ª |
171 | mov eax, 13 ; £àã¡® â ª |
172 | xor edx, edx |
172 | xor edx, edx |
173 | int 0x40 |
173 | int 0x40 |
174 | dec ebx |
174 | dec ebx |
175 | dec ecx |
175 | dec ecx |
176 | 176 | ||
177 | mov eax, [test_num] |
177 | mov eax, [test_num] |
178 | mov eax, [test_proc + eax*4] |
178 | mov eax, [test_proc + eax*4] |
179 | or eax, eax |
179 | or eax, eax |
180 | jz end_of_test |
180 | jz end_of_test |
181 | call eax |
181 | call eax |
182 | jmp exit_draw |
182 | jmp exit_draw |
183 | end_of_test: |
183 | end_of_test: |
184 | mov eax, 4 |
184 | mov eax, 4 |
185 | mov ebx, 8 * 65536 + 8 |
185 | mov ebx, 8 * 65536 + 8 |
186 | mov ecx, 0xffffff |
186 | mov ecx, 0xffffff |
187 | mov edx, test_finish |
187 | mov edx, test_finish |
188 | mov esi, test_finish.size |
188 | mov esi, test_finish.size |
189 | int 0x40 |
189 | int 0x40 |
190 | mov dword [test_done], 1 |
190 | mov dword [test_done], 1 |
191 | jmp no_info |
191 | jmp no_info |
192 | 192 | ||
193 | exit_draw: |
193 | exit_draw: |
194 | 194 | ||
195 | cmp dword [show_info], 1 |
195 | cmp dword [show_info], 1 |
196 | jnz no_info |
196 | jnz no_info |
197 | 197 | ||
198 | ; ᮢ à §¬¥àë íªà |
198 | ; ᮢ à §¬¥àë íªà |
199 | mov ebx, [screenx] |
199 | mov ebx, [screenx] |
200 | mov ecx, [screeny] |
200 | mov ecx, [screeny] |
201 | 201 | ||
202 | ; ᣥ¥à¨âì áâà®çªã á à §à¥è¥¨¥¬ íªà . 㦮, ¯®â®¬ã çâ® ¯¯æ |
202 | ; ᣥ¥à¨âì áâà®çªã á à §à¥è¥¨¥¬ íªà . 㦮, ¯®â®¬ã çâ® ¯¯æ |
203 | 203 | ||
204 | ; ¯àאַ㣮«ì¨ª 200å40 á ¨ä®© |
204 | ; ¯àאַ㣮«ì¨ª 200å40 á ¨ä®© |
205 | mov edx, 200 |
205 | mov edx, 200 |
206 | mov eax, 13 |
206 | mov eax, 13 |
207 | sub ebx, edx |
207 | sub ebx, edx |
208 | shl ebx, 15 |
208 | shl ebx, 15 |
209 | mov bx, dx |
209 | mov bx, dx |
210 | mov edx, 40 |
210 | mov edx, 40 |
211 | sub ecx, edx |
211 | sub ecx, edx |
212 | shl ecx, 15 |
212 | shl ecx, 15 |
213 | mov cx, dx |
213 | mov cx, dx |
214 | mov edx, 0xffffff |
214 | mov edx, 0xffffff |
215 | int 0x40 |
215 | int 0x40 |
216 | xor edx, edx |
216 | xor edx, edx |
217 | add ebx, 0x0000fffe ; ®ç¥ì 㤮¡® :)))) |
217 | add ebx, 0x0000fffe ; ®ç¥ì 㤮¡® :)))) |
218 | add ecx, 0x0000fffe |
218 | add ecx, 0x0000fffe |
219 | int 0x40 |
219 | int 0x40 |
220 | 220 | ||
221 | 221 | ||
222 | ; ⥪áâ |
222 | ; ⥪áâ |
223 | mov eax, 4 |
223 | mov eax, 4 |
224 | shr ecx, 16 |
224 | shr ecx, 16 |
225 | mov bx, cx |
225 | mov bx, cx |
226 | add ebx, 0x00010001 |
226 | add ebx, 0x00010001 |
227 | mov ecx, 0x80ffffff |
227 | mov ecx, 0x80ffffff |
228 | mov edx, [test_num] |
228 | mov edx, [test_num] |
229 | mov edx, [test_info + edx*4] |
229 | mov edx, [test_info + edx*4] |
230 | int 0x40 |
230 | int 0x40 |
231 | add ebx, 8 |
231 | add ebx, 8 |
232 | mov edx, press_space |
232 | mov edx, press_space |
233 | int 0x40 |
233 | int 0x40 |
234 | add ebx, 8 |
234 | add ebx, 8 |
235 | mov edx, press_i |
235 | mov edx, press_i |
236 | int 0x40 |
236 | int 0x40 |
237 | add ebx, 8 |
237 | add ebx, 8 |
238 | mov edx, press_c |
238 | mov edx, press_c |
239 | int 0x40 |
239 | int 0x40 |
240 | 240 | ||
241 | no_info: |
241 | no_info: |
242 | mov eax, 12 ; finish drawing |
242 | mov eax, 12 ; finish drawing |
243 | mov ebx, 2 |
243 | mov ebx, 2 |
244 | int 0x40 |
244 | int 0x40 |
245 | 245 | ||
246 | ret |
246 | ret |
247 | 247 | ||
248 | ; <---- procedures for various tests of display -----> |
248 | ; <---- procedures for various tests of display -----> |
249 | ; in: ebx = screen_width, ecx = screen_height |
249 | ; in: ebx = screen_width, ecx = screen_height |
250 | 250 | ||
251 | lsz i_image_size, ru, "Image Size and Placement" |
251 | lsz i_image_size, ru, "Image Size and Placement" |
252 | db 0 |
252 | db 0 |
253 | t_image_size: |
253 | t_image_size: |
254 | mov eax, 38 |
254 | mov eax, 38 |
255 | mov esi, ebx |
255 | mov esi, ebx |
256 | mov edi, ecx |
256 | mov edi, ecx |
257 | mov edx, 0xffffff |
257 | mov edx, 0xffffff |
258 | ; 6 ®â१ª®¢ |
258 | ; 6 ®â१ª®¢ |
259 | xor ecx, ecx |
259 | xor ecx, ecx |
260 | int 0x40 |
260 | int 0x40 |
261 | mov ecx, edi |
261 | mov ecx, edi |
262 | shl ecx, 16 |
262 | shl ecx, 16 |
263 | xor ebx, ebx |
263 | xor ebx, ebx |
264 | int 0x40 |
264 | int 0x40 |
265 | mov ebx, esi |
265 | mov ebx, esi |
266 | shl ebx, 16 |
266 | shl ebx, 16 |
267 | add ecx, edi |
267 | add ecx, edi |
268 | int 0x40 |
268 | int 0x40 |
269 | sub ecx, edi |
269 | sub ecx, edi |
270 | add ebx, esi |
270 | add ebx, esi |
271 | int 0x40 |
271 | int 0x40 |
272 | ; à ¬ª £®â®¢ |
272 | ; à ¬ª £®â®¢ |
273 | mov ebx, esi |
273 | mov ebx, esi |
274 | shl ebx, 16 |
274 | shl ebx, 16 |
275 | mov ecx, edi |
275 | mov ecx, edi |
276 | shl ecx, 15 |
276 | shl ecx, 15 |
277 | mov cx, di |
277 | mov cx, di |
278 | shr cx, 1 |
278 | shr cx, 1 |
279 | int 0x40 |
279 | int 0x40 |
280 | shr ebx, 1 |
280 | shr ebx, 1 |
281 | mov bx, si |
281 | mov bx, si |
282 | shr bx, 1 |
282 | shr bx, 1 |
283 | mov ecx, edi |
283 | mov ecx, edi |
284 | shl ecx, 16 |
284 | shl ecx, 16 |
285 | int 0x40 |
285 | int 0x40 |
286 | 286 | ||
287 | ret |
287 | ret |
288 | 288 | ||
289 | lsz i_grid, ru, "Grid" |
289 | lsz i_grid, ru, "Grid" |
290 | db 0 |
290 | db 0 |
291 | t_grid: |
291 | t_grid: |
292 | ; á¥âª à §¬¥à®¬ ¢ 64 ¯¨ªá¥« |
292 | ; á¥âª à §¬¥à®¬ ¢ 64 ¯¨ªá¥« |
293 | mov eax, 38 |
293 | mov eax, 38 |
294 | inc ebx |
294 | inc ebx |
295 | inc ecx |
295 | inc ecx |
296 | mov esi, ebx |
296 | mov esi, ebx |
297 | mov edi, ecx |
297 | mov edi, ecx |
298 | mov edx, 0xffffff |
298 | mov edx, 0xffffff |
299 | mov ebp, 0x00400040 |
299 | mov ebp, 0x00400040 |
300 | ; £®à¨§®â «ìë¥ «¨¨¨ |
300 | ; £®à¨§®â «ìë¥ «¨¨¨ |
301 | shl ebx, 16 |
301 | shl ebx, 16 |
302 | xor ecx, ecx |
302 | xor ecx, ecx |
303 | grid_next_y: |
303 | grid_next_y: |
304 | int 0x40 |
304 | int 0x40 |
305 | add ecx, ebp |
305 | add ecx, ebp |
306 | cmp cx, di |
306 | cmp cx, di |
307 | jnae grid_next_y |
307 | jnae grid_next_y |
308 | sub ecx, 0x00010001 |
308 | sub ecx, 0x00010001 |
309 | int 0x40 |
309 | int 0x40 |
310 | ; ¢¥à⨪ «ìë¥ «¨¨¨ |
310 | ; ¢¥à⨪ «ìë¥ «¨¨¨ |
311 | mov ecx, edi |
311 | mov ecx, edi |
312 | shl ecx, 16 |
312 | shl ecx, 16 |
313 | xor ebx, ebx |
313 | xor ebx, ebx |
314 | grid_next_x: |
314 | grid_next_x: |
315 | int 0x40 |
315 | int 0x40 |
316 | add ebx, ebp |
316 | add ebx, ebp |
317 | cmp bx, si |
317 | cmp bx, si |
318 | jnae grid_next_x |
318 | jnae grid_next_x |
319 | sub ebx, 0x00010001 |
319 | sub ebx, 0x00010001 |
320 | int 0x40 |
320 | int 0x40 |
321 | 321 | ||
322 | ret |
322 | ret |
323 | 323 | ||
324 | lsz i_horstr, ru, "Horizontal Straightness" |
324 | lsz i_horstr, ru, "Horizontal Straightness" |
325 | db 0 |
325 | db 0 |
326 | t_horstr: |
326 | t_horstr: |
327 | mov eax, 38 |
327 | mov eax, 38 |
328 | mov edi, ecx |
328 | mov edi, ecx |
329 | mov edx, 0xffffff |
329 | mov edx, 0xffffff |
330 | mov esi, ecx |
330 | mov esi, ecx |
331 | inc esi |
331 | inc esi |
332 | shr esi, 3 |
332 | shr esi, 3 |
333 | mov ebp, esi |
333 | mov ebp, esi |
334 | shl ebp, 16 |
334 | shl ebp, 16 |
335 | mov bp, si |
335 | mov bp, si |
336 | ; £®à¨§®â «ìë¥ «¨¨¨ |
336 | ; £®à¨§®â «ìë¥ «¨¨¨ |
337 | shl ebx, 16 |
337 | shl ebx, 16 |
338 | mov ecx, ebp |
338 | mov ecx, ebp |
339 | shr ecx, 1 |
339 | shr ecx, 1 |
340 | mov cx, bp |
340 | mov cx, bp |
341 | shr cx, 1 |
341 | shr cx, 1 |
342 | hor_next_y: |
342 | hor_next_y: |
343 | int 0x40 |
343 | int 0x40 |
344 | add ecx, ebp |
344 | add ecx, ebp |
345 | cmp cx, di |
345 | cmp cx, di |
346 | jnae hor_next_y |
346 | jnae hor_next_y |
347 | ret |
347 | ret |
348 | lsz i_vertstr, ru, "Vertical Straightness",0 |
348 | lsz i_vertstr, ru, "Vertical Straightness",0 |
349 | db 0 |
349 | db 0 |
350 | t_vertstr: |
350 | t_vertstr: |
351 | mov eax, 38 |
351 | mov eax, 38 |
352 | mov edx, 0xffffff |
352 | mov edx, 0xffffff |
353 | mov esi, ebx |
353 | mov esi, ebx |
354 | shl ecx, 16 |
354 | shl ecx, 16 |
355 | mov edi, esi |
355 | mov edi, esi |
356 | shr edi, 3 |
356 | shr edi, 3 |
357 | mov ebp, edi |
357 | mov ebp, edi |
358 | shl ebp, 16 |
358 | shl ebp, 16 |
359 | mov bp, di |
359 | mov bp, di |
360 | mov ebx, ebp |
360 | mov ebx, ebp |
361 | shr ebx, 1 |
361 | shr ebx, 1 |
362 | mov bx, bp |
362 | mov bx, bp |
363 | shr bx, 1 |
363 | shr bx, 1 |
364 | vert_next_x: |
364 | vert_next_x: |
365 | int 0x40 |
365 | int 0x40 |
366 | add ebx, ebp |
366 | add ebx, ebp |
367 | cmp bx, si |
367 | cmp bx, si |
368 | jnae vert_next_x |
368 | jnae vert_next_x |
369 | 369 | ||
370 | ret |
370 | ret |
371 | 371 | ||
372 | lsz i_distort, ru, "Distortion",0 |
372 | lsz i_distort, ru, "Distortion",0 |
373 | db 0 |
373 | db 0 |
374 | t_distort: |
374 | t_distort: |
375 | mov edx, 0xffffff |
375 | mov edx, 0xffffff |
376 | mov esi, ebx |
376 | mov esi, ebx |
377 | mov edi, ecx |
377 | mov edi, ecx |
378 | mov ebp, 3 |
378 | mov ebp, 3 |
379 | 379 | ||
380 | xor ebx, ebx |
380 | xor ebx, ebx |
381 | dist_next: |
381 | dist_next: |
382 | mov eax, 38 |
382 | mov eax, 38 |
383 | push ebp |
383 | push ebp |
384 | mov ebp, ebx |
384 | mov ebp, ebx |
385 | shl ebx, 16 |
385 | shl ebx, 16 |
386 | or ebx, ebp |
386 | or ebx, ebp |
387 | 387 | ||
388 | mov ecx, edi |
388 | mov ecx, edi |
389 | shl ecx, 16 |
389 | shl ecx, 16 |
390 | or ecx, ebp |
390 | or ecx, ebp |
391 | int 0x40 |
391 | int 0x40 |
392 | 392 | ||
393 | mov ebx, esi |
393 | mov ebx, esi |
394 | shl ebx, 16 |
394 | shl ebx, 16 |
395 | mov bx, si |
395 | mov bx, si |
396 | int 0x40 |
396 | int 0x40 |
397 | 397 | ||
398 | mov bx, bp |
398 | mov bx, bp |
399 | mov ecx, ebp |
399 | mov ecx, ebp |
400 | shl ecx, 16 |
400 | shl ecx, 16 |
401 | or ecx, ebp |
401 | or ecx, ebp |
402 | int 0x40 |
402 | int 0x40 |
403 | 403 | ||
404 | mov ecx, edi |
404 | mov ecx, edi |
405 | shl ecx, 16 |
405 | shl ecx, 16 |
406 | mov cx, di |
406 | mov cx, di |
407 | int 0x40 |
407 | int 0x40 |
408 | 408 | ||
409 | mov eax, 30 |
409 | mov eax, 30 |
410 | sub esi, eax |
410 | sub esi, eax |
411 | sub edi, eax |
411 | sub edi, eax |
412 | mov ebx, ebp |
412 | mov ebx, ebp |
413 | add ebx, eax |
413 | add ebx, eax |
414 | pop ebp |
414 | pop ebp |
415 | dec ebp |
415 | dec ebp |
416 | jnz dist_next |
416 | jnz dist_next |
417 | 417 | ||
418 | ret |
418 | ret |
419 | 419 | ||
420 | lsz i_horres, ru, "Horizontal Resolution",0 |
420 | lsz i_horres, ru, "Horizontal Resolution",0 |
421 | db 0 |
421 | db 0 |
422 | t_horres: |
422 | t_horres: |
423 | mov eax, 38 |
423 | mov eax, 38 |
424 | mov edx, 0xffffff |
424 | mov edx, 0xffffff |
425 | mov edi, ecx |
425 | mov edi, ecx |
426 | shl ecx, 16 |
426 | shl ecx, 16 |
427 | mov esi, ebx |
427 | mov esi, ebx |
428 | xor ebx, ebx |
428 | xor ebx, ebx |
429 | mov edi, 0x003A003A |
429 | mov edi, 0x003A003A |
430 | mov ebp, 0x00030003 |
430 | mov ebp, 0x00030003 |
431 | 431 | ||
432 | horres_next: |
432 | horres_next: |
433 | add ebx, edi |
433 | add ebx, edi |
434 | int 0x40 |
434 | int 0x40 |
435 | add ebx, ebp |
435 | add ebx, ebp |
436 | int 0x40 |
436 | int 0x40 |
437 | add ebx, ebp |
437 | add ebx, ebp |
438 | int 0x40 |
438 | int 0x40 |
439 | add ebx, ebp |
439 | add ebx, ebp |
440 | int 0x40 |
440 | int 0x40 |
441 | add ebx, ebp |
441 | add ebx, ebp |
442 | int 0x40 |
442 | int 0x40 |
443 | cmp bx, si |
443 | cmp bx, si |
444 | jna horres_next |
444 | jna horres_next |
445 | 445 | ||
446 | ret |
446 | ret |
447 | 447 | ||
448 | lsz i_vertres, ru, "Vertical Resolution",0 |
448 | lsz i_vertres, ru, "Vertical Resolution",0 |
449 | db 0 |
449 | db 0 |
450 | t_vertres: |
450 | t_vertres: |
451 | mov eax, 38 |
451 | mov eax, 38 |
452 | mov edx, 0xffffff |
452 | mov edx, 0xffffff |
453 | ; mov esi, ebx |
453 | ; mov esi, ebx |
454 | shl ebx, 16 |
454 | shl ebx, 16 |
455 | mov edi, ecx |
455 | mov edi, ecx |
456 | xor ecx, ecx |
456 | xor ecx, ecx |
457 | mov ebp, 0x00030003 |
457 | mov ebp, 0x00030003 |
458 | mov esi, 0x002A002A |
458 | mov esi, 0x002A002A |
459 | 459 | ||
460 | vertres_next: |
460 | vertres_next: |
461 | add ecx, esi |
461 | add ecx, esi |
462 | int 0x40 |
462 | int 0x40 |
463 | add ecx, ebp |
463 | add ecx, ebp |
464 | int 0x40 |
464 | int 0x40 |
465 | add ecx, ebp |
465 | add ecx, ebp |
466 | int 0x40 |
466 | int 0x40 |
467 | add ecx, ebp |
467 | add ecx, ebp |
468 | int 0x40 |
468 | int 0x40 |
469 | add ecx, ebp |
469 | add ecx, ebp |
470 | int 0x40 |
470 | int 0x40 |
471 | add ecx, 0x00540054 |
471 | add ecx, 0x00540054 |
472 | cmp cx, di |
472 | cmp cx, di |
473 | jna vertres_next |
473 | jna vertres_next |
474 | 474 | ||
475 | ret |
475 | ret |
476 | 476 | ||
477 | lsz i_moire, ru, "Moire Patterns",0 |
477 | lsz i_moire, ru, "Moire Patterns",0 |
478 | db 0 |
478 | db 0 |
479 | t_moire: |
479 | t_moire: |
480 | mov eax, 38 |
480 | mov eax, 38 |
481 | mov edx, 0xffffff |
481 | mov edx, 0xffffff |
482 | mov edi, ecx |
482 | mov edi, ecx |
483 | shl ecx, 16 |
483 | shl ecx, 16 |
484 | mov esi, ebx |
484 | mov esi, ebx |
485 | xor ebx, ebx |
485 | xor ebx, ebx |
486 | mov ebp, 0x00030003 |
486 | mov ebp, 0x00030003 |
487 | moire_next: |
487 | moire_next: |
488 | int 0x40 |
488 | int 0x40 |
489 | add ebx, ebp |
489 | add ebx, ebp |
490 | cmp bx, si |
490 | cmp bx, si |
491 | jna moire_next |
491 | jna moire_next |
492 | 492 | ||
493 | ret |
493 | ret |
494 | 494 | ||
495 | lsz i_revsharp, ru, "Reverse Video Sharpness",0 |
495 | lsz i_revsharp, ru, "Reverse Video Sharpness",0 |
496 | db 0 |
496 | db 0 |
497 | t_revsharp: |
497 | t_revsharp: |
498 | mov esi, ebx |
498 | mov esi, ebx |
499 | mov edi, ecx |
499 | mov edi, ecx |
500 | shr ecx, 1 |
500 | shr ecx, 1 |
501 | mov eax, 13 |
501 | mov eax, 13 |
502 | mov edx, 0xffffff |
502 | mov edx, 0xffffff |
503 | int 0x40 |
503 | int 0x40 |
504 | ; ⥯¥àì - ¨¢¥àáë¥ «¨¨¨ |
504 | ; ⥯¥àì - ¨¢¥àáë¥ «¨¨¨ |
505 | mov eax, 38 |
505 | mov eax, 38 |
506 | mov ecx, edi |
506 | mov ecx, edi |
507 | mov edx, 0x01000000 |
507 | mov edx, 0x01000000 |
508 | xor ebx, ebx |
508 | xor ebx, ebx |
509 | mov ebp, 0x00010001 |
509 | mov ebp, 0x00010001 |
510 | mov edi, 0x003F003F |
510 | mov edi, 0x003F003F |
511 | revsharp_next: |
511 | revsharp_next: |
512 | add ebx, edi |
512 | add ebx, edi |
513 | int 0x40 |
513 | int 0x40 |
514 | add ebx, ebp |
514 | add ebx, ebp |
515 | int 0x40 |
515 | int 0x40 |
516 | add ebx, ebp |
516 | add ebx, ebp |
517 | int 0x40 |
517 | int 0x40 |
518 | add ebx, edi |
518 | add ebx, edi |
519 | sub ebx, ebp |
519 | sub ebx, ebp |
520 | int 0x40 |
520 | int 0x40 |
521 | cmp bx, si |
521 | cmp bx, si |
522 | jna revsharp_next |
522 | jna revsharp_next |
523 | 523 | ||
524 | ret |
524 | ret |
525 | 525 | ||
526 | lsz i_flicker, ru, "Flicker Severity",0 |
526 | lsz i_flicker, ru, "Flicker Severity",0 |
527 | db 0 |
527 | db 0 |
528 | t_flicker: |
528 | t_flicker: |
529 | mov eax, 13 |
529 | mov eax, 13 |
530 | mov edx, 0xffffff |
530 | mov edx, 0xffffff |
531 | int 0x40 |
531 | int 0x40 |
532 | ret |
532 | ret |
533 | 533 | ||
534 | lsz i_glare, ru, "Glare Severity",0 |
534 | lsz i_glare, ru, "Glare Severity",0 |
535 | db 0 |
535 | db 0 |
536 | t_glare: ; ®¯â¨¬¨§¨à®¢ âì ¥ç¥£® |
536 | t_glare: ; ®¯â¨¬¨§¨à®¢ âì ¥ç¥£® |
537 | ret |
537 | ret |
538 | 538 | ||
539 | lsz i_interlace, ru, "Interlacing Detection",0 |
539 | lsz i_interlace, ru, "Interlacing Detection",0 |
540 | db 0 |
540 | db 0 |
541 | t_interlace: |
541 | t_interlace: |
542 | mov edi, ecx |
542 | mov edi, ecx |
543 | mov eax, 38 |
543 | mov eax, 38 |
544 | mov edx, 0xffffff |
544 | mov edx, 0xffffff |
545 | xor ecx, ecx |
545 | xor ecx, ecx |
546 | mov ebp, 0x00020002 |
546 | mov ebp, 0x00020002 |
547 | interlace_next: |
547 | interlace_next: |
548 | add ecx, ebp |
548 | add ecx, ebp |
549 | int 0x40 |
549 | int 0x40 |
550 | cmp cx, di |
550 | cmp cx, di |
551 | jna interlace_next |
551 | jna interlace_next |
552 | 552 | ||
553 | ret |
553 | ret |
554 | 554 | ||
555 | lsz i_scrreg, ru, "Screen Regulation",0 |
555 | lsz i_scrreg, ru, "Screen Regulation",0 |
556 | db 0 |
556 | db 0 |
557 | t_scrreg: |
557 | t_scrreg: |
558 | mov eax, 13 |
558 | mov eax, 13 |
559 | mov edx, 0xffffff |
559 | mov edx, 0xffffff |
560 | add ebx, 0x0018FFCD ; +25 ª ç «ã ¨ -50 ®â ¤«¨ë |
560 | add ebx, 0x0018FFCD ; +25 ª ç «ã ¨ -50 ®â ¤«¨ë |
561 | shr ecx, 1 |
561 | shr ecx, 1 |
562 | add ecx, 0x0013FFEC ; +19 ª ç «ã ¨ -19 ®â ¤«¨ë |
562 | add ecx, 0x0013FFEC ; +19 ª ç «ã ¨ -19 ®â ¤«¨ë |
563 | int 0x40 |
563 | int 0x40 |
564 | ret |
564 | ret |
565 | 565 | ||
566 | lsz i_pricol, ru, "Primary Color Purity" |
566 | lsz i_pricol, ru, "Primary Color Purity" |
567 | db 0 |
567 | db 0 |
568 | t_pricol: |
568 | t_pricol: |
569 | 569 | ||
570 | mov esi, ebx |
570 | mov esi, ebx |
571 | mov edi, ecx |
571 | mov edi, ecx |
572 | mov eax, 13 |
572 | mov eax, 13 |
573 | 573 | ||
574 | shr ebx, 4 ; /16 |
574 | shr ebx, 4 ; /16 |
575 | mov ebp, ebx |
575 | mov ebp, ebx |
576 | shl ebx, 16 |
576 | shl ebx, 16 |
577 | mov bx, bp |
577 | mov bx, bp |
578 | shl ebp, 16 |
578 | shl ebp, 16 |
579 | lea ebp, [ebp + ebp * 4] ; ebp *= 5 |
579 | lea ebp, [ebp + ebp * 4] ; ebp *= 5 |
580 | 580 | ||
581 | mov ecx, 0x00280000 |
581 | mov ecx, 0x00280000 |
582 | mov cx, di |
582 | mov cx, di |
583 | sub cx, 80 |
583 | sub cx, 80 |
584 | ;shr cx, 1 |
584 | ;shr cx, 1 |
585 | 585 | ||
586 | shl bx, 2 |
586 | shl bx, 2 |
587 | mov edx, 0xff0000 |
587 | mov edx, 0xff0000 |
588 | int 0x40 |
588 | int 0x40 |
589 | 589 | ||
590 | add ebx, ebp |
590 | add ebx, ebp |
591 | shr edx, 8 |
591 | shr edx, 8 |
592 | int 0x40 |
592 | int 0x40 |
593 | 593 | ||
594 | add ebx, ebp |
594 | add ebx, ebp |
595 | shr edx, 8 |
595 | shr edx, 8 |
596 | int 0x40 |
596 | int 0x40 |
597 | 597 | ||
598 | ret |
598 | ret |
599 | 599 | ||
600 | lsz i_colint, ru, "Color Intensity Gradient" |
600 | lsz i_colint, ru, "Color Intensity Gradient" |
601 | db 0 |
601 | db 0 |
602 | t_colint: |
602 | t_colint: |
603 | 603 | ||
604 | mov esi, ebx |
604 | mov esi, ebx |
605 | mov edi, ecx |
605 | mov edi, ecx |
606 | 606 | ||
607 | ; mov eax, ecx |
607 | ; mov eax, ecx |
608 | ; shr ecx, 2 ; end y coord |
608 | ; shr ecx, 2 ; end y coord |
609 | ; and ecx, 0xffffff80 ; íâ® not 7F |
609 | ; and ecx, 0xffffff80 ; íâ® not 7F |
610 | ; shr eax, 7 ; / 128 |
610 | ; shr eax, 7 ; / 128 |
611 | ; mov ebp, eax |
611 | ; mov ebp, eax |
612 | ; mov edx, eax |
612 | ; mov edx, eax |
613 | ; lea eax, [eax + eax * 2] ; eax *= 5 |
613 | ; lea eax, [eax + eax * 2] ; eax *= 5 |
614 | ; shl ebp, 4 |
614 | ; shl ebp, 4 |
615 | ; add eax, ebp |
615 | ; add eax, ebp |
616 | 616 | ||
617 | ; shl eax, 16 |
617 | ; shl eax, 16 |
618 | ; add ecx, eax |
618 | ; add ecx, eax |
619 | ; mov edx, ebp |
619 | ; mov edx, ebp |
620 | ; shl ebp, 16 |
620 | ; shl ebp, 16 |
621 | ; mov bp, dx ; © ¡®«ì®© |
621 | ; mov bp, dx ; © ¡®«ì®© |
622 | 622 | ||
623 | ; ï ¥ ¯®ï«, çâ® â ¬ ¤¥« «®áì, ¨ à¥è¨« ¯¨á âì ᮢ ®_ |
623 | ; ï ¥ ¯®ï«, çâ® â ¬ ¤¥« «®áì, ¨ à¥è¨« ¯¨á âì ᮢ ®_ |
624 | 624 | ||
625 | ; ¤® §¤¥áì ᣥ¥à¨âì ecx ( ç «ìë© á¤¢¨£) ¨ ebp (è £ ¯® ã) |
625 | ; ¤® §¤¥áì ᣥ¥à¨âì ecx ( ç «ìë© á¤¢¨£) ¨ ebp (è £ ¯® ã) |
626 | 626 | ||
627 | mov eax, edi |
627 | mov eax, edi |
628 | lea eax, [eax + 2 * eax] |
628 | lea eax, [eax + 2 * eax] |
629 | shr eax, 5 ; eax = 3/32 ¢ëá®âë |
629 | shr eax, 5 ; eax = 3/32 ¢ëá®âë |
630 | mov ebp, eax |
630 | mov ebp, eax |
631 | shl ebp, 16 |
631 | shl ebp, 16 |
632 | mov bp, ax ; ebp = ax ¢ ®¡®¨å á«®¢ å |
632 | mov bp, ax ; ebp = ax ¢ ®¡®¨å á«®¢ å |
633 | 633 | ||
634 | mov ebx, eax ; á®åà ¨¬ íâ® § 票¥ |
634 | mov ebx, eax ; á®åà ¨¬ íâ® § 票¥ |
635 | 635 | ||
636 | mov eax, edi |
636 | mov eax, edi |
637 | inc eax |
637 | inc eax |
638 | shr eax, 4 ; 3/16 ¢ëá®âë - ç «ì®¥ § 票¥ |
638 | shr eax, 4 ; 3/16 ¢ëá®âë - ç «ì®¥ § 票¥ |
639 | ; ¢á¥£® ¯®«®áë § ©¬ãâ 3/4 ¢ëá®âë, ¨â®£® ¯® 3/32 ¢ëá®âë ¯®«®áã (¤«ï ஢®£® áç¥â ) |
639 | ; ¢á¥£® ¯®«®áë § ©¬ãâ 3/4 ¢ëá®âë, ¨â®£® ¯® 3/32 ¢ëá®âë ¯®«®áã (¤«ï ஢®£® áç¥â ) |
640 | lea eax, [eax + eax * 2] |
640 | lea eax, [eax + eax * 2] |
641 | mov ecx, eax |
641 | mov ecx, eax |
642 | shl ecx, 16 |
642 | shl ecx, 16 |
643 | shr ebx, 2 |
643 | shr ebx, 2 |
644 | lea ebx, [ebx + ebx * 2] ; ebx = 3/4 ebx, â.¥. 3/4 ¢ëá®âë ¯®«®áë |
644 | lea ebx, [ebx + ebx * 2] ; ebx = 3/4 ebx, â.¥. 3/4 ¢ëá®âë ¯®«®áë |
645 | add eax, ebx |
645 | add eax, ebx |
646 | mov cx, ax |
646 | mov cx, ax |
647 | 647 | ||
648 | xor edx, edx |
648 | xor edx, edx |
649 | mov eax, 0xffff |
649 | mov eax, 0xffff |
650 | div esi |
650 | div esi |
651 | mov edi, eax ; edi = 64K/width |
651 | mov edi, eax ; edi = 64K/width |
652 | 652 | ||
653 | mov dword [color_index], 0 |
653 | mov dword [color_index], 0 |
654 | jmp colint_next |
654 | jmp colint_next |
655 | 655 | ||
656 | color_table dd 0x00ff0000, 0x0000ff00, 0x00ffff00, \ |
656 | color_table dd 0x00ff0000, 0x0000ff00, 0x00ffff00, \ |
657 | 0x000000ff, 0x00ff00ff, 0x0000ffff, 0x00ffffff |
657 | 0x000000ff, 0x00ff00ff, 0x0000ffff, 0x00ffffff |
658 | color_index dd 0 |
658 | color_index dd 0 |
659 | 659 | ||
660 | colint_next: |
660 | colint_next: |
661 | xor edx, edx |
661 | xor edx, edx |
662 | xor ebx, ebx |
662 | xor ebx, ebx |
663 | mov eax, 38 |
663 | mov eax, 38 |
664 | colint_next_line: |
664 | colint_next_line: |
665 | push edx |
665 | push edx |
666 | push eax |
666 | push eax |
667 | movzx eax, dh |
667 | movzx eax, dh |
668 | shl eax, 16 |
668 | shl eax, 16 |
669 | mov dl, dh |
669 | mov dl, dh |
670 | or edx, eax |
670 | or edx, eax |
671 | mov eax, [color_index] |
671 | mov eax, [color_index] |
672 | mov eax, [color_table + eax * 4] |
672 | mov eax, [color_table + eax * 4] |
673 | and edx, eax |
673 | and edx, eax |
674 | pop eax |
674 | pop eax |
675 | int 0x40 |
675 | int 0x40 |
676 | pop edx |
676 | pop edx |
677 | add ebx, 0x00010001 |
677 | add ebx, 0x00010001 |
678 | add edx, edi |
678 | add edx, edi |
679 | cmp bx, si |
679 | cmp bx, si |
680 | jna colint_next_line |
680 | jna colint_next_line |
681 | 681 | ||
682 | add ecx, ebp |
682 | add ecx, ebp |
683 | inc dword [color_index] |
683 | inc dword [color_index] |
684 | cmp dword [color_index], 7 |
684 | cmp dword [color_index], 7 |
685 | jb colint_next |
685 | jb colint_next |
686 | 686 | ||
687 | ret |
687 | ret |
688 | 688 | ||
689 | lsz i_colalign, ru, "Color Alignment Grid" |
689 | lsz i_colalign, ru, "Color Alignment Grid" |
690 | db 0 |
690 | db 0 |
691 | t_colalign: |
691 | t_colalign: |
692 | 692 | ||
693 | ; ªà á ï á¥âª |
693 | ; ªà á ï á¥âª |
694 | inc ebx ; ⠪ 㦮 |
694 | inc ebx ; ⠪ 㦮 |
695 | inc ecx |
695 | inc ecx |
696 | mov esi, ebx |
696 | mov esi, ebx |
697 | mov edi, ecx |
697 | mov edi, ecx |
698 | mov edx, 0xff0000 |
698 | mov edx, 0xff0000 |
699 | ; £®à¨§®â «ìë¥ «¨¨¨ |
699 | ; £®à¨§®â «ìë¥ «¨¨¨ |
700 | shl ebx, 16 |
700 | shl ebx, 16 |
701 | xor ecx, ecx |
701 | xor ecx, ecx |
702 | push edi |
702 | push edi |
703 | shr edi, 3 |
703 | shr edi, 3 |
704 | mov ebp, edi |
704 | mov ebp, edi |
705 | shl ebp, 16 |
705 | shl ebp, 16 |
706 | mov bp, di |
706 | mov bp, di |
707 | pop edi |
707 | pop edi |
708 | mov [yshift], ebp |
708 | mov [yshift], ebp |
709 | mov eax, 38 |
709 | mov eax, 38 |
710 | cgrid_next_y: |
710 | cgrid_next_y: |
711 | int 0x40 |
711 | int 0x40 |
712 | add ecx, ebp |
712 | add ecx, ebp |
713 | cmp cx, di |
713 | cmp cx, di |
714 | jnae cgrid_next_y |
714 | jnae cgrid_next_y |
715 | ; ¯®á«¥¤ïï «¨¨ï: |
715 | ; ¯®á«¥¤ïï «¨¨ï: |
716 | sub ecx, 0x00010001 |
716 | sub ecx, 0x00010001 |
717 | int 0x40 |
717 | int 0x40 |
718 | 718 | ||
719 | ; ¢¥à⨪ «ìë¥ «¨¨¨ |
719 | ; ¢¥à⨪ «ìë¥ «¨¨¨ |
720 | mov ecx, edi |
720 | mov ecx, edi |
721 | shl ecx, 16 |
721 | shl ecx, 16 |
722 | xor ebx, ebx |
722 | xor ebx, ebx |
723 | push esi |
723 | push esi |
724 | shr esi, 3 |
724 | shr esi, 3 |
725 | mov ebp, esi |
725 | mov ebp, esi |
726 | shl ebp, 16 |
726 | shl ebp, 16 |
727 | mov bp, si |
727 | mov bp, si |
728 | mov [xshift], ebp |
728 | mov [xshift], ebp |
729 | pop esi |
729 | pop esi |
730 | mov eax, 38 |
730 | mov eax, 38 |
731 | cgrid_next_x: |
731 | cgrid_next_x: |
732 | int 0x40 |
732 | int 0x40 |
733 | add ebx, ebp |
733 | add ebx, ebp |
734 | cmp bx, si |
734 | cmp bx, si |
735 | jnae cgrid_next_x |
735 | jnae cgrid_next_x |
736 | ; ¯®á«¥¤ïï «¨¨ï |
736 | ; ¯®á«¥¤ïï «¨¨ï |
737 | sub ebx, 0x00010001 |
737 | sub ebx, 0x00010001 |
738 | int 0x40 |
738 | int 0x40 |
739 | jmp cgrid_green |
739 | jmp cgrid_green |
740 | 740 | ||
741 | xshift dd 0 |
741 | xshift dd 0 |
742 | yshift dd 0 |
742 | yshift dd 0 |
743 | shift dd 0 |
743 | shift dd 0 |
744 | cgrid_green: |
744 | cgrid_green: |
745 | ; §¥«¥ë¥ «¨¨¨: £®à¨§®â «ìë¥ |
745 | ; §¥«¥ë¥ «¨¨¨: £®à¨§®â «ìë¥ |
746 | mov edx, esi |
746 | mov edx, esi |
747 | shr edx, 5 |
747 | shr edx, 5 |
748 | lea eax, [edx + edx * 2] |
748 | lea eax, [edx + edx * 2] |
749 | shl edx, 16 |
749 | shl edx, 16 |
750 | or edx, eax |
750 | or edx, eax |
751 | mov [shift], edx |
751 | mov [shift], edx |
752 | mov eax, 38 |
752 | mov eax, 38 |
753 | mov edx, 0x00ff00 |
753 | mov edx, 0x00ff00 |
754 | xor ecx, ecx |
754 | xor ecx, ecx |
755 | mov ebp, [xshift] |
755 | mov ebp, [xshift] |
756 | ggrid_next_yy: |
756 | ggrid_next_yy: |
757 | mov ebx, [shift] |
757 | mov ebx, [shift] |
758 | ggrid_next_yx: |
758 | ggrid_next_yx: |
759 | int 0x40 |
759 | int 0x40 |
760 | add ebx, ebp |
760 | add ebx, ebp |
761 | cmp bx, si |
761 | cmp bx, si |
762 | jnae ggrid_next_yx |
762 | jnae ggrid_next_yx |
763 | sub ebx, 0x00010001 |
763 | sub ebx, 0x00010001 |
764 | int 0x40 |
764 | int 0x40 |
765 | 765 | ||
766 | add ecx, [yshift] |
766 | add ecx, [yshift] |
767 | cmp cx, di |
767 | cmp cx, di |
768 | jnae ggrid_next_yy |
768 | jnae ggrid_next_yy |
769 | ; last row of lines |
769 | ; last row of lines |
770 | mov ebx, [shift] |
770 | mov ebx, [shift] |
771 | dec ecx |
771 | dec ecx |
772 | ggrid_last_yx: |
772 | ggrid_last_yx: |
773 | int 0x40 |
773 | int 0x40 |
774 | add ebx, ebp |
774 | add ebx, ebp |
775 | cmp bx, si |
775 | cmp bx, si |
776 | jnae ggrid_last_yx |
776 | jnae ggrid_last_yx |
777 | 777 | ||
778 | ; ¨ ¢¥à⨪ «ìë¥ |
778 | ; ¨ ¢¥à⨪ «ìë¥ |
779 | mov edx, edi |
779 | mov edx, edi |
780 | shr edx, 5 |
780 | shr edx, 5 |
781 | lea eax, [edx + edx * 2] |
781 | lea eax, [edx + edx * 2] |
782 | shl edx, 16 |
782 | shl edx, 16 |
783 | or edx, eax |
783 | or edx, eax |
784 | mov [shift], edx |
784 | mov [shift], edx |
785 | 785 | ||
786 | mov eax, 38 |
786 | mov eax, 38 |
787 | mov edx, 0x00ff00 |
787 | mov edx, 0x00ff00 |
788 | mov ecx, [shift] |
788 | mov ecx, [shift] |
789 | mov ebp, [xshift] |
789 | mov ebp, [xshift] |
790 | ggrid_next_xy: |
790 | ggrid_next_xy: |
791 | xor ebx, ebx |
791 | xor ebx, ebx |
792 | ggrid_next_xx: |
792 | ggrid_next_xx: |
793 | int 0x40 |
793 | int 0x40 |
794 | add ebx, ebp |
794 | add ebx, ebp |
795 | cmp bx, si |
795 | cmp bx, si |
796 | jnae ggrid_next_xx |
796 | jnae ggrid_next_xx |
797 | sub ebx, 0x00010001 |
797 | sub ebx, 0x00010001 |
798 | int 0x40 |
798 | int 0x40 |
799 | 799 | ||
800 | add ecx, [yshift] |
800 | add ecx, [yshift] |
801 | cmp cx, di |
801 | cmp cx, di |
802 | jnae ggrid_next_xy |
802 | jnae ggrid_next_xy |
803 | xor ebx, ebx |
803 | xor ebx, ebx |
804 | dec ecx |
804 | dec ecx |
805 | ggrid_last_xy: |
805 | ggrid_last_xy: |
806 | ;int 0x40 |
806 | ;int 0x40 |
807 | ;add ebx, ebp |
807 | ;add ebx, ebp |
808 | ;cmp bx, si |
808 | ;cmp bx, si |
809 | ;jnae ggrid_last_xy |
809 | ;jnae ggrid_last_xy |
810 | 810 | ||
811 | 811 | ||
812 | 812 | ||
813 | ret |
813 | ret |
814 | 814 | ||
815 | lsz i_colsyn, ru, "Color Synchronization" |
815 | lsz i_colsyn, ru, "Color Synchronization" |
816 | db 0 |
816 | db 0 |
817 | t_colsyn: |
817 | t_colsyn: |
818 | 818 | ||
819 | inc ebx |
819 | inc ebx |
820 | inc ecx |
820 | inc ecx |
821 | mov esi, ebx |
821 | mov esi, ebx |
822 | mov edi, ecx |
822 | mov edi, ecx |
823 | 823 | ||
824 | shr ebx, 5 |
824 | shr ebx, 5 |
825 | mov eax, ebx |
825 | mov eax, ebx |
826 | lea ebx, [ebx + ebx * 4] |
826 | lea ebx, [ebx + ebx * 4] |
827 | shl ebx, 1 ; 10/32 |
827 | shl ebx, 1 ; 10/32 |
828 | mov ebp, ebx |
828 | mov ebp, ebx |
829 | shl eax, 16 |
829 | shl eax, 16 |
830 | or ebx, eax |
830 | or ebx, eax |
831 | shl ebp, 16 |
831 | shl ebp, 16 |
832 | 832 | ||
833 | mov edi, 0x0000ffff |
833 | mov edi, 0x0000ffff |
834 | add ecx, 0x003FFF7F |
834 | add ecx, 0x003FFF7F |
835 | mov edx, edi |
835 | mov edx, edi |
836 | mov eax, 13 |
836 | mov eax, 13 |
837 | int 0x40 |
837 | int 0x40 |
838 | 838 | ||
839 | mov edx, 0x00ff0000 |
839 | mov edx, 0x00ff0000 |
840 | add ebx, ebp |
840 | add ebx, ebp |
841 | int 0x40 |
841 | int 0x40 |
842 | 842 | ||
843 | mov edx, edi |
843 | mov edx, edi |
844 | add ebx, ebp |
844 | add ebx, ebp |
845 | int 0x40 |
845 | int 0x40 |
846 | 846 | ||
847 | ret |
847 | ret |
848 | 848 | ||
849 | ; <--- initialised data ---> |
849 | ; <--- initialised data ---> |
850 | DATA |
850 | DATA |
851 | 851 | ||
852 | screenx dd 0 |
852 | screenx dd 0 |
853 | screeny dd 0 |
853 | screeny dd 0 |
854 | 854 | ||
855 | test_num dd 0 |
855 | test_num dd 0 |
856 | test_done dd 0 |
856 | test_done dd 0 |
857 | show_info dd 1 |
857 | show_info dd 1 |
858 | test_proc dd t_image_size, t_grid, t_horstr, t_vertstr,\ |
858 | test_proc dd t_image_size, t_grid, t_horstr, t_vertstr,\ |
859 | t_distort, t_horres, t_vertres, t_moire, t_revsharp, \ |
859 | t_distort, t_horres, t_vertres, t_moire, t_revsharp, \ |
860 | t_flicker, t_glare, t_interlace, t_scrreg, t_pricol, \ |
860 | t_flicker, t_glare, t_interlace, t_scrreg, t_pricol, \ |
861 | t_colint, t_colalign, t_colsyn, 0 |
861 | t_colint, t_colalign, t_colsyn, 0 |
862 | test_info dd i_image_size, i_grid, i_horstr, i_vertstr, \ |
862 | test_info dd i_image_size, i_grid, i_horstr, i_vertstr, \ |
863 | i_distort, i_horres, i_vertres, i_moire, i_revsharp, \ |
863 | i_distort, i_horres, i_vertres, i_moire, i_revsharp, \ |
864 | i_flicker, i_glare, i_interlace, i_scrreg, i_pricol, \ |
864 | i_flicker, i_glare, i_interlace, i_scrreg, i_pricol, \ |
865 | i_colint, i_colalign, i_colsyn, 0 |
865 | i_colint, i_colalign, i_colsyn, 0 |
866 | 866 | ||
867 | lsz press_space, ru, " ¦¬¨â¥ ¯à®¡¥« ¤«ï ¯à®¤®«¦¥¨ï," |
867 | lsz press_space, ru, " ¦¬¨â¥ ¯à®¡¥« ¤«ï ¯à®¤®«¦¥¨ï," |
868 | db 0 |
868 | db 0 |
869 | lsz press_i, ru, "I ¤«ï ¯¥à¥ª«î票ï ᢥ¤¥¨©," |
869 | lsz press_i, ru, "I ¤«ï ¯¥à¥ª«î票ï ᢥ¤¥¨©," |
870 | db 0 |
870 | db 0 |
871 | lsz press_c, ru, "¨ C ¤«ï ¯¥à¥ª«îç¥¨ï ªãàá®à " |
871 | lsz press_c, ru, "¨ C ¤«ï ¯¥à¥ª«îç¥¨ï ªãàá®à " |
872 | db 0 |
872 | db 0 |
873 | lsz header, ru, "¥áâ ¬®¨â®à " |
873 | lsz header, ru, "¥áâ ¬®¨â®à " |
874 | lsz test_finish, ru, "®¥æ â¥áâ . ¦¬¨â¥ ESC." |
874 | lsz test_finish, ru, "®¥æ â¥áâ . ¦¬¨â¥ ESC." |
875 | 875 | ||
876 | cursor dd 32*32 dup(0x00000000) ; ¢á¥ à ¢® ᮦ¬¥âáï |
876 | cursor dd 32*32 dup(0x00000000) ; ¢á¥ à ¢® ᮦ¬¥âáï |
877 | 877 | ||
878 | cursorVisible dd 1 |
878 | cursorVisible dd 1 |
879 | cursorID dd 0 |
879 | cursorID dd 0 |
880 | 880 | ||
881 | 881 | ||
882 | ; <--- uninitialised data ---> |
882 | ; <--- uninitialised data ---> |
883 | UDATA |
883 | UDATA |
884 | 884 | ||
885 | 885 | ||
886 | MEOS_APP_END |
886 | MEOS_APP_END |
887 | ; <--- end of MenuetOS application --->--->--->--->---->- |
887 | ; <--- end of MenuetOS application --->--->--->--->---->- |
888 | >--->--->--->---> |
888 | >--->--->--->---> |