|
|
coherent
C language Overview C language
The following summarizes how COHERENT implements the C language.
Identifiers
Characters allowed: AA-ZZ, aa-zz, _, 00-99
Case sensitive.
Number of significant characters in a variable name:
at compile time:112288
at link time:1166
C appends `_' to end of external identifiers
Reserved Identifiers (Keywords)
See CC kkeeyywwoorrddss, above.
Data Formats (bits)
cchhaarr 8
uunnssiiggnneedd cchhaarr 8
ddoouubbllee 64
ffllooaatt 32
iinntt 16
uunnssiiggnneedd iinntt 16
lloonngg 32
uunnssiiggnneedd lloonngg 32
pointer 16
Limits
Maximum bitfield size: 16 bits
Maximum number of ccaassees in a sswwiittcchh: no formal limit
Maximum block nesting depth: no formal limit
Maximum parentheses nesting depth: no formal limit
Maximum structure size: 64 kilobytes
Preprocessor Instructions:
#define #ifdef
#else #ifndef
#elif #include
#endif #line
#if #undef
Structure Name-Spaces
Supports both Berkeley and Kernighan-Ritchie conventions
for structure in union.
Register Variables
Two available for iinntts
Two available for pointers
Function Linkage
Return values for iinntts: AX
Return values for lloonnggs: DX:AX
Return values for SMALL-model pointers: AX
Return values for LARGE-model pointers: DX:AX
Return values for ddoouubbllees in DX:AX
Parameters pushed on stack in reverse order, cchhaarrs and sshhoorrtts pushed
as words, lloonnggs and pointers pushed as lloonnggs, structures
COHERENT Lexicon Page 1
C language Overview C language
copied onto stack
Caller must clear parameters off stack
Stack frame linkage is done through SP register
***** Special Features and Optimizations *****
* Branch optimization is performed: this uses the smallest branch
instruction for the required range.
* Unreached code is eliminated.
* Duplicate instruction sequences are removed.
* Jumps to jumps are eliminated.
* Multiplication and division by constant powers of two are
changed to shifts when the results are the same.
* Sequences that can be resolved at compile time are identified
and resolved.
***** See Also *****
argc, argv, C keywords, C preprocessor, header files, Lexicon,
libraries, linker-defined symbols, main()
COHERENT Lexicon Page 2
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.