Download CCS C Compiler Manual
Transcript
PreProcessor
Example
Files:
ex_psp.c
Also See:
#ERROR
#word
Syntax:
#WORD id = x
Elements:
id is a valid C identifier,
x is a C variable or a constant
Purpose:
If the id is already known as a C variable then this will locate the variable at address x. In this case
the variable type does not change from the original definition. If the id is not known a new C variable
is created and placed at address x with the type int16
Warning: In both cases memory at x is not exclusive to this variable. Other variables may be located
at the same location. In fact when x is a variable, then id and x share the same memory location.
Examples:
#word data = 0x0800
struct {
int lowerByte : 8;
int upperByte : 8;
} control_word;
#word control_word = 0x85
...
control_word.upperByte = 0x42;
Example
Files:
None
Also See:
#bit, #byte, #locate, #reserve, Named Registers, Type Specifiers, Type Qualifiers, Enumerated
Types, Structures & Unions, Typedef
129
Related documents
C Compiler User Manual
Agilent 3396 Series Integrator
Final Document
The LSE User`s Manual
Copyright 1995, Jean J. Labrosse, Plantation, FL
drivemaster2 - SIEB & MEYER AG
pdf Tracker G400 /G500 and Tracker for Android
Artit Jirapatnakul - College of Engineering
Programming 8-bit PIC Microcontrollers in C 2008
User Manual for River Form & Channel Analysis
DISEÑO Y CONSTRUCCIÓN DE U - DSpace en ESPOL
EUROPEAN ORGANISATION FOR THE SAFETY OF