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 "Draw_Fill/versions/7" does not exist. Please create it now, or hit the "back" button in your browser.

OS_ChangeEnvironment

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

OS_ChangeEnvironment

(SWI &40)
Entry
R1 Handler number
R1 New address, or 0 to read
R2 Value of R12 when code is called
R3 Pointer to buffer if appropriate or 0 to read
Exit
R0 Preserved
R1 Previous address
R2 Previous R12
R3 Previous buffer pointer

Use

The purpose of this call is to install a handler.

Notes

This is a single routine which performs the actions of OS_Control, OS_SetEnv, OS_CallBack, OS_BreakCtrl and OS_UnusedSWI. In fact all of those routines use this call and are only kept for backwards compatibility, so you should use this call in preference.

Note, OS_ChangeEnvironment vectors through ChangeEnvironmentV. A routine linked into this vector can stop the change from happening by setting R1 to zero and passing the call on.

If you set up any handlers, you must provide Error, Exit and UpCall handlers so that you can restore all handlers on any kind of program exit (even X SWIs can generate serious errors).

See also

  • OS_BreakCtrl
  • OS_CallBack
  • OS_Control
  • OS_SetEnv
  • OS_UnusedSWI
  • System Control Handlers
Revised on November 26, 2010 12:28:03 by Trevor Johnson (329)? (127.0.0.1)
Edit | Back in time (1 revision) | See changes | History | Views: Print | Source | Linked from: Error Generators, OS SWI Calls, OS_BreakCtrl, OS_BreakPt, OS_CallBack, OS_Control, System Control Handlers, Escape Handler, Software Vector Numbers, OS_GetEnv, OS_SetCallBack, OS_SetEnv, OS_UnusedSWI, OS_WriteEnv, Internal Communications Introduction, UKSWIV

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