* Simulator of microcontrollers (uc.cc)
*
* Copyright (C) 1999,99 Drotos Daniel, Talker Bt.
- *
+ *
* To contact author send email to drdani@mazsola.iit.uni-miskolc.hu
*
*/
}
sp_max= 0;
sp_avg= 0;
-
+
stack_ops->free_all();
int i;
cset= new cl_cmdset();
cset->init();
}
- cset->add(cmd= new cl_info_bp_cmd("breakpoints", 0,
+ cset->add(cmd= new cl_info_bp_cmd("breakpoints", 0,
"info breakpoints Status of user-settable breakpoints",
"long help of info breakpoints"));
cmd->add_name("bp");
cmd->init();
- cset->add(cmd= new cl_info_reg_cmd("registers", 0,
+ cset->add(cmd= new cl_info_reg_cmd("registers", 0,
"info registers List of integer registers and their contents",
"long help of info registers"));
cmd->init();
- cset->add(cmd= new cl_info_hw_cmd("hardware", 0,
+ cset->add(cmd= new cl_info_hw_cmd("hardware", 0,
"info hardware cathegory\n"
" Status of hardware elements of the CPU",
"long help of info hardware"));
cmd->add_name("hw");
cmd->init();
- cset->add(cmd= new cl_info_stack_cmd("stack", 0,
+ cset->add(cmd= new cl_info_stack_cmd("stack", 0,
"info stack Status of stack of the CPU",
"long help of info stack"));
cmd->init();
cl_uc::mem(enum mem_class type)
{
class cl_m *m;
-
+
if (mems->count < type)
m= (class cl_m *)(mems->at(MEM_DUMMY));
else
}
-/*
+/*
* Reading intel hexa file into EROM
*____________________________________________________________________________
*
i++;
hw= get_hw(cath, &i);
}
- if (hw &&
+ if (hw &&
idx)
*idx= i;
return(hw);
i++;
hw= get_hw(id_string, &i);
}
- if (hw &&
+ if (hw &&
idx)
*idx= i;
return(hw);
return(&empty);
}
-char *
+const char *
cl_uc::disass(t_addr addr, const char *sep)
{
char *buf;
void
cl_uc::print_disass(t_addr addr, class cl_console_base *con)
{
- char *dis;
+ const char *dis;
class cl_brk *b;
int i;
i++;
}
con->dd_printf(" %s\n", dis);
- free(dis);
+ free((char *)dis);
}
void
cl_uc::del_counter(char *nam)
{
int i;
-
+
if (!nam)
return;
for (i= 0; i < counters->count; i++)
cl_uc::fetch(void)
{
ulong code;
-
+
if (!rom)
return(0);
cl_uc::stack_read(class cl_stack_op *op)
{
class cl_stack_op *top= (class cl_stack_op *)(stack_ops->top());
-
+
if (op->get_op() & stack_write_operation)
{
class cl_error_stack_tracker_wrong_handle *e= new
top?(top->get_pc()):0, top?(top->get_before()):0,
op->get_after());
}
-
+
if (top)
{
int ta= top->get_after(), oa= op->get_after();
error(e);
}
}
-
+
delete op;
}
cl_uc::fbrk_at(t_addr addr)
{
int idx;
-
+
return((class cl_fetch_brk *)(fbrk->get_bp(addr, &idx)));
}