Together, the system variables TCHX, TCHY, TCHST and TCHTIME (all read-only integers) indicate activity on the touchscreen.

When the stylus is detected on the touchscreen, TCHX and TCHY are set to the location of the touch, TCHST is set to 1, and TCHTIME starts counting. As long as the stylus stays in contact with the screen, TCHX and TCHY will follow the contact point and TCHTIME will keep increasing. As soon as the stylus is removed, TCHST is set to 0, and TCHTIME is set to 0 and will stop. TCHX and TCHY will retain their last values, so even when the stylus is up, you can read the last location it was detected.

TCHX appears to have a range of 0 to 255 inclusive, and TCHY appears to have a range of 0 to 191 inclusive. TCHTIME appears to use frames as the unit of time.