Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

MPLAB
®
XC16 C Compiler Users Guide
DS50002071C-page 8 2012-2013 Microchip Technology Inc.
Chapter 13. Functions
13.1 Introduction ............................................................................................... 175
13.2 Writing Functions ...................................................................................... 175
13.2.1 Function Specifiers ................................................................................175
13.2.2 Function Attributes .................................................................................176
13.3 Function Size Limits ................................................................................. 184
13.4 Allocation of Function Code ..................................................................... 184
13.5 Changing the Default Function Allocation ................................................ 184
13.6 Inline Functions ........................................................................................ 185
13.7 Memory Models ........................................................................................ 186
13.7.1 Near or Far Code ...................................................................................187
13.8 Function Call Conventions ....................................................................... 188
13.8.1 Function Parameters ..............................................................................188
13.8.2 Return Value ..........................................................................................190
13.8.3 Preserving Registers Across Function Calls ..........................................190
Chapter 14. Interrupts
14.1 Introduction ............................................................................................... 191
14.2 Interrupt Operation ................................................................................... 192
14.3 Writing an Interrupt Service Routine ........................................................ 193
14.3.1 Guidelines for Writing ISRs ....................................................................193
14.3.2 Syntax for Writing ISRs ..........................................................................193
14.3.3 Coding ISRs ...........................................................................................194
14.3.4 Using Macros to Declare Simple ISRs ...................................................194
14.4 Specifying the Interrupt Vector ................................................................. 195
14.5 Interrupt Service Routine Context Saving ................................................ 196
14.6 Nesting Interrupts ..................................................................................... 196
14.7 Enabling/Disabling Interrupts ................................................................... 197
14.8 ISR Considerations .................................................................................. 198
14.8.1 Sharing Memory with Mainline Code .....................................................198
14.8.2 PSV Usage with Interrupt Service Routines ..........................................202
14.8.3 Latency ..................................................................................................202
Chapter 15. Main, Runtime Startup and Reset
15.1 Introduction ............................................................................................... 203
15.2 The main Function .................................................................................... 203
15.3 Runtime Startup and Initialization ............................................................. 203
Chapter 16. Mixing C and Assembly Code
16.1 Introduction ............................................................................................... 205
16.2 Mixing Assembly Language and C Variables and Functions ................... 205
16.3 Using Inline Assembly Language ............................................................. 208
16.4 Predefined Assembly Macros ................................................................... 212
Chapter 17. Library Routines
Chapter 18. Optimizations
18.1 Introduction ............................................................................................... 215
18.2 Setting Optimization Levels ...................................................................... 215
18.3 Optimization Feature Summary ................................................................ 216

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh