RISC-V Assembly · From beginner to advanced

Learn assembly
by running it.

Write assembly, step through execution, inspect registers and memory, and see exactly how each instruction changes the machine.

Browser-native · no install Find your level →
factorial.s — StudyRISC-V
STEP
PC 0x0000001c Cycle 4 Mode STEP
ASSEMBLY
1 0x10 addi x1, x0, 5
2 0x14 addi x2, x0, 1
loop:
4 0x1c mul x2, x2, x1
5 0x20 addi x1, x1, -1
6 0x24 bne x1, x0, loop
done:
// effect x2 = x2 × x1
REGISTERS
x00x00000000
x10x00000005
x20x00000001
x30x00000000
x40x00000000
ra0x00000000
sp0x7FFFFFF8
MEMORY
0x7FFFFFF80x00000005
0x7FFFFFFC0x00000001
0x800000000x00000000
STACK
saved ra
loop var x1
← sp
Architecture

See the architecture,
not just the code.

Follow each instruction through the parts of the machine it touches.

Pipeline

Watch execution move
from fetch to writeback.

Every instruction flows through five stages. See exactly where in the machine your code is at each cycle.

Registers

See exactly which register
changed and why.

The full 32-register file lights up on every writeback. Nothing is hidden or abstracted.

Memory

Make stack frames and
memory writes visible.

Frame boundaries, saved registers, and the stack pointer are labeled and updated in real time.

Practice

Run practice problems without
installing a toolchain.

Structured problems with automated test cases run entirely in your browser via WebAssembly.

REGISTER FILE RV32IM
x00x00000000
x10x00000005
x20x00000001← changed
x30x00000000
x40x00000000
ra0x00000000
sp0x7FFFFFF8
a00x00000000
INSTRUCTION PC 0x001c
mul x2, x2, x1
x2 = x2 * x1
Multiply two registers, write back to x2
opcodeMUL
rdx2
rs1x2
rs2x1
CALL STACK sp = 0x7FFFFFF0
loop() · frame
saved ra = 0x148
saved s0 = 0x0
← sp = 0x7FFFFFF0
01

Registers update as you step.

Every instruction writes a result. The register file shows you exactly which register changed, what it changed to, and how many cycles the operation took. Nothing is hidden behind an abstraction layer.

02

Every instruction has a visible effect.

Below every instruction, a pseudo-C translation describes the exact computation — register operands, memory addressing, and control flow included. The machine state is never hidden.

03

The stack becomes visible.

Frame boundaries, saved registers, and the stack pointer are labeled and updated in real time. Every push, pop, call, and return is explicit and traceable.

Curriculum

Structured from zero
to systems-level.

20 lessons across four phases, each building on the last.

01
Foundation Lessons 1–5
Registers & immediates
Load & store
Branches & loops
Function calls & stack
Sorting algorithms
02
Core Concepts Lessons 6–10
Bitwise operations
Shifts & multiply
Comparisons & set
Stack frames deep dive
M-extension: mul/div/rem
03
Intermediate Lessons 11–15
Strings & ASCII
Recursion
Pointers & arrays
System calls (ecall)
Capstone: linked list
04
Advanced Lessons 16–20
Pipeline hazards
Cache & memory hierarchy
Interrupts & exceptions
Virtual memory
Mini-kernel capstone
ISA

Explore the RV32IM instruction set.

Hover any opcode to see its encoding, effect, and a concrete example.

ADDI
Add an immediate constant to a register.
addi x5, x0, 10
Immediate setup for constants and loop counters
Use addi for quick register updates without touching memory. It shows up everywhere: loop indexes, stack pointer movement, and small constant setup.
x5 ← x0 + 10
RV32IM
CS 61C Berkeley ECE 3058 Georgia Tech CS 3410 Cornell ECE 2035 Georgia Tech CS 61 Harvard ECE 4100 Georgia Tech CS 152 Berkeley ECE 2500 Purdue ECE 3150 Cornell EECS 151 Berkeley CS 2200 Georgia Tech

From assembly to execution state,
one step at a time.

No install. No account required. Start stepping through instructions in your browser.