home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CBM Funet Archive
/
cbm-funet-archive-2003.iso
/
cpm
/
programming
/
HiTech_C
/
z80v309.lzh
/
HITECH.H
< prev
next >
Wrap
Text File
|
1993-10-26
|
2KB
|
69 lines
/*sTANDARD TYPES FOR hi-tech sOFTWARE CODE
tHESE TYPES MAY NEED TO BE TUNED FOR DIFFERENT
MACHINES/COMPILERS. nOTES WITH EACH ONE INDICATE ASSUMPTIONS
THAT SHOULD BE MAINTAINED FOR EACH TYPE.
*/
/*
tURN ansi ON IF THE COMPILER SUPPORTS FUNCTION PROTOTYPES AND
HAS THE ansi HEADER FILES
<STDLIB.H>
<STRING.H>
*/
#IFhi_tech_c
#DEFINEansi1
#ENDIFhi_tech_c
/*SHORTHAND TYPES */
#DEFINEUCHARUNSIGNED CHAR
#DEFINEULONGUNSIGNED LONG
#DEFINEUSHORTUNSIGNED SHORT
/* USEFUL, TUNEABLE TYPES. cHANGE ONLY IF:
1) COMPILER DOES NOT SUPPORT TYPE, E.G. UNSIGNED CHAR.
2) COMPILER GENERATES BAD CODE FOR A PARTICULAR TYPE.
3) A LARGER TYPE WOULD GENERATE FASTER CODE, E.G. BYTE COUNTERS
ON THE 65816 ARE INEFFICIENT CODE-WISE.
*/
#DEFINEboolUNSIGNED CHAR/* BOOLEAN VARIABLE. aNY INTEGRAL TYPE
WILL DO. */
#DEFINEfastCHAR/* FAST, SMALL COUNTER. mUST PERMIT
VALUES -128 TO 127 BUT MAY BE LARGER. */
#DEFINEufastUNSIGNED CHAR/* FAST, SMALL UNSIGNED COUNTER. mUST
PERMIT VALUES 0-255 AT LEAST */
#DEFINEbyteUNSIGNED CHAR/* SIZEOF(byte) MUST == 1 */
#DEFINEint_16SHORT/* SIGNED, >= 16 BITS */
#DEFINEuint_16UNSIGNED SHORT/* UNSIGNED, >= 16 BITS */
#DEFINEint_32LONG/* SIGNED, >= 32 BITS */
#DEFINEuint_32UNSIGNED LONG/* UNSIGNED, >= 32 BITS */
/*rEGISTER VARIABLE SELECTORS; reg1 IS FOR THINGS THAT MUST GO
IN REGISTERS AT ALL COSTS, reg2 FOR THINGS THAT SHOULD, reg3 FOR
THINGS THAT COULD GO IN REGISTERS IF THERE ARE ANY LEFT OVER.
oRDERING OF DECLARATIONS WILL OF COURSE COME INTO IT TOO.
*/
#IFZ80/* ONLY HAS ONE REGISTER VARIABLE */
#DEFINEreg1REGISTER
#DEFINEreg2AUTO
#DEFINEreg3AUTO
#ENDIFZ80
#IFI8086/* ONLY HAS TWO REGISTER VARIABLE */
#DEFINEreg1REGISTER
#DEFINEreg2REGISTER
#DEFINEreg3AUTO
#ENDIFI8086
#IFI8096 {$7c}{$7c} M68K/* LOTS OF REGISTERS! */
#DEFINEreg1REGISTER
#DEFINEreg2REGISTER
#DEFINEreg3REGISTER
#ENDIFI8096 {$7c}{$7c} M68K