2 * Simulator of microcontrollers (sim51.cc)
4 * Copyright (C) 1999,99 Drotos Daniel, Talker Bt.
6 * To contact author send email to drdani@mazsola.iit.uni-miskolc.hu
10 /* This file is part of microcontroller simulator: ucsim.
12 UCSIM is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
17 UCSIM is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with UCSIM; see the file COPYING. If not, write to the Free
24 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
41 //#include "cmd51cl.h"
45 #include "uc89c51rcl.h"
50 cl_sim51::cl_sim51(class cl_app *the_app):
56 cl_sim51::mk_controller(void)
61 if (app->args->get_sarg('t', 0) == NULL)
62 app->args->add(new cl_prg_arg('t', 0, "C51"));
63 while ((cpus_51[i].type_str != NULL) &&
64 (strcmp(app->args->get_sarg('t', 0), cpus_51[i].type_str) != 0))
66 if (cpus_51[i].type_str == NULL)
68 fprintf(stderr, "Unknown processor type. "
69 "Use -H option to see known types.\n");
72 switch (cpus_51[i].type)
74 case CPU_51: case CPU_31:
75 return(new t_uc51(cpus_51[i].type, cpus_51[i].technology, this));
76 case CPU_52: case CPU_32:
77 return(new t_uc52(cpus_51[i].type, cpus_51[i].technology, this));
79 return(new t_uc51r(cpus_51[i].type, cpus_51[i].technology, this));
81 return(new t_uc89c51r(cpus_51[i].type, cpus_51[i].technology, this));
83 return(new t_uc251(cpus_51[i].type, cpus_51[i].technology, this));
89 /* End of s51.src/sim51.cc */