2 * Simulator of microcontrollers (arg.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
51 cl_arg::cl_arg(long long lv):
58 cl_arg::cl_arg(char *sv):
61 s_value= sv?strdup(sv):0;
64 cl_arg::cl_arg(double fv):
71 cl_arg::cl_arg(void *pv):
86 * Getting value of the argument
90 cl_arg::get_ivalue(void)
96 cl_arg::get_svalue(void)
102 cl_arg::get_fvalue(void)
108 cl_arg::get_pvalue(void)
116 *----------------------------------------------------------------------------
119 cl_cmd_int_arg::cl_cmd_int_arg(long long addr):
123 cl_cmd_sym_arg::cl_cmd_sym_arg(char *sym):
128 cl_cmd_sym_arg::get_address(void)
130 struct name_entry *ne;
132 if ((ne= get_name_entry(simulator->uc->sfr_tbl(),
134 simulator->uc)) != NULL)
141 cl_cmd_str_arg::cl_cmd_str_arg(char *str):
145 cl_cmd_bit_arg::cl_cmd_bit_arg(class cl_cmd_arg *asfr, class cl_cmd_arg *abit):
146 cl_cmd_arg((long long)0)
152 cl_cmd_bit_arg::~cl_cmd_bit_arg(void)
161 cl_cmd_bit_arg::get_address(void)
164 return(sfr->get_address());
171 *----------------------------------------------------------------------------
174 cl_prg_arg::cl_prg_arg(char sn, char *ln, long long lv):
178 long_name = ln?strdup(ln):0;
181 cl_prg_arg::cl_prg_arg(char sn, char *ln, char *sv):
185 long_name = ln?strdup(ln):0;
188 cl_prg_arg::cl_prg_arg(char sn, char *ln, double fv):
192 long_name = ln?strdup(ln):0;
195 cl_prg_arg::cl_prg_arg(char sn, char *ln, void *pv):
199 long_name = ln?strdup(ln):0;
202 cl_prg_arg::~cl_prg_arg(void)