# Vault 7: Projects

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

### Protego

# PIC24FJ64GA004 - Programmers Reference Manual

- 1
- 2
…
- 444
- 445
- 446
- 447
- 448
…
- 501
- 502

16-bit MCU and DSC Programmer’s Reference Manual
DS70157F-page 446 © 2005-2011 Microchip Technology Inc.
6.1 INTRODUCTION
This section describes the built-in functions that are specific to the MPLAB C Compiler for PIC24
MCUs and dsPIC DSCs (formerly MPLAB C30).
Built-in functions give the C programmer access to assembler operators or machine instructions
that are currently only accessible using in-line assembly, but are sufficiently useful that they are
applicable to a broad range of applications. Built-in functions are coded in C source files
syntactically like function calls, but they are compiled to assembly code that directly implements
the function, and do not involve function calls or library routines.
There are a number of reasons why providing built-in functions is preferable to requiring
programmers to use in-line assembly. They include the following:
1. Providing built-in functions for specific purposes simplifies coding.
2. Certain optimizations are disabled when in-line assembly is used. This is not the case for
built-in functions.
3. For machine instructions that use dedicated registers, coding in-line assembly while
avoiding register allocation errors can require considerable care. The built-in functions
make this process simpler as you do not need to be concerned with the particular register
requirements for each individual machine instruction.
The built-in functions are listed below followed by their individual detailed descriptions.
This section describes only the built-in functions related to the CPU operations. The compiler
provides additional built-in functions for operations such as writing to Flash program memory and
changing the oscillator settings. Refer to the “MPLAB
®
C Compiler for PIC24 MCUs and dsPIC
®
DSCs User’s Guide” (DS51284) for a complete list of compiler built-in functions.
• __builtin_addab
• __builtin_add
• __builtin_btg
• __builtin_clr
• __builtin_clr_prefetch
• __builtin_divf
• __builtin_divmodsd
• __builtin_divmodud
• __builtin_divsd
• __builtin_divud
• __builtin_dmaoffset
• __builtin_ed
• __builtin_edac
• __builtin_edsoffset
• __builtin_edspage
• __builtin_fbcl
• __builtin_lac
• __builtin_mac
• __builtin_modsd
• __builtin_modud
• __builtin_movsac
• __builtin_mpy
• __builtin_mpyn
• __builtin_msc
• __builtin_mulss
• __builtin_mulsu
• __builtin_mulus
• __builtin_muluu
• __builtin_nop
• __builtin_psvpage
• __builtin_psvoffset
• __builtin_readsfr
• __builtin_return_address
• __builtin_sac
• __builtin_sacr
• __builtin_sftac
• __builtin_subab
• __builtin_tbladdress
• __builtin_tblpage
• __builtin_tbloffset
• __builtin_tblrdh
• __builtin_tblrdl
• __builtin_tblwth
• __builtin_tblwtl

- 1
- 2
…
- 444
- 445
- 446
- 447
- 448
…
- 501
- 502