count of zero is possible

This commit is contained in:
folkert van heusden 2024-04-18 22:47:03 +02:00
parent 86e3bceaa3
commit c16b5d911f
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1

View file

@ -189,6 +189,8 @@ void rl02::writeWord(const uint16_t addr, uint16_t v)
uint32_t memory_address = get_bus_address(); uint32_t memory_address = get_bus_address();
uint32_t count = (65536l - registers[(RL02_MPR - RL02_BASE) / 2]) * 2; uint32_t count = (65536l - registers[(RL02_MPR - RL02_BASE) / 2]) * 2;
if (count == 65536)
count = 0;
uint16_t temp = registers[(RL02_DAR - RL02_BASE) / 2]; uint16_t temp = registers[(RL02_DAR - RL02_BASE) / 2];