_swi (Windows CE 5.0)

Send Feedback

This intrinsic function generates a call to an OS routine using the software interrupt instruction SWI.

unsigned int__swi(unsigned swi_number,arg2, arg3, arg4);

Parameters

  • swi_number
    Software Interrupt number
  • arg2-arg4
    Additional arguments for passing

Return Values

The _swi intrinsic function returns the value left in register R0 when control is returned to the instruction following the SWI.

Remarks

The _swi intrinsic applies to the ARM or the Thumb instruction set, depending on whether the compiler is generating 32-bit or 16-bit code.

The first parameter, swi_number, is encoded directly into the immediate field of the instruction. It must be an integer constant in the range [0 - 16777215] for ARM or [0 - 255] for Thumb.

If additional arguments are included, the function passes the values according to the standard ARM calling convention with one exception: no arguments or parts of arguments may be passed in memory, that is, on the stack.

Therefore, all arguments must be able to be passed using only registers R0, R1, R2, and R3.

Requirements

Header: armintr.h.

See Also

/QRarch - Specify Target Architecture | /QRthumb

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.