Atmel CAVR-4 Manual De Usuario
![Atmel](https://files.manualsbrain.com/attachments/0369829915bda09f9c2e00fb805a7753579683b5/common/fit/150/50/8d2bf08978ec3e5bc63f4343ac5e91ce8d0e40045619fa520d910d64af8f/brand_logo.png)
CAVR-4
240
Descriptions of intrinsic functions
AVR® IAR C/C++ Compiler
Reference Guide
_ _multiply_unsigned
unsigned int _ _multiply_unsigned(unsigned char, unsigned char);
Generates a
MUL
instruction.
_ _no_operation
void _ _no_operation(void);
Generates a
NOP
instruction.
_ _require
void _ _require(void *);
Sets a constant literal as required.
One of the prominent features of the IAR XLINK Linker is its ability to strip away
anything that is not needed. This is a very good feature because it reduces the resulting
code size to a minimum. However, in some situations you may want to be able to
explicitly include a piece of code or a variable even though it is not directly used.
anything that is not needed. This is a very good feature because it reduces the resulting
code size to a minimum. However, in some situations you may want to be able to
explicitly include a piece of code or a variable even though it is not directly used.
The argument to
_ _require
could be a variable, a function name, or an exported
assembler label. It must, however, be a constant literal. The label referred to will be
treated as if it would be used at the location of the
treated as if it would be used at the location of the
_ _require
call.
Example
In the following example, the copyright message will be included in the generated
binary file even though it is not directly used.
binary file even though it is not directly used.
#include <intrinsics.h>
char copyright[] = "Copyright 2005 by XXXX";
void main(void)
{
_ _require(copyright);
[... the rest of the program ...]
}
_ _restore_interrupt
void _ _restore_interrupt(unsigned char oldState);
This intrinsic function will restore the interrupt flag to the specified state.
Note: The value of
oldState
must be the result of a call to the
_ _save_interrupt
intrinsic function.
_ _reverse
unsigned int _ _reverse(unsigned int);
This intrinsic function reverses the byte order of the value given as parameter. Avoid
using
using
_ _reverse
in complex expressions as it might introduce extra register copying.