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 0CH (decimal 12) writes an individual pixel. You specify the
  pixel's location on the screen by passing its column (x-coordinate) in
  register CX and its row (y-coordinate) in DX. Remember that pixel rows and
  columns are not the same as the character row and column you use in other
  services to locate the cursor or to display a character. Pixel coordinates
  correspond to individual dots, not to characters.

  If you're using a graphics mode that supports multiple display pages, be
  sure to specify the display page number in register BH. (See Figure
  9-12.) Also, when you specify the pixel's color in register AL, you have
  the option of setting bit 7 of the color value to 1. As in service 09H,
  this tells the BIOS to display the pixel with an XORed color value. (See
  service 09H for an explanation.)

  Service Number           Parameters
  --------------------------------------------------------------------------
  AH = 0CH                 AL = pixel color
                           BH = display page number
                           DX = row number of pixel
                           CX = column number of pixel
  --------------------------------------------------------------------------

  Figure 9-12.  The registers used to write a pixel using service 0CH.

  See page 91 for more on pixels in graphics modes.

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