IT lexicon › Infra & Ops › SWI (RISC OS)

SWI (RISC OS)

Infra & Ops På svenska → Updated: 2026-11-09

ARM's software-interrupt instruction, which RISC OS turned into its entire API — every service is a numbered, named SWI call.

The ARM SWI instruction drops the CPU into supervisor mode and carries a 24-bit immediate. RISC OS uses that number as the call ID, and everything from printing a character (OS_WriteC) to yielding the CPU on the desktop (Wimp_Poll) goes through it. Modules register their own chunks of 64 numbers, so a third-party module extends the OS on exactly the same terms as Acorn's own.

One detail every programmer learned quickly: bit 17 is the X bit. Without it, an error jumps straight to the error handler; with it, as in XOS_WriteC, the error comes back with the V flag set and the caller decides. ARM has since renamed the instruction SVC, but in RISC OS circles it is still a SWI.

← Back to the lexicon