Entry | |
---|---|
R8 | Reason code (bits 0-7) and flags (bits 8-31) |
- | Other register meanings dependent on R8 |
Exit | |
---|---|
- | Depends on R8 |
This SWI provides access to the hardware layer. Conceptually, it is similar to accessing the hardware registers directly in earlier versions of RISC OS – whereever possible OS routines should be used in preference. This call is primarily designed for the use of device drivers – for example the PS2Driver module makes PS2 hardware calls using this interface.
Making hardware calls to devices normally managed by the Kernel is liable to cause the same problems as poking the hardware. However, making hardware calls is of course preferable to actually accessing the hardware directly. Use this interface with caution.
# | Hex | Meaning |
---|---|---|
0 | &00 | Call HAL routine |
1 | &01 | Get address of HAL routine |
2 | &02 | Add HAL device |
3 | &03 | Remove HAL device |
4 | &04 | Enumerate HAL devices, reverse order |
5 | &05 | Enumerate HAL devices, chronological order |