RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Software | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

Variable Type Code

Programmer's Reference Manuals
» Part 15 – SWI Calls
» OS
» OS_ReadVarVal
» Variable Types
» Code

Code

Notes

R1 points to a block containing the following:

Offset Contents
+0 This is where the OS jumps when the variable is to be written. Will normally be a branch instruction
+4 This is where the OS jumps when the variable is to be read – your code may start here

When the Write entry is called
|_<^{width:4em}. Entry | |
|<^. R2 |<^. Length of value |

Exit
R1, R2, R4, R10, R11 & R12 may be corrupted

When the Read entry is called
|_<^{width:4em}. Entry ||
|<^. – |<^. – |

Exit
R1 Pointer to value
R2 May be corrupted
R3 Length of value

The two entry points are called in SVC mode, so if you call a SWI then R14 will be corrupted.

Note that OS_ReadVarVal is marked as being re-entrant, so in theory your code could be called while threaded. However, the PRM makes no mention of this, neither warning that it could happen, nor stating that the kernel makes sure that it does not happen.

See also

  • OS_ReadVarVal
  • OS_ReadVarVal Variable Types
Created on December 1, 2009 20:08:45 by Alan Robertson (52)? (127.0.0.1)
Edit | Views: Print | Source | Linked from: OS_ReadVarVal Variable Types

Search the Wiki

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

ROOL Store

The official C/C++ Development kit and more here.

Donate! Why?

Help ROOL make things happen – please consider donating!

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2011 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys