From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: Dos char set Organization: Pin Eight Software http://pineight.8m.com/ Message-ID: <0fifjsgugpmpuvrkkp0rnthddapuliqrf0@4ax.com> References: <8h7nqr$6u9$1 AT nnrp1 DOT deja DOT com> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 26 X-Trace: /K+neRjWIXvM1br9ap/xpiEoNdfUlRvn7vcpn3vb3P8W13gONsCcvhpI/fNerrj4eDh8wWSunNzm!gLgqfo7kS5ZarAZIt6EIPLxj042YvLaXmuc4gB+v46WxFQ/7o2s8uYoWMWAuAEVhU+LUSHSTtvS2!l7TG X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Fri, 02 Jun 2000 14:53:07 GMT Distribution: world Date: Fri, 02 Jun 2000 14:53:07 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Fri, 02 Jun 2000 07:30:34 GMT, rob89 AT my-deja DOT com wrote: >After this I could have some sort of for loop which goes through the >rows and columns and checks if there is a pixel there and if there is, >display it on the screen using some function(say putpixel.). The code >has the following line which checks if there is a pixel in the >corresponding location: > >if((ch_table[string[index]][row] << column) & 0x80) > >I completely understand ch_table[string[index]][row] part, which first >of all goes to the character to be displayed, but then I don't >understand why we have to shift left (<< column) and most importantly >why do we have to use masking (&0x80). The ROM font is stored as a monochrome bitmap to save space in ROM (each row is one byte), and you have to use shifting to convert a monochrome bitmap to 8-bit. -- Damian Yerrick "I refuse to listen to those who refuse to listen to reason." See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html This is McAfee VirusScan. Add these two lines to your signature to prevent the spread of signature viruses. http://www.mcafee.com/