<s>[INST] How can you delete a line or group of lines in a BBC BASIC program? [/INST] To delete a line, type its line number and press RETURN. To delete a set of lines, type DELETE followed by the range of line numbers. </s>


<s>[INST] What does the RENUMBER command do in BBC BASIC? [/INST] The RENUMBER command renumbers all the lines in the program so that they are in a tidy sequence. </s>


<s>[INST] How do you remove a program from the memory of a BBC Micro computer? [/INST] Use the command NEW or press the BREAK key. </s>


<s>[INST] How can you retrieve a removed program on a BBC Micro computer? [/INST] Type OLD and press RETURN, provided you haven't begun to type in a new program. </s>


<s>[INST] How do you delete a specific line in a BBC BASIC program? [/INST] To delete a specific line, type in just the line number and press RETURN. </s>


<s>[INST] How do you replace an existing line in a BBC BASIC program? [/INST] Type in a new line with the same line number as the existing one and press RETURN; the old line will be replaced by the new one. </s>


<s>[INST] How can you delete a range of lines in a BBC BASIC program? [/INST] To delete a range of lines, use the command DELETE followed by the first and last line numbers of the range, separated by a comma. </s>


<s>[INST] What caution should you exercise while deleting lines in a BBC BASIC program? [/INST] You cannot retrieve these lines once deleted unless you copy them from the screen before deletion. </s>


<s>[INST] What is the function of the RENUMBER command in BBC BASIC? [/INST] The RENUMBER command renumbers all lines in your program in a tidy sequence. </s>


<s>[INST] Write a BBC BASIC program to illustrate the function of the RENUMBER command [/INST] A program to illustrate the function of the RENUMBER command is
1 REM ** GOTO GOTO GOTO
2 REM WITH ACKNOWLEDGEMENTS TO
3 REM 'COMPUTERS IN SCHOOLS'
4 REM THE JOURNAL OF MUSE
15 GOTO 100
16 GOTO 95
40 N=N+1
44 END
57 IF N=18 THEN PRINT 'GOTO OR NOT TO GOTO'
60 IF N>35 THEN GOTO 110
78 GOTO 40
95 PRINT '**THE GOTO SHOW**': GOTO 40
100 N=0: GOTO 16
105 PRINT 'GOT TO GOTO GOTO NOW'
110 GOTO 44
115 PRINT 'GOTO OR NOT TO GOTO'; GOTO 60
</s>


<s>[INST] Does the RENUMBER command also update the line numbers in the GOTO statements? [/INST] Yes, the RENUMBER command updates the line numbers referred to in GOTO statements within the program. </s>


<s>[INST] How can you remove an existing program from the BBC Micro computer's memory? [/INST] Use the command NEW or press the BREAK key to remove the existing program from memory. </s>


<s>[INST] Is it possible to retrieve a program once it's been removed from the BBC Micro computer's memory? [/INST] Type OLD and press RETURN to retrieve a removed program, provided you haven't started typing in a new one. </s>


<s>[INST] How can you view the program currently in the BBC Micro computer's memory? [/INST] Use the LIST command to view the program currently in memory. </s>


<s>[INST] What are the display modes available in Model A BBC computer? [/INST] The Model A BBC computer can display text and graphics in four different modes. </s>


<s>[INST] How many display modes are available in Model B BBC computer? [/INST] The Model B BBC computer can show eight different modes. </s>


<s>[INST] What is unique about Teletext Mode in BBC computers? [/INST] Teletext Mode (MODE 7) differs from all other modes in several ways such as difficulty in drawing lines or triangles and special changes in text color. </s>


<s>[INST] How do you enter MODE 5 on a BBC computer? [/INST] To enter MODE 5, type MODE 5 and press RETURN. </s>


<s>[INST] What colors can be displayed in MODE 5? [/INST] MODE 5 is a four-color mode with colors black, red, yellow, and white. </s>


<s>[INST] How do you change the text color in BBC BASIC? [/INST] Use the COLOUR statement, followed by a number corresponding to the desired color. </s>


<s>[INST] How can the background color be changed in BBC BASIC? [/INST] Use COLOUR commands such as COLOUR 128 for black, COLOUR 129 for red, COLOUR 130 for yellow, and COLOUR 131 for white. </s>


<s>[INST] What is the GCOL command used for in BBC BASIC? [/INST] GCOL is used to change the color of graphics. </s>


<s>[INST] How are coordinates specified when drawing lines and triangles in BBC BASIC? [/INST] Coordinates are specified with two numbers: the x and y coordinates. </s>


<s>[INST] Write a program to draw a line from point 1000,0 to 1000,1000. [/INST] A program to draw a line is
MOVE 1000,0
DRAW 1000,1000
</s>


<s>[INST] What command moves the cursor without drawing a line in BBC BASIC? [/INST] Use the MOVE command to move the cursor without drawing a line. </s>


<s>[INST] How do you set up a graphics window in BBC BASIC? [/INST] Use the VDU 24 command, followed by four values to specify the window's dimensions. </s>


<s>[INST] How do you set up a text window in BBC BASIC? [/INST] Use the VDU 28 command, followed by four values to specify the window's dimensions. </s>


<s>[INST] How can you clear the text area in BBC BASIC? [/INST] Use the CLS command to clear the text area. </s>


<s>[INST] How can you clear the graphics area in BBC BASIC? [/INST] Use the CLG command to clear the graphics area. </s>


<s>[INST] What is the role of VDU 26 command in BBC BASIC? [/INST] VDU 26 resets both text and graphics windows to fill the whole screen. </s>


<s>[INST] What does VDU 5 enable in BBC BASIC? [/INST] VDU 5 allows text to be drawn at any position inside a graphics window. </s>


<s>[INST] Write a BBC BASIC program to set text and graphics areas and draw lines. [/INST] A program to set text and graphics areas and draw lines is
10 MODE 5
20 VDU 24, 0; 0; 500; 1000;
30 VDU 28,10,20,19,5
40 COLOUR 129
50 COLOUR 2
60 GCOL 0,130
70 CLS : CLG
80 FOR N=1 TO 1000
90 PRINT 'LINE'; N
100 GCOL 0, RND (4)
110 DRAW RND(500), RND(1000)
120 NEXT N
RUN
</s>


<s>[INST] What does the TAB statement do in BBC BASIC? [/INST] The TAB statement starts printing at a specific place on the screen. </s>


<s>[INST] How many characters can a line have in the MODE 7 in BBC BASIC? [/INST] MODE 7 has 40 characters. </s>


<s>[INST] Write a BBC BASIC program to print the value of F and 2*F at specific positions on the screen. [/INST] A program to do this is
10 PRINT '012345678901234567890'
20 F=16
30 REPEAT
40 PRINT TAB(10);F;TAB(15);2*F
50 F=F+1
60 UNTIL F=18
</s>


<s>[INST] What will happen if you put a space between TAB and its argument? [/INST] The computer will not understand and will report 'No such variable.' </s>


<s>[INST] What happens if you are beyond the place you specify with TAB in BBC BASIC? [/INST] The computer moves to the next line and then tabs to the specified place. </s>


<s>[INST] Write a BBC BASIC program that counts to 1000, printing each number at specific X and Y text coordinates. [/INST] A program to do this is
5 CLS
10 Q=1
20 REPEAT
30 PRINT TAB(18,5);Q
40 Q=Q+1
50 UNTIL Q=1000
</s>


<s>[INST] How does PRINT TAB(X,Y) differ from PRINT TAB(X) in BBC BASIC? [/INST] PRINT TAB(X,Y) allows text to be printed at any specific X and Y character location on the screen. </s>


<s>[INST] Write a BBC BASIC program to subscript the chemical formula H2. [/INST] A program to do this is
10 MODE 4
20 VDU 5
30 MOVE 500,500
40 PRINT 'H'
50 MOVE 532,484
60 PRINT '2'
70 VDU 4
</s>


<s>[INST] What is the purpose of the VDU 5 statement in BBC BASIC? [/INST] VDU 5 enables text to be printed at the exact position of the graphics cursor. </s>


<s>[INST] What limitations are there when using VDU 5 in BBC BASIC? [/INST] VDU 5 does not work in text-only modes like MODES 3, 6, and 7. Also, you can only print things in the graphics window and not in the text window. </s>


<s>[INST] How can the text cursor be moved in BBC BASIC? [/INST] The text cursor can be moved with special control codes, PRINT TAB(X,Y), or the VDU command. </s>


<s>[INST] What VDU command moves the cursor to the 'home' position at the top left of the screen? [/INST] The VDU 30 command moves the cursor to the 'home' position. </s>


<s>[INST] How can you turn off the flashing cursor in BBC BASIC? [/INST] The flashing cursor can be turned off with the statement VDU 23;8202;0;0;0;. </s>


<s>[INST] How can you turn the cursor back on in BBC BASIC? [/INST] The cursor can be turned back on with the MODE statement. </s>