* sim/ucsim/cmd.src/info.cc, sim/ucsim/cmd.src/bp.cc,
[fw/sdcc] / sim / ucsim / s51.src / uc390cl.h
1 /*
2  * Simulator of microcontrollers (uc390cl.h)
3  *
4  * Copyright (C) 1999,99 Drotos Daniel, Talker Bt.
5  *
6  * To contact author send email to drdani@mazsola.iit.uni-miskolc.hu
7  *
8  * uc390cl.h - implemented by Karl Bongers, karl@turbobit.com
9  */
10
11 /* This file is part of microcontroller simulator: ucsim.
12
13 UCSIM is free software; you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation; either version 2 of the License, or
16 (at your option) any later version.
17
18 UCSIM is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with UCSIM; see the file COPYING.  If not, write to the Free
25 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
26 02111-1307, USA. */
27 /*@1@*/
28
29 #ifndef UC390CL_HEADER
30 #define UC390CL_HEADER
31
32 #include "ddconfig.h"
33
34 #include "uc52cl.h"
35
36 class cl_uc390: public cl_uc52
37 {
38 public:
39   cl_uc390(int Itype, int Itech, class cl_sim *asim);
40   virtual void mk_hw_elements (void);
41   virtual void make_memories(void);
42
43   virtual void clear_sfr (void);
44
45   // making objects
46   //virtual t_addr get_mem_size (enum mem_class type);
47
48   // manipulating memories
49   virtual t_mem read_mem (const char *id/*enum mem_class type*/, t_addr addr);
50   virtual t_mem get_mem (const char *id/*enum mem_class type*/, t_addr addr);
51   virtual void  write_mem (const char *id/*enum mem_class type*/, t_addr addr, t_mem val);
52   virtual void  set_mem (const char *id/*enum mem_class type*/, t_addr addr, t_mem val);
53
54   /* mods for dual-dptr */
55   virtual int inst_inc_dptr(uchar code);
56   virtual int inst_jmp_Sa_dptr(uchar code);
57   virtual int inst_mov_dptr_Sdata(uchar code);
58   virtual int inst_movc_a_Sa_dptr(uchar code);
59   virtual int inst_movx_a_Sdptr(uchar code);
60   virtual int inst_movx_Sdptr_a(uchar code);
61
62   /* mods for flat24 */
63   virtual int inst_ajmp_addr(uchar code);
64   virtual int inst_ljmp(uchar code);
65   virtual int inst_acall_addr(uchar code);
66   virtual int inst_lcall(uchar code, uint addr, bool intr);/* 12 */
67   virtual int inst_ret(uchar code);
68   virtual int inst_reti(uchar code);
69
70   /* mods for 10 bit stack */
71   virtual int inst_push (uchar code);
72   virtual int inst_pop (uchar code);
73
74   /* mods for disassembly of flat24 */
75   virtual struct dis_entry *dis_tbl(void);
76   virtual const char * disass(t_addr addr, const char *sep);
77   virtual void   print_regs(class cl_console_base *con);
78
79 protected:
80   int flat24_flag; /* true if processor == ds390f */
81   virtual void push_byte (t_mem uc);
82   virtual t_mem pop_byte (void);
83 };
84
85 /* End of s51.src/uc390cl.h */
86
87 #endif