
PUSH1 0xAA
PUSH1 0xBB
PUSH1 0xCC
SWAP1
POP
POPPUSH1 0x02
PUSH1 0x03ADDJUMPDEST opcode. Let's examine a simple conditional: if x ≠ 0, return 1; else return 0.00: PUSH1 0x08
02: PUSH1 0x00
03: CALLDATALOAD
04: SWAP1
05: ISZERO
06: JUMPI
07: STOP
08: JUMPDEST
09: PUSH1 0x01
0B: PUSH1 0x00
0D: MSTORE
0E: PUSH1 0x20
10: PUSH1 0x00
12: RETURN0x2a (decimal 42) into storage slot 0. This demonstrates the basic pattern for persisting data in contract storage.PUSH1 0x00
PUSH1 0x2a
SWAP1
SSTORE
STOPPUSH1 0x00
SLOAD
PUSH1 0x00
MSTORE
PUSH1 0x20
PUSH1 0x00
RETURNPUSH1 0x02 // 3 gas
PUSH1 0x03 // 3 gas
ADD // 3 gas
PUSH1 0x00 // 3 gas
SWAP1 // 3 gas
SSTORE // 22,100 or 2,900 gas
STOP // 0 gas"Understanding the EVM is like understanding assembly language—it gives you the foundation to master any higher-level abstraction built on top of it."