So you want to use interrupts. Here's the top level overview.
First, you need to be writing a relocatable module. The difficulty with code in application space (the area of memory that BASIC and normal compiled C programs run in, starting at &8000) is that applications are swapped in and out. So you can't guarantee that your code will be paged in when the interrupt happens - you might end up calling another app instead. This means that BASIC is out.
If you're writing C, you need to set up appropriate 'interrupt veneers'. These are entry points that set up the right registers (stack etc) to call the C functions themselves. This is done with the module header generator - either CMHG (Acorn/ROOL C) or CMunge (GCC). If you're writing assembler you don't need veneers.
Then you need to register the entrypoints to the veneers with the interrupt handler. This is indeed OS_ClaimDeviceVector. You also need something to OS_RemoveDeviceVector when you're done (eg in the module finalisation section if your module is killed).
And finally you need to know what device number your interrupt is at. In the old days, the manual told you. On all Acorn hardware podules (the cards that plugged into the back of your Archimedes or Risc PC) were interrupt 13, for example. Today we run on lots of different hardware, so we have to look up the device number. For this we use the HAL:
https://www.riscosopen.org/wiki/documen ... on%20Layer
First, see the HAL Device API section to find out what the device number of your chosen hardware is. Then use the device number with OS_ClaimDeviceVector. Finally use the HAL Interrupt API to enable interrupts on your chosen device. When you're done, turn off interrupts for it before removing the device vector.
Note that HAL_Something isn't a SWI, it's a HAL call. You can make HAL calls via the SWI OS_Hardware 0, but you can also get a pointer to the function to call directly (using OS_Hardware 1).
You don't want to use OS_IntOn or IntOff, because that kills interrupts for the whole system. If you do that all your USB, network, etc will jam up.
Hope that is enough of an overview to get started. As an aside, you might want to look at the HAL Timer API, as that might give you sufficient fine-grained timing to not need interrupts.