Tap Run to execute
main.s · output appears here
Press Run to execute
Output streams here as your program runs.
RISC-V is the open instruction set that computer-architecture courses at Berkeley, MIT and Cornell now teach and that new chips from microcontrollers to servers implement. Its base integer set is small and regular: 32 registers with ABI names (a0-a7 arguments, t0-t6 temporaries, s0-s11 saved, sp, ra), loads and stores as the only memory instructions, and pseudo-instructions such as li, la, mv and j that the assembler expands for you. CompileBytes assembles your code with GNU as 2.44 for RV64GC, links it with GNU ld and runs the result under the QEMU 10.0 user-mode emulator, so a real Linux binary executes with real syscalls and the output appears in the console.
Programs start at the _start label and talk to the kernel with ecall: put the syscall number in a7 (64 write, 63 read, 93 exit) and the arguments in a0-a2. There is no C library, so the examples print by writing bytes to file descriptor 1. Keep main.s as the entry file and add more .s files from the explorer; every file is assembled into one object, so labels defined in one are visible from the others. Assembler errors name the line, a crash is reported with its signal, and the run ends when exit is called or the time limit is hit. Nothing to install: no cross toolchain, no emulator, no board.
main.s is the entry point. Add helper files from the explorer and import them into your project.
Use the Input panel to pipe standard input to your program when it needs data.
Run sends your code to a fresh hosted runtime and streams the result into the output panel.
Your draft stays in this browser, and Share creates a separate snapshot link.
The editor uses Monaco, the engine behind VS Code, with language-aware editing tools and familiar keyboard controls.
Type or paste your code into the editor, then click Run (or press Ctrl/Cmd + Enter) to execute it.
Output streams into the console panel, including runtime errors, exit status, and execution time.
Nothing to install and no account to create — code runs in an isolated hosted runtime.
Language-aware autocomplete and IntelliSense suggestions where the editor has a matching language service
Syntax highlighting, with native compiler and runtime errors shown in the console
Bracket matching, auto-indentation, code folding, and a minimap
Multi-cursor editing plus find & replace (Ctrl/Cmd + F)
Full undo/redo history and copy to clipboard
Built on Monaco — the same editor that powers VS Code
Run on demand with Run or Ctrl/Cmd + Enter, or turn on Auto-run in the editor settings to execute after each typing pause
Stop long-running or infinite programs at any time
A real console shows standard output, errors, exit status, and execution time
Pass standard input (stdin) to your program from the Input panel — one value per line
Switch between light and dark themes
Adjust font size and other editor settings
Toggle side-by-side or top/bottom layouts
Enter distraction-free fullscreen mode
Generate a shareable link to your exact code in one click — no login needed
Your work autosaves to your browser, so you can pick up where you left off
Copy the active file to your clipboard
Run code: Ctrl/Cmd + Enter
Find & replace: Ctrl/Cmd + F
Open the full shortcut list from the keyboard icon in the toolbar
RISC-V Assembly is one of 28 linked-project compilers. Run always starts main.s; selecting a helper tab changes what you edit, not the entry file.
main.s prints the message that helper.s defines; both files are assembled as one unit.
Linked-project languages (28): Node.js, TypeScript, Deno, Python, C, Go, Dart, Swift, Rust, Ruby, PHP, Java, Luau, Kotlin, C++, C#, Nim, Crystal, Haxe, Zig, Scala, D, Verilog, GDScript, RISC-V Assembly, ARM64 Assembly, Bun, Objective-C.
Single-file scratchpads (47): Matplotlib, NumPy, pandas, Haskell, Clojure, Perl, Lua, Tcl, jq, Raku, Elixir, Bash, Zsh, Nushell, R, Assembly (NASM), Julia, Octave, Groovy, PowerShell, Visual Basic .NET, Odin, Pascal, Lisp, Erlang, CoffeeScript, COBOL, BASIC, V, Racket, OCaml, Prolog, AWK, Emacs Lisp, Emojicode, Forth, F#, Fortran, Assembly (NASM64), MIPS Assembly, Solidity, Mojo, Ada, WASM (WAT), Gleam, Shell Script (sh), Scheme. Their extra project files are not submitted to the runtime.
Download project exports every RISC-V Assembly tab and a README in one ZIP archive.