3b2: Fix STRCPY instruction
STRCPY must increment both source and destination pointers (R0 and R1).
This commit is contained in:
parent
69ec377834
commit
ab27a53014
1 changed files with 5 additions and 8 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue