Rev 1168 | Rev 2288 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1168 | Rev 1264 | ||
---|---|---|---|
Line 9... | Line 9... | ||
9 | ;; ;; |
9 | ;; ;; |
10 | ;; Paul Butcher, paul.butcher@asa.co.uk ;; |
10 | ;; Paul Butcher, paul.butcher@asa.co.uk ;; |
11 | ;; ;; |
11 | ;; ;; |
12 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
12 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 13... | Line 13... | ||
13 | 13 | ||
Line 14... | Line 14... | ||
14 | $Revision: 1168 $ |
14 | $Revision: 1264 $ |
Line 15... | Line 15... | ||
15 | 15 | ||
Line 173... | Line 173... | ||
173 | mov edx,200 |
173 | mov edx,200 |
174 | mov ecx,320 |
174 | mov ecx,320 |
175 | cld |
175 | cld |
176 | m13pix: |
176 | m13pix: |
177 | lodsd |
177 | lodsd |
178 | cmp eax,0 |
178 | test eax,eax |
179 | je .save_pixel |
179 | jz .save_pixel |
180 | push eax |
180 | push eax |
181 | mov ebx,eax |
181 | mov ebx,eax |
182 | and eax,(128+64+32) ; blue |
182 | and eax,(128+64+32) ; blue |
183 | shr eax,5 |
183 | shr eax,5 |
184 | and ebx,(128+64+32)*256 ; green |
184 | and ebx,(128+64+32)*256 ; green |
Line 257... | Line 257... | ||
257 | mov ch,4 |
257 | mov ch,4 |
258 | .main_loop: |
258 | .main_loop: |
259 | mov cl,8 |
259 | mov cl,8 |
260 | .convert_pixels_to_VGA: |
260 | .convert_pixels_to_VGA: |
261 | lodsd ; eax = 24bit colour |
261 | lodsd ; eax = 24bit colour |
262 | cmp eax,0 |
262 | test eax,eax |
263 | je .end |
263 | jz .end |
264 | rol eax,8 |
264 | rol eax,8 |
265 | mov al,ch |
265 | mov al,ch |
266 | ror eax,8 |
266 | ror eax,8 |
267 | mov ch,1 |
267 | mov ch,1 |
268 | dec cl |
268 | dec cl |
Line 333... | Line 333... | ||
333 | add edi, VGABasePtr ; address of pixel in VGA area |
333 | add edi, VGABasePtr ; address of pixel in VGA area |
334 | and ecx,0x07 ; bit no. (modulo 8) |
334 | and ecx,0x07 ; bit no. (modulo 8) |
335 | pushfd |
335 | pushfd |
336 | ; edi = address, eax = 24bit colour, ecx = bit no. (modulo 8) |
336 | ; edi = address, eax = 24bit colour, ecx = bit no. (modulo 8) |
337 | xor edx,edx |
337 | xor edx,edx |
338 | cmp eax,0 |
338 | test eax,eax |
339 | je .p13cont |
339 | jz .p13cont |
340 | cmp al,85 |
340 | cmp al,85 |
341 | jbe .p13green |
341 | jbe .p13green |
342 | or dl,0x01 |
342 | or dl,0x01 |
343 | cmp al,170 |
343 | cmp al,170 |
344 | jbe .p13green |
344 | jbe .p13green |