To return the current cursor row number.
y=CSRLIN
CSRLIN
returns the cursor’s line (row) number. POS returns the cursor’s column number.
' Save cursor row and column
saveline = CSRLIN
savecol = POS(0)
' Move to line 10, column 20
LOCATE 10, 20: PRINT "Message at 10, 20"
' Restore cursor to previous position
LOCATE saveline, savecol