x86 Assembly Stack Simulator

Visualize how instructions like push, pop, and call affect the stack.

Assembly Code

1000ms

Legend & Instructions

ESP (Stack Pointer) / EIP (Next Instruction)
Last Executed Instruction
EBP (Base Pointer)
Changed Value (register or stack cell)
Breakpoint (click line number to toggle)

Supported: PUSH, POP, MOV, ADD, SUB, XOR, AND, OR, NOT, INC, DEC, NOP, LEA, CMP, TEST, SHL, SHR, NEG, XCHG, JMP, JZ/JE, JNZ/JNE, CALL, RET, ENTER, LEAVE.
Operands: registers (EAX), decimals (42), hex (0xFF).
Stack memory: [esp+4], [ebp-8], [reg].
Data memory: [x], [y], [z] or [0x400000].
LEA computes address without dereferencing.
CMP sets zero flag; JZ/JNZ branch on it.
Lines with ';' or just labels are skipped.
Shortcuts: Space step, Backspace undo, Escape stop.

CPU Registers

Welcome! Enter some assembly code or use the example. Click 'Execute Next' to begin.

Stack Memory

Data Memory