OS SWIs manual
This manual is part of a collection comprising the main public domain programming reference. The other manuals in the series are :
OS The base operating system stuff
Wimp The desktop part of the operating system
InetSWIs Internet based SWIs
InetSocket Internet socket calls
MiscSWIs Miscellaneous SWIs
VDU VDU commands
Toolbox Toolbox
Thanks go to those mentioned in the
contributors list.
These manuals are kindly hosted by
www.riscos.info
This page gives history and credits.
Notes on how the manual is structured
These are some very incomplete notes on how the manual should be structured. If any part of it isn't then it will eventually be updated, or I'll change this specification. It's mostly here to remind me anyhow.
The major driving principle in these manuals is that they should be free to everyone. This means that anyone capable of running RISC OS 3.1 or higher should be able to use them, providing they have a copy of StrongHelp. It it designed to be a quick reference for programmers. Anything more is a bonus. To be such it should present the information in the most easily readable form. Each page, even indexes, should be completely visible on a Mode 31 (800x600) screen, and the majority should take under ¼ of the screen so that editing and reference is easily possible. Version 2.53 of StrongHelp is assumed for the most part. This means that you may use sprite links if you wish.
Each SWI should be documented in the form :
<title> (<hex swi number>)
#Parent <something>
=><tab> R# =<tab> <contents>
<tab> R# =<tab> <contents>
[etc]
<= R#-R# preserved
R# corrupted
<tab> R# =<tab> <contents>
[etc]
This SWI does x, y and z. Short examples may be given here.
{*}Note:{*} something important.
The input or output parameters may be omitted if none are required. It is assumed that the registers are preserved, but this may be explicitly be stated. Registers should be listed it ascending order, unless a discontinuous range is being given in which case it should appear at the top of the return parameters list.
If a register or other entry may consist of multiple entries it should be listed in a subpage, with a descriptive reference to it as the link. If more than one SWI may use that set of values then the subpage should be a data file in a sensible location (usually the same directory).
The <contents> entry should be a single sentance, with clarification or alternatives in a comma seperated list, and only using brackets to indicate ranges. Where long blocks of alternatives are listed, consider using a table or split lines and use tabbing to align; the former is preferable.
Tables should consist of :
Offset<tab> Meaning
#Line
x<tab> y
[etc]
others<tab> reserved, must be zero
Others may be omitted if not relevant, offsets should be given in decimal, unless otherwise stated on the page. Bit masks are described as 'Meaning if set', and should be inversely true if unset. If this is not the case then a seperate description may be required.
Examples may be included on the page if short enough, but for preference should be on a page of their own. Examples should, if possible, be given in pseudo-code or BASIC. Proficient coders should be able to translate to whatever language they are using easily. Assembly examples should only be used where they are strictly relevant.
For services, upcalls, events, etc the reason code need not be given in the input parameters, but is it is it should be given as a number and followed by "(reason code)" or similar. For most such reasons it would be useful if the hex and decimal values were given. This has not been applied across the manuals.
If PRM references are included they should be and the bottom of the page and of the form :
#Line
See <PRM <manual>, page <page>=>PRM-<manual>:<page>>.
This is to allow for a possible future release of a StrongHelp version of the PRMs. The correct names for manuals will be : PRM-1, PRM-2, PRM-3, PRM-4, PRM-Index, PRM-5, PRM-5a. Subsequent releases of the PRMs will include their release number, eg if Ursula has volumes 1-5, it's manuals would be PRM2-1 to PRM2-5 and PRM2-Index, etc.
When highlighting words it is recommended you use Bold ('
{*}') to stress words, Italic ('
{/}') to indicate variables, and Code ('
{fCode}') to indicate sections of literal text, code or other such text. This has not yet been applied to the entire manual.
Current 'normal' cross-referencable objects are :
Page Contents
swi_dateformat Date format string tokens
swi_errorblock Error block format
swi_bbox Generic bounding box
fsys_ident List of Filing System numbers
fsys_objattr File attribute bits
fsys_loadexec File Load/Exec word meaning
os_mousebuttons Mouse button bit mapping
os_scalefactors Standard scaler block
os_setcolouractions GCOL actions
os_spriteop_area Sprite area block
os_spriteop_ptr Sprite block
buffer_buffers List of buffer numbers
colourtrans_paletteentry Palette entry meaning
colourtrans_pixtrans Pixel translation table format
colourtrans_fixedpoint Fixed point values (like draw_transformunits)
territory_anumbers List of alphabet numbers
territory_numbers List of territory numbers
drawfile_format Drawfile format
drawfile_header Drawfile header
draw_transform Draw transformation matrix block
draw_transformunits Draw transform units (&XXXX.XXXX)
Many thanks to Nicholas Clark for helping develop the style used through out this manual.
OS History v3.00
0 AD
· The name! This is now the OS manual, most of this section should remain pretty static, the other sections, Wimp, Misc and Inet should be updated more regularly than the main operating system (hopefully)
· A large number of new services and other little things added
· Reformatting of some pages more in line with the rest of the manual
· SpriteOps updated to include hex number, and new calls
· Added a few more services
· FileEntry added, incomplete at present; needs FileEntry_Func updating, and FileEntry_GBPB adding
· Removed obsolete '\<=' usage, expanded 'ptr', 'no' and added more descriptions
· Moved some blocks from OS to Wimp as it seems more appropriate.
Next history
OS History v3.02
10 Jan 1998
· KeyV updated with reference to the keyboard ID
· Updates to CD section (Dave Thomas)
· More updates to CD section (Eddie Edwards)
· Moved Service_A7 to InetSWIs as it's more logical; more similar changes may follow.
· Territory module completely documented (J.B.Blaukopf)
· Removed spurious ScreenModes documentation
Previous history Next history
OS History v3.03
22 Jan 1998
· Font routines now completely documented (Nicholas Clark)
· Modifications to various swis (Nicholas Clark)
· FPEmulator, Hourglass_Colours, IIC, MakePSFont, Super documented (Nicholas Clark)
· OS_FSControl 37 fixed, miscellaneous Territory calls modified.
· DrawFile format moved into DrawFile from Draw
· ColourTrans now completely documented, additional vectors added (various)
· Sound SWIs documented (Nicholas Clark)
· Started making some notes on the structure
· Transformation matrix added, along with font 24 for the Sidney font so that we can use the matrix blocks
· Reorganisation of certain parts of the manual, updates to services
· Released on ftp://freenet.barnet.ac.uk/manuals/j.fletcher/
Note: This
should have been a beta release, but I needed to release something on the manuals site.
Previous history Next history
OS History v3.04
24 Mar 1998
· Many changes (Econet, Service, Event, Vector, Portable, etc) by Nicholas Clark
· More changes (NetFS, ResourceFS, Squash) by Nicholas Clark
· Finally plucked up courage to run StrongTst across it again. Most of the links should now be valid.
· OS_ConvertBinary/SpacedCardinal/SpacedInteger added.
· Many service calls added, a few other changes.
· Far, far too many changes made to even think about - it's all Nick's doing.
· Updated FileCore entries to be a little more helpful.
· Generic bounding box added, and linked from other entries
· More Byte, Vector, Service, etc calls by Nick.
· DrawFile services added
· Serious note in OS_File about non-return of 'load', and expansion of variable.
· NetPrint documented, updates to various OS SWIs and RPC keyboard diagram added (Nicholas Clark)
· Reformatted, links checked and clean copied for release (phew!)
Previous history Next history
OS History v3.05
25 Mar 1998
· Succombed to public pressure and added PRM references to some pages (OS_Bytes, Services and Vectors at present).
· Spelling corrections and a few minor updates to pages.
· Numerous additions of SWI and reason code numbers to page titles
· Added PRM references to all SWIs. Apologies to those without the manuals. This will aid those with, and when the StrongHelp version becomes available it will help everyone.
· Updated SWIs to include Dynamic Area references, and fixed DrawFile bugs.
· DeviceFS calls updated
· Service_IdentifyDisc fixed (Phil Norman)
· ClaimSWI/ReleaseSWI added (but not documented)
· OS_Memory added, changes to OS_MMUControl (Dave Thomas)
· ScreenBlanker updated, PaletteV updated (James Larcombe)
· Service_FilterManagerInstalled updated
· ColourTrans palette entry data added
· Minor additions, spelling mistakes fixed.
· Changes added (Nicholas Clark)
· Added 'notfound_
manual' pages, for StrongHelp 2.60.
· Added 16-bit sound system details (Alex Thoukydides)
· HTML-ification identified some parental problems
Previous history Next history
OS History v3.06
17 May 1999
· Moderator now iain truskett
·
FSLock details updated.
· CMOS byte 132 updated to reflect 16-bit audio (David Thomas and Thomas Olsson)
· String termination in
OS_ReadUnsigned modified (Daniel Silverstone)
· Virtualise added to
OS_DynamicArea and
OS_ReadDynamicArea (Alexander Thoukydides)
· various minor differences (Justin Fletcher aka gerph)
· !Configure file added and Draw documentation changed appropriately.
· Services for
Freeway added.
· UpCall for
Freeway added.
· Example
OS_Module SWI handler code bug fixed. (Matthew Phillips)
·
IIC_Control extended (Andrew Macfarlane Smith)
· Notfound pages revised.
· Introduction of some
SCSI documentation.
· Some Y2K compliance revisions.
· Various minor amendments.
Previous Next history
History for OS v3.07
16 Jun 1999
26 Nov 1999
21 May 2003
27 Jun 2003
21 Jul 2003
28 Jul 2003
6 September 2003
06 January 2004
29 June 2004
18 November 2004
7 January 2006
30 November 2007
18 May 2010
21 Jul 2012
05 Apr 2014
20 Jan 2016
09 Nov 2016
12 Jul 2018
14 May 2021