Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 User Manual

Product codes
SW006021-1
Page of 518
Library Functions
 2012 Microchip Technology Inc.
DS52053B-page 317
Example
#include <xc.h>
void 
main (void)
{
  control |= 0x80;
  _delay(10);    // delay for 10 cycles
  control &= 0x7F;
}
See Also
_delay3(), __delay_us()
, __delay_ms()
_DELAY3() 
Synopsis
#include <xc.h>
 
void _delay3(unsigned char cycles);
Description
This is an inline function that is expanded by the code generator. When called, this rou-
tine expands to an inline assembly delay sequence.The sequence will consist of code 
that delays for 3 times the number of cycles that is specified as argument. The argu-
ment can be a byte-sized constant or variable.
Example
#include <xc.h>
void 
main (void)
{
  control |= 0x80;
  _delay(10);    // delay for 30 cycles
  control &= 0x7F;
}
See Also
_delay
ABS 
Synopsis
#include <stdlib.h>
 
int abs (int j)
Description
The abs() function returns the absolute value of j.