Acorn Computers BBC Micro Model B w/8271 — Acorn BBC Micro Model B w/8271 User Guide Manual PDF

65 Cursor control The text cursor is the flashing line on the screen which shows where text will appear if it is typed in on the keyboard. The text cursor also indicates where text will be printed on the screen by a PRINT statement. The cursor can be moved around the screen by a number of special ‘control codes’, some of which are as follows. Code Effect 8 Move cursor left 9 Move cursor right 10 Move cursor up 11 Move cursor down These code numbers can be used with either the VDU command or the PRINT command – eg to move left four spaces, use either or VDU 8,8,8,8 PRINT CHR$(8);CHR$(8);CHR$(8);CHR$(8) Clearly the VDU command is simpler to type in in most cases.

In addition to the codes shown above the user can use the PRINT TAB(X,Y) statement to move the cursor directly to any character position on the screen. As we’ve seen in MODE 7 the screen can contain up to 25 lines (numbered 0 to 24) of up to 40 characters per line. The position marked on the diagram above is 18 positions across and six lines down. The cursor could be moved directly there with the statement PRINT TAB(18,6); Note that the opening parenthesis must immediately follow the word TAB thus TAB( and not TAB ( .