Fix a bug where v[X] was not handled in 0xFX55 and 0xFX65, use memcpy instead of looping, increment i like in the original implementation
This commit is contained in:
parent
522af3833a
commit
ab05516329
@ -388,13 +388,13 @@ op_handler(void)
|
|||||||
pc += 2;
|
pc += 2;
|
||||||
return 1;
|
return 1;
|
||||||
case 0xF055:
|
case 0xF055:
|
||||||
for (register uint_fast8_t t = 0; t < X; ++t)
|
memcpy(memory + i, v, ((X) + 1) * sizeof(byte));
|
||||||
memory[i + t] = v[t];
|
i += (X) + 1;
|
||||||
pc += 2;
|
pc += 2;
|
||||||
return 1;
|
return 1;
|
||||||
case 0xF065:
|
case 0xF065:
|
||||||
for (register uint_fast8_t t = 0; t < X; ++t)
|
memcpy(v, memory + i, ((X) + 1) * sizeof(byte));
|
||||||
v[t] = memory[i + t];
|
i += (X) + 1;
|
||||||
pc += 2;
|
pc += 2;
|
||||||
return 1;
|
return 1;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user