comparison code_part1/OSTC_code_asm_part1/aa_wordprocessor.asm @ 705:55983c4d6b2d

aa fonts processor
author heinrichsweikamp
date Mon, 15 Apr 2013 21:13:14 +0200
parents 6e456a6398e0
children d68c6a6b1f38
comparison
equal deleted inserted replaced
704:422b9eeace4f 705:55983c4d6b2d
348 movf aa_temp+1,W,ACCESS ; Add color/4 348 movf aa_temp+1,W,ACCESS ; Add color/4
349 addwf PRODL,F ; NOTE: 7/31+15/31=22/31, 349 addwf PRODL,F ; NOTE: 7/31+15/31=22/31,
350 movf aa_temp+0,W,ACCESS ; hence composants won't overlap. 350 movf aa_temp+0,W,ACCESS ; hence composants won't overlap.
351 addwfc PRODH,F ; In right order, to propagate carry. 351 addwfc PRODH,F ; In right order, to propagate carry.
352 352
353 movff win_flags,WREG ; BEWARE: bank0 bit-test
354 btfss WREG,1 ; Display1?
355 bra aa_decode_3 ; No, Done.
356
357 ; Convert 16Bit RGB b'RRRRRGGG GGGBBBBB' into 24Bit RGB b'00RRRRRR 00GGGGGG 00BBBBBB'
358 ; Blue
359 movff PRODH,win_color3
360 bcf STATUS,C
361 rlcf win_color3,F ; = U0BBBBB0
362 bcf win_color3,7 ; = 00BBBBB0
363 ; Green
364 rrcf PRODL,F
365 rrcf PRODH,F
366 rrcf PRODL,F
367 rrcf PRODH,F
368 rrcf PRODL,F ; = UUURRRRR
369 rrcf PRODH,F ; = GGGGGGUU
370 bcf STATUS,C
371 rrcf PRODH,F ; = 0GGGGGGU
372 bcf STATUS,C
373 rrcf PRODH,F ; = 00GGGGGG
374 ; Red
375 bcf STATUS,C
376 rlcf PRODL,F ; = UURRRRR0
377 bcf PRODL,6 ; = U0RRRRR0
378 bcf PRODL,7 ; = 00RRRRR0
353 bra aa_decode_3 ; Done. 379 bra aa_decode_3 ; Done.
354 380
355 ; ---- Simple BLACK and WHITE cases ------------------------------ 381 ; ---- Simple BLACK and WHITE cases ------------------------------
356 aa_decode_13: ; Got a 1xx or a 000 code... 382 aa_decode_13: ; Got a 1xx or a 000 code...
357 btfsc win_invert,0 ; Inverse video mode ? 383 btfsc win_invert,0 ; Inverse video mode ?