Chapter Three
BASICODE - THE SPECIFICATIONS
Tone Modulation
Two tones are used to record data onto cassette tape, the frequencies are 1200 and 2400 Hz. A "0" is defined as one full cycle of 1200 Hz.

A "1" is defined as two full cycles of 2400 Hz.
Sequence code
The speed of BASICODE is 1200 Baud. A byte comprises the following sequence:
1 startbit (logic 0)
8 databits (the least significant first)
2 stopbits (logic 1)
For example:
BASIC information
The BASIC program is coded either in the form in which it has been typed in, or as it is displayed on the screen when the command LIST is given. In most cases, however, this is
not the form in which it is retained in the computer's memory.
All letters and ciphers are presented in American Standard Code for Information Interchange (ASCII), and each BASIC line is closed with
CR (Hex 8D). Each ASCII byte in the program receives an eighth bit=1.
The tone sequence
The cassette tape recording of a BASICODE program will consist of:
Leader: 5 seconds of stopbit(=2400 Hz)
ASCII
Start Text (Hex 82)
BASIC Information in ASCII
Checksum
Trailer: 5 seconds of stopbit(=2400 Hz)
Checksum
A note about the checksum. This is a simple code used to check that the program has been read from the tape successfully. If an error is indicated by the checksum then BASICODE-2 will tell you and you should list the program and correct the error. Then you can SAVE the program in the usual way.
Technical note: the checksum is a number stored as an 8 bit computer word. It is calculated by performing an
exclusive - or on all the previous bytes in the block. Unlike all the other transmitted ASCII characters, the checksum's eighth bit is not set to "1" but may be "1" or "0".
The improved BASICODE-2
The idea of the first BASICODE was to be able to transmit machine-readable programs over the air. For the most part this worked extremely well. A program from microcomputer X could be read by computer Y, simply by using the BASICODE translation code tape in between. The regular transmission of BASICODE programs since 1979 by the Dutch domestic service (NOS) showed that BASICODE was extremely reliable, often better than the computer's own cassette interface standard. Radio amateurs in the Netherlands soon obtained permission from the Dutch PTT to experiment with computer data transfer using BASICODE, and excellent results have been reported using VHF links.
However, the regular broadcasts also highlighted some of the limitations of the original BASICODE, mostly as a result of the various BASIC dialects. The rules of the original protocol did not work in all cases.
So, based on experience, improvements were made to the standard to create BASICODE-2. The working of various BASIC instructions was examined in the various dialects. In doing so, many differences were discovered. However, there was common ground amongst the computers taking part in the BASICODE working group.
All computers worked in Microsoft-BASIC, or had the possibility of doing so. A subset of standard BASIC instructions has now been drawn up, which has the same meaning in all the various BASIC dialects. These are dealt with in more detail in
the next chapter. There are also a number of very important functions which are brought into action using different commands on different computers. These include the clearing of the screen and the commands to a printer.
The solution in this case is in the form of subroutines on agreed fixed BASIC line numbers. The subroutines are of course different for each brand of computer, but they all work in much the same way. The subroutines are called when a particular function is required.
This means a new discipline in programming and the adjustment of existing programs to meet the new standard. However, the effort appears to be worth the trouble, since BASICODE-2 programs now work on many brands of computer without having to be adjusted by the user before they will run.
The subroutines are contained in the BASICODE-2 translation programs in Side 1 as part of the loading sequence and therefore do not have to be part of BASICODE-2 programs you exchange with other users. The cassette with this handbook contains the translation programs you will need. In most cases it is possible to choose whether or not the subroutines are read or recorded with the main BASICODE program.
BASICODE-2 is now the fruit of some years of experiments and is a practical medium of data transfer. It is a simple solution in cases where programs have to be distributed to a number of computer brands.