Table des matières

INT 0x10 - 0x04 - Read Light Pen Position

Not available on VGA

Request/Call:

reg value descr
AH 0x04

Return:

reg descr
AH 0 : light pen switch not triggered
1 : light pen triggered
BX pixel column (0-319 or 0-639, mode dependent)
CH raster line (0-199) (CGA and EGA modes 4, 5 and 6)
CX raster line (EGA modes except 4, 5 and 6)
DH row (0-24)
DL column (0-79 or 0-79 mode dependent)

Notes & Comments

  • data returned as a byte coordinate, leaving horizontal accuracy to within 2 pixels (320) or 4 pixels (640)
  • on a CGA, returned column numbers are always multiples of 2 (320-column modes) or 4 (640-column modes)
  • vertical accuracy within 2 lines
  • PS/2's don't support the light pen interface

Back