BBC Basic on an Atom? Reg Parsons finds the BBC ROM card a bit of a spanner in the works.
When Acorn advertised a ROM card for RUNning BBC Basic on the Atom I quickly placed my order.
I’d taken delivery of the 8K+2K Atom with floating-point ROM a few months earlier, and during the period of learning to drive it became aware of its limitations. I soon fitted a power utility ROM and expanded the RAM via the full Atom complement to an additional 32K offboard Timedata Dynamic RAM card, fitted inside the Atom case.
This was configured to occupy the whole of the lower text space, and provided 38K of continuous RAM. Then I added the 6522 Versatile Interface Adaptor and a printer buffer set.
The Atom ROM card seemed an attractive proposition, even though I knew that less than half the available RAM would be free for use in BBC mode.
When the board eventually turned up I immediately discovered two snags. First, there was no way in which it would fit in its intended slot inside the case while the Timedata RAM card was there. And although the ‘Comprehensive BBC-type Basic Manual’ gave detailed fitting instructions, it didn’t live up to its description – it was inadequate in providing working information on the BBC dialect. Nor was a circuit diagram supplied.
I had to remove the internally fitted memory board and house it externally, with a ribbon cable and socket connection to the external Atom bus. Meanwhile, I ordered a copy of the BBC Basic User’s Guide.
When the manual turned up I got down to the business of installing the board and evaluating it from the point of view of – by now – a seasoned Atom user.
When the board was fitted, all the internal lower text-space RAM was removed, including Zero Page, together with IC6, and the connection to pin 12 of IC5 was disabled in order to configure the Atom to use the external board.
These modifications remained, so the IC9 position on the BBC Board was left unoccupied, and in addition, the extra RAM supplied on the BBC board by ICs 5-8 was removed.
I chose to use the keyboard selection option for switching between BBC Basic and Atom Basic. I won’t tolerate the incongruity presented by making additional soldered connections to plug-in modules, so I fitted miniature single-pole sockets to the Atom board in appropriate positions, and mating plugs to the flying leads from the board.
The BBC Basic conversion card sits piggyback-style on the main PCB of the Atom. In front of it is the back of the keyboard, so the entire assembly is actually upside-down in the case. A few jumper connections are necessary.
On power-up followed by BREAK, the BBC Basic banner was displayed. BREAK/CONTROL produced the Acorn Atom banner. To switch back, BREAK/SHIFT at first produced no result, but a second attempt returned to BBC Basic.
So – after the initialisation. BREAK/ SHIFT has to be executed twice to attain the desired result; no problem – but nobody said so. BREAK/CONTROL needs only one execution to operate. After executing BREAK only, no change takes place in the operating mode.
My first major discovery was that Mode 7 is not Teletext; it is Atom Mode 0. Similarly, Mode 6 = Atom ,Mode 1, 5 = Atom 2, 4 = Atom 3, and 3 – 0 are Atom 4. Characters per line remain at 32.
Mode 7 is the only text mode. There is no facility for defining text windows in graphics modes. The cursor remains the Atom cursor, and, although nobody says so, it can be turned off by the command ?&E1=0, and on again by ?&E1=&80 – equivalent to the Atom commands.
The mode equivalents are listed in the supplementary manual, which also says that the graphics screens are scaled, so that PLOT statements refer to the same screen location in all graphics modes. In this context, the screen size is 1280 x 1024.
The Atom character font is used, but the production of inverse characters, representing lower-case letters, is inhibited and they are printed to the screen as normal capitals. This means that a printer will not print lower-case characters. This seems to be due to the fact that inverse characters and block graphics characters are used as key-word tokens in BBC Basic. Acorn says this is because the Atom OS is used by the board.
The number of characters permitted per line when input from the keyboard considerably exceeds the Atom limitation, and appears to be a maximum of 128 characters (four screen lines). After this, entry is allowed to continue up to 240 characters or more, although editing is no longer possible.
A strange feature is that certain shifted characters seem to cause a notional but not physical CR, so that entry again becomes valid.
No statement of the maximum number of characters permitted can be found anywhere, and Acorn will not commit itself to one. The company says that the shifted character anomaly results from the fact that the Atom OS is used.
When I tried to LOAD an existing program in Atom mode, it failed. A memory test indicated that, in this mode, memory was accessible only up to #4000. This was totally unacceptable, and again I turned to Acorn and also to Timedata.
Acorn told me that the presence of the BBC board in the Atom inhibited the addressing of any off-board Eurocard, even in Atom mode. Not one word to this effect appears in any of its advertisements for the board, and no such limitation is mentioned in the instructions that accompany it.
Timedata carried out a thorough investigation and eventually produced a comprehensive set of notes concerning the use of its boards in conjunction with the BBC board.
The connection to pin 11 of IC14 on the BBC board must be disabled, and that pin must be connected to pin 12 of IC12, also on the BBC board. There is a conveniently located plated-through hole on the BBC board, connected to pin 12 of IC12, and a short wire was soldered from there and terminated on a single IC socket removed from a DIL unit, which was clipped to the bent-up pin on BBC IC14.
Full Atom memory was now available from 0 to #97FF but. of course, the maximum memory location normally available in BBC mode remained at &4000.
However, by raising HIMEM to &57FF, continuous memory is accessible up to that location. When I asked whether the screen section could be used for Basic programs, as in the Atom, Acorn refused to comment.
I have tried it; sometimes it works, sometimes it doesn’t. It’s impossible to say why, because when it fails it produces the diabolical BAD PROGRAM error and all is lost. At least it should be possible to store data and/or machine code in this area, but this has not yet been tried.
I am aware that criticism of that error message – or rather of its consequence – is more a criticism of BBC Basic than of its implementation on the Atom, but I still think the action taken is ridiculous, and I cannot think of any logical reason for it.
I suspect that the error occurs on the BBC board for reasons over and above the one defined in the User’s Guide. For instance, tidying up a program by adding an END statement will sometimes allow it to make one more run, and then report BAD PROGRAM, and that’s your lot. Acorn attributes this to the use of the Atom OS.
The Atom utility ROM has to be transferred to the BBC board and occupies memory space from &6000 to &6FFF. Because of the address contents- if for no other reason – the ROM is unusable and inaccessible in BBC mode, and the valuable address space is wasted. Worse still. Atom COS, which runs at 300 baud, is the only one available in BBC mode.
Since for the last eight months or so I have been *LOADing and *SAVEing all Basic programs as unnamed files at 1,200 baud with absolute reliability, I do not take kindly to returning to the tedious 300baud.
It has been reported that, by careful manipulation of addresses, it is possible to save programs in Atom mode, using the utility ROM fast COS. To date. I have not been able to do so; this could be due to some unexpected effect of the use of off-board memory.
Acorn’s advice is again that this is due to the use of Atom OS. The lack of FAST COS will ensure that very little use is made of the board by me.
Hex numbers could not be INPUT from the keyboard direct to a variable. The answer is to INPUT to a string variable, and make the variable = EVAL (string variable). It seems that this is a standard feature of BBC Basic; nobody says so anywhere.
None of the BBC *FX commands is available, and the only VDU commands available are those corresponding to the Atom control codes, plus one which places the cursor in a specified position on the screen, and one which mimics the command MODE 3, VDU31 and VDU16 respectively.
If there are others, I have not found them. A nice feature is that VDU can be abbreviated to V.; V.00 is much easier and quicker to type than P.$00.
Other commands not implemented are ADVAL (understandable because there is no analog to digital converter), COLOUR. ENVELOPE (resulting in severe limitations to the SOUND command), EOF, EXT#, PTR (all because there is no provision for DOS). GCOL, POINT and POS.
Commands only partially implemented are VDU (already discussed), INKEY, INKEY$ (input of negative numbers not supported), SOUND (only one channel and no Envelope parameter).
As has already been implied, the hex operator is ‘&’ instead of ‘#’. The latter is used in the assembler to denote immediate addressing mode instead of ‘@’.
The following OS routines do not exist: OSGBPB and OSARGS. OSRDCH and OSASCI appear to be implemented by Atom’s OSWRCH. OSNEWL has also disappeared, but its limited functions are obviously absorbed elsewhere.
VDU21, besides its normal function (P.$21), deletes the whole of the current line up to 128 characters in length, during program entry only.
Most keywords can be abbreviated on entry, but these are printed in full when listing; this makes them less readable, as does the use of variable names – which is not only permitted but positively encouraged by BBC Basic. Variable names are extremely wasteful of memory space, and I cannot understand why they should be so encouraged.
Long before computers existed I was taught to allocate letters or alpha-numeric combinations to variables. While I concede that variable names may have a limited use, I shall continue to use alpha and alpha-numeric variables.
In general, BBC error codes, except for the BAD PROGRAM abomination, seem to be more helpful than their Atom equivalents, but there is one message that is not only useless but a nuisance. When LISTing in BBC mode, Atom OS as usual is used, and exit from the List is by ESCAPE. BBC Basic prints out the unnecessary message ESCAPE AT LINE 00, and in doing so, it scrolls the listing up, by up to three lines – not disastrous but irritating and time-wasting. Acorn says that the message cannot be inhibited and that it is due to the use – you’ve guessed it – of the Atom OS.
There is a ‘bug’ in versions of the ROM that pre-date December ’82, which causes a LINE FEED to be sent to the printer. This results in undesired double-line spacing in some printers. Line feed to the printer, says Acorn’s technical department, can be inhibited by the command ?&FE=0.
Acorn says that user-accessible vector addresses are the same as Atom equivalents. They refuse to supply information on Zero Page addresses, which they say is not available.
Despite all my criticisms, however, there are desirable features.
Print formatting is a pleasant feature after the Atom’s almost total lack of any such facility, as is the implementation of ‘proper’ string handling, and the total independence of string variables on integer variables. The freedom of choice in selecting both integer and FP variables is a welcome innovation, as is the freedom
from the need to dimension strings before, use.
Many of the more useful commands, such as DEL, ELSE and ON ERROR already appear on most of the utility ROMs and will not be new to Atom users.
DEF and the associated FN and PROC are potentially useful, but as yet I have not experimented with them, and because they open up a totally new programming concept I am reluctant to do so.
No doubt, though, that reluctance will be overcome given time.
PAGE is a welcome simplification of the ?18=#00 routine.
CHAIN, which will accept an empty string as its argument, and which is equivalent to ATOM’S *RUN without the hassle, is a potentially useful command, but it is restricted in its usefulness by the lack of FAST COS.
The BBC board for the Acorn Atom is an excellent idea, potentially of great value and interest to Atom owners. But the project has brought forth a half-baked product.
I accept that the Atom can never be a BBC micro. Nevertheless, with a little more dedication on Acorn’s part it could have been much closer to it than it actually is.
There is room in the memory map, and even a socket for an extension OS ROM. Also the space occupied by introducing the Atom utility ROM into the BBC memory could have been usefully employed in extending the OS.
Acorn says it has no plans for any extension at the moment.
In the final analysis, everything depends on the view one takes of ‘BBC Basic’. Acorn appears to consider that it should be a minimum implementation of the dialect within the limits of Atom’s existing hardware, and indeed the company virtually says so.
I believe it should be the maximum possible implementation of the dialect within the physical limitations of the Atom – a very different thing. The crunch question is if I had known then what I now know, would I have bought the board?’ The answer must be No.
If you are considering buying it you must form your own conclusions. If you have a fully expanded Atom (12K+12K with VIA) and no intention to expand further than the BBC board, then it may be just what you are looking for. Otherwise, be warned.
There’s life in the Atom yet
Acorn’s Atom has more recently been overshadowed by its grander TV-star relation the BBC micro, but it’s a fine little micro in its own right.
For only £174 you get a full-travel keyboard, between 2 and 12K of RAM and a 6502-based processor. You also get one of the fastest (but most idiosyncratic) Basics around, and enough programmable I/O to satisfy anyone.
Of course, it isn’t all milk and honey. For example, there isn’t enough space inside the case to take any more than a couple of the available expansion boards, and one in particular, the colour card, generates too much heat for the rather inadequate ventilation.
That said, the Atom is a very ‘open’ machine, meaning that (provided you can get the information) there are no tricks preventing you from programming it to do anything you want.
The lack of memory will limit how much code can be squeezed into the little box, but tight programming can make it fit. The system has also been available to run Acorn’s Econet since last year, but since the development of the BBC it isn’t much used for that purpose.
The Atom was in many ways a test vehicle for a lot of the facilities now offered on the BBC micro. For instance, Econet was first configured on the Atom more than a year and a half ago, using much the same system available for the BBC. In fact, the Atom is still used as a control keyboard for the System 5 file server system on a large BBC micro Econeted system.
Although the Atom is likely to become obsolete with the development of the Acorn Electron – the company’s next under-£200 micro – it will remain until then one of the better-equipped machines in that price range.
Looking much like an anonymous Commodore Vic-20, the Atom has only 60 keys and those used for the cursor. It is not equipped with quite the range of graphics keys available on a more modern machine such as the Vic.
The Atom has also suffered from problems in implementation of colour. Atom colour card’s VDU driver chip, 6847, was originally designed to be used on an American colour system and has proved difficult to use on PAL systems. Unless modifications are made, it is also frustrating for use with RGB-type monitors.
The BBC micro has solved this colour problem by offering RGB, PAL and composite video signals as standard outputs.
Although it is not expected to be used with disks as often as the BBC micro, the Atom can accommodate a disk drive. An Atom disk drive pack from Acorn will give you 92K of storage on a standard 5.25in single-sided 40-track floppy disk using an Olivetti disk drive with its own separate power supply.
Unfortunately, the disk pack costs almost twice the price of the micro, which is likely to keep most Atom owners from using such a drive.
Images by Kieren Phelps
First published in Personal Computer News magazine, 1st April 1983