home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ARM Club 3
/
TheARMClub_PDCD3.iso
/
programs
/
emulaton
/
trash80
/
!Trash80
/
h
/
general
< prev
Wrap
Text File
|
1992-08-19
|
2KB
|
111 lines
/* Quelques definitions qui devraient se trouver dans un fichier type.h */
typedef unsigned char u_char;
typedef unsigned int u_int;
#include <stddef.h>
#ifndef BOOL
#define BOOL int
#endif
#define ARM
/* Quelques definitions et macros utiles */
#define BITS 128
#define BITV 4
#define BITP 4
#define BITC 1
#define BITN 2
#define BITZ 64
#define BITH 16
/* Taille physique du code TRS80: 65536 pour le moment (18/05/92) */
#define SIZE_CODE 65536 /* octets */
#define NEXTPC Reg_PC++;Reg_PC&=0xffff
#define Lire_Code(Ax) TRSCode->bytes[Ax]
#define LRPC Lire_Code(Reg_PC)
typedef struct
{
u_char bytes[SIZE_CODE];
} EightBitCode;
#define FROMRESET 1
#define FROMDI 2
#define FROMEI 3
/* Longueur des denominations de path */
#define FNAMELENGTH 32
#ifndef BOOL
#define BOOL int
#define FALSE 0
#define TRUE 1
#endif
#define TRS80
#ifdef TRS80
#undef IM0
#define IM1
#undef IM2
#undef PORT16
#undef NMI
#endif
#ifdef PORT16
#define T_NO_PORT u_int
#else
#define T_NO_PORT u_char
#endif
#ifdef ARM
typedef union
{
struct
{
u_char rB, rC, rD, rE, rH, rL, rM, rA, rF;
u_char rA2, rF2, rint;
u_int rIX, rIY;
u_int rSP;
BOOL rIFF;
#ifdef NMI
BOOL rIFF2;
BOOL rNature;
#endif
u_char rB2, rC2, rD2, rE2, rH2, rL2;
u_char rI;
} sg;
#ifdef NMI
u_char r[35];
#else
u_char r[31];
#endif
} TypGlb;
#define Reg_B Glob.sg.rB
#define Reg_C Glob.sg.rC
#define Reg_D Glob.sg.rD
#define Reg_E Glob.sg.rE
#define Reg_H Glob.sg.rH
#define Reg_L Glob.sg.rL
#define Reg_A Glob.sg.rA
#define Reg_A2 Glob.sg.rA2
#define Reg_F Glob.sg.rF
#define Reg_F2 Glob.sg.rF2
#define Reg_IFF Glob.sg.rIFF
#define Reg_IFF2 Glob.sg.rIFF
#define Reg_NMI Glob.sg.rNature
#define Reg_INT Glob.sg.rint
#define Reg_IX Glob.sg.rIX
#define Reg_IY Glob.sg.rIY
#define Reg_SP Glob.sg.rSP
#define Reg_B2 Glob.sg.rB2
#define Reg_C2 Glob.sg.rC2
#define Reg_D2 Glob.sg.rD2
#define Reg_E2 Glob.sg.rE2
#define Reg_H2 Glob.sg.rH2
#define Reg_L2 Glob.sg.rL2
#define Reg_I Glob.sg.rI
#endif