13.6 C-- tokens

----------------

TOKEN |FUNCTION |EXAMPLE

-------------------------------------------------------------------

/* |begin comment block |/* commentary */

*/ |end comment block |/* commentary */

// |comment to end of line |// commentary

| |

= |assignment |AX = 12;

+ |addition |AX = BX + 12;

- |subtraction |house = dog - church;

* |multiplication or pointer |x = y * z; AL = * var;

/ |division |x1 = dog / legs;

& |bitwise logical AND |pollution = stupid & pointless;

| |bitwise logical OR |YES = i | maybe;

^ |bitwise exclusive OR |SNAP = got ^ power;

<< |bit shift to the left |x = y << z;

>> |bit shift to the right |x = y >> z;

+= |addition plus assignment |fox += 12; // fox = fox +12;

-= |subtraction |cow -= BX; // cow = cow - BX;

*= |multiplication |a *= b; // a = a * b;

/= |division |a /= b; // a = a / b;

&= |bitwise logical AND |p &= q; // p = p & q;

|= |bitwise logical OR |P |= z; // p = p | z;

^= | excluding OR |U ^= s; // u = u ^ s;

<<= |bit shift to the left |x <<= z; // x = x << z

>>= |bit shift to the right |x >>= z; // x = x >> z

>< |exchange values |x >< y; /*exchanges values of x and y*/

== |checking for equality |IF(AX == 12)

> |checking for more than |IF(junk > BOGUS)

< |checking for less than |if( x < y )

>= |greater than equal |if(AX >= 12)

<= |check less or equal |IF(BL >= CH)

!= |checking for not equal to |IF(girl != boy)

<> |checking for difference |if(cat<>dog) /*same function as!=*/

@ |insertion of code |@ COLDBOOT(); /* inserts COLDBOOT code */

: |dynamic function |: functionname () //declares functionname

$ |assembler command |$ PUSH AX /* pushes AX to stack */

# |get address or directive |loc = #cow; /* loc = address of cow */

| | #resize FALSE

! |operator NOT or change |!x_var; if(!proc())

|flag of operation compare. |

... |any number of parameters in| void proc(...);

:: |permit visibility | ::var=0;