swi
This module provides access to the RiscOS SWI interface. It provides a function swi that puts suitable values in the arm registers, calls the SWI and extracts values from registers.
As many SWIs manipulate blocks of memory a new object type is provided for handling blocks of memory and inserting and extracting values from them.
Errors are reported as exceptions; the usual exceptions are given for type, index and value errors, while errors reported by X versions of the system calls raise swi.error, described below.
Module swi defines the following data item:
It defines the following functions:
The memory of a block is guaranteed not to move unless the block is deleted or resized.
Blocks support index and slice operations as for lists of integers, except that the block cannot change size, so assignments are truncated or padded as for initialization. Slices beyond the end of the block give index errors.
Block items support the following data items and methods.