posted by Gavin Wraith on Wed 5th Jul 2006 17:44 UTC

"RISC OS, 3/3"

Applications are one of RISC OS's secret weapons. Every application should or may contain files called

  • !Run
  • !Boot
  • !Help
  • !Sprites

Obey files contain textual commands, which are executed when you click on the file's icon. Clicking on an application has the same effect as clicking on its !Run file which, like !Boot, is generally an Obey file.

The !Boot file is run once, when the directory containing the application first has its window opened. This allows the application to carry out some initialization. When this happens RISC OS first of all sets a variable Obey$Dir to the full pathname of the directory or application containing the Obey file. Usually the first command in the !Boot file will be to set another variable to the value of Obey$Dir, so that the application knows where it is, before it goes on to do things.

If a file called !Help is found in the application, then RISC OS will add a Help item to the pop-up menu of the application. Selecting the item has the same effect as clicking on the !Help file.

The appearance of the application is determined by a sprite (a native bitmap format) of the same name as the application in a spritefile called !Sprites. An application called !Paint is provided for the user to create her own sprites.

The point of all this is that an application is a complete package that can be put anywhere you like in the filing system. By setting a variable it can tell other applications where it is. When you want to get rid of an application, just delete it. No fancy de-installers needed. If you need to boot the computer from a filing system then you need an application in its root directory called !Boot, whose structure is mostly mandated. But apart from that, the user can organize a filing system any way she wants. In fact I sometimes shock Windows users by telling them that of the 7Gb of files on my hard disc I reckon to know what each one is for, and I reckon to be able to spot cuckoos in the nest by eye. Could they do that? A slight exaggeration perhaps, but a reasonable claim.

Early versions of RISC OS would not let you put more than 77 files into a directory. I am not sure of the real technical reason, but an excuse sometimes given was that you are not likely to be able to keep track of more than 77 heterogeneous objects; and if they are homogeneous a directory is probably a daft way of organizing them anyway. The 77 file limit is long gone, but you cannot help admiring Acorn's chutzpah.

Multitasking

Multitasking of user tasks is cooperative, not preemptive. That means that a badly written task can hang the system. Yes, total control means no security. It also means that writing programs that create tasks is more complicated.

When you click on an object's icon in a filer window, the filer broadcasts a message to all tasks that have registered to receive such messages, notifying them what the object's pathname and filetype are, and where on the screen its icon is. If a task recognizes the object as one it should do something about, it acknowledges the message (so the message is sent no further) and has its way with it. If no task recognizes it, the filer looks at the object's filetype to see if that specifies a run-action. In the case of HTML files, for example, it will say, fire up a browser and put my pathname on its command line. If no run-action is specified then the user is informed of that. Run-actions for standard filetypes are set up at bootup, but all such run-actions can be redefined by the user.

Users

Enough about the operating system; what about the users of it? There are not enough of them to keep programmers tanked up with coffee, that is for sure. But there are advantages to being a member of an obscure and aging minority. People help each other. If you have a problem, send an email to a user group and the solution can come back in minutes. No worry about viruses; no Trojan horses. There is a lot of very good software that is either free or very cheap. The free text editors Zap and StrongED are amazing. Techwriter, a structured document editor originally commissioned for Apple, is wonderful. I am writing this now with it. It can save my document out as:

  • Text
  • RTF
  • HTML
  • TeX
  • Postscript
  • PDF
  • Draw, a native vector graphics format
  • TechWriter - its own format

The fish in a shrinking pool tend to bite each other, but you soon learn to avoid those that do. I have said nothing about using RISC OS with music (e.g. Sibelius), video production or graphic design. The range of uses to which the RISC OS community puts its machines is far wider and more diverse than I can hope to describe.

Being non-standard has lots of drawbacks but none yet so compelling that I must use another operating system.

Table of contents
  1. "RISC OS, 1/3"
  2. "RISC OS, 2/3"
  3. "RISC OS, 3/3"
e p (8)    24 Comment(s)

Technology White Papers

See More