From 1575146c480915b29d2a7c74d34689557135953c Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Sun, 4 Apr 2010 12:20:59 +0100 Subject: [PATCH] flash: Add support for RAMPZ If declared... Signed-off-by: Michel Pollet --- simavr/sim/avr_flash.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/simavr/sim/avr_flash.c b/simavr/sim/avr_flash.c index 3f3a12a..27f0772 100644 --- a/simavr/sim/avr_flash.c +++ b/simavr/sim/avr_flash.c @@ -54,6 +54,8 @@ static int avr_flash_ioctl(struct avr_io_t * port, uint32_t ctl, void * io_param avr_t * avr = p->io.avr; uint16_t z = avr->data[R_ZL] | (avr->data[R_ZH] << 8); + if (avr->rampz) + z |= avr->data[avr->rampz] << 16; uint16_t r01 = avr->data[0] | (avr->data[1] << 8); // printf("AVR_IOCTL_FLASH_SPM %02x Z:%04x R01:%04x\n", avr->data[p->r_spm], z,r01); -- 2.39.5