home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / SIMTEL / HITECH-C / Z80V309.EXE / lha / HITECH.H < prev    next >
Text File  |  1979-11-30  |  2KB  |  69 lines

  1. /*    Standard types for HI-TECH Software code
  2.     These types may need to be tuned for different
  3.     machines/compilers. Notes with each one indicate assumptions
  4.     that should be maintained for each type.
  5.  */
  6.  
  7.  
  8. /*
  9.     Turn ANSI on if the compiler supports function prototypes and
  10.     has the ANSI header files
  11.         <stdlib.h>
  12.         <string.h>
  13.  */
  14.  
  15. #if    HI_TECH_C
  16. #define    ANSI    1
  17. #endif    HI_TECH_C
  18.  
  19. /*    shorthand types */
  20.  
  21. #define    uchar    unsigned char
  22. #define    ulong    unsigned long
  23. #define    ushort    unsigned short
  24.  
  25. /* useful, tuneable types. Change only if:
  26.  
  27.     1) compiler does not support type, e.g. unsigned char.
  28.     2) compiler generates bad code for a particular type.
  29.     3) a larger type would generate faster code, e.g. byte counters
  30.        on the 65816 are inefficient code-wise.
  31.  */
  32.  
  33. #define    BOOL    unsigned char        /* boolean variable. Any integral type
  34.                        will do. */
  35. #define    FAST    char            /* fast, small counter. Must permit
  36.                        values -128 to 127 but may be larger. */
  37. #define    UFAST    unsigned char        /* fast, small unsigned counter. Must
  38.                        permit values 0-255 at least */
  39. #define    BYTE    unsigned char        /* sizeof(BYTE) must == 1 */
  40. #define    INT_16    short            /* signed, >= 16 bits */
  41. #define    UINT_16    unsigned short        /* unsigned, >= 16 bits */
  42. #define    INT_32    long            /* signed, >= 32 bits */
  43. #define    UINT_32    unsigned long        /* unsigned, >= 32 bits */
  44.  
  45.  
  46. /*    Register variable selectors; REG1 is for things that must go
  47.     in registers at all costs, REG2 for things that should, REG3 for
  48.     things that could go in registers if there are any left over.
  49.     Ordering of declarations will of course come into it too.
  50.  */
  51.  
  52. #if    z80        /* only has one register variable */
  53. #define    REG1    register
  54. #define    REG2    auto
  55. #define    REG3    auto
  56. #endif    z80
  57.  
  58. #if    i8086        /* only has two register variable */
  59. #define    REG1    register
  60. #define    REG2    register
  61. #define    REG3    auto
  62. #endif    i8086
  63.  
  64. #if    i8096 || m68k    /* lots of registers! */
  65. #define    REG1    register
  66. #define    REG2    register
  67. #define    REG3    register
  68. #endif    i8096 || m68k
  69.