* Simulator of microcontrollers (avr.cc)
*
* Copyright (C) 1999,99 Drotos Daniel, Talker Bt.
- *
+ *
* To contact author send email to drdani@mazsola.iit.uni-miskolc.hu
*
*/
return(0);
}
-char *
+const char *
cl_avr::id_string(void)
{
return("unspecified AVR");
return(0);
}
-char *
-cl_avr::disass(t_addr addr, char *sep)
+const char *
+cl_avr::disass(t_addr addr, const char *sep)
{
char work[256], temp[20];
- char *buf, *p, *b, *t;
+ const char *b;
+ char *buf, *p, *t;
uint code, data= 0;
int i;
p= work;
-
+
code= get_mem(MEM_ROM_ID, addr);
i= 0;
while ((code & dis_tbl()[i].mask) != dis_tbl()[i].code &&
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)
{
t_addr sp;
t_mem spl, sph;
-
+
spl= ram->read(SPL);
sph= ram->read(SPH);
sp= 0xffff & (256*sph + spl);
{
t_addr sp;
t_mem spl, sph, al, ah;
-
+
spl= ram->read(SPL);
sph= ram->read(SPH);
sp= 0xffff & (256*sph + spl);
sph= (sp>>8) & 0xff;
ram->write(SPL, spl);
ram->write(SPH, sph);
-
+
return(resGO);
}