Could someone kindly explain how the program counter in the EVM knows where to jump to when the JUMP opcode is executed? I understand that a counter is supplied using PUSH (something) before the JUMP opcode but how does the program counter use this to navigate where to continue from?

1 Answer 1


Yes, The JUMP instruction uses a value from the stack and alters the program counter, thus breaking the linear path of the execution to another point in the deployed code. The value of the counter in the stack indicates the address from which operations will be continued. The JUMPDEST instruction should be located at this address. enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.