ucsim-0.2.37-pre3 into cvs
[fw/sdcc] / sim / ucsim / avr.src / inst.cc
1 /*
2  * Simulator of microcontrollers (inst.cc)
3  *
4  * Copyright (C) 1999,99 Drotos Daniel, Talker Bt.
5  * 
6  * To contact author send email to drdani@mazsola.iit.uni-miskolc.hu
7  *
8  */
9
10 /* This file is part of microcontroller simulator: ucsim.
11
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.
16
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.
21
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
25 02111-1307, USA. */
26 /*@1@*/
27
28 #include "ddconfig.h"
29
30 // local
31 #include "avrcl.h"
32 #include "regsavr.h"
33
34
35 /*
36  * No Instruction
37  * NOP
38  * 0000 0000 0000 0000
39  *----------------------------------------------------------------------------
40  */
41
42 int
43 cl_avr::nop(t_mem code)
44 {
45   return(resGO);
46 }
47
48
49 int
50 cl_avr::sleep(t_mem code)
51 {
52   return(resGO);
53 }
54
55
56 int
57 cl_avr::wdr(t_mem code)
58 {
59   return(resGO);
60 }
61
62
63 /*
64  * Set all bits in Register
65  * SER Rd  16<=d<=31
66  * 1110 1111 dddd 1111
67  *____________________________________________________________________________
68  */
69
70 int
71 cl_avr::ser_Rd(t_mem code)
72 {
73   t_addr d= (code&0xf0)>>4;
74   t_mem data= 0xff;
75   ram->write(d, &data);
76   return(resGO);
77 }
78
79
80 /* End of avr.src/inst.cc */