diff options
Diffstat (limited to 'z80_decode.c')
-rw-r--r-- | z80_decode.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/z80_decode.c b/z80_decode.c index 4b6929c..81760ae 100644 --- a/z80_decode.c +++ b/z80_decode.c @@ -27,6 +27,7 @@ */ #include <stdlib.h> +#include <limits.h> #include "z80.h" #include "z80_private.h" @@ -71,6 +72,8 @@ void Z80_InitialiseInternals(void) Z80Word f; Z80Reg r; + /* Check endianness + */ r.w=0x1234; if (r.b[0] == 0x12) @@ -88,6 +91,13 @@ void Z80_InitialiseInternals(void) exit(1); } + /* Check variable sizes + */ + if (CHAR_BIT!=8 || sizeof(Z80Word)!=2) + { + exit(2); + } + /* Initialise flag tables */ for(f=0;f<256;f++) |