Showing changes from revision #3 to #4:
Added | Removed | Changed
When OS_CallASWI was introduced in RISC OS 3.7, Acorn realised that in order to encourage adoption of the SWI and to ease the burden on programmers they had to provide a method for that SWI to be used on older OS versions. This resulted in the creation of the CallASWI module. Over time the number of kernel SWIs that that the module provides implementations of has grown in number. This page provides a list of SWIs provided by the module, and the OS and module version numbers in which the SWI was introduced.
SWI | Stable OS version | CallASWI version |
---|---|---|
OS_CallASWI | 3.70 | 0.01 |
OS_CallASWIR12 | 3.70 | 0.01 |
OS_PlatformFeatures | 3.70 | 0.01 |
OS_SynchroniseCodeAreas | 3.70 | 0.01 |
OS_HeapSort32 | 5.00 | 0.03 |
OS_SubstituteArgs32 | 5.00 | 0.03 |
OS_ReadLine32 | 5.00 | 0.03 |
OS_LeaveOS | 5.00 | 0.101 |
OS_ConvertVariform | 5.18 | 0.06 |
OS_FSControl 582 | 5.18 | 0.07 |
OS_ReadUnsigned “WIDE” | 5.17 | 0.09 |
OS_PlatformFeatures “NoSWP”3 | 5.23 | 0.12 |
As all platforms that run RISC OS 5 are still supported, the simplest approach to the use of a newly introduced OS SWI is to upgrade to the desired stable OS version based on the table above.
For systems prior to that, the application’s !Run file can check. For example, if the “WIDE” form of OS_ReadUnsigned is needed by an application, the sequence might be
*SETEVAL CallASWI$PreFive 0
*SETEVAL CallASWI$Required 0
*SETEVAL CallASWI$TooOld 0
*RMENSURE UtilityModule 5.00 SetEval CallASWI$PreFive 1
*RMENSURE UtilityModule 5.17 SetEval CallASWI$Required 1
*IF CallASWI$Required AND CallASWI$PreFive THEN RMLOAD System:Modules.CallASWI
*RMENSURE CallASWI 0.09 SetEval CallASWI$TooOld 1
*IF CallASWI$Required AND NOT CallASWI$PreFive THEN ERROR This application requires RISC OS 5.17 or later
*IF CallASWI$Required AND CallASWI$PreFive AND CallASWI$TooOld THEN ERROR This application requires CallASWI 0.09 or later
*UNSET CallASWI$PreFive
*UNSET CallASWI$Required
*UNSET CallASWI$TooOld
1 Note that although OS_LeaveOS is present in CallASWI 0.03 and later, a bug in the implementation would most likely lead to a crash or infinite loop if an attempt is made to use it. This bug was fixed in CallASWI 0.10.
2 Added in FileSwitch 2.74 which appeared in stable OS version 5.18. This was added in FileSwitch 2.44 in ROL’s Select 1i1.
3 OS_PlatformFeatyres subreason 0, bit 11, being valid prior to ARMv2a