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)
61 class cl_optref type_option(this);
64 type_option.use("cpu_type");
66 if ((typ= type_option.get_value(typ)) == NIL)
68 while ((cpus_51[i].type_str != NULL) &&
69 (strcmp(typ, cpus_51[i].type_str) != 0))
71 if (cpus_51[i].type_str == NULL)
73 fprintf(stderr, "Unknown processor type. "
74 "Use -H option to see known types.\n");
77 switch (cpus_51[i].type)
79 case CPU_51: case CPU_31:
80 return(new cl_51core(cpus_51[i].type, cpus_51[i].technology, this));
81 case CPU_52: case CPU_32:
82 return(new cl_uc52(cpus_51[i].type, cpus_51[i].technology, this));
84 return(new cl_uc51r(cpus_51[i].type, cpus_51[i].technology, this));
86 return(new cl_uc89c51r(cpus_51[i].type, cpus_51[i].technology, this));
88 return(new cl_uc251(cpus_51[i].type, cpus_51[i].technology, this));
89 case CPU_DS390: case CPU_DS390F:
90 return(new cl_uc390(cpus_51[i].type, cpus_51[i].technology, this));
96 /* End of s51.src/sim51.cc */