2 * Simulator of microcontrollers (argcl.h)
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
35 * Base type of arguments/parameters
38 class cl_arg: public cl_base
55 virtual long long get_ivalue(void);
56 virtual char *get_svalue(void);
57 virtual double get_fvalue(void);
58 virtual void *get_pvalue(void);
66 class cl_cmd_arg: public cl_arg
69 cl_cmd_arg(long long i): cl_arg(i) {}
70 cl_cmd_arg(char *s): cl_arg(s) {}
72 virtual int is_string(void) { return(0); }
73 virtual long get_address(void) { return(-1); }
76 class cl_cmd_int_arg: public cl_cmd_arg
79 cl_cmd_int_arg(long long addr);
81 virtual long get_address(void) { return(get_ivalue()); }
84 class cl_cmd_sym_arg: public cl_cmd_arg
87 cl_cmd_sym_arg(char *sym);
89 virtual long get_address(void);
92 class cl_cmd_str_arg: public cl_cmd_arg
95 cl_cmd_str_arg(char *str);
97 virtual int is_string(void) { return(1); }
100 class cl_cmd_bit_arg: public cl_cmd_arg
103 class cl_cmd_arg *sfr, *bit;
106 cl_cmd_bit_arg(class cl_cmd_arg *asfr, class cl_cmd_arg *abit);
107 ~cl_cmd_bit_arg(void);
109 virtual long get_address(void);
117 class cl_prg_arg: public cl_arg
124 cl_prg_arg(char sn, char *ln, long long lv);
125 cl_prg_arg(char sn, char *ln, char *lv);
126 cl_prg_arg(char sn, char *ln, double fv);
127 cl_prg_arg(char sn, char *ln, void *pv);