Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/06/03 02:40
Read: times


 
#50149 - RE: 5x7 character mapping
Responding to: ???'s previous message
"I'd have to still math the ASCII value so that it looks up the correct array. I'm only implementing 0x20-0x7E."

Still, you should be able to "directly" address a character's table entry, since you know you are using the ASCII sequence and that you are starting your table with "space" (0x20). Can you not simply subtract off the offset? For example, assuming the use of Michael's character table...
void print_char(char c)
{
    unsigned char *raster_line_ptr;

    /* Point to the character's first raster line.
     */
    raster_line_ptr = &chr5x7[(c & 0x7F) - ' '][0];

    /* Output 5 raster lines...
     */
}


List of 14 messages in thread
TopicAuthorDate
5x7 character mapping            01/01/70 00:00      
   RE: 5x7 character mapping            01/01/70 00:00      
   RE: 5x7 character mapping            01/01/70 00:00      
   RE: 5x7 character mapping            01/01/70 00:00      
      RE: 5x7 character mapping            01/01/70 00:00      
   RE: 5x7 character mapping            01/01/70 00:00      
      RE: 5x7 character mapping            01/01/70 00:00      
         RE: 5x7 character mapping            01/01/70 00:00      
            RE: 5x7 character mapping            01/01/70 00:00      
            RE: 5x7 character mapping            01/01/70 00:00      
               RE: 5x7 character mapping            01/01/70 00:00      
            RE: 5x7 character mapping            01/01/70 00:00      
               RE: 5x7 character mapping            01/01/70 00:00      
                  RE: 5x7 character mapping            01/01/70 00:00      

Back to Subject List