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

Mode Specifier

OS SWI Calls
» OS_ReadModeVariable
» Mode Specifier

Mode Specifier

A mode specifier is a single-word value used to specify a screen mode. It is handled as follows:

  • If it is a number from 0 to 255, it is assumed to be a mode number
  • Else if the bottom bit is set, it is assumed to be a Sprite Mode Word (describing a RISC OS 3.5 or RISC OS 5 format sprite)
  • Otherwise it is assumed to be a pointer to a Mode Selector Block

Unless otherwise noted, all APIs for dealing with screen modes accept all of the above forms.

Note that some APIs have additional rules, e.g. a mode specifier of -1 may be used to refer to the current screen mode. Remember that these are extensions to the specification and are not understood by all APIs.

Also remember that it is nonsensical to pass in a sprite mode word to some APIs; for example attempting to set the screen mode using a RISC OS 3.5 sprite mode word will fail, as the mode word does not contain any width or height information.

See also

  • Screen Modes
  • Sprite Mode Word
  • Mode Selector Block
  • OS_ScreenMode
  • OS_ReadModeVariable
  • Wimp_SetMode
Other languages documentation

Français

Revised on October 23, 2019 12:37:51 by nemo (145) (86.7.33.6)
Edit | Back in time (5 revisions) | See changes | History | Views: Print | Source | Linked from: Mode Selector Block, Wimp_SetMode, ColourTrans_GenerateTable, ColourTrans_SelectGCOLTable, ColourTrans_SelectTable, Sprite Mode Word, OS_Byte 135, OS_ScreenMode 0, Service_ModeExtension, Service_ModeChange, Service_PreModeChange, ColourTrans mode identification, OS_ScreenMode 1, OS_ReadModeVariable, Mode String, OS_SpriteOp 15, Sprite Mode Word (français), Mode Specifier (français)

Search the Wiki

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2018 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