CPU chip ALU input on A instruction

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

CPU chip ALU input on A instruction

gs99
To learn the operation of CPU chip, I made a CPU.asm with the code shown in CPU.tst comments, e.g.
@12345
D=A
@23456
D=D-D
etc. to see how registers should be affected.

One difference I noticed:
The hdl code I developed does not apply input values to ALU if the current instruction is A,
whereas
CPU Emulator keeps the input values from the prior instruction.

Is there a reason for that? Are the values of the prior ALU input ever used?