From: drdani Date: Fri, 23 Jun 2000 11:22:30 +0000 (+0000) Subject: Some fixes towards 0.2.37-pre5 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=a8bed8a7dd8bd305251eefb69e5f66c35bd53112;p=fw%2Fsdcc Some fixes towards 0.2.37-pre5 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@281 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/sim/ucsim/.version b/sim/ucsim/.version index ee649d12..37483e84 100644 --- a/sim/ucsim/.version +++ b/sim/ucsim/.version @@ -1 +1 @@ -0.2.37-pre4 +0.2.37-pre5 diff --git a/sim/ucsim/Makefile b/sim/ucsim/Makefile index 23904e79..5b69d993 100644 --- a/sim/ucsim/Makefile +++ b/sim/ucsim/Makefile @@ -116,21 +116,24 @@ dep: putcopyright: 'put(c)' -s $(STARTYEAR) *.cc *.h *.y *.l +start: + date '+%Y.%m.%d-%H:%M' >.start + newer: distclean - @if [ -f start ]; then \ + @if [ -f .start ]; then \ tar cvf - \ - `find . -newer start -type f -print` |\ - gzip -9c >ucsim-newer-`date '+%Y.%m.%d-%H:%M'`.tgz; \ + `find . -newer .start -type f -print` |\ + gzip -9c >ucsim-newer-`cat .start`_`date '+%Y.%m.%d-%H:%M'`_`hostname`.tgz; \ else \ - echo "start file not found.\n"; \ + echo ".start file not found.\n"; \ exit 1; \ fi print-newer: - @if [ -f start ]; then \ - find . -newer start -type f -print ;\ + @if [ -f .start ]; then \ + find . -newer .start -type f -print ;\ else \ - echo "start file not found.\n" ;\ + echo ".start file not found.\n" ;\ exit 1 ;\ fi diff --git a/sim/ucsim/cmd.src/bp.cc b/sim/ucsim/cmd.src/bp.cc index e2d6fd13..d926e325 100644 --- a/sim/ucsim/cmd.src/bp.cc +++ b/sim/ucsim/cmd.src/bp.cc @@ -53,7 +53,7 @@ cl_break_cmd::do_work(class cl_cmdline *cmdline, class cl_console *con) if (params[0] == 0) { con->printf("Address is missing.\n"); - return(FALSE); + return(DD_FALSE); } addr= (params[0])->get_address(); if (params[1]) diff --git a/sim/ucsim/cmd.src/cmdset.cc b/sim/ucsim/cmd.src/cmdset.cc index 8a659f68..68a8e1ef 100644 --- a/sim/ucsim/cmd.src/cmdset.cc +++ b/sim/ucsim/cmd.src/cmdset.cc @@ -111,7 +111,7 @@ cl_state_cmd::do_work(class cl_cmdline *cmdline, class cl_console *con) int cl_file_cmd::do_work(class cl_cmdline *cmdline, class cl_console *con) { - char *fname; + char *fname= 0; long l; if ((cmdline->param(0) == 0) || diff --git a/sim/ucsim/cmd.src/cmdutil.cc b/sim/ucsim/cmd.src/cmdutil.cc index 083b8456..90bb15dc 100644 --- a/sim/ucsim/cmd.src/cmdutil.cc +++ b/sim/ucsim/cmd.src/cmdutil.cc @@ -147,7 +147,7 @@ interpret_bitname(char *name, class cl_uc *uc, { dot--; *dot= '.'; - return(FALSE); + return(DD_FALSE); } } else @@ -155,12 +155,12 @@ interpret_bitname(char *name, class cl_uc *uc, if ((*celladdr < 0x20) || ((*celladdr > 0x2f) && (*celladdr < 0x80)) || ((*celladdr > 0x7f) && (*celladdr & 0x07))) - return(FALSE); + return(DD_FALSE); bitnum= strtol(dot, &p, 0); if ((p && *p) || (bitnum < 0) || (bitnum > 7)) - return(FALSE); + return(DD_FALSE); if (*celladdr > 0x7f) *bitaddr= *celladdr + bitnum; else @@ -175,7 +175,7 @@ interpret_bitname(char *name, class cl_uc *uc, *bitaddr= strtol(name, &p, 0); if ((p && *p) || (*bitaddr > 0xff)) - return(FALSE); + return(DD_FALSE); } else *bitaddr= ne->addr; @@ -189,7 +189,7 @@ interpret_bitname(char *name, class cl_uc *uc, *bitmask= BIT_MASK(*bitaddr); // making symbolic name if (!symname) - return(TRUE); + return(DD_TRUE); i= 0; while (uc->bit_tbl()[i].name && (uc->bit_tbl()[i].addr != *bitaddr)) @@ -198,7 +198,7 @@ interpret_bitname(char *name, class cl_uc *uc, { sym= strdup(uc->bit_tbl()[i].name); *symname= sym; - return(TRUE); + return(DD_TRUE); } i= 0; while (uc->sfr_tbl()[i].name && @@ -216,7 +216,7 @@ interpret_bitname(char *name, class cl_uc *uc, sprintf(bitnumstr, "%1d", *bitaddr & 0x07); strcat(sym, bitnumstr); *symname= sym; - return(TRUE); + return(DD_TRUE); } diff --git a/sim/ucsim/cmd.src/newcmd.cc b/sim/ucsim/cmd.src/newcmd.cc index 6b1001f5..cee73544 100644 --- a/sim/ucsim/cmd.src/newcmd.cc +++ b/sim/ucsim/cmd.src/newcmd.cc @@ -549,6 +549,7 @@ cl_console::cl_console(char *fin, char *fout, class cl_sim *asim): if (f= fopen(fout, "w+"), out= f?f:stdout, !f) fprintf(stderr, "Can't open `%s': %s\n", fout, strerror(errno)); prompt= 0; + flags= CONS_NONE; } cl_console::cl_console(FILE *fin, FILE *fout, class cl_sim *asim): @@ -558,6 +559,7 @@ cl_console::cl_console(FILE *fin, FILE *fout, class cl_sim *asim): sim= asim; in = fin; out= fout; + flags= CONS_NONE; } /* @@ -657,7 +659,7 @@ cl_console::print_prompt(void) if (sim->arg_avail('P')) putc('\0', out); else - fprintf(out, "%s", prompt?prompt: + fprintf(out, "%s", (prompt && prompt[0])?prompt: ((p= sim->get_sarg(0, "prompt"))?p:"> ")); fflush(out); } @@ -880,24 +882,16 @@ cl_commander::init(void) if (!sim) return(1); if (sim->arg_avail('c')) - { - add_console(mk_console(sim->get_sarg('c', 0), - sim->get_sarg('c', 0), sim)); - } + add_console(mk_console(sim->get_sarg('c', 0), + sim->get_sarg('c', 0), sim)); #ifdef SOCKET_AVAIL if (sim->arg_avail('Z')) - { - add_console(mk_console(sim->get_iarg(0, "Zport"), sim)); - } + add_console(mk_console(sim->get_iarg(0, "Zport"), sim)); if (sim->arg_avail('r')) - { - add_console(mk_console(sim->get_iarg('r', 0), sim)); - } + add_console(mk_console(sim->get_iarg('r', 0), sim)); #endif if (cons->get_count() == 0) - { - add_console(mk_console(stdin, stdout, sim)); - } + add_console(mk_console(stdin, stdout, sim)); return(0); } @@ -986,6 +980,23 @@ cl_commander::all_printf(char *format, ...) return(ret); } +int +cl_commander::all_print(char *string, int length) +{ + int i; + + for (i= 0; i < cons->count; i++) + { + class cl_console *c= (class cl_console*)(cons->at(i)); + if (c->out) + { + for (int j= 0; j < length; j++) + putc(string[j], c->out); + } + } + return(0); +} + /* * Printing to actual_console */ diff --git a/sim/ucsim/cmd.src/newcmdcl.h b/sim/ucsim/cmd.src/newcmdcl.h index d384e7fe..255a8578 100644 --- a/sim/ucsim/cmd.src/newcmdcl.h +++ b/sim/ucsim/cmd.src/newcmdcl.h @@ -163,7 +163,7 @@ public: virtual char *read_line(void); virtual int proc_input(void); virtual bool interpret(char *cmd); - virtual bool old_command(class cl_cmdline *cmdline) { return(FALSE); } + virtual bool old_command(class cl_cmdline *cmdline) { return(DD_FALSE); } }; #ifdef SOCKET_AVAIL @@ -214,6 +214,7 @@ public: void set_fd_set(void); int all_printf(char *format, ...); // print to all consoles + int all_print(char *string, int length); int printf(char *format, ...); // print to actual_console int debug(char *format, ...); // print consoles with debug flag set int flag_printf(int iflags, char *format, ...); diff --git a/sim/ucsim/ddconfig_in.h b/sim/ucsim/ddconfig_in.h index 1b9094bb..a41420eb 100644 --- a/sim/ucsim/ddconfig_in.h +++ b/sim/ucsim/ddconfig_in.h @@ -28,9 +28,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #ifndef DDCONFIG_HEADER #define DDCONFIG_HEADER -#define TRUE 1 -#define FALSE 0 -#define bool int +#define DD_TRUE 1 +#define DD_FALSE 0 +#define bool int #undef STDC_HEADERS #undef HAVE_GETOPT_H diff --git a/sim/ucsim/gui.src/serio.src/posix_signal.hh b/sim/ucsim/gui.src/serio.src/posix_signal.hh index b747342a..18c0caec 100644 --- a/sim/ucsim/gui.src/serio.src/posix_signal.hh +++ b/sim/ucsim/gui.src/serio.src/posix_signal.hh @@ -4,11 +4,7 @@ * Tim Hurman - t.hurman@virgin.net * * Last edited on 01th Oct 1999 * ******************************************************************************/ -#if !defined(sun) -/* Solaris doesn't like redefining this. */ typedef void(*SIG_PF)(int); -#endif - class SigHandler { public: diff --git a/sim/ucsim/pobj.cc b/sim/ucsim/pobj.cc index ae9e850b..20af199c 100644 --- a/sim/ucsim/pobj.cc +++ b/sim/ucsim/pobj.cc @@ -404,7 +404,7 @@ cl_list::set_limit(t_index alimit) cl_sorted_list::cl_sorted_list(t_index alimit, t_index adelta): cl_list(alimit, adelta) { - Duplicates= FALSE; + Duplicates= DD_FALSE; } @@ -474,7 +474,7 @@ cl_sorted_list::search(void *key, t_index &index) { t_index l = 0; t_index h = count - 1; - bool res= FALSE; + bool res= DD_FALSE; while (l <= h) { @@ -486,7 +486,7 @@ cl_sorted_list::search(void *key, t_index &index) h= i - 1; if (c == 0) { - res= TRUE; + res= DD_TRUE; if (!Duplicates) l= i; } @@ -511,7 +511,7 @@ cl_sorted_list::search(void *key, t_index &index) cl_strings::cl_strings(t_index alimit, t_index adelta): cl_sorted_list(alimit, adelta) { - Duplicates= TRUE; + Duplicates= DD_TRUE; } @@ -578,7 +578,7 @@ bool cl_ustrings::search(void *key, t_index& index) { t_index i = 0; - bool found= FALSE; + bool found= DD_FALSE; void *Actual; if ((count) && key) diff --git a/sim/ucsim/pobjt.h b/sim/ucsim/pobjt.h index 1bdc7c0e..3b879889 100644 --- a/sim/ucsim/pobjt.h +++ b/sim/ucsim/pobjt.h @@ -31,9 +31,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "ddconfig.h" #ifndef MyTypesHeader -#define TRUE 1 -#define FALSE 0 -#define bool int +#define DD_TRUE 1 +#define DD_FALSE 0 +#define bool int #endif typedef int t_index; diff --git a/sim/ucsim/s51.src/cmd.cc b/sim/ucsim/s51.src/cmd.cc index 9e224981..5be88f2c 100644 --- a/sim/ucsim/s51.src/cmd.cc +++ b/sim/ucsim/s51.src/cmd.cc @@ -72,7 +72,7 @@ cmd_help(char *cmd, class cl_uc *uc, class cl_sim *sim) class cl_cmd *cmd= (class cl_cmd *)(sim->cmdset->at(i)); sim->cmd->printf("%s\n", cmd->short_help); } - return(FALSE); + return(DD_FALSE); } @@ -99,7 +99,7 @@ cmd_get_option(char *cmd, class cl_uc *uc, class cl_sim *sim) fprintf(sim->cmd_out(), " %s\n", o->help); } } - return(FALSE); + return(DD_FALSE); } @@ -117,12 +117,12 @@ cmd_set_option(char *cmd, class cl_uc *uc, class cl_sim *sim) if ((id= strtok(NULL, delimiters)) == NULL) { fprintf(sim->cmd_out(), "Name of option has not given.\n"); - return(FALSE); + return(DD_FALSE); } if ((s= strtok(NULL, delimiters)) == NULL) { fprintf(sim->cmd_out(), "Value has not given.\n"); - return(FALSE); + return(DD_FALSE); } for (i= 0; i < uc->options->count; i++) { @@ -133,7 +133,7 @@ cmd_set_option(char *cmd, class cl_uc *uc, class cl_sim *sim) break; } } - return(FALSE); + return(DD_FALSE); } @@ -143,99 +143,99 @@ cmd_set_option(char *cmd, class cl_uc *uc, class cl_sim *sim) struct cmd_entry cmd_table[]= { - {"g" , cmd_go, FALSE, + {"g" , cmd_go, DD_FALSE, "g [start [stop]] Go"}, - {"stop", cmd_stop, FALSE, + {"stop", cmd_stop, DD_FALSE, "stop Stop"}, - {"pc", cmd_pc, FALSE, + {"pc", cmd_pc, DD_FALSE, "pc [address] Get/set content of PC"}, - {"s" , cmd_step, TRUE, + {"s" , cmd_step, DD_TRUE, "s [step] Step"}, - {"n" , cmd_next, TRUE, + {"n" , cmd_next, DD_TRUE, "n [step] Next"}, - {"bse", cmd_brk_sete, FALSE, + {"bse", cmd_brk_sete, DD_FALSE, "bse wi|ri|wx|rx|ws|rs|rc f|d addr [hit]\n" " Set EVENT Breakpoint"}, - {"bde", cmd_brk_dele, FALSE, + {"bde", cmd_brk_dele, DD_FALSE, "bde wi|ri|wx|rx|ws|rs|rc addr\n" " Delete EVENT Breakpoint"}, - {"ba", cmd_brk_delall, FALSE, + {"ba", cmd_brk_delall, DD_FALSE, "ba Delete all breakpoints"}, - {"dis", cmd_disass, TRUE, + {"dis", cmd_disass, DD_TRUE, "dis [start [offset [lines]]]\n" " Disassemble code"}, - {"dp", cmd_dump_port, FALSE, + {"dp", cmd_dump_port, DD_FALSE, "dp Dump ports"}, - {"ds", cmd_dump_sfr, FALSE, + {"ds", cmd_dump_sfr, DD_FALSE, "ds [addr...] Dump SFR"}, - {"db", cmd_dump_bit, TRUE, + {"db", cmd_dump_bit, DD_TRUE, "db addr... Dump bit"}, - {"si", cmd_set_iram, FALSE, + {"si", cmd_set_iram, DD_FALSE, "si addr data... Set Internal RAM"}, - {"sx", cmd_set_xram, FALSE, + {"sx", cmd_set_xram, DD_FALSE, "sx addr data... Set External RAM"}, - {"sc", cmd_set_code, FALSE, + {"sc", cmd_set_code, DD_FALSE, "sc addr data... Set code (ROM)"}, - {"ss", cmd_set_sfr, FALSE, + {"ss", cmd_set_sfr, DD_FALSE, "ss addr data... Set SFR area"}, - {"sb", cmd_set_bit, FALSE, + {"sb", cmd_set_bit, DD_FALSE, "sb addr data... Set bit"}, - {"sp", cmd_set_port, FALSE, + {"sp", cmd_set_port, DD_FALSE, "sp port data Set port pins"}, - {"fi", cmd_fill_iram, FALSE, + {"fi", cmd_fill_iram, DD_FALSE, "fi start stop data Fill IRAM area with `data'"}, - {"fx", cmd_fill_xram, FALSE, + {"fx", cmd_fill_xram, DD_FALSE, "fx start stop data Fill XRAM area with `data'"}, - {"fs", cmd_fill_sfr, FALSE, + {"fs", cmd_fill_sfr, DD_FALSE, "fs start stop data Fill SFR area with `data'"}, - {"fc", cmd_fill_code, FALSE, + {"fc", cmd_fill_code, DD_FALSE, "fc start stop data Fill ROM area with `data'"}, - {"wi", cmd_where_iram, FALSE, + {"wi", cmd_where_iram, DD_FALSE, "wi,Wi string Search for `string' in IRAM (Wi case sensitive)"}, - {"Wi", cmd_Where_iram, FALSE, NULL}, + {"Wi", cmd_Where_iram, DD_FALSE, NULL}, - {"wx", cmd_where_xram, FALSE, + {"wx", cmd_where_xram, DD_FALSE, "wx,Wx string Search for `string' in XRAM (Wx case sensitive)"}, - {"Wx", cmd_Where_xram, FALSE, NULL}, + {"Wx", cmd_Where_xram, DD_FALSE, NULL}, - {"wc", cmd_where_code, FALSE, + {"wc", cmd_where_code, DD_FALSE, "wc,Wc string Search for `string' in ROM (Wc case sensitive)"}, - {"Wc", cmd_Where_code, FALSE, NULL}, + {"Wc", cmd_Where_code, DD_FALSE, NULL}, - {"sopt", cmd_set_option, FALSE, + {"sopt", cmd_set_option, DD_FALSE, "sopt opt value Set value of option"}, - {"gopt", cmd_get_option, FALSE, + {"gopt", cmd_get_option, DD_FALSE, "gopt [opt] Get value of option(s)"}, - {"show", cmd_show, FALSE, + {"show", cmd_show, DD_FALSE, "show c|w Show licensing information"}, - {"h" , cmd_help, FALSE, + {"h" , cmd_help, DD_FALSE, "h,? Help about commands"}, - {"?" , cmd_help, FALSE, NULL}, + {"?" , cmd_help, DD_FALSE, NULL}, {NULL, NULL} }; diff --git a/sim/ucsim/s51.src/cmd51.cc b/sim/ucsim/s51.src/cmd51.cc index b79d9983..5dd3c939 100644 --- a/sim/ucsim/s51.src/cmd51.cc +++ b/sim/ucsim/s51.src/cmd51.cc @@ -72,7 +72,7 @@ cl_51cons::interpret(char *cmd) { int i; char *c, *s; - bool repeat= FALSE, retval= FALSE; + bool repeat= DD_FALSE, retval= DD_FALSE; if (*cmd) { @@ -83,11 +83,11 @@ cl_51cons::interpret(char *cmd) } else if (last_command == NULL) - return(FALSE); + return(DD_FALSE); else { c= strdup(last_command); - repeat= TRUE; + repeat= DD_TRUE; } i= 0; s= strtok(c, delimiters); @@ -124,7 +124,7 @@ cl_51cons::old_command(class cl_cmdline *cmdline) if (cmdline->name == 0 || *(cmdline->name) == '\0' || *(cmdline->name) == '\n') - return(TRUE); + return(DD_TRUE); while ((cmd_table[i].name != NULL) && /*(strstr(c, cmd_table[i].name) != c)*/ (strcmp(cmdline->name, cmd_table[i].name) != 0)) diff --git a/sim/ucsim/s51.src/cmd_brk.cc b/sim/ucsim/s51.src/cmd_brk.cc index 1c7e49cc..0602cd49 100644 --- a/sim/ucsim/s51.src/cmd_brk.cc +++ b/sim/ucsim/s51.src/cmd_brk.cc @@ -104,12 +104,12 @@ cmd_brk_sete(char *cmd, class t_uc51 *uc, class cl_sim *sim) if ((id= strtok(NULL, delimiters)) == NULL) { sim->cmd->printf("Event has not given.\n"); - return(FALSE); + return(DD_FALSE); } if ((s= strtok(NULL, delimiters)) == NULL) { sim->cmd->printf("Permanency has not given\n"); - return(FALSE); + return(DD_FALSE); } switch (*s) { @@ -121,12 +121,12 @@ cmd_brk_sete(char *cmd, class t_uc51 *uc, class cl_sim *sim) break; default: sim->cmd->printf("Unknow permanency\n"); - return(FALSE); + return(DD_FALSE); } if ((s= strtok(NULL, delimiters)) == NULL) { sim->cmd->printf("Address has not given\n"); - return(FALSE); + return(DD_FALSE); } addr= (uint)strtol(s, NULL, 0); if ((s= strtok(NULL, delimiters)) != NULL) @@ -152,7 +152,7 @@ cmd_brk_sete(char *cmd, class t_uc51 *uc, class cl_sim *sim) if (b) uc->ebrk->add_bp(b); } - return(FALSE); + return(DD_FALSE); } @@ -176,7 +176,7 @@ cmd_brk_delf(char *cmd, class t_uc51 *uc, class cl_sim *sim) else uc->fbrk->del_bp(addr); } - return(FALSE); + return(DD_FALSE); }*/ @@ -193,7 +193,7 @@ cmd_brk_dele(char *cmd, class t_uc51 *uc, class cl_sim *sim) if ((id= strtok(NULL, delimiters)) == NULL) { fprintf(sim->cmd_out(), "Event has not given.\n"); - return(FALSE); + return(DD_FALSE); } if ((s= strtok(NULL, delimiters)) == NULL) fprintf(sim->cmd_out(), "Address has not given.\n"); @@ -205,7 +205,7 @@ cmd_brk_dele(char *cmd, class t_uc51 *uc, class cl_sim *sim) else uc->rm_ebrk(addr, id); } - return(FALSE); + return(DD_FALSE); } @@ -223,7 +223,7 @@ cmd_brk_delall(char *cmd, class t_uc51 *uc, class cl_sim *sim) } while (uc->ebrk->count) uc->ebrk->free_at(0); - return(FALSE); + return(DD_FALSE); } @@ -257,7 +257,7 @@ cmd_brk_lst(char *cmd, class t_uc51 *uc, class cl_sim *sim) eb->hit, eb->cnt, eb->addr, eb->id); } - return(FALSE); + return(DD_FALSE); }*/ diff --git a/sim/ucsim/s51.src/dump.cc b/sim/ucsim/s51.src/dump.cc index 1a1af360..8ff7743f 100644 --- a/sim/ucsim/s51.src/dump.cc +++ b/sim/ucsim/s51.src/dump.cc @@ -96,7 +96,7 @@ cmd_disass(char *cmd, class t_uc51 *uc, class cl_sim *sim) uint realstart; if (!uc->there_is_inst()) - return(FALSE); + return(DD_FALSE); if ((s= strtok(NULL, delimiters)) != NULL) start= strtol(s, NULL, 0); else @@ -131,7 +131,7 @@ cmd_disass(char *cmd, class t_uc51 *uc, class cl_sim *sim) } disass_last_stop= realstart; - return(FALSE); + return(DD_FALSE); } @@ -206,7 +206,7 @@ cmd_dump_port(char *cmd, class t_uc51 *uc, class cl_sim *sim) print_bin(data, 8, sim->cmd_out()); sim->cmd->printf(" 0x%02x %3d %c\n", data, data, isprint(data)?data:'.'); - return(FALSE); + return(DD_FALSE); } @@ -244,7 +244,7 @@ cmd_dump_sfr(char *cmd, class t_uc51 *uc, class cl_sim *sim) else // dump all dump_memory(uc->mem(MEM_SFR), &start, 255, 16, sim->cmd_out(), sim); - return(FALSE); + return(DD_FALSE); } @@ -262,20 +262,20 @@ cmd_dump_bit(char *cmd, class t_uc51 *uc, class cl_sim *sim) if ((s= strtok(NULL, delimiters)) == NULL) { sim->cmd->printf("Address has not given.\n"); - return(FALSE); + return(DD_FALSE); } while (s) { if (!interpret_bitname(s, uc, &cell, &addr, &bitaddr, &bitmask, &sym)) { sim->cmd->printf("Bad address %s\n", s); - return(FALSE); + return(DD_FALSE); } sim->cmd->printf("%06x %6s %c\n", addr, sym, (*cell & bitmask)?'1':'0'); free(sym); s= strtok(NULL, delimiters); } - return(FALSE); + return(DD_FALSE); } diff --git a/sim/ucsim/s51.src/go.cc b/sim/ucsim/s51.src/go.cc index cbc52ba7..d7b3289c 100644 --- a/sim/ucsim/s51.src/go.cc +++ b/sim/ucsim/s51.src/go.cc @@ -50,7 +50,7 @@ cmd_go(char *cmd, class t_uc51 *uc, class cl_sim *sim) t_addr start= uc->PC; long stop= -1; class cl_brk *b; - bool brk_at_stop= FALSE; + bool brk_at_stop= DD_FALSE; if (sim->state & SIM_GO) { @@ -77,11 +77,11 @@ cmd_go(char *cmd, class t_uc51 *uc, class cl_sim *sim) if (start == (t_addr)stop) { fprintf(sim->cmd_out(), "Addresses must be different.\n"); - return(FALSE); + return(DD_FALSE); } if ((b= uc->fbrk_at(stop))) { - brk_at_stop= TRUE; + brk_at_stop= DD_TRUE; b->cnt= 1; } else @@ -101,7 +101,7 @@ cmd_go(char *cmd, class t_uc51 *uc, class cl_sim *sim) uc->fbrk->del_bp(stop);*/ /*fprintf(sim->cmd_out(), "%d\n", uc->result); uc->print_disass(uc->PC);*/ - return(FALSE); + return(DD_FALSE); } @@ -110,7 +110,7 @@ cmd_stop(char *cmd, class t_uc51 *uc, class cl_sim *sim) { sim->stop(resUSER); uc->print_disass(uc->PC, sim->cmd->actual_console); - return(FALSE); + return(DD_FALSE); } @@ -139,7 +139,7 @@ cmd_step(char *cmd, class t_uc51 *uc, class cl_sim *sim) uc->do_inst(1); dump_step(uc, sim); } - return(FALSE); + return(DD_FALSE); } @@ -177,7 +177,7 @@ cmd_next(char *cmd, class t_uc51 *uc, class cl_sim *sim) uc->do_inst(1); dump_step(uc, sim); } - return(FALSE); + return(DD_FALSE); } @@ -194,7 +194,7 @@ cmd_pc(char *cmd, class t_uc51 *uc, class cl_sim *sim) if ((s= strtok(NULL, delimiters)) == NULL) { uc->print_disass(uc->PC, sim->cmd->actual_console); - return(FALSE); + return(DD_FALSE); } pc= strtol(s, &p, 0); if (p && @@ -212,7 +212,7 @@ cmd_pc(char *cmd, class t_uc51 *uc, class cl_sim *sim) uc->PC= pc; uc->print_disass(uc->PC, sim->cmd->actual_console); } - return(FALSE); + return(DD_FALSE); } diff --git a/sim/ucsim/s51.src/jmp.cc b/sim/ucsim/s51.src/jmp.cc index d66b05a0..914c9728 100644 --- a/sim/ucsim/s51.src/jmp.cc +++ b/sim/ucsim/s51.src/jmp.cc @@ -280,7 +280,7 @@ t_uc51::inst_reti(uchar code) proc_write_sp(*aof_SP); PC= h*256 + l; - was_reti= TRUE; + was_reti= DD_TRUE; class it_level *il= (class it_level *)(it_levels->top()); if (il && il->level >= 0) @@ -503,6 +503,7 @@ t_uc51::inst_djnz_addr_addr(uchar code) addr = get_direct(fetch(), &event_at.wi, &event_at.ws); jaddr= fetch(); + tick(1); if (--(*addr)) PC= (PC + (signed char)jaddr) & (EROM_SIZE-1); return(resGO); @@ -522,6 +523,7 @@ t_uc51::inst_djnz_rn_addr(uchar code) reg = get_reg(code & 0x07, &event_at.wi); jaddr= fetch(); + tick(1); if (--(*reg)) PC= (PC + (signed char)jaddr) & (EROM_SIZE-1); return(resGO); diff --git a/sim/ucsim/s51.src/set.cc b/sim/ucsim/s51.src/set.cc index 47b81b7b..d8bc2e3f 100644 --- a/sim/ucsim/s51.src/set.cc +++ b/sim/ucsim/s51.src/set.cc @@ -154,7 +154,7 @@ bool cmd_set_iram(char *cmd, class cl_uc *uc, class cl_sim *sim) { set_memory(uc->mem(MEM_IRAM), 0, uc, NULL, sim); - return(FALSE); + return(DD_FALSE); } @@ -168,7 +168,7 @@ cmd_set_xram(char *cmd, class cl_uc *uc, class cl_sim *sim) uc->eram2xram(); set_memory(uc->mem(MEM_XRAM), 0, uc, NULL, sim); uc->xram2eram(); - return(FALSE); + return(DD_FALSE); } @@ -180,7 +180,7 @@ bool cmd_set_code(char *cmd, class cl_uc *uc, class cl_sim *sim) { set_memory(uc->mem(MEM_ROM), 0, uc, NULL, sim); - return(FALSE); + return(DD_FALSE); } @@ -192,7 +192,7 @@ bool cmd_set_sfr(char *cmd, class cl_uc *uc, class cl_sim *sim) { set_memory(uc->mem(MEM_SFR), SFR_START, uc, uc->sfr_tbl(), sim); - return(FALSE); + return(DD_FALSE); } @@ -210,25 +210,25 @@ cmd_set_bit(char *cmd, class cl_uc *uc, class cl_sim *sim) if ((s= strtok(NULL, delimiters)) == NULL) { fprintf(sim->cmd_out(), "Address has not given.\n"); - return(FALSE); + return(DD_FALSE); } if (!interpret_bitname(s, uc, &cell, &addr, &bitaddr, &bitmask, NULL)) { fprintf(sim->cmd_out(), "Bad address %s\n", s); - return(FALSE); + return(DD_FALSE); } if ((s= strtok(NULL, delimiters)) == NULL) { fprintf(sim->cmd_out(), "Data has not given.\n"); - return(FALSE); + return(DD_FALSE); } while (s) { if (!isdigit(*s)) { fprintf(sim->cmd_out(), "Bad data %s\n", s); - return(FALSE); + return(DD_FALSE); } if (*s == '0') *cell&= ~bitmask; @@ -238,7 +238,7 @@ cmd_set_bit(char *cmd, class cl_uc *uc, class cl_sim *sim) bitmask&= 0xff; s= strtok(NULL, delimiters); } - return(FALSE); + return(DD_FALSE); } @@ -255,29 +255,29 @@ cmd_set_port(char *cmd, class cl_uc *uc, class cl_sim *sim) if ((s= strtok(NULL, delimiters)) == NULL) { fprintf(sim->cmd_out(), "Port number has not given.\n"); - return(FALSE); + return(DD_FALSE); } port= strtol(s, &p, 0); if ((p && *p) || (port > 3)) { fprintf(sim->cmd_out(), "Port number %s is wrong.\n", s); - return(FALSE); + return(DD_FALSE); } if ((s= strtok(NULL, delimiters)) == NULL) { fprintf(sim->cmd_out(), "Date has not given.\n"); - return(FALSE); + return(DD_FALSE); } data= strtol(s, &p, 0); if (p && *p) { fprintf(sim->cmd_out(), "Data %s is wrong.\n", s); - return(FALSE); + return(DD_FALSE); } uc->port_pins[port]= data; - return(FALSE); + return(DD_FALSE); } @@ -340,7 +340,7 @@ bool cmd_fill_iram(char *cmd, class cl_uc *uc, class cl_sim *sim) { fill_memory(uc->MEM(MEM_IRAM), uc->get_mem_size(MEM_IRAM), 0, uc, sim); - return(FALSE); + return(DD_FALSE); } @@ -353,7 +353,7 @@ cmd_fill_xram(char *cmd, class cl_uc *uc, class cl_sim *sim) { fill_memory(uc->MEM(MEM_XRAM), uc->get_mem_size(MEM_XRAM), 0, uc, sim); uc->xram2eram/*FIXME*/(); - return(FALSE); + return(DD_FALSE); } @@ -365,7 +365,7 @@ bool cmd_fill_sfr(char *cmd, class cl_uc *uc, class cl_sim *sim) { fill_memory(uc->MEM(MEM_SFR), uc->get_mem_size(MEM_SFR), SFR_START, uc, sim); - return(FALSE); + return(DD_FALSE); } @@ -377,7 +377,7 @@ bool cmd_fill_code(char *cmd, class cl_uc *uc, class cl_sim *sim) { fill_memory(uc->MEM(MEM_ROM), EROM_SIZE, 0, uc, sim); - return(FALSE); + return(DD_FALSE); } diff --git a/sim/ucsim/s51.src/show.cc b/sim/ucsim/s51.src/show.cc index b7bd584c..ef29bcd5 100644 --- a/sim/ucsim/s51.src/show.cc +++ b/sim/ucsim/s51.src/show.cc @@ -329,7 +329,7 @@ cmd_show(char *cmd, class cl_uc *uc, class cl_sim *sim) if ((s= strtok(NULL, delimiters)) == NULL) { fprintf(sim->cmd_out(), "Parameter is not given.\n"); - return(FALSE); + return(DD_FALSE); } if (*s == 'c') { @@ -339,7 +339,7 @@ cmd_show(char *cmd, class cl_uc *uc, class cl_sim *sim) fprintf(sim->cmd_out(), "%s\n", warranty); else fprintf(sim->cmd_out(), "Unknown parameter.\n"); - return(FALSE); + return(DD_FALSE); } diff --git a/sim/ucsim/s51.src/uc51.cc b/sim/ucsim/s51.src/uc51.cc index 77e8c4d3..eab37892 100644 --- a/sim/ucsim/s51.src/uc51.cc +++ b/sim/ucsim/s51.src/uc51.cc @@ -70,7 +70,7 @@ t_uc51::t_uc51(int Itype, int Itech, class cl_sim *asim): technology= Itech; debug= asim->get_iarg('V', 0); - stop_at_it= FALSE; + stop_at_it= DD_FALSE; options->add(new cl_bool_opt(&debug, "verbose", "Verbose flag.")); options->add(new cl_bool_opt(&stop_at_it, "stopit", "Stop if interrupt accepted.")); @@ -443,7 +443,7 @@ t_uc51::reset(void) result= resGO; - was_reti= FALSE; + was_reti= DD_FALSE; s_tr_t1 = 0; s_rec_t1 = 0; @@ -451,8 +451,8 @@ t_uc51::reset(void) s_rec_tick = 0; s_in = 0; s_out = 0; - s_sending = FALSE; - s_receiving= FALSE; + s_sending = DD_FALSE; + s_receiving= DD_FALSE; s_rec_bit = 0; s_tr_bit = 0; } @@ -655,13 +655,13 @@ t_uc51::proc_write(uchar *addr) if (addr == &((sfr->umem8)[SBUF])) { s_out= sfr->get(SBUF); - s_sending= TRUE; + s_sending= DD_TRUE; s_tr_bit = 0; s_tr_tick= 0; s_tr_t1 = 0; } if (addr == &((sfr->umem8)[IE])) - was_reti= TRUE; + was_reti= DD_TRUE; } void @@ -884,7 +884,7 @@ t_uc51::do_inst(int step) step--; if (state == stGO) { - was_reti= FALSE; + was_reti= DD_FALSE; pre_inst(); result= exec_inst(); post_inst(); @@ -1002,7 +1002,7 @@ t_uc51::set_p_flag(void) int i; uchar uc; - p = FALSE; + p = DD_FALSE; uc= sfr->get(ACC); for (i= 0; i < 8; i++) { @@ -1109,7 +1109,7 @@ t_uc51::do_serial(int cycles) if (s_sending && (s_tr_bit >= bits)) { - s_sending= FALSE; + s_sending= DD_FALSE; sfr->set_bit1(SCON, bmTI); if (serial_out) { @@ -1129,7 +1129,7 @@ t_uc51::do_serial(int cycles) if (i > 0 && FD_ISSET(fileno(serial_in), &set)) { - s_receiving= TRUE; + s_receiving= DD_TRUE; s_rec_bit= 0; s_rec_tick= s_rec_t1= 0; } @@ -1143,7 +1143,7 @@ t_uc51::do_serial(int cycles) sfr->set(SBUF, s_in); received(c); } - s_receiving= FALSE; + s_receiving= DD_FALSE; s_rec_bit-= bits; } return(resGO); @@ -1390,7 +1390,7 @@ t_uc51::do_interrupt(void) if (was_reti) { - was_reti= FALSE; + was_reti= DD_FALSE; return(resGO); } if (!((ie= sfr->get(IE)) & bmEA)) diff --git a/sim/ucsim/s51.src/uc51r.cc b/sim/ucsim/s51.src/uc51r.cc index 5af287f1..191dd08c 100644 --- a/sim/ucsim/s51.src/uc51r.cc +++ b/sim/ucsim/s51.src/uc51r.cc @@ -144,7 +144,7 @@ t_uc51r::do_timers(int cycles) int t_uc51r::do_timer2(int cycles) { - bool nocount= FALSE; + bool nocount= DD_FALSE; uint t2mod= get_mem(MEM_SFR, T2MOD); uint t2con= get_mem(MEM_SFR, T2CON); uint p1= get_mem(MEM_SFR, P1); @@ -162,7 +162,7 @@ t_uc51r::do_timer2(int cycles) /* Determining nr of input clocks */ if (!(t2con & bmTR2)) - nocount= TRUE; // Timer OFF + nocount= DD_TRUE; // Timer OFF else if (t2con & bmC_T2) { @@ -171,7 +171,7 @@ t_uc51r::do_timer2(int cycles) !(p1 & port_pins[1] & bmT2)) cycles= 1; else - nocount= TRUE; + nocount= DD_TRUE; } /* Counting */ while (cycles--) diff --git a/sim/ucsim/s51.src/uc52.cc b/sim/ucsim/s51.src/uc52.cc index 8f181ffe..9f64b063 100644 --- a/sim/ucsim/s51.src/uc52.cc +++ b/sim/ucsim/s51.src/uc52.cc @@ -103,7 +103,7 @@ t_uc52::do_timers(int cycles) int t_uc52::do_timer2(int cycles) { - bool nocount= FALSE; + bool nocount= DD_FALSE; uint t2con= get_mem(MEM_SFR, T2CON); exf2it->activate(); @@ -116,7 +116,7 @@ t_uc52::do_timer2(int cycles) /* Determining nr of input clocks */ if (!(t2con & bmTR2)) - nocount= TRUE; // Timer OFF + nocount= DD_TRUE; // Timer OFF else if (t2con & bmC_T2) { @@ -125,7 +125,7 @@ t_uc52::do_timer2(int cycles) !(get_mem(MEM_SFR, P1) & port_pins[1] & bmT2)) cycles= 1; else - nocount= TRUE; + nocount= DD_TRUE; } /* Counting */ while (cycles--) @@ -245,7 +245,7 @@ t_uc52::do_t2_reload(int *cycles, bool nocount) !(get_mem(MEM_SFR, P1) & port_pins[1] & bmT2EX) && (get_mem(MEM_SFR, T2CON) & bmEXEN2)) { - ext2= TRUE; + ext2= DD_TRUE; mem(MEM_SFR)->set_bit1(T2CON, bmEXF2); prev_p1&= ~bmT2EX; // Falling edge has been handled } diff --git a/sim/ucsim/s51.src/where.cc b/sim/ucsim/s51.src/where.cc index 7905cc32..ba5d3b7d 100644 --- a/sim/ucsim/s51.src/where.cc +++ b/sim/ucsim/s51.src/where.cc @@ -65,7 +65,7 @@ where_memory(cl_mem *mem, bool cs, class cl_sim *sim) while (start < mem->size-len) { t_addr tmp= start; - found= TRUE; + found= DD_TRUE; for (i= 0; found && (iget(start+i):toupper(mem->get(start+i))); if (found) @@ -87,15 +87,15 @@ where_memory(cl_mem *mem, bool cs, class cl_sim *sim) bool cmd_where_iram(char *cmd, class cl_uc *uc, class cl_sim *sim) { - where_memory(uc->mem(MEM_IRAM), FALSE, sim); - return(FALSE); + where_memory(uc->mem(MEM_IRAM), DD_FALSE, sim); + return(DD_FALSE); } bool cmd_Where_iram(char *cmd, class cl_uc *uc, class cl_sim *sim) { - where_memory(uc->mem(MEM_IRAM), TRUE, sim); - return(FALSE); + where_memory(uc->mem(MEM_IRAM), DD_TRUE, sim); + return(DD_FALSE); } @@ -107,16 +107,16 @@ bool cmd_where_xram(char *cmd, class cl_uc *uc, class cl_sim *sim) { uc->eram2xram/*FIXME*/(); - where_memory(uc->mem(MEM_XRAM), FALSE, sim); - return(FALSE); + where_memory(uc->mem(MEM_XRAM), DD_FALSE, sim); + return(DD_FALSE); } bool cmd_Where_xram(char *cmd, class cl_uc *uc, class cl_sim *sim) { uc->eram2xram/*FIXME*/(); - where_memory(uc->mem(MEM_XRAM), TRUE, sim); - return(FALSE); + where_memory(uc->mem(MEM_XRAM), DD_TRUE, sim); + return(DD_FALSE); } @@ -127,15 +127,15 @@ cmd_Where_xram(char *cmd, class cl_uc *uc, class cl_sim *sim) bool cmd_where_code(char *cmd, class cl_uc *uc, class cl_sim *sim) { - where_memory(uc->mem(MEM_ROM), FALSE, sim); - return(FALSE); + where_memory(uc->mem(MEM_ROM), DD_FALSE, sim); + return(DD_FALSE); } bool cmd_Where_code(char *cmd, class cl_uc *uc, class cl_sim *sim) { - where_memory(uc->mem(MEM_ROM), TRUE, sim); - return(FALSE); + where_memory(uc->mem(MEM_ROM), DD_TRUE, sim); + return(DD_FALSE); } diff --git a/sim/ucsim/sim.src/brk.cc b/sim/ucsim/sim.src/brk.cc index ab50bc15..3543b1b2 100644 --- a/sim/ucsim/sim.src/brk.cc +++ b/sim/ucsim/sim.src/brk.cc @@ -101,7 +101,7 @@ cl_ev_brk::type(void) bool cl_ev_brk::match(struct event_rec *ev) { - return(FALSE); + return(DD_FALSE); } @@ -262,9 +262,9 @@ brk_coll::there_is_event(enum brk_event ev) b= (class cl_brk *)at(i); if (b->type() == brkEVENT && ((class cl_ev_brk *)b)->event == ev) - return(TRUE); + return(DD_TRUE); } - return(FALSE); + return(DD_FALSE); } int diff --git a/sim/ucsim/sim.src/itsrc.cc b/sim/ucsim/sim.src/itsrc.cc index d865a976..de784289 100644 --- a/sim/ucsim/sim.src/itsrc.cc +++ b/sim/ucsim/sim.src/itsrc.cc @@ -58,7 +58,7 @@ cl_it_src::cl_it_src(uchar Iie_mask, name= strdup(Iname); else name= strdup("unknown"); - active= TRUE; + active= DD_TRUE; } cl_it_src::~cl_it_src(void) @@ -81,13 +81,13 @@ cl_it_src::set_active_status(bool Aactive) void cl_it_src::activate(void) { - set_active_status(TRUE); + set_active_status(DD_TRUE); } void cl_it_src::deactivate(void) { - set_active_status(FALSE); + set_active_status(DD_FALSE); } diff --git a/sim/ucsim/sim.src/mem.cc b/sim/ucsim/sim.src/mem.cc index e780f4e0..06354edf 100644 --- a/sim/ucsim/sim.src/mem.cc +++ b/sim/ucsim/sim.src/mem.cc @@ -95,7 +95,7 @@ cl_memloc::write(class cl_mem *mem, long addr, ulong *val) cl_memloc_coll::cl_memloc_coll(void): cl_sorted_list(2, 2) { - Duplicates= FALSE; + Duplicates= DD_FALSE; } void * diff --git a/sim/ucsim/sim.src/option.cc b/sim/ucsim/sim.src/option.cc index 282952ce..47cce11f 100644 --- a/sim/ucsim/sim.src/option.cc +++ b/sim/ucsim/sim.src/option.cc @@ -101,9 +101,9 @@ cl_bool_opt::set_value(char *s) if (c == '1' || c == 'T' || c == 'Y') - *(bool *)option= TRUE; + *(bool *)option= DD_TRUE; else - *(bool *)option= FALSE; + *(bool *)option= DD_FALSE; } }; diff --git a/sim/ucsim/sim.src/sim.cc b/sim/ucsim/sim.src/sim.cc index dd19b44c..ed68c752 100644 --- a/sim/ucsim/sim.src/sim.cc +++ b/sim/ucsim/sim.src/sim.cc @@ -94,10 +94,9 @@ cl_sim::init(void) } char *prompt; if (arg_avail('P')) - /*FIXME: putc('\0', f)*/; + cmd->all_print("\0", 1); else - cmd->all_printf("%s", arg_avail('P')?"\0": - ((prompt= get_sarg(0, "prompt"))?prompt:"> ")); + cmd->all_printf("%s", (prompt= get_sarg(0, "prompt"))?prompt:"> ") ; } return(0); } diff --git a/sim/ucsim/sim.src/uc.cc b/sim/ucsim/sim.src/uc.cc index d0577919..f128e8e7 100644 --- a/sim/ucsim/sim.src/uc.cc +++ b/sim/ucsim/sim.src/uc.cc @@ -151,7 +151,7 @@ cl_uc::init(void) } ebrk= new brk_coll(2, 2, (class cl_rom *)mem(MEM_ROM)); fbrk= new brk_coll(2, 2, (class cl_rom *)mem(MEM_ROM)); - fbrk->Duplicates= FALSE; + fbrk->Duplicates= DD_FALSE; mk_hw_elements(); reset(); return(0); @@ -295,7 +295,7 @@ cl_uc::mem(enum mem_class type) return((class cl_mem *)(mems->at(type))); } -uchar * +TYPE_UBYTE * cl_uc::MEM(enum mem_class type) { class cl_mem *m; @@ -316,7 +316,7 @@ ReadInt(FILE *f, bool *ok, int bytes) char s2[3]; long l= 0; - *ok= FALSE; + *ok= DD_FALSE; while (bytes) { if (fscanf(f, "%2c", &s2[0]) == EOF) @@ -325,7 +325,7 @@ ReadInt(FILE *f, bool *ok, int bytes) l= l*256 + strtol(s2, NULL, 16); bytes--; } - *ok= TRUE; + *ok= DD_TRUE; return(l); } @@ -365,7 +365,7 @@ cl_uc::read_hex_file(const char *name) } //memset(inst_map, '\0', sizeof(inst_map)); - ok= TRUE; + ok= DD_TRUE; while (ok && rtyp != 1) { @@ -538,7 +538,7 @@ cl_uc::register_hw_write(enum mem_class type, long addr, class cl_hw *hw) class cl_hw * cl_uc::get_hw(enum hw_cath cath, int *idx) { - class cl_hw *hw; + class cl_hw *hw= 0; int i= 0; if (idx) diff --git a/sim/ucsim/sim.src/uccl.h b/sim/ucsim/sim.src/uccl.h index 7cd40687..5a373065 100644 --- a/sim/ucsim/sim.src/uccl.h +++ b/sim/ucsim/sim.src/uccl.h @@ -110,7 +110,7 @@ public: virtual void write_mem(enum mem_class type, long addr, ulong val); virtual void set_mem(enum mem_class type, long addr, ulong val); virtual class cl_mem *mem(enum mem_class type); - virtual uchar *MEM(enum mem_class type); + virtual TYPE_UBYTE *MEM(enum mem_class type); // file handling virtual long read_hex_file(const char *name); diff --git a/sim/ucsim/z80.src/glob.cc b/sim/ucsim/z80.src/glob.cc index d90e5fc7..aae09598 100644 --- a/sim/ucsim/z80.src/glob.cc +++ b/sim/ucsim/z80.src/glob.cc @@ -31,123 +31,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA struct dis_entry disass_z80[]= { - { 0x0000, 0xffff, ' ', 1, "nop" }, - { 0x9488, 0xffff, ' ', 1, "clc" }, - { 0x94d8, 0xffff, ' ', 1, "clh" }, - { 0x94f8, 0xffff, ' ', 1, "cli" }, - { 0x94a8, 0xffff, ' ', 1, "cln" }, - { 0x94c8, 0xffff, ' ', 1, "cls" }, - { 0x94e8, 0xffff, ' ', 1, "clt" }, - { 0x94b8, 0xffff, ' ', 1, "clv" }, - { 0x9498, 0xffff, ' ', 1, "clz" }, - { 0x9408, 0xffff, ' ', 1, "sec" }, - { 0x9458, 0xffff, ' ', 1, "seh" }, - { 0x9478, 0xffff, ' ', 1, "sei" }, - { 0x9428, 0xffff, ' ', 1, "sen" }, - { 0x9448, 0xffff, ' ', 1, "ses" }, - { 0x9468, 0xffff, ' ', 1, "set" }, - { 0x9438, 0xffff, ' ', 1, "sev" }, - { 0x9418, 0xffff, ' ', 1, "sez" }, - { 0x1c00, 0xfc00, ' ', 1, "adc %d,%r" }, - { 0x0c00, 0xfc00, ' ', 1, "add %d,%r" }, - { 0x9600, 0xff00, ' ', 1, "adiw %2,%6" }, - { 0x2000, 0xfc00, ' ', 1, "and %d,%r" }, - { 0x7000, 0xf000, ' ', 1, "andi %D,%K" }, - { 0x9405, 0xfe0f, ' ', 1, "asr %d" }, - { 0x9488, 0xff8f, ' ', 1, "bclr %s" }, - { 0xf800, 0xfe08, ' ', 1, "bld %d,%b" }, - { 0xf400, 0xfc07, ' ', 1, "brcc %k" }, - { 0xf000, 0xfc07, ' ', 1, "brcs %k" }, - { 0xf001, 0xfc07, ' ', 1, "breq %k" }, - { 0xf404, 0xfc07, ' ', 1, "brge %k" }, - { 0xf405, 0xfc07, ' ', 1, "brhc %k" }, - { 0xf005, 0xfc07, ' ', 1, "brhs %k" }, - { 0xf407, 0xfc07, ' ', 1, "brid %k" }, - { 0xf007, 0xfc07, ' ', 1, "brie %k" }, - { 0xf000, 0xfc07, ' ', 1, "brlo %k" }, - { 0xf004, 0xfc07, ' ', 1, "brlt %k" }, - { 0xf002, 0xfc07, ' ', 1, "brmi %k" }, - { 0xf401, 0xfc07, ' ', 1, "brne %k" }, - { 0xf402, 0xfc07, ' ', 1, "brpl %k" }, - { 0xf400, 0xfc07, ' ', 1, "brsh %k" }, - { 0xf406, 0xfc07, ' ', 1, "brtc %k" }, - { 0xf006, 0xfc07, ' ', 1, "brts %k" }, - { 0xf403, 0xfc07, ' ', 1, "brvc %k" }, - { 0xf003, 0xfc07, ' ', 1, "brvs %k" }, - { 0xf400, 0xfc00, ' ', 1, "brbc %b,%k" }, - { 0xf000, 0xfc00, ' ', 1, "brbs %b,%k" }, - { 0x9408, 0xff8f, ' ', 1, "bset %s" }, - { 0xfa00, 0xfe00, ' ', 1, "bst %d,%b" }, - { 0x940e, 0xfe0e, ' ', 2, "call %A" }, - { 0x9800, 0xff00, ' ', 1, "cbi %P,%b" }, - { 0x9400, 0xfe0f, ' ', 1, "com %d" }, - { 0x1400, 0xfc00, ' ', 1, "cp %d,%r" }, - { 0x0400, 0xfc00, ' ', 1, "cpc %d,%r" }, - { 0x3000, 0xf000, ' ', 1, "cpi %D,%K" }, - { 0x1000, 0xfc00, ' ', 1, "cpse %d,%r" }, - { 0x940a, 0xfe0f, ' ', 1, "dec %d" }, - { 0x2400, 0xfc00, ' ', 1, "eor %d,%r" }, - { 0x9509, 0xff0f, ' ', 1, "icall" }, - { 0x9409, 0xff0f, ' ', 1, "ijmp" }, - { 0xb000, 0xf800, ' ', 1, "in %d,%p" }, - { 0x9403, 0xfe0f, ' ', 1, "inc %d" }, - { 0x940c, 0xfe0e, ' ', 2, "jmp %A" }, - { 0x900c, 0xfe0f, ' ', 1, "ld %d,X" }, - { 0x900d, 0xfe0f, ' ', 1, "ld %d,X+" }, - { 0x900e, 0xfe0f, ' ', 1, "ld %d,-X" }, - { 0x8008, 0xfe0f, ' ', 1, "ld %d,Y" }, - { 0x9009, 0xfe0f, ' ', 1, "ld %d,Y+" }, - { 0x900a, 0xfe0f, ' ', 1, "ld %d,-Y" }, - { 0x8008, 0xd208, ' ', 1, "ldd %d,Y+%q" }, - { 0x8000, 0xfe0f, ' ', 1, "ld %d,Z" }, - { 0x9001, 0xfe0f, ' ', 1, "ld %d,Z+" }, - { 0x9002, 0xfe0f, ' ', 1, "ld %d,-Z" }, - { 0x8000, 0xd208, ' ', 1, "ldd %d,Z+%q" }, - { 0xe000, 0xf000, ' ', 1, "ldi %D,%K" }, - { 0x9000, 0xfe0f, ' ', 2, "lds %d,%R" }, - { 0x95c8, 0xffff, ' ', 1, "lpm" }, - { 0x95d8, 0xffff, ' ', 1, "elpm" }, // in some devices equal to lpm - { 0x9406, 0xfe0f, ' ', 1, "lsr %d" }, - { 0x2c00, 0xfc00, ' ', 1, "mov %d,%r" }, - { 0x9c00, 0xfc00, ' ', 1, "mul %d,%r" }, - { 0x9401, 0xfe0f, ' ', 1, "neg %d" }, - { 0x2800, 0xfc00, ' ', 1, "or %d,%r" }, - { 0x6000, 0xf000, ' ', 1, "ori %d,%K" }, - { 0xb800, 0xf800, ' ', 1, "out %p,%d" }, - { 0x900f, 0xfe0f, ' ', 1, "pop %d" }, - { 0x920f, 0xfe0f, ' ', 1, "push %d" }, - { 0xd000, 0xf000, ' ', 1, "rcall %a" }, - { 0x9508, 0xff9f, ' ', 1, "ret" }, - { 0x9518, 0xff9f, ' ', 1, "reti" }, - { 0xc000, 0xf000, ' ', 1, "rjmp %a" }, - { 0x9407, 0xfe0f, ' ', 1, "ror %d" }, - { 0x0800, 0xfc00, ' ', 1, "sbc %d,%r" }, - { 0x4000, 0xf000, ' ', 1, "sbci %D,%K" }, - { 0x9a00, 0xff00, ' ', 1, "sbi %P,%b" }, - { 0x9900, 0xff00, ' ', 1, "sbic %P,%b" }, - { 0x9b00, 0xff00, ' ', 1, "sbis %P,%b" }, - { 0x9700, 0xff00, ' ', 1, "sbiw %2,%6" }, - { 0x6000, 0xf000, ' ', 1, "sbr %D,%K" }, - { 0xfc00, 0xfe00, ' ', 1, "sbrc %d,%b" }, - { 0xfe00, 0xfe00, ' ', 1, "sbrs %d,%b" }, - { 0xef0f, 0xff0f, ' ', 1, "ser %D" }, - { 0x9588, 0xffef, ' ', 1, "sleep" }, - { 0x920c, 0xfe0f, ' ', 1, "st X,%d" }, - { 0x920d, 0xfe0f, ' ', 1, "st X+,%d" }, - { 0x920e, 0xfe0f, ' ', 1, "st -X,%d" }, - { 0x8208, 0xfe0f, ' ', 1, "st Y,%d" }, - { 0x9209, 0xfe0f, ' ', 1, "st Y+,%d" }, - { 0x920a, 0xfe0f, ' ', 1, "st -Y,%d" }, - { 0x8208, 0xd208, ' ', 1, "std Y+%q,%d" }, - { 0x8200, 0xfe0f, ' ', 1, "st Z,%d" }, - { 0x9201, 0xfe0f, ' ', 1, "st Z+,%d" }, - { 0x9202, 0xfe0f, ' ', 1, "st -Z,%d" }, - { 0x8200, 0xd208, ' ', 1, "std Z+%q,%d" }, - { 0x9200, 0xfe0f, ' ', 2, "sts %R,%d" }, - { 0x1800, 0xfc00, ' ', 1, "sub %d,%r" }, - { 0x5000, 0xf000, ' ', 1, "subi %D,%K" }, - { 0x9402, 0xfe0f, ' ', 1, "swap %d" }, - { 0x95a8, 0xffef, ' ', 1, "wdr" }, + { 0x0000, 0x00ff, ' ', 1, "nop" }, { 0, 0, 0, 0, NULL } };