Commit 1575146c480915b29d2a7c74d34689557135953c
authorMichel Pollet <buserror@gmail.com>
Sun, 4 Apr 2010 11:20:59 +0000 (12:20 +0100)
committerMichel Pollet <buserror@gmail.com>
Sun, 4 Apr 2010 11:20:59 +0000 (12:20 +0100)
If declared...

Signed-off-by: Michel Pollet <buserror@gmail.com>
simavr/sim/avr_flash.c

index 3f3a12a11248b3aed96efc9d914c27b2eab81d98..27f07728a8bcb5a49e1e97e551c74e200e2e9c73 100644 (file)
@@ -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);