Beebug


Public Domain Software

Alan Blundell looks at what is available in the public domain to help add variety to your programming.

Public Domain Software

This month, I will describe some of the programming languages you can obtain for the BBC, Master and Electron in the public domain. Some excellent packages are available which provide the opportunity to widen your programming experience without committing yourself to significant financial outlay. The best of these rival commercial packages in their richness of features and completeness.

Alan Phillips, of Lancaster University's Department of Computing, has made several contributions to the growth of the public domain, and not just for Acorn micros. One of his productions, a 65C02 Macro Assembler package, is perhaps the best example to begin with. The package consists of a ROM image and a comprehensive manual, supplied as a text file on disc, which is well written and comprehensible, and extends to over 70 pages. Version 1.6 is the current, and probably the last, version of the package.

Having used the assembler myself, I can say that I am very impressed: the only time I would feel the need to use a different assembler would be for a short program for which I wanted to distribute the source code in a format which anyone can compile or for the machine code element of a mainly Basic program. For both of these cases, the BBC Basic assembler is entirely adequate and quite versatile.

The advantages of a dedicated assembler system are so great, though, that for any 'serious' programming work, the inbuilt assembler just does not compete. The Macro Assembler manual describes all of the system's features in a readable, well-explained style. Directives for control of source and object files and for embedding data (EQUates), conditional assembly and a macro programming language are all supported and included.

Perhaps one of the most useful brief comments to make about the system, as a way of giving you an assessment of its features, is to refer to one of the appendices to the manual. The appendix in question is less than a page long and details the differences between this assembler and the ADE Assembler from System Software, a commercial product of some repute. The most significant of the differences seem to be that Alan's assembler does not implement macro libraries or local labels within macros.

On the other hand, expressions are evaluated fully hierarchically, rather than the simpler left-to-right approach used by ADE. If you write in assembler, but have not yet ventured beyond the BBC Basic in-line assembler, then this system is definitely worth a look.

C (the programming language, not the letter) is a subject which has attracted a lot of attention in recent years and, for many of the big name software houses, C is the language of choice for program development because of the ease with which a program, once developed, can be modified for other makes of computer Processor.

Dr A. J. Travis was attracted to C in 1985 because he had observed the development of the language on other computers, mainly the PC, and because he wanted an alternative to Forth or Assembler for writing 6502 image processing software. Speed is, of course, a vital characteristic for any image processing software, and C is a relatively fast language. The memory capacity of the BBC Micro is too small to permit the easy development of a full ANSI-standard C compiler, so he opted to work on the Small-C language, a useful subset of the full C language.

The development of C compilers is an interesting process: what Dr Travis actually did was to write a translator program which converted the output of an existing Small-C compiler for IBM PCs and compatibles into 6502 machine code. Recompiling the PC Small-C then produced a compiler for the BBC micro, in 6502 code. Unfortunately, this did not turn out to be a feasible proposition at the time because of memory constraints, so the first working version was a rewrite in BBC Basic.

After several more stages of refinement, the compiler eventually became a language ROM image for the BBC B and Master, with shell and other utility programs on disc. A version of the compiler was adapted by Mijas Software, with the permission of Dr Travis, as part of their commercial 6502 Development System. The current (and last) version of the compiler is version 0.70, which was released as public domain as long ago as 1 May 1989.

I hope that Dr Travis won't mind it being said that the original documentation supplied with the compiler, whilst not lacking in essential information, was quite technical and limited in usefulness unless the reader was already familiar with the C language and able to cope with the slightly arcane installation instructions. Because the compiler is a popular part of the range of public domain software, the willingness of others to help has come into play, though, and the documentation available for the compiler has improved its accessibility greatly over the last year.

This is another illustration of the gradual refinement and improvement which is evident for the best of the software in the public domain. Quite early on, Jonathan Harston (who himself operates a PD library) provided text files detailing how to install the compiler and describing the language and its use in greater detail.

Reed Sadler contributed more documentation, describing how to use the compiler on systems with a hard disc drive. These additions are useful to anyone who needs more than the basic specification of the compiler.

Whilst I would not want to compare Small-C feature for feature with, say, Beebugsoft C, it is a low cost entry route to the world of C language programming if you are short of cash or simply not sure if C will be of long term interest or use to you.

The compiler is complemented by a shareware C language tutorial produced by Coronado Enterprises of New Mexico, USA. This is a collection of extensive text files on disc, (over 380K, including an extensive set of example C programs) originally produced for the IBM PC and compatibles, which has been transferred to Acorn format discs. It comprises a comprehensive introduction to the C language, which is not all relevant to Dr. Travis' Small-C, but which is nevertheless a useful addition. The fact that it is shareware means that it can be distributed as if it were public domain, but if you find it useful and gain benefit from it, you are expected to pay a fee to the producer to register your use of it.

Closer to home, Glyn Fowler has written a tutorial on the use of the standard BBC Basic in your micro which will be of interest to newcomers to programming. There seem to be quite a lot of people who are just becoming familiar with the BBC Micro, having bought one secondhand, who may find this useful. The tutorial again comes as text files on disc, in total over 90K of text and example short programs.

There are a number of other programming related items available in the public domain, but I will have to try to tell you more about those in a later article. For next month, you can look forward to finding out more about PD utilities, teletext software and TANSTAAFL.

Alan Blundell