35 lines
486 B
C
35 lines
486 B
C
#ifndef TYPES_H
|
|
#define TYPES_H
|
|
|
|
#include "platform.h"
|
|
|
|
typedef signed int integral_t;
|
|
typedef float decimal_t;
|
|
|
|
typedef union half_word_t {
|
|
char bytes[2];
|
|
short s;
|
|
} half_word_t;
|
|
|
|
typedef union word_t {
|
|
integral_t i;
|
|
decimal_t d;
|
|
half_word_t halves[2];
|
|
char bytes[4];
|
|
} word_t;
|
|
|
|
typedef union proc_object_t {
|
|
integral_t i;
|
|
decimal_t d;
|
|
word_t word;
|
|
struct {
|
|
char bytes[4];
|
|
};
|
|
} proc_object_t;
|
|
|
|
typedef struct BIG big_endian_int_t {
|
|
int value;
|
|
} big_endian_int_t;
|
|
|
|
#endif
|