RosettaCodeData/Task/Terminal-control-Cursor-movement/BASIC/terminal-control-cursor-movement.basic
2023-07-01 13:44:08 -04:00

16 lines
409 B
Text

10 'move left
20 LOCATE , POS(0) - 1
30 'move right
40 LOCATE , POS(0) + 1
50 'move up
60 LOCATE CSRLIN - 1
70 'move down
80 LOCATE CSRLIN + 1
900 'beginning of line
100 LOCATE , 1
110 'end of line; requires previous knowledge of screen width -- typically 80
120 LOCATE , 80
130 'top left corner
140 LOCATE 1, 1
150 'bottom right corner; requires knowledge of screen dimensions (80x25 here)
160 LOCATE 25, 80