Building an EVM from scratch part 1 - the execution context
Building an EVM from scratch part 2 - branching instructions
Building an EVM from scratch part 3 - calldata and the function dispatcher
🟩🟩🟩🟩🟩🟨⬜⬜⬜⬜ 77/142 instructions implemented
Github branch: smol-evm/evm-from-scratch-pt2
In this part, we’re going to expand on our instruction set with a focus on:
DUP
, SWAP
, PUSH
)Let’s go!
These instructions let us manipulate the program counter, i.e. the position in the code buffer of the next instruction to run. The spec is fairly straightforward: