2 * Simulator of microcontrollers (sim.src/itsrccl.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
28 #ifndef SIM_ITSRCCL_HEADER
29 #define SIM_ITSRCCL_HEADER
36 * Represents source of interrupt
39 class cl_it_src: public cl_base
42 uchar ie_mask; // Mask in IE register
43 uchar src_reg; // Register in SFR of source
44 uchar src_mask; // Mask of source bit in src_reg
45 uint addr; // Address of service routine
46 bool clr_bit; // Request bit must be cleared when IT accepted
47 char *name; // For debug
48 bool active; // Acceptance can be disabled
50 cl_it_src(uchar Iie_mask,
59 virtual void set_active_status(bool Aactive);
60 virtual void activate(void);
61 virtual void deactivate(void);
66 * This class is used to follow levels of accepted interrupts
67 * It used on a stack of active interrupt services (it_levels of cl_uc)
70 class it_level: public cl_base
76 class cl_it_src *source;
78 it_level(int alevel, uint aaddr, uint aPC, class cl_it_src *is);
84 /* End of itsrccl.h */