changeset 705:55983c4d6b2d

aa fonts processor
author heinrichsweikamp
date Mon, 15 Apr 2013 21:13:14 +0200
parents 422b9eeace4f
children d68c6a6b1f38
files code_part1/OSTC_code_asm_part1/aa_wordprocessor.asm code_part1/OSTC_code_asm_part1/display_lowlevel.asm
diffstat 2 files changed, 27 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/aa_wordprocessor.asm	Fri Mar 29 20:53:41 2013 +0100
+++ b/code_part1/OSTC_code_asm_part1/aa_wordprocessor.asm	Mon Apr 15 21:13:14 2013 +0200
@@ -350,6 +350,32 @@
 		movf	aa_temp+0,W,ACCESS      ; hence composants won't overlap.
 		addwfc	PRODH,F				    ; In right order, to propagate carry.
 
+        movff   win_flags,WREG          ; BEWARE: bank0 bit-test
+        btfss   WREG,1                  ; Display1?
+        bra		aa_decode_3			    ; No, Done.
+
+        ; Convert 16Bit RGB b'RRRRRGGG GGGBBBBB' into 24Bit RGB b'00RRRRRR 00GGGGGG 00BBBBBB'
+        ; Blue
+        movff   PRODH,win_color3
+        bcf     STATUS,C
+        rlcf    win_color3,F            ; = U0BBBBB0
+        bcf     win_color3,7            ; = 00BBBBB0
+        ; Green
+        rrcf    PRODL,F
+        rrcf    PRODH,F
+        rrcf    PRODL,F
+        rrcf    PRODH,F
+        rrcf    PRODL,F                 ; = UUURRRRR
+        rrcf    PRODH,F                 ; = GGGGGGUU
+        bcf     STATUS,C
+        rrcf    PRODH,F                 ; = 0GGGGGGU
+        bcf     STATUS,C
+        rrcf    PRODH,F                 ; = 00GGGGGG
+        ; Red
+        bcf     STATUS,C
+        rlcf    PRODL,F                 ; = UURRRRR0
+        bcf     PRODL,6                 ; = U0RRRRR0
+        bcf     PRODL,7                 ; = 00RRRRR0
 		bra		aa_decode_3			    ; Done.
 
 		; ---- Simple BLACK and WHITE cases ------------------------------
--- a/code_part1/OSTC_code_asm_part1/display_lowlevel.asm	Fri Mar 29 20:53:41 2013 +0100
+++ b/code_part1/OSTC_code_asm_part1/display_lowlevel.asm	Mon Apr 15 21:13:14 2013 +0200
@@ -753,7 +753,7 @@
     movff   win_flags,WREG          ; Display1? win_flags is in bank0...
     btfss   WREG,1                  ; Display1?
     return                          ; No, done.
-    movff   win_color3,PORTD        ; Move low byte to PORTD
+    movff   win_color3,PORTD        ; Move low(est) byte to PORTD
 	bcf		DISPLAY_rw
 	bsf		DISPLAY_rw
 	return