# Vault 7: Projects

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

### Protego

# MPLAB XC16 C-Compiler

- 1
- 2
…
- 302
- 303
- 304
- 305
- 306
…
- 365
- 366

MPLAB
®
XC16 C Compiler Users Guide
DS50002071C-page 304  2012-2013 Microchip Technology Inc.
__builtin_write_CRYOTP
Description: Initiates a write to the Crypto OTP by issuing the correct unlock sequence and setting the
CRYWR bit.
Interrupts may need to be disable for proper operation.
This builtin function can be used as a part of a complex sequence discussed in the data
sheet or family reference manual.
See this documentation for more information.
Prototype: void __builtin_write_CRYOTP(void);
Argument: None.
Return Value: None.
Assembler Operator/
Machine Instruction:
mov #0x55, Wn
mov Wn, _CRYKEY
mov #0xAA, Wn
mov Wn, _CRYKEY
bset _CRYCON, #0
nop
nop
Error Messages None.
__builtin_disable_interrupts
Description: Disable the specified interrupts.
Prototype: void __builtin_disable_interrupts(unsigned int interrupt);
Argument: interrupt Interger value specifying the interrupt to disable.
Return Value: None.
Assembler Operator/
Machine Instruction:
disable_interrupts
Error Messages None.
__builtin_disi
Description: Disables all interrupts for a specified number of instruction cycles. See
Section 14.7 Enabling/Disabling Interrupts.
Will emit the specified DISI instruction at the point it appears in the source program: disi
#<disi_count>
Prototype: void __builtin_disi(int disi_count);
Argument: disi_count instruction cycle count. Must be a literal integer between 0 and 16383.
Return Value: N/A
Assembler Operator/
Machine Instruction:
disi.f

- 1
- 2
…
- 302
- 303
- 304
- 305
- 306
…
- 365
- 366