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

Page "Filer_Action" does not exist. Please create it now, or hit the "back" button in your browser.

OS_EnterUSR32

Programmer's Reference Manuals
» Part 15 – SWI Calls
» OS
» OS_EnterUSR32

OS_EnterUSR32

(SWI &73)
Entry
- -
Exit
All registers preserved

Use

The purpose of this call is to set the processor to Supervisor mode.

Notes

The interrupt status is unaltered.

This SWI returns in 32-bit user mode. Behaviour is undefined unless this SWI is called from 26-bit user mode (normal RISC OS mode). This SWI cannot be called from an address above 64M. This SWI does not use the normal SWI exit code, and does not check for callbacks.

Once in 32-bit user mode, all code is subject to the restrictions of the ARM 32-bit instruction set. Beware of instructions that are illegal in 32-bit mode, and of instructions that behave differently.

Because 32-bit user mode is not the normal RISC OS user mode, there are additional restrictions:

  • 32-bit user mode code must not call any SWIs, except OS_EnterUSR26 to return to normal RISC OS user mode
  • 32-bit user mode code can jump to addresses above 64M (code in dynamic areas), but must jump back below 64M before calling OS_EnterUSR26.
  • Although transient callbacks can occur (via interrupt returns, the current callback handler is not called because the API for callback handlers is not 32-bit aware.
  • If an abort occurs in 32-bit mode code, the register dump information will be as if from 26-bit mode; an abort address above 64M cannot be reported properly. Instead, you should use OS_ReadSysInfo 7 to read the 32-bit PC and PSR for the last abort.

See also

  • OS_EnterUSR26
  • OS_ReadSysInfo 7
Revised on November 26, 2010 12:40:30 by Trevor Johnson (329)? (127.0.0.1)
Edit | Back in time (1 revision) | See changes | History | Views: Print | Source | Linked from: OS SWI Calls, OS_EnterUSR26

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