2 * Simulator of microcontrollers (imove.cc)
4 * Copyright (C) @@S@@,@@Y@@ 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
31 cl_m6800::clr(class cl_memory_cell
&dest
)
33 u8_t f
= rF
& ~(flagN
|flagV
|flagC
);
41 cl_m6800::lda(class cl_memory_cell
&dest
, u8_t op
)
43 u8_t f
= rF
& ~(flagN
|flagV
|flagC
);
46 if (op
&0x80) f
|= flagN
;
52 cl_m6800::sta(class cl_memory_cell
&dest
, u8_t op
)
54 u8_t f
= rF
& ~(flagN
|flagV
|flagC
);
57 if (op
&0x80) f
|= flagN
;
63 cl_m6800::ldsx(class cl_cell16
&dest
, u16_t op
)
65 u8_t f
= rF
& ~(flagN
|flagV
|flagC
);
68 if (op
&0x8000) f
|= flagN
;
74 cl_m6800::stsx(t_addr a
, u16_t op
)
76 u8_t f
= rF
& ~(flagN
|flagV
|flagC
);
78 rom
->write(a
+1, op
&0xff);
81 if (op
&0x8000) f
|= flagN
;
88 cl_m6800::TAP(t_mem code
)
95 cl_m6800::TPA(t_mem code
)
102 cl_m6800::TAB(t_mem code
)
104 u8_t f
= rCC
& ~(flagN
|flagZ
|flagV
);
107 if (rA
&0x80) f
|= flagN
;
113 cl_m6800::TBA(t_mem code
)
115 u8_t f
= rF
& ~(flagN
|flagZ
|flagV
);
118 if (rB
&0x80) f
|= flagN
;
124 cl_m6800::TSX(t_mem code
)
131 cl_m6800::PULA(t_mem code
)
134 cA
.W(rom
->read(rSP
));
140 cl_m6800::PULB(t_mem code
)
143 cB
.W(rom
->read(rSP
));
149 cl_m6800::TXS(t_mem code
)
156 cl_m6800::PSHA(t_mem code
)
165 cl_m6800::PSHB(t_mem code
)
174 /* End of m6800.src/imove.cc */