register.h

00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Fred Klaus                                      *
00003  *   frednet@web.de                                                        *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
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

Generated on Fri Mar 16 21:30:28 2007 for roland.kdevelop by  doxygen 1.5.0