I've done it in assembler... I don't know how to make the compiler generate
that kind of code...
Program memory usage should be about 30 words, execution time roughly 300 Tcy
or 0.3 milliseconds at 4MHz.
var byte char_start, char_size
-- missing: set char_start and char_size to the appropriate values
var byte char_90deg[8] -- this sketch is for 8x8 font maximum
var byte*8 char_90deg_large_number at char_90deg
var byte char_pixline
char_90deg_large_number=0
for char_size using line_counter loop
-- shifting a large number is more efficient than shifting eight single
-- bytes
char_90deg_large_number=char_90deg_large_number<<1
char_pixline=fontlookup[char_start+line_counter]
assembler
btfsc char_pixline,0
bsf char_90deg+0
btfsc char_pixline,1
bsf char_90deg+1
btfsc char_pixline,2
bsf char_90deg+2
btfsc char_pixline,3
bsf char_90deg+3
btfsc char_pixline,4
bsf char_90deg+4
btfsc char_pixline,5
bsf char_90deg+5
btfsc char_pixline,6
bsf char_90deg+6
btfsc char_pixline,7
bsf char_90deg+7
end assembler
end loop
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en.