a745263d867f3e2dbac13b5acfa26ac1bc366ef2
[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 t_uc390: public t_uc52
37 {
38 public:
39   t_uc390(int Itype, int Itech, class cl_sim *asim);
40   virtual void mk_hw_elements (void);
41
42   virtual void clear_sfr (void);
43
44   // making objects
45   virtual t_addr get_mem_size (enum mem_class type);
46
47   // manipulating memories
48   virtual t_mem read_mem (enum mem_class type, t_addr addr);
49   virtual t_mem get_mem (enum mem_class type, t_addr addr);
50   virtual void  write_mem (enum mem_class type, t_addr addr, t_mem val);
51   virtual void  set_mem (enum mem_class type, t_addr addr, t_mem val);
52
53   /* mods for dual-dptr */
54   virtual int inst_inc_dptr(uchar code);
55   virtual int inst_jmp_Sa_dptr(uchar code);
56   virtual int inst_mov_dptr_Sdata(uchar code);
57   virtual int inst_movc_a_Sa_dptr(uchar code);
58   virtual int inst_movx_a_Sdptr(uchar code);
59   virtual int inst_movx_Sdptr_a(uchar code);
60
61   /* mods for flat24 */
62   virtual int inst_ajmp_addr(uchar code);
63   virtual int inst_ljmp(uchar code);
64   virtual int inst_acall_addr(uchar code);
65   virtual int inst_lcall(uchar code, uint addr);
66   virtual int inst_ret(uchar code);
67   virtual int inst_reti(uchar code);
68
69   /* mods for 10 bit stack */
70   virtual int inst_push (uchar code);
71   virtual int inst_pop (uchar code);
72
73   /* mods for disassembly of flat24 */
74   virtual struct dis_entry *dis_tbl(void);
75   virtual char * disass(t_addr addr, char *sep);
76   virtual void   print_regs(class cl_console *con);
77
78 protected:
79   int flat24_flag; /* true if processor == ds390f */
80   virtual void push_byte (t_mem uc);
81   virtual t_mem pop_byte (void);
82 };
83
84 /* End of s51.src/uc390cl.h */
85
86 #endif