Skip to content
/ jasm Public

A simple Assembler written from scratch, for educational and recreational purposes

License

Notifications You must be signed in to change notification settings

Jotrorox/jasm

Repository files navigation

🚀 JASM Assembler

Version License Platform

A modern, user-friendly x86_64 assembler for Linux.

InstallationQuick StartExamplesDocumentationCLI Reference

✨ Features

  • 🔥 Lightning Fast: Optimized assembler with quick compilation times
  • 💡 Easy to Use: Simple syntax and helpful error messages
  • 🔧 Modern: Support for latest x86_64 instructions
  • 📦 Flexible Output: Generate ELF executables or raw binary files

📋 Installation

# Clone the repository
git clone https://github.com/jotrorox/jasm.git

# Enter the directory
cd jasm

# Build the project
make

🚀 Quick Start

  1. Create a new file named hello.jasm
  2. Write your assembly code following the syntax guide
  3. Compile your code:
    jasm hello.jasm
  4. Run the executable:
    ./a.out

📝 Examples

Hello World

# Example: Print "Hello, world!" to stdout
# Syscall details:
#   sys_write: rax=1, rdi=stdout, rsi=buffer, rdx=length

data msg "Hello, World!\n"

# sys_write(stdout, msg, 14)
mov rax, 1       # sys_write
mov rdi, 1       # stdout
mov rsi, msg     # message
mov rdx, 14      # length
call

# sys_exit(0)
mov rax, 60      # sys_exit
mov rdi, 0       # status
call

💻 Command Line Interface

jasm [options] <input.jasm> [output]

Options:
  -h, --help            Display help message
  -v, --verbose         Enable verbose output
  -V, --version         Display version information
  -f, --format <format> Specify output format (elf, bin)

Example Usage

  • Basic Compilation:

    jasm program.jasm

    Creates an ELF executable named a.out

  • Binary Output:

    jasm -f bin program.jasm prog.bin

    Creates a raw binary file

  • Verbose Mode:

    jasm -v program.jasm prog

    Shows detailed assembly information

📚 Documentation

For complete documentation, visit the JASM Documentation.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

Copyright © 2025 Johannes (Jotrorox) Müller

This project is licensed under the MIT License.

About

A simple Assembler written from scratch, for educational and recreational purposes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published