Use the TOUCH command. It will return three values...
TS - Time the screen has been touched, 0 otherwise. Increments each 1/100 second.
TX and TY - The coordinates of the last point touched. As all other coordinates in SmileBASIC, the Y axis is reversed.
You can use the TOUCH command with this syntax...
TOUCH OUT TS,TX,TY
After that, you can simply use the values of TS, TX and TY.