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"
51 cl_sim51::cl_sim51(class cl_app *the_app):
57 cl_sim51::mk_controller(void)
62 if (app->args->get_sarg('t', 0) == NULL)
63 app->args->add(new cl_prg_arg('t', 0, "C51"));
64 while ((cpus_51[i].type_str != NULL) &&
65 (strcmp(app->args->get_sarg('t', 0), cpus_51[i].type_str) != 0))
67 if (cpus_51[i].type_str == NULL)
69 fprintf(stderr, "Unknown processor type. "
70 "Use -H option to see known types.\n");
73 switch (cpus_51[i].type)
75 case CPU_51: case CPU_31:
76 return(new t_uc51(cpus_51[i].type, cpus_51[i].technology, this));
77 case CPU_52: case CPU_32:
78 return(new t_uc52(cpus_51[i].type, cpus_51[i].technology, this));
80 return(new t_uc51r(cpus_51[i].type, cpus_51[i].technology, this));
82 return(new t_uc89c51r(cpus_51[i].type, cpus_51[i].technology, this));
84 return(new t_uc251(cpus_51[i].type, cpus_51[i].technology, this));
86 return(new t_uc390(cpus_51[i].type, cpus_51[i].technology, this));
92 /* End of s51.src/sim51.cc */