Specifications

CARROLL TOUCH Appendix D - CTKERN Function Reference
Touch System Programmer’s Guide D-13
GetTouchState (1)
Description
This function returns the instantaneous touch state of the touch system.
Call with
AL = 1 (function number).
Returns
BH = Z-axis touch pressure.
BL = Touch state.
0 = Not touched (x, y set to last place screen was
touched).
1 = Touched (x, y set to where the screen is touched).
2 = Non-contiguous (x, y undefined).
CX = X coordinate.
DX = Y coordinate.
Notes
The x and y coordinates may be scaled and/or calibrated as defined by
the calibration and scaling parameters.
The default origin for the touch coordinate reports is the upper left
corner. This default origin may be changed by setting the scaling
parameters appropriately. See SetScalingParameters (9) for more
information about setting the default origin.
All touch coordinates reported are scaled and calibrated according to
the scaling and calibration modes and parameters that are in effect at the
time that the touch event occurred, not at the time that the coordinates
are reported. For example, if the scaling mode was set to fixed with
Xres, Yres set to 640, 200 and the screen was touched at the point
corresponding to 200, 100 and released, subsequent calls to
GetTouchState (1) report the touch state as not touched, x=200, y=100,
even if the scaling or calibration modes or parameters were changed.
If the touch screen has not been touched since CTKERN was loaded or
reset, the touch state is Not Touched (0), and the x and y coordinates are
both set to 0.
If z-axis scaling is disabled, the raw z-axis parameter reported by the
touch system is reported in BH. If z-axis scaling is enabled, the z-axis