lin = csrlin 'record current line col = pos(0) 'record current column locate 12, 36 'center the cursor print "Basmark" locate lin, col 'restore positionsaves the current vertical position of the cursor in the variable lin and the current horizontal position of the cursor in the variable col. It then moves the cursor to line 12, column 36, and prints the string "Basmark" there. Finally, it moves the cursor back to the saved position as specified by the values of lin and col.
The vertical cursor position is, of course, dependent on the number of rows on the userís screen. This is determined by examining the environment variable TERM and looking up the terminal in the systemís terminal capability database, either /etc/termcap or /usr/lib/terminfo. If the terminal type cannot be determined or the terminal capability database can not be accessed, the number of rows is assumed to be 24.
from The Basmark QuickBASIC Programmerís Manual by Lawrence Leinweber