Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Peter Norton Programmer's Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  Service 08H (decimal 8) is used to read characters "off the screen," that
  is, directly out of the display memory. This service is unusually spiffy
  because it works in both text and graphics modes.

  In graphics modes, the same character-drawing tables used to write
  characters are also used to recognize them by a pattern-matching
  operation. Even if you create your own character set in graphics mode,
  this service will be able to recognize them. In text modes, of course, the
  ASCII character codes are directly available in the display memory.

  Service 08H returns the ASCII character code of the character in AL. (See
  Figure 9-8.) In graphics modes, if the character doesn't match any
  characters in the graphics character set, the ROM BIOS returns ASCII code
  0. In text modes, the service also returns the character's color
  attributes in AH. Remember to specify a display page number in BH when you
  call this service.

  Service Number Parameters                   Returns
  --------------------------------------------------------------------------
  AH = 08H       BH = active display          AL = ASCII character read from
                 page number                  cursor location
                                              AH = attribute of text
                                              character (text modes only)
  --------------------------------------------------------------------------

  Figure 9-8.  The registers used to read a character and attribute with
  service 08H.

  See page 82 for more on text characters and attribute bytes. See page
  84 for more on text- and graphics-mode characters. See Appendix C for
  more on ASCII characters.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson