* Simulator of microcontrollers (uc51.cc)
*
* Copyright (C) 1999,99 Drotos Daniel, Talker Bt.
- *
+ *
* To contact author send email to drdani@mazsola.iit.uni-miskolc.hu
*
*/
return(0);
}
-static char id_string_51[100];
-
-char *
+const char *
cl_51core::id_string(void)
{
+ static char id_string_51[100];
int i;
for (i= 0; cpus_51[i].type_str != NULL && cpus_51[i].type != type; i++) ;
return(bit_tab51);
}
-char *
-cl_51core::disass(t_addr addr, char *sep)
+const char *
+cl_51core::disass(t_addr addr, const char *sep)
{
char work[256], temp[20], c[2];
- char *buf, *p, *b, *t;
+ const char *b;
+ char *buf, *p, *t;
t_mem code= rom->get(addr);
p= work;
buf= (char *)malloc(6+strlen(p)+1);
else
buf= (char *)malloc((p-work)+strlen(sep)+strlen(p)+1);
- for (p= work, b= buf; *p != ' '; p++, b++)
- *b= *p;
+ for (p= work, t= buf; *p != ' '; p++, t++)
+ *t= *p;
p++;
- *b= '\0';
+ *t= '\0';
if (sep == NULL)
{
while (strlen(buf) < 6)
iram->get(start), data, isprint(data)?data:'.');
con->dd_printf(" ACC= 0x%02x %3d %c B= 0x%02x", sfr->get(ACC), sfr->get(ACC),
- isprint(sfr->get(ACC))?(sfr->get(ACC)):'.', sfr->get(B));
+ isprint(sfr->get(ACC))?(sfr->get(ACC)):'.', sfr->get(B));
//eram2xram();
data= xram->get(sfr->get(DPH)*256+sfr->get(DPL));
con->dd_printf(" DPTR= 0x%02x%02x @DPTR= 0x%02x %3d %c\n", sfr->get(DPH),
cl_51core::clear_sfr(void)
{
int i;
-
+
for (i= 0x80; i <= 0xff; i++)
sfr->set(i, 0);
sfr->/*set*/write(P0, 0xff);
{
//fprintf(stderr,"uc: inp avail in PD mode, user stop\n");
result= resUSER;
- sim->stop(result);
+ sim->stop(result);
}
}
return(result);