⬡ ZEWP VM
▶ RUN
⏭ STEP
⏹ RESET
SPEED: FAST
Fibonacci
Factorial
Fizzbuzz
GCD
Program (one instruction per line)
; Fibonacci sequence — first 10 numbers PUSH 0 ; a = 0 PUSH 1 ; b = 1 STORE 0 ; mem[0] = counter (10) PUSH 10 STORE 0 ; Loop LOAD 0 ; load counter PUSH 0 EQ JNZ 24 ; if counter == 0, jump to HALT ; Print current fib number DUP ; duplicate top (b) PRINT ; Calculate next: a, b -> b, a+b SWAP OVER ADD ; Decrement counter LOAD 0 PUSH 1 SUB STORE 0 JMP 6 ; loop back HALT
Stack
Instructions
PC:
0
SP:
0
Step:
0
Memory (32 cells)
Output
Instructions:
0
|
Status:
IDLE
ZEWP.COM