Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TASM 2.x / MASM 6.x Assembly Language - <b>int 10h, 0ch (12) write pixel</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
INT 10h,  0Ch (12)       Write Pixel

    Writes a pixel dot of a specified color at a specified screen
    coordinate.

       On entry:      AH         0Ch
                      AL         Pixel color
                      CX         Horizontal position of pixel
                      DX         Vertical position of pixel
                      BH         Display page number (graphics modes with
                                 more than 1 page)

       Returns:       None

       Registers destroyed:      AX, SP, BP, SI, DI

  --------------------------------------------------------------------------
                             Legal values

  Mode   CX (Horizontal)  DX (Vertical)   AL (Pixel Color)   BH (Page Number)
  04h      0-319            0-199             0-3
  05h      0-319            0-199             0-3
  06h      0-639            0-199             0-1
  0Dh      0-319            0-199             0-15                  0-7
  0Eh      0-639            0-199             0-15                  0-3
  0Fh      0-639            0-349             0-1                   0-1
  10h      0-639            0-349             0-15                  0-1
  --------------------------------------------------------------------------

       Notes:         If the pixel color (AL) is specified with bit 7 set,
                      the color bits of the pixel are XORed with the color
                      bits of the current pixel at the specified
                      coordinate. You can use this feature to write
                      characters and then erase them.

                      For modes 0Dh through 10h, a page number needs to be
                      supplied in BH.

See Also: INT 10h, 0Dh

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