Appendix 5. BASIC on the Junior Computer

Although the Junior Computer is quite fluent in machine language, its linguistic skills cannot lead to full ‘adult’ communication until the machine has learned a ‘high level’ language, such as BASIC. A specially adapted version of BASIC is now available on cassette from the Microsoft/Johnson Computer Corporation, which will enable Junior Computer operators to fulfil their dreams at long last.

Part one

BASIC still remains the number one computer language. Although it may not be as grammatical and efficient as other languages (such as COMAL or PASCAL), its popularity shows that it meets the essential requirements of computer users all over the world. Thanks to Microsoft, who developed an excellent version of BASIC for the KIM computer some time ago, the Junior Computer can now be made bilingual, its ‘mother tongue’ being machine language of course. Even with the addition of a BASIC vocabulary, machine language still plays an important role in various routines and timing processes etc., so there is no question of it being completely replaced. That is a relief for readers who have stayed up to all hours getting to grips with the machine language instruction set! The KB9 BASIC by Microsoft is a nine digit 8k BASIC on cassette. Since this was originally developed for the KIM, it will have to be modified before it will run on the Junior Computer. Contrary to what might be expected, this is a straightforward operation that takes a mere fifteen minutes or so. This is nothing compared to the thousands of man-hours involved in developing the Microsoft BASIC. Only 31 of the eight thousand memory locations need to have their contents altered. Now to discover what ingredients are required to “cook up' a BASIC on the Junior Computer.

The ingredients

First of all, what about the hardware? Obviously, the computer will have to be a fully extended version. In addition, 16k of RAM has to be located






So much for the theory . . .

Table 2 shows how to modify the B1 file. Start by loading KB-9 into the Junior Computer memory. Then modify the contents of addresses $37C3, 37D0 ... 37DD, the ROR instructions used by the addition and subtraction programs. After $37DE, the ‘old’ instruction set may be substituted for B2 instructions. The ones contained in page 1A are stored in the $37DE ... 37EF address range (see section II of table 1). Then change the multiplication routine instructions: $38C3 ... 38D1 (Table 2, section V).

All that remains to be done is to adjust the absolute addresses belonging to the ‘old’ B2 instructions in the manner shown in Table 2, section VI. B1 and B2 will now constitute a new file which could be christened BB, for example, to avoid confusion. Readers will find the alterations speed up the Junior BASIC considerably and improve its overall performance. The division programs are not affected, as they include the ROL instruction and very Hittle would be gained by changing the addition/subtraction operations.

Literature:

BYTE, May 1981, Faster BASIC for the Ohio Scientific, J. Sauter, page 236
BYTE, September 1981, Byte's bugs, page 110
Elektor, April 1982, E84, ‘BASIC on the Junior Computer’
Elektor, April 1982, E84, ‘Dynamic RAM card’