6.1 Variable types

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

 

      There are seven types of variables (named memory areas) in C--:

  byte, word, dword, char, int, long, float.

 

      The table below lists the size and range of values for each type.

 

   NAME   |size   |        VALUE RANGE       |        VALUE RANGE

   type   |in byte| range in decimal notation| range in hex notation

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

  byte    |   1   |           0 to 255       |        0x00 to 0xFF

  word    |   2   |           0 to 65535     |      0x0000 to 0xFFFF

  dword   |   4   |           0 to 4294967295|  0x00000000 to 0xFFFFFFFF

  char    |   1   |        -128 to 127       |        0x80 to 0x7F

  int     |   2   |      -32768 to 32767     |      0x8000 to 0x7FFF

  long    |   4   | -2147483648 to 2147483647|  0x80000000 to 0x7FFFFFFF

  float   |   4   |    -3,37E38 to +3,37E38  |  0xFF7FFFFF to 0x7FFFFFFF

 

      Note: when working with types 'float', 'dword' and 'long', 32-bit

  integer commands are used, which requires at least a 386.

 

      For compatibility with C standards, we have added the new reserved

  words 'short', 'signed', and 'unsigned'. For type 'int' in the 32-bit mode,

  bit-size has changed. Below is a table of all variants of the new data

  types:

 

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

  | full type        |possible type        |old analogs   |

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

  |signed char       |char                 |  char        |

  |signed int        |signed, int          |  int/long    |

  |signed short int  |short, signed short  |  int         |

  |signed long int   |long, signed long    |  long        |

  |unsigned char     |---                  |  byte        |

  |unsigned int      |unsigned             |  word/dword  |

  |unsigned short int|unsigned short       |  word        |

  |unsigned long int |unsigned long        |  dword       |

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

 

      The old types 'byte', 'word' and 'dword' are still supported and have

  the same functional value as before. The only changes are to type 'int',

  which like 'unsigned int' is 16-bit in 16-bit mode but 32-bit in 32-bit

  mode. These properties appear at first glance rather confusing, but there

  is a gain when this type is used in library files, which can be used for

  compiling both 16-bit and 32-bit programs.