Jump command

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Jump command

cym13
I am dealing with the code:

@10
D=A
@20
A=D+A;JMP

What should be the value of PC after the last command? 20 (the old value of A) or 30 (the new value)?
Reply | Threaded
Open this post in threaded view
|

Re: Jump command

cadet1620
Administrator
cym13 wrote
I am dealing with the code:

@10
D=A
@20
A=D+A;JMP

What should be the value of PC after the last command? 20 (the old value of A) or 30 (the new value)?
This is undefined behavior. A C-instruction that changes A must not include a jump.

See this thread.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: Jump command

cym13
Thank you very much!