LOCATE sets the text cursor on the screen.
10 LOCATE 0,0
Places the cursor in the top left-hand corner.
LOCATE is most useful for locating the cursor before printing text onto the display. LOCATE operates differently in text mode and graphics mode.
The maximum values for the parameters are X = 79 and Y = 23, being the size of the virtual screen.
Values greater than the maximum for X will cause wrap-around on the same line. Values greater than the maximum for Y will remain at the bottom of the screen.
SCREEN 1command will reset the cursor to the origin at (0,0). When character set zero is selected the LOCATE co-ordinates are referenced to the graphics pixel position. Otherwise, the co-ordinates specified in LOCATE refer to the top left hand pixel of a 7 x 5 character cell, the size of which is equivalent to a CHAR1 character.