INT 10h, 04h (4) Read Light-Pen Position
Reports the position and status of the light pen.
On entry: AH 04h
Returns: AH Status (0=not triggered, 1=triggered)
BX Pixel column number (0-639)
CH Pixel line number (0-199)
CX Pixel line number for modes 0Fh-10h (0-nnn)
DH Character row number (0-24)
DL Character column number (0-39 or 0-79)
Registers destroyed: AX, SP, BP, SI, DI
--------------------------------------------------------------------------
Notes: The position is reported in two forms: the character
position (row in DH, column in DL), and the pixel
location (raster line in CH, column/dot in BX).
For the PC Convertible, if AH is 0 upon return, the
light pen is not supported.
The pixel coordinates for the light pen position are
not precise. The y coordinate is always a multiple
of 2, while the x coordinate is a multiple of 4 for
the 320 x 200 graphics mode and a multiple of 8 for
the 640 x 200 graphics mode.
This page last updated on Fri Nov 30 10:49:50 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster