Menu
Coddy logo textTech

Assembly Playground

Write, run, and share code snippets - no setup required.

Coddymain.asm
Output
Click Run to see the output here.

Run Assembly online in your browser

This is a free online Assembly compiler for x86-64 code written in NASM syntax. Type your program, press Run, and Coddy assembles it with nasm -f elf64, links it with ld, and runs the resulting Linux executable server-side - then shows you stdout, stderr, and the exit status. There's nothing to install: no NASM, no linker, no virtual machine, no cross-compiler.

The starter program is a complete _start entry point that reads a line from standard input and writes a greeting back using the raw read, write, and exit syscalls - no libc. That's assembly the way it really works: you move arguments into rax/rdi/rsi/rdx, invoke syscall, and the kernel does the rest. Use the stdin panel below the editor to feed input to your program on each Run, exactly like piping into a real binary.

What makes this Assembly playground useful

  • Real x86-64 NASM toolchain. Your source is assembled with nasm -f elf64 and linked with ld on Linux - the same commands you'd type locally - so what runs here matches what runs on a real machine.
  • Direct Linux syscalls. The starter uses read, write, and exit through the syscall instruction with no libc in the way, so you see exactly how registers carry arguments and return values.
  • Standard input support. Feed bytes to your program through the stdin panel and read them with syscall 0 - useful for the classic 'read a name, print a greeting' exercises and beyond.
  • Zero setup, instant feedback. No NASM install, no linker flags to remember, no permission errors - open the page and the editor is ready. Errors from the assembler and linker come straight back in the output.

What you can try in the Assembly playground

  • Print a fixed string with a single write syscall, then a clean exit(0) - the smallest complete x86-64 program, and the fastest way to see how _start and syscall fit together.
  • Read from stdin into a .bss buffer, trim the trailing newline, and echo it back - the pattern behind almost every input-driven assembly exercise.
  • Add two numbers in registers and convert the result to ASCII digits by hand, so you can write it out. It's how you learn that assembly has no print - only bytes and syscalls.

Assembly online compiler FAQ

Which assembler and syntax does this playground use?
It uses NASM (the Netwide Assembler) with Intel syntax, targeting x86-64 Linux. Your code is assembled with nasm -f elf64 and linked with ld. If you're coming from AT&T/GAS syntax (the %rax, movq style), rewrite in NASM's Intel style - mov rax, 1, section .text, global _start.
Do I need to install NASM or a linker to use this?
No. The full toolchain runs server-side in a sandboxed container. You write NASM in the browser, press Run, and Coddy assembles and links your program for you. There's nothing to install locally - no NASM, no ld, no Linux VM.
How do I read input in assembly here?
Use the read syscall (number 0): put 0 in rax (sys_read), 0 in rdi (stdin), the address of a buffer in rsi, and the max byte count in rdx, then execute syscall. Whatever you type in the stdin panel below the editor is delivered to your program on Run. The starter shows the full pattern, including trimming the trailing newline.
Why does my program need _start instead of main?
Because the starter links with ld and no C runtime. main is a libc convention - the C startup code calls it after setting things up. With a bare ld link there's no libc, so the kernel jumps straight to the _start label, which is why every program here defines global _start. You're responsible for exiting cleanly with the exit syscall (number 60) at the end.
Can I learn assembly with this compiler even as a beginner?
Yes. Start from the greeting program, change the string, and watch the output. Then try reading input, doing arithmetic in registers, and converting numbers to text by hand. Because there's no setup and every Run gives instant feedback, you can iterate quickly - which is the fastest way to build intuition for registers, memory, and syscalls.

Useful tools for Assembly

Free, browser-based tools that pair well with the Assembly Playground - all part of Coddy.