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

OS_SWINumberFromString

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

OS_SWINumberFromString

(SWI &39)
Entry
R1 Pointer to name (control terminated)
Exit
R0 SWI number
R1 Preserved

Use

The purpose of this call is to convert a SWI name string to a SWI number.

Notes

An error is given if the SWI name is not recognized.

The conversion is as follows:

  • A leading X is stripped. If present, it will cause &20000 to be added to the number returned (bit 17)
  • System names are checked for. Note that the conversion of SWIs isn’t very bidirectional: the name OS_WriteI+" " can be produced, but only OS_WriteI is recognised
  • Modules are scanned. If the module prefix matches the one given, and the suffix to the name is a number, then that number is added to the module’s SWI ‘chunk’ base, and the sum returned. For example, Wimp_&23 returns &400E3, as the Wimp’s chunk number is &400C0
  • If the suffix is a name, and this can be matched by the module, the appropriate number is returned. For example, Wimp_Poll returns &400C7

See also

  • OS_SWINumberToString
Created on December 4, 2009 14:19:03 by Alan Robertson (52)? (127.0.0.1)
Edit | Views: Print | Source | Linked from: OS SWI Calls, OS_SWINumberToString

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