This chapter documents the changes to the program environment for RISC OS Pyromaniac.
Largely, the program environment in RISC OS Pyromaniac is as documented within the Program Environment Chapter. However, certain interfaces are slightly different to make extensions to the system simpler.
On 26bit systems, the register buffer in the callback handler is 16 words (64 bytes) long. This area stores the registers at the time of a call to the callback (threading back to user mode).
On 32bit systems, the register buffer is 17 words (68 bytes) long. This is the same layout as the 26bit system, but with the value of the CSPR in the final word.
The size of the exception register area, and its layout is described by
The format of the exception register area is the same as the callback handler register buffer.
Under RISC OS Classic, the handling of a branch through 0 (calling address 0) was performed within the Kernel as an implicit part of abort handling. For RISC OS Select 3, the handling of branch through zero moved to the undefined instruction handler. In either case, the only action possible was for an error to be raised.
Under RISC OS Pyromaniac, the Branch through 0 handler is called when code is executed at address 0. This handler stores registers in the abort area, just as the abort handler would. The default action for this handler is to raise the 'Branch through 0' error.
Under RISC OS Classic, the command line buffers were fixed in memory.
When an
The buffer length in RISC OS 4 and later is 1024 bytes. Prior to RISC OS 4, the length was 256 bytes.
Under RISC OS Pyromaniac, the area that the Kernel will use to store the command line is a part of the program environment, and the size of the buffer is able to be read or changed. The handler buffer, supplied in R3, reports the command line buffer location. The size of the buffer is reported in R2.
The default buffer length under RISC OS Pyromaniac is 1024 bytes but is configurable through the system configuration.
© Gerph, 2020-23.