Note from archiver<at>cs.uu.nl:
This page is part of a big collection
of Usenet postings, archived here for your convenience.
For matters concerning the content of this page,
please contact its author(s); use the
source, if all else fails.
For matters concerning the archive as a whole, please refer to the
or contact the archiver.
Subject: The comp.sys.acorn.programmer FAQ
This article was archived around: Tue, 03 Oct 2006 08:37:58 +0100
Posting-Frequency: monthly (approximately)
Last-modified: 3rd August 2006
Maintainer: Matthew Hambley (firstname.lastname@example.org)
Disclaimer: Approval for *.answers is based on form, not content.
-----BEGIN PGP SIGNED MESSAGE-----
The comp.sys.acorn.programmer FAQ
1.46 - 3rd August 2006
There are a number of questions which crop up time and again in the
comp.sys.acorn.programmer newsgroup. This FAQ hopes to answer these in an
attempt to keep the signal to noise ratio on the group high. It also covers
a number of points concerning the nature of the news group itself.
Please be aware that this FAQ does not hope to be a comprehensive resource
for programmers. Rather it is intended to be what it claims to be, an
answer to some frequently asked questions. If you don't like this, please
feel free to write and maintain your own.
Furthermore note that due to the depressingly large amounts of spam which
afflict my FAQ e-mail address I automatically delete all mail which does
not have the word "FAQ" in the subject line. Simply replying to this post
is OK otherwise make sure you include "FAQ" somewhere in the subject.
Current maintainer: Matthew Hambley <email@example.com>
Web version: <http://www.aether.demon.co.uk/faqs/programmer.html>
Only the 3 most recent releases are given here. Should you wish to view the
complete history, visit:
v1.46 (2nd August 2006)
* Added "Sourcery" to the tools section
* Altered links into riscos.info to reflect its new wikines
v1.45 (2nd April 2006)
* New version of GCC
v1.44 (2nd February 2006)
* New version of RTK
* New version of XhoX11
* Example mirror for JFShared
* New URL for "Routines"
* New URL for SharedBLibM
* New home for Smalltalk
* New home for new version of Dr Wimp
* New home and maintainer for RiscXLib
* Noted lack of home for Desk
* Removed Mesa as the author appears to have disowned it
* Typo and spelling fixes
Questions and Answers
1. Concerning the news group itself
1.1. What is comp.sys.acorn.programmer?
Comp.sys.acorn.programmer is a newsgroup for discussion regarding
programming RISC OS computer systems. Its remit is wide covering
everything from novice programmers to assembly hackers.
You are encouraged to ask any programming questions but be aware
that you may find people more knowledgeable in a specific area of
programming (e.g. 3D graphics) on a group dedicated to that
1.2. Are there any matters of netiquette of which I should be aware?
First, a reminder of basic netiquette. Before posting a question
check that it is not in this FAQ. Then check that it has not been
discussed before. Google may be used for this last task.
You may also find an answer to your question in either a RISC OS
specific web site (try Acorn Search) or a generic programming
resource such as Wotsit.
Finally consider whether your question is appropriate to
comp.sys.acorn.programmer. In particular bear in mind that although
you are writing your program on a RISC OS machine your question may
not be RISC OS specific. In these cases there may be a more
appropriate group available.
Having said all that don't be put off posting. As long as the
denizens of the group think you have employed due diligence in
searching for an answer they will be happy to try and help.
One last thought. Do not end your message with "Please reply by
private e-mail as I do not read this group." This is considered
exceptionaly rude and exploitative. If you can not be bothered to
participate in the group, even for the life span of your query,
then the regulars can not be bothered to help you.
1.3. What are the rules regarding code fragments?
It is often a good idea to include a code fragment when asking a
question as it is often much easier to sort out the problem from
the code than from a hand-wavey discription. The golden rule is
"Keep it short and relevant".
Another trick to make potential helpers' lives easier and increase
the likelyhood of you getting a useful reply is to include as much
error information as you can. Also outline your debugging effort to
date: What you have tried and what did and didn't work.
Code fragments should be included in-line rather than being
attached with uucode or MIME. It is also not acceptable to attach
binary files to your posts. If you feel that a binary will make
matters clearer then upload it to a web site and provide a link to
2. On the matter of languages and libraries
2.1. Which programming languages are available?
The most obvious languages are BASIC with its built in assembler as
these are provided "for free" with the operating system. There are
a number of C/C++ products as outlined in a following question. The
Acorn C/C++ package also comes with the ObjAsm assembly language
development application. Other languages which have received ports
over the years include:
Bob last known version 4
This language is derived from Bob 1.5, an experimental
object-oriented language with a C-like syntax by David Betz and
the subject of an article in Dr Dobbs Journal in September
1991. Betz is the author of XLisp and later became programming
language consultant for Apple; NewtonScript has strong
resemblances to Bob.
ArmBob is a Risc OS extension of Bob. You can write wimp
programs with it.
Fortran (ukp124 + VAT)
II68 Desktop Fortran 77: Commercial product from Inteligent
This is a programming language specialised for constructing web
sites. It is a full programming language with variables,
functions etc, in which the names of HTML tags become strings,
functions or functionals.
2.2. Are there any libraries or similar to ease BASIC programming?
There certainly are:
AppBasic last known version 2.02 beta
The aim of this package is to offer a Visual BASIC style
environment whereby WIMP applications may be developed quickly.
It utilises the Toolbox modules and replaces EasyB by the same
DrWimp (freeware) last known version 4.40
A highly regarded set of resources including not only a library
but also a skeleton application to ease matters further.
JFShared last known version 2.54
A collection of BASIC libraries which come with a few templates
to get you started. This library was written by Justin Fletcher
for his own use so your mileage may vary.
Currently dropped off the net but is still available from
various mirror sites. For instance Drobe.
Routines (Freeware) last known version 1.18
A collectino of useful functions and procedures which can by
dynamically included in your applications.
SharedBLib (LGPL) last known version 1.00
In the vein of SharedCLib a set of BASIC libraries which exist
only once in memory. Supports both CLI and WIMP interfaces and
The download page is a little confusing so don't be surprised
if it takes a while to work out how to download it.
WimpBASIC 2 (ukp39) <http://www.apdl.co.uk/progs/wbasic.htm>
A commercial development environment from APDL.
A commercial development environment from Jaffa Software.
2.3. I want to work in C/C++, what is available?
Acorn C/C++ (ukp199)
Includes the toolbox bits and a pile of other utilities.
The C compiler (often refered to as Norcroft) is very capable
however the C++ compiler is based on CFront and as such is
showing its age.
Now developed and available from Castle Technology
Easy C/C++ (ukp19) <http://www.apdl.co.uk/prog.htm>
Originally produced by Beebug, now sold by ProAction/APDL. It
aims to be a good basic C and C++ compiler. It is a little
dated now and some doubt has been cast as to its reliability on
newer machines. However it is cheap and therefore ideal for
people who are just learning or who are dabbling and don't want
to muck about with command lines as in GCC.
GCC (free) last known version 3.4.5
The latest version of the GNU Compiler Collection ported to
LCC (free) last known version 4.20
This C compiler is designed to be light-weight. As such it does
not support the various extensions which GCC has added. Nor
does it include a C++ compiler.
There was also a C interpreter, is that still available? I think it
was written by Hugo Fiennes and came on a magazine cover disc. We
have a vote for Acorn User, February 1994.
Generates a code skeleton to allow the programming of
relocatable modules in C. Similar to CMHG which comes with the
Acorn C/C++ environment but, according to advocates, better.
May be found in the stubsg collection.
Sourcery (PD) last known version 0.99
A graphical replacement for "make". This tool manages all the
various components of your application including not just
source but also sprite files, templates, etc.
Port of "the most abhorrent M$ lib/header file".
ChoX11 last known version 0.30
An X client library produced as part of the authors Unix
Port of the Unix command line cursor control system.
The library from which Desk is a fork.
Desk last known version 3.24
A fork of DeskLib. It seems to have fallen of the web for the
This C++ class library was last updated in June 1998 and an
archive of it could not be found at the time of writing. It
wraps up the various toolbox modules in an object oriented
OSLib (GPL) last known version 6.80
Well thought of and nigh on comprehensive set of libraries. A
recent revision introduced 26/32-bit agnostic code and support
for RISC OS 5 and Select API's.
RISC OS Toolkit last known version 0.7.1
A class library to aid application development. Of particular
note is its dynamic window construction in the style of Java
RiscXLib last known version 0.03
A set of X client libraries. Part of the Unix Porting Project.
StubsG last known version 0.04
The full gammet of libraries supplied by RISC OS Ltd. Not only
does this include the stubs library for use with the shared C
library but also libraries for the toolbox modules, tcp/ip and
Provides all the functions required for GCC but can also be
used with Acorn C. Very useful for porting Unix applications.
For machines with floating point hardware. Provides faster
versions of the maths functions.
2.4. Where can I get an update to the Java virtual machine?
If you have version 0.76 then you can't, that's the most recent
2.5. What is available in the way of Java tools?
There is a web site at which further information may be found.
The original Java Virtual Machine (JVM) for RISC OS machines is
called RiscCafe and was written by Acorn, therefore it is not
currently supported. It supports applets written to the 1.0.2
standard. If you want a copy keep your eyes on the charity stalls
at shows or the small ads in magazines.
A newer JVM and support libraries called Kaffe has been made
available by the Unix Porting Project.
A coding group called eQ R&D gas recently released an alpha test
version of their JVM, Zhaba
A third JVM, called Chockcino, is currently under development. As
yet no release date is known.
Two Java compilers exist for RISC OS. The first, guavac, compiles
to the 1.1 version of the Java run-time environment. It can be used
in conjuction with the libraries supplied with RiscCafe or version
1.1 libraries are available for it. Guavac support has been dropped
in favour of Jikes.
The second compiler is a port of Jikes from IBM. It's newer,
faster, leaner and smells of peppermint.
3. Programming RISC OS
3.1. How do I get started?
In my experience the best way to learn programming is to do it
however some tutorials and reference material can be invaliable.
The various Acorn/RISC OS magazines have covered this topic
(generally some time ago so you will have to seek out back issues)
and I can particularly recomend some of the series run in <<Risc
User>>. The book <<Wimp Programming for All>> is based on these
articles and is available on the "RISC User in a Nutshell" CD-ROM.
You may also be interested in Paul Vigays "RISC OS Academy"
initiative. This is an on-line correspondence course which is to
cover BASIC programming as well as a number of other topics
including HTML coding. Details of the syllabus and subscription
rates are available.
3.2. I need manuals and other technical information. Where can I get
As part of their Select scheme RISC OS Ltd are building up a
comprehensively revised and updated set of PRMs. This is available
in electronic form from the Select members private site. This is
going to be a definitive reference for many things and is another
good reason for joining the Select scheme. (I also give excelent
false witness, price list is available on request)
There is also a wealth of information for C programmers at
Adam Richardson has collected together a page of useful little odds
and ends. It is a short distilate of the PRMs and Style Guide
along with some common sense suggestions on good practice.
3.3. What general programming utilities are available
Much software has been written to ease the process of writing
software. Below are listed some of the non language-specific pieces
which may prove useful.
RISC OS Packaging Project <http://www.riscpkg.org/>
This project aims to provide a dependency tracking package
manager in the style of Debian's APT. It is still at an early
stage of development but you may wish to consider it as a means
to distribute your software.
4. Technical issues of import
4.1. What's all this about '32-bit' code?
It relates to the underlying ARM hardware; the simplest explanation
is that the earliest ARM CPUs used a combined program
counter/processor status register. This limited the effective
address range to 64MB ("26-bit" code). Later ARM CPUs provide
26-bit compatibility along with extra modes that have separate
program counter and status registers ("32-bit" code).
Some ARM CPUs - such as the one used in the Castle Iyonix - lack
the 26-bit compatibility modes. For one thing 26-bit mode is
incompatible with the "Thumb" instruction set provided by some ARM
There is a longer disertation on this topic should you wish
some further reading.
4.2. Fine, but what C/C++ stuff is 32-bit compatible?
Castle sell an improved version of the Norcroft compiler, tools and
libraries which includes an addressing scheme agnostic (i.e. it
works for both 26 and 32 bit addressing modes) version of the
shared C library.
GCC also offers 32-bit addressing mode support as does LCC.
As far as libraries are concerned most have now been updated but
check with the original distribution site before assuming that the
one you use has.
5. Gotchas of which to be aware
5.1. My BASIC IF...ENDIF block doesn't appear to be working properly
Chances are you have a space after the THEN. In these cases BASIC
will assume that it is dealing with a single line IF. Thus it will
execute the rest of the block regardless of the state of the
There are a number of ways of avoiding this problem in the future.
Both Zap and StrongEd provide a means whereby trailing spaces may
be automatically stripped on file save. Alternatively you can use
the BASIC command CRUNCH to perform a number of size reducing
operations including the removal of trailing spaces.
5.2. When I try to run another program from within my BASIC application
something weird happens.
Performing this task is a little trickier than you might at first
think. It is not simply a matter of *RUNing the new program as
doing this will replace the currently executing code with the new
stuff. Hence when the new program finishes executing it will exit
but the original program is no longer in existence to return to.
There are a number of ways to achieve the desired goal. The
hardest, most prone to errors and least recommended method is to
fiddle around, a lot, to set up a new environment in which the new
program may run.
If you are looking for an easier and less nasty way there are
several. There is *WimpTask which will work inside and outside the
WIMP. Be warned though that you have to be careful keeping track of
which task is swapped in at any given time. If you try to include
arguments to the new program by placing them in memory which is
then swapped out you can suffer crashes.
There is also the BASICShell module which is part of the SharedBLib
library. This module may have trouble if another has claimed
Finally you can try hacking the code which provides this function
out of the SlideShow application.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1-sb1 (RISC OS)
-----END PGP SIGNATURE-----
Maintainer of the comp.sys.acorn.games and programmer FAQ lists
E-mail : firstname.lastname@example.org Public key ID : C991137B