Using function memory attributes
It is possible to override the default placement for individual functions. Use the appropriate function memory attribute to specify this.
These attributes are available:
Function memory attribute | Address range | Pointer size | Description |
|---|---|---|---|
|
| 2 bytes | The function can be called from anywhere in memory, using a vectored |
|
| 2 bytes | The function can be called from anywhere in memory. This is the default attribute in the Near code model. |
|
| 3 bytes | The function can be called from anywhere in memory. This is the default attribute in the Far code model. |
Pointers with function memory attributes have restrictions in implicit and explicit casts between pointers and between pointers and integer types. For information about the restrictions, see Casting.
For syntax information and for more information about each attribute, see Extended keywords.