00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef REGISTER_H
00021 #define REGISTER_H
00022
00023 #include "types.h"
00024
00025 #include <memory>
00026
00027
00028 #define _A z80.AF.b.h
00029 #define _F z80.AF.b.l
00030 #define _AF z80.AF.w.l
00031 #define _AFdword z80.AF.d
00032 #define _B z80.BC.b.h
00033 #define _C z80.BC.b.l
00034 #define _BC z80.BC.w.l
00035 #define _BCdword z80.BC.d
00036 #define _D z80.DE.b.h
00037 #define _E z80.DE.b.l
00038 #define _DE z80.DE.w.l
00039 #define _DEdword z80.DE.d
00040 #define _H z80.HL.b.h
00041 #define _L z80.HL.b.l
00042 #define _HL z80.HL.w.l
00043 #define _HLdword z80.HL.d
00044 #define _PC z80.PC.w.l
00045 #define _PCdword z80.PC.d
00046 #define _SP z80.SP.w.l
00047
00048 #define _IXh z80.IX.b.h
00049 #define _IXl z80.IX.b.l
00050 #define _IX z80.IX.w.l
00051 #define _IXdword z80.IX.d
00052 #define _IYh z80.IY.b.h
00053 #define _IYl z80.IY.b.l
00054 #define _IY z80.IY.w.l
00055 #define _IYdword z80.IY.d
00056
00057 #define _I z80.I
00058 #define _R z80.R
00059 #define _Rb7 z80.Rb7
00060 #define _IFF1 z80.IFF1
00061 #define _IFF2 z80.IFF2
00062 #define _IM z80.IM
00063 #define _HALT z80.HALT
00064
00065
00066 class Z80;
00067
00069 class Register
00070 {
00071 friend class Z80;
00072
00073 public:
00074 Register() {init();}
00075 ~Register(){}
00076
00077 void init() {memset(this, 0, sizeof(*this)); IX.w.l=IY.w.l=0xffff;AF.b.l=0x40;break_point = 0xffffffff;}
00078
00079 private:
00080 REGPAIR AF, BC, DE, HL, PC, SP, AFx, BCx, DEx, HLx, IX, IY;
00081 UBYTE I, R, Rb7, IFF1, IFF2, IM, HALT, EI_issued, int_pending;
00082 DWORD break_point, trace;
00083
00084 };
00085
00086 #endif