CC llaanngguuaaggee -- Overview

COHERENT  includes a  C compiler  that fully  implements the  Kernighan and
Ritchie standard of C, with extensions taken from the ANSI standard.

Please note  that in the following discussion, _w_o_r_d  indicates an object 16
bits long;  _d_w_o_r_d, an  object 32  bits long; and  _q_w_o_r_d, an object  64 bits
long:

_I_d_e_n_t_i_f_i_e_r_s
     Characters allowed: AA-ZZ, aa-zz, _, 00-99
     Case sensitive
     Number of significant characters in a variable name: 225555

_E_s_c_a_p_e _S_e_q_u_e_n_c_e_s
     The COHERENT C compiler recognizes the following escape sequences:

          _A_S_C_I_I   _C_t_r_l         _H_e_x         _D_e_s_c_r_i_p_t_i_o_n
     \aa   BEL     <ctrl-G>    0x07         audible tone (bell)
     \bb   BS      <ctrl-H>    0x08         backspace
     \ff   FF      <ctrl-L>    0x12         formfeed
     \nn   LF      <ctrl-J>    0x0A         linefeed (newline)
     \rr   CR      <ctrl-M>    0x0D         carriage return
     \tt   HT      <ctrl-I>    0x09         horizontal tab
     \vv   VT      <ctrl-K>    0x0B         vertical tab
     \xxhhhh                     0xhh         hex (one to four hex digits [0-9a-fA-F])
     \oooooo                                  octal (one to four octal digits [0-7])

_R_e_s_e_r_v_e_d _I_d_e_n_t_i_f_i_e_r_s (_K_e_y_w_o_r_d_s)
     See CC kkeeyywwoorrddss, above.

_D_a_t_a _F_o_r_m_a_t_s (_i_n _b_i_t_s)

          cchhaarr              8
          uunnssiiggnneedd cchhaarr     8
          ddoouubbllee            64
          eennuumm              8|32
          ffllooaatt             32
          iinntt               32
          uunnssiiggnneedd iinntt      32
          lloonngg              32
          uunnssiiggnneedd lloonngg     32
          pointer           32
          sshhoorrtt             16
          uunnssiiggnneedd sshhoorrtt    16

_F_l_o_a_t_i_n_g-_P_o_i_n_t _F_o_r_m_a_t_s

     IEEE floating-point ffllooaatt:
         1 sign bit
         8-bit exponent
         24-bit normalized fraction with hidden bit
         Bias of 127

     IEEE floating-point ddoouubbllee:
         1 sign bit
         11-bit exponent
         53-bit fraction
         Bias of 1,023

     Reserved values:
         +- infinity, -0

     All floating-point operations are done as ddoouubbllees.

_L_i_m_i_t_s
     Maximum bitfield size:  32 bits
     Maximum number of ccaassees in a sswwiittcchh:  no formal limit
     Maximum block nesting depth:  no formal limit
     Maximum parentheses nesting depth:  no formal limit
     Maximum structure size:  no formal limit
     Maximum array size:  no formal limit

_P_r_e_p_r_o_c_e_s_s_o_r _I_n_s_t_r_u_c_t_i_o_n_s

          #ddeeffiinnee     #iiffddeeff
          #eellssee       #iiffnnddeeff
          #eelliiff       #iinncclluuddee
          #eennddiiff      #lliinnee
          #iiff         #uunnddeeff
          #pprraaggmmaa

_S_t_r_u_c_t_u_r_e _N_a_m_e-_S_p_a_c_e_s
     Supports both Berkeley and Kernighan-Ritchie conventions for structure
     in union.

_F_u_n_c_t_i_o_n _L_i_n_k_a_g_e
     Return values in EAX
     Return values for ddoouubbllees:
         With software floating-point emulation returns in EDX:EAX
         Hardware floating-point (-VNDP) returns in the NDP stacktop %sstt00
     Parameters pushed on stack in reverse order:
         cchhaarrs, sshhoorrtts, and pointers pushed as dwords
         Structures copied onto the stack
     Caller must clear parameters off stack
     Stack frame linkage is done through ESP register

_S_t_r_u_c_t_u_r_e_s _a_n_d _A_l_i_g_n_m_e_n_t
     Structure members  are aligned according to  the most strictly aligned
     type within  the structure.  For example,  a structure is word-aligned
     if it  contains only  sshhoorrtts, but  on dword if  it contains an  iinntt or
     lloonngg.  #pprraaggmmaa aalliiggnn _n can override this feature.

_R_e_g_i_s_t_e_r_s
     Registers  EBX, EDI,  and ESI  are  available for  register variables.
     Only 32-bit objects go into registers.

_S_p_e_c_i_a_l _F_e_a_t_u_r_e_s _a_n_d _O_p_t_i_m_i_z_a_t_i_o_n_s
Both implementations of C perform the following 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.

_S_e_e _A_l_s_o
aarrggcc,  aarrggvv,  CC  kkeeyywwoorrddss, CC  pprreepprroocceessssoorr,  eennvviirroonn,  eennvvpp, hheeaaddeerr  ffiilleess,
iinniittiiaalliizzaattiioonn,  lliibbrraarriieess,  mmaaiinn(),   nnaammee  ssppaaccee,  PPrrooggrraammmmiinngg  CCOOHHEERREENNTT,
ttrriiggrraapphh
