Argus Press


Discovering Arthur

Categories: Description: Utility

 
Author: Philip Colmer
Published in A&B Computing 6.01

Discovering Arthur

Compatible with Archimedes 300 and 400 series, Arthur OS 1.2.

As with all new machines (especially expandable ones), there is always a tendency to find out as much as possible about the machine - particularly if it is undocumented. The Archimedes is no exception. This article will describe and list four programs which have been written to help you discover more about Arthur. Please note that some of the programs require Arthur 1.2. If you haven't got it, ring Acorn on 0223 214411 immediately! Of course, before long, we are all going to be looking at RISCOS but meanwhile...

Listing SWIs

The SoftWare Interrupt is an integral part of expanding the operating system. But how can you find out which SWls are currently supported? Well, part of the number conversion routines includes converting a SWI number to a SWI string.

Thus, by writing a program which cycles through all of the suitable values and discards the unused SWI numbers, we are left with a list of supported SWIs. This is what the first program (ListSWs) does. Please note that if you have loaded some relocatable modules which support SWls, such as Clare's Toolkit, then these SWIs will be listed as well. All part of the service!

Listing File Types

Another number conversion which the operating system does automatically whenever you type *EX is that of file type number to string. However, despite the fact that Acorn have allocated the 3 byte number as follows:

&E00-&FFF
Reserved for Acorn use

&800-&DFF
For allocation to software houses

&000-&7FF
Free for the user the operating system only knows the text for a few of these values.

So how can the known text be listed? Easy! There is a filing system call, named OS FSControl, which is a multi-purpose call and one of its assignments is to convert a file type number into the appropriate string. This operation is performed by the second program (ListFTs). Once again, if there are any modules which perform this conversion (see below), then the extra file types will be listed.

Adding File Types

So far, all we have done is hacked at the system. We haven't actually made use of the expandability.

This next program (AddFTs) creates a relocatable module which the operating system will use to decode extra file type numbers into strings. This is done by using one of the service calls to a module. The module is given the file type number and if it recognises it then the appropriate string is returned in the registers and the call claimed.

Currently two file types are supported - &0AB which I allocated to my pointer definer and &AFO which is used by ArcWriter. Please note that Arthur 1.2 is required as previous versions of BASIC V do not use ALIGN and O% properly.

Philip Colmer

This article was converted to a web page from the following pages of A&B Computing 6.01.

A&B Computing 6.01 scan of page 91

Page 91

A&B Computing 6.01 scan of page 92

Page 92