fix for @(Rn)+: increment is 1 in case of bytes

This commit is contained in:
folkert van heusden 2024-03-29 09:47:21 +01:00
parent b8d0a08bcf
commit 68be8eeffc
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1

View file

@ -402,7 +402,7 @@ gam_rc_t cpu::getGAM(const uint8_t mode, const uint8_t reg, const word_mode_t wo
case 3: // @(Rn)+ / @#a case 3: // @(Rn)+ / @#a
g.addr = b->read(getRegister(reg, mode_selection), wm_word, mode_selection, false, isR7_space); g.addr = b->read(getRegister(reg, mode_selection), wm_word, mode_selection, false, isR7_space);
// might be wrong: the adds should happen when the read is really performed, because of traps // might be wrong: the adds should happen when the read is really performed, because of traps
addRegister(reg, mode_selection, 2); addRegister(reg, mode_selection, word_mode == wm_byte ? 1 : 2);
addToMMR1(mode, reg, word_mode); addToMMR1(mode, reg, word_mode);
g.space = d_space; g.space = d_space;
if (read_value) if (read_value)