projects
/
sx
/
simavr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
regExp
home
|
summary
|
tags
|
heads
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
raw
|
patch
| inline |
side by side
(parent:
7d47dbc
)
Commit
62db05d8ec93d990209b1595b427e2f0dc208ead
author
Max Schwarz
<max.schwarz@online.de>
Thu, 5 Feb 2015 22:17:25 +0000
(23:17 +0100)
committer
Max Schwarz
<max.schwarz@online.de>
Thu, 5 Feb 2015 23:57:41 +0000
(
00:57
+0100)
simavr/sim/sim_core.c
patch
|
blob
|
history
|
download
diff --git
a/simavr/sim/sim_core.c
b/simavr/sim/sim_core.c
index 0cc30000f1380d1bf39ef824b91cf4ef3601a6b6..e58b86f44f55764185bc26fdf2e7e18c03c9dc7e 100644
(file)
--- a/
simavr/sim/sim_core.c
+++ b/
simavr/sim/sim_core.c
@@
-206,7
+206,7
@@
inline void _avr_sp_set(avr_t * avr, uint16_t sp)
*/
static inline void _avr_set_ram(avr_t * avr, uint16_t addr, uint8_t v)
{
- if (addr <
256
)
+ if (addr <
MAX_IOs + 31
)
_avr_set_r(avr, addr, v);
else
avr_core_watch_write(avr, addr, v);
@@
-224,7
+224,7
@@
static inline uint8_t _avr_get_ram(avr_t * avr, uint16_t addr)
*/
READ_SREG_INTO(avr, avr->data[R_SREG]);
- } else if (addr > 31 && addr <
256
) {
+ } else if (addr > 31 && addr <
31 + MAX_IOs
) {
uint8_t io = AVR_DATA_TO_IO(addr);
if (avr->io[io].r.c)