projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
version 0.5.2
[fw/sdcc]
/
sim
/
ucsim
/
s51.src
/
sim51.cc
diff --git
a/sim/ucsim/s51.src/sim51.cc
b/sim/ucsim/s51.src/sim51.cc
index 658ad57b28c49eee25b6414bedc5afeb0d3cb875..e4c281df590e74b312c6b8b543d4ab0e3f3b33ed 100644
(file)
--- a/
sim/ucsim/s51.src/sim51.cc
+++ b/
sim/ucsim/s51.src/sim51.cc
@@
-57,12
+57,16
@@
class cl_uc *
cl_sim51::mk_controller(void)
{
int i;
cl_sim51::mk_controller(void)
{
int i;
+ char *typ= NIL;
+ class cl_optref type_option(this);
+ type_option.init();
+ type_option.use("cpu_type");
i= 0;
i= 0;
- if (
app->args->get_sarg('t', 0) == NUL
L)
-
app->args->add(new cl_prg_arg('t', 0, "C51"))
;
+ if (
(typ= type_option.get_value(typ)) == NI
L)
+
typ= "C51"
;
while ((cpus_51[i].type_str != NULL) &&
while ((cpus_51[i].type_str != NULL) &&
- (strcmp(
app->args->get_sarg('t', 0)
, cpus_51[i].type_str) != 0))
+ (strcmp(
typ
, cpus_51[i].type_str) != 0))
i++;
if (cpus_51[i].type_str == NULL)
{
i++;
if (cpus_51[i].type_str == NULL)
{
@@
-73,17
+77,17
@@
cl_sim51::mk_controller(void)
switch (cpus_51[i].type)
{
case CPU_51: case CPU_31:
switch (cpus_51[i].type)
{
case CPU_51: case CPU_31:
- return(new
t_uc51
(cpus_51[i].type, cpus_51[i].technology, this));
+ return(new
cl_51core
(cpus_51[i].type, cpus_51[i].technology, this));
case CPU_52: case CPU_32:
case CPU_52: case CPU_32:
- return(new
t
_uc52(cpus_51[i].type, cpus_51[i].technology, this));
+ return(new
cl
_uc52(cpus_51[i].type, cpus_51[i].technology, this));
case CPU_51R:
case CPU_51R:
- return(new
t
_uc51r(cpus_51[i].type, cpus_51[i].technology, this));
+ return(new
cl
_uc51r(cpus_51[i].type, cpus_51[i].technology, this));
case CPU_89C51R:
case CPU_89C51R:
- return(new
t
_uc89c51r(cpus_51[i].type, cpus_51[i].technology, this));
+ return(new
cl
_uc89c51r(cpus_51[i].type, cpus_51[i].technology, this));
case CPU_251:
case CPU_251:
- return(new
t
_uc251(cpus_51[i].type, cpus_51[i].technology, this));
+ return(new
cl
_uc251(cpus_51[i].type, cpus_51[i].technology, this));
case CPU_DS390: case CPU_DS390F:
case CPU_DS390: case CPU_DS390F:
- return(new
t
_uc390(cpus_51[i].type, cpus_51[i].technology, this));
+ return(new
cl
_uc390(cpus_51[i].type, cpus_51[i].technology, this));
}
return(NULL);
}
}
return(NULL);
}