/****************************************************************** * M_BOOL * ****************************************************************** * Type M_BOOL is a boolean type. It is used for parameter * * passing and return values. * ******************************************************************/ typedef int M_BOOL; #ifndef TRUE # define TRUE 1 #endif #ifndef FALSE # define FALSE 0 #endif /****************************************************************** * CSTRING * ****************************************************************** * A CSTRING is a null-terminated string. * ******************************************************************/ typedef char* CSTRING; /****************************************************************** * M_INT * * M_REAL * ****************************************************************** * M_INT is the type used to store integers directly. * * M_REAL is the type used to store real numbers directly. * ******************************************************************/ typedef long M_INT; typedef double M_REAL; /****************************************************************** * M_WORD * ****************************************************************** * The machine uses some number of words to store each of the * * basic data types. The following constants are define in * * machinedefs.h. * * * * M_SIZE_INTEGER is the number of WORDS used to store an * * integer. * * * * M_SIZE_REAL is the number of words used to store a * * real number. * * * * M_SIZE_ARRAY is the number of words used to store a * * pointer. * * * * The definitions given here are for a 32-bit machine. * ******************************************************************/ typedef long M_WORD; /****************************************************************** * M_BYTE * ****************************************************************** * M_BYTE is the type of the individual bytes in the array that * * holds the byte codes of the program. * ******************************************************************/ typedef unsigned char M_BYTE; #define M_BYTE_BITS 8 #define M_BYTE_MASK 0xFF /****************************************************************** * M_ARRAY * ****************************************************************** * A data array (manipulated by the byte code program) has type * * M_ARRAY. * ******************************************************************/ typedef struct { long size; /* The number of values in the array */ int kind; /* M_INT_KIND for an array of integers, M_REAL_KIND for an array of reals */ union { M_INT* integers; M_REAL* reals; } content; } M_ARRAY_HEADER; typedef M_ARRAY_HEADER* M_ARRAY;