NC BBC BASIC
BBC BASIC Programming on the NCs
If you already know a bit about programming in BBC BASIC, and want to know about programming the NC and it's differences to the BBC Micro, read on!
BBC BASIC Information
Entering and using BBC BASIC
Commands you can't use
The SOUND command
Using TIME$
Bugs in BASIC
File handling
Assembly language programming
Book list
Programming Tips
Tim's Tips for programming
FREE Software to Download
Software information pages
Software index
Data Sheets
Data Sheets index
BBC BASIC command reference
VDU commands
PLOT commands
BASIC error messages
OS error messages
Entering and using BBC BASIC
Press and and you will see the BASIC prompt.
To run a program automatically after pressing FUNCTION-B (as you might want to do with my Menu Master program), re-name the file as AUTO. To automatically run a second program after the first one has finished, name the second file NOTEPAD.RUN.
You will find that the cursor keys cannot be used to copy a line as on the BBC Micro. Instead, type
EDIT line
and then you can use the left and right cursor keys and the two delete
keys to edit the line.
This is also a quick way to copy a line -- just EDIT the line and change
its line number, press ENTER, and there will be two copies of the line.
Commands you can't use
The following commands can't be used because of differences in hardware. If you type them in you will get the 'Sorry' error message.
ADVAL -- There is no ADC.
COLOR / COLOUR / GCOL -- The NC only has a mono screen!
ENVELOPE -- The NC can only produce 'beeping' noises from it's speaker, so the ENVELOPE command will not work.
INKEY(-x) -- You can not use this syntax to check for a specific key (x) since only one key is registered at a time. Normal use with a positive parameter is allowed.
MODE -- The NC has only one mode.
*FX -- These are not accepted.
The SOUND command
The syntax of the SOUND command is...
SOUND c,a,p,d
...where...
'c' is the channel number, either 1 or 2 (There are only two channels)
'a' is the amplitude. This is ignored since there is only one amplitude.
'p' is the pitch. This is a multiple of four in the range 0 to 255.
One step of four is a jump of one semitone. One step of eight is a jump
of one tone.
'd' is the duration measured in 20th's of a second, i.e., a value of
20 gives a note lasting 1 second.
Using TIME$
The format of TIME$ is as follows :
ddd.nn mmm yyyy,hh:mm:ss
...where ddd is the day as a three-letter word, nn is the day as a two-digit number, mmm is the month as a three-letter word, yyyy is the year, hh is the hour in 24-hour format, mm is the minute, and ss is the second.
Bugs in BASIC
There are three 'bugs' that I have found whilst using BASIC. If you have found any more, please email me.
When using INKEY in a loop, it sometimes pauses the program execution.
You will have to press any key to continue.
Sometimes when EDITing a line, every keypress makes the whole line repeat
again and again on the screen. Press ENTER and the line will not be
corrupted.
When the text screen scrolls in a text window and there are characters
in the last column, parts of the last column are left on the screen.
Using CLS still fails to clear the remnants of the characters.
File handling
The NC200 differs from the BBC Micro in that it uses 12 character filenames and can support extensions using a separating dot, although files saved to disk need to be in MS-DOS format; maximum 8 characters plus a three character extension separated by a dot.
Assembly language programming
The NC machines can be programmed in assembly language, although the mnemonics will be for the








