2 * Simulator of microcontrollers (uc390cl.h)
4 * Copyright (C) 1999,99 Drotos Daniel, Talker Bt.
6 * To contact author send email to drdani@mazsola.iit.uni-miskolc.hu
8 * uc390cl.h - implemented by Karl Bongers, karl@turbobit.com
11 /* This file is part of microcontroller simulator: ucsim.
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.
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.
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
29 #ifndef UC390CL_HEADER
30 #define UC390CL_HEADER
36 class t_uc390: public t_uc52
39 t_uc390(int Itype, int Itech, class cl_sim *asim);
41 virtual void clear_sfr(void);
44 virtual t_addr get_mem_size (enum mem_class type);
46 // manipulating memories
47 virtual ulong read_mem (enum mem_class type, t_mem addr);
48 virtual ulong get_mem (enum mem_class type, t_addr addr);
49 virtual void write_mem (enum mem_class type, t_addr addr, t_mem val);
50 virtual void set_mem (enum mem_class type, t_addr addr, t_mem val);
52 /* mods for dual-dptr */
53 virtual int inst_inc_dptr(uchar code);
54 virtual int inst_jmp_$a_dptr(uchar code);
55 virtual int inst_mov_dptr_$data(uchar code);
56 virtual int inst_movc_a_$a_dptr(uchar code);
57 virtual int inst_movx_a_$dptr(uchar code);
58 virtual int inst_movx_$dptr_a(uchar code);
61 virtual int inst_ajmp_addr(uchar code);
62 virtual int inst_ljmp(uchar code);
63 virtual int inst_acall_addr(uchar code);
64 virtual int inst_lcall(uchar code, uint addr);
65 virtual int inst_ret(uchar code);
66 virtual int inst_reti(uchar code);
68 /* mods for 10 bit stack */
69 virtual int inst_push (uchar code);
70 virtual int inst_pop (uchar code);
73 virtual void proc_write(uchar *addr);
75 /* mods for disassembly of flat24 */
76 virtual struct dis_entry *dis_tbl(void);
77 virtual char * disass(t_addr addr, char *sep);
78 virtual void print_regs(class cl_console *con);
81 int flat24_flag; /* true if processor == ds390f */
82 unsigned long ctm_ticks; /* mini-state-machine for "crystal multiplier" */
83 unsigned long timed_access_ticks;
84 int timed_access_state; /* 0: idle; 1: $aa written; 2: $55 written */
85 virtual int push_byte (uchar uc);
86 virtual uchar pop_byte (int *Pres);
87 virtual uchar read(uchar *addr);
90 /* End of s51.src/uc390cl.h */