XCODX |

Assembly x64 Online Compiler & Interpreter

Select Language
Online Code Compiler
Full HTML IDE
Py main.py
Program Output Ready
  Welcome to XCODX Online Compiler

  Quick Start:
  Ctrl+Enter  Run code
  Ctrl+S      Save / Download
  Ctrl+L      Clear output

  Select a language and start coding.
Success
Operation completed

About Assembly x64

x86-64 assembly is what actually runs on virtually every modern laptop and server, and NASM is the assembler most tutorials, university courses, and security training use to write it. In 64-bit Linux you invoke the kernel with the dedicated syscall instruction, pass arguments in rdi, rsi, and rdx per the System V AMD64 ABI, and work with sixteen general-purpose registers instead of eight. Understanding this layer pays off in debugging, performance work, and reverse engineering. This page assembles and links your 64-bit NASM source and runs the binary in a live terminal, so you can iterate on register logic and syscalls in seconds without configuring ld or a Linux VM.

Hello World in Assembly x64

section .data
    banner  db "Hello from 64-bit assembly!", 0xA
    blen    equ $ - banner
    ask     db "Type something and press Enter: ", 0
    asklen  equ $ - ask

section .bss
    buf     resb 64

section .text
    global _start

_start:
    mov rax, 1          ; sys_write
    mov rdi, 1          ; stdout
    mov rsi, banner
    mov rdx, blen
    syscall

    mov rax, 1
    mov rdi, 1
    mov rsi, ask
    mov rdx, asklen
    syscall

    mov rax, 0          ; sys_read
    mov rdi, 0          ; stdin
    mov rsi, buf
    mov rdx, 64
    syscall

    mov rdx, rax        ; bytes read
    mov rax, 1          ; echo it back
    mov rdi, 1
    mov rsi, buf
    syscall

    mov rax, 60         ; sys_exit
    xor rdi, rdi
    syscall

When to use Assembly x64

64-bit NASM is the working dialect for modern systems courses, OS development from tutorials like the osdev wiki, and binary exploitation practice where CTF challenges assume the System V calling convention. Performance engineers read compiler output in this syntax when tuning hot loops, and malware analysts and reverse engineers drill on register usage patterns here before opening a disassembler. It is also the natural next step after the 32-bit page for students comparing int 0x80 against the faster syscall instruction and the changed syscall numbering.

Common questions

How does interactive stdin work in 64-bit assembly?

Call sys_read: rax set to 0, rdi to 0 for stdin, rsi pointing at a .bss buffer, rdx holding the maximum byte count, then syscall. The live terminal keeps the call blocked until you press Enter, and rax returns the number of bytes read, which the example above reuses to echo your input back.

Why are the syscall numbers different from 32-bit x86?

The x86-64 Linux ABI was renumbered from scratch: write is 1, read is 0, and exit is 60, versus 4, 3, and 1 under int 0x80. Arguments also move from ebx/ecx/edx to rdi/rsi/rdx, and you use the syscall instruction rather than a software interrupt. Mixing the two conventions is the most frequent porting bug.

Can I call C library functions like printf from my assembly?

This environment links your object standalone with _start as the entry point, so raw kernel syscalls are the supported I/O path and libc symbols are not linked in. That constraint is actually clarifying for learning: everything your program does is visible in the source, with no runtime initialization happening behind your back.

How Assembly x64 runs on XCODX

Sandbox filename
main.asm
Entry point
single main source file
Editor grammar
gas
Reading stdin
sys_read syscall
Input delivery
live WebSocket stream
Prompt flushing
flush manually before reading input
Compile limit
10 s
Run limit
3 s batch · up to 3 min live
Memory
256 MB per stage
Max source
50,000 characters

Default program on this page

; NASM 64-bit Assembly
section .data
    msg db "Hello from NASM 64-bit!", 0xA
    len equ $ - msg

section .text
    global _start

_start:
    mov rax, 1
    mov rdi, 1
    mov rsi, msg
    mov rdx, len
    syscall

    mov rax, 60
    xor rdi, rdi
    syscall