3b2: Fix STRCPY instruction

STRCPY must increment both source and destination pointers (R0 and R1).
This commit is contained in:
Seth Morabito 2019-08-11 22:47:00 -07:00
parent 69ec377834
commit ab27a53014

View file

@ -3018,14 +3018,11 @@ t_stat sim_instr(void)
break; break;
case STRCPY: case STRCPY:
a = 0; a = 0;
b = 0; while ((a = read_b(R[0], ACC_AF)) != '\0') {
write_b(R[1], (uint8) a);
do { R[0]++;
b = read_b(R[0] + a, ACC_AF); R[1]++;
write_b(R[1] + a, (uint8) b); }
a++;
} while (b != '\0');
break; break;
case TSTW: case TSTW:
a = cpu_read_op(src1); a = cpu_read_op(src1);