SW500008 Microchip Technology, SW500008 Datasheet - Page 57

PICC-18 STD

SW500008

Manufacturer Part Number
SW500008
Description
PICC-18 STD
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC18r
Datasheets

Specifications of SW500008

Supported Families
PIC18
Core Architecture
PIC
Software Edition
Standard
Kit Contents
Software And Docs
Mcu Supported Families
PIC18
Tool Function
Compiler
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
PIC18 Series
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
015
778-1001
778-1001
C Language Features
sequences, except where the strings are used to initialise an array residing in the data space as shown
in the last statement in the previous example.
by the compiler. Thus:
assigned the pointer with the string "hello world".
3.4.2 Bit Data Types and Variables
HI-TECH PICC-18 STDsupports bit integral types which can hold the values 0 or 1. Single bit
variables may be declared using the keyword bit. bit objects declared within a function, for exam-
ple:
will be allocated in the bit-addressable psect rbit, and will be visible only in that function. When
the following declaration is used outside any function:
init_flag will be globally visible, but located within the same psect.
by using the bit keyword in the function’s prototype in the usual way. The bit return value will be
returned in the carry flag of the STATUS register.
contain the values 0 and 1, and therefore provide a convenient and efficient method of storing boolean
flags without consuming large amounts of internal RAM. It is, however, not possible to declare
pointers to bit variables or statically initialize bit variables.
possible, thus the generated code to access bit objects is very efficient.
used. For example, if the bit variable bitvar was assigned as in the following:
HI-TECH C will use the same storage location and label for strings that have identical character
Two adjacent string constants (i.e. two strings separated only by white space) are concatenated
Bit variables cannot be auto or parameters to a function. A function may return a bit object
Bit variables behave in most respects like normal unsigned char variables, but they may only
Operations on bit objects are performed using the single bit instructions (bsf and bcf) wherever
Note that when assigning a larger integral type to a bit variable, only the least-significant bit is
const char * cp = "hello " "world";
static bit init_flag;
bit init_flag;
int data = 0x54;
bit bitvar;
bitvar = data;
Supported Data Types and Variables
43

Related parts for SW500008