A powerful, cross-platform assembly language build and run tool that simplifies the process of compiling and executing assembly programs. Supports multiple architectures, syntaxes, and provides advanced features like auto-dependency installation, watch mode, benchmarking, and more.
- 🚀 Easy Assembly Building: Compile and run assembly programs with a single command
- 🔧 Multi-Platform Support: Works on Linux, macOS, and Windows (via WSL/Cygwin)
- 🏗️ Multiple Architectures: Support for 32-bit, 64-bit, and ARM64 architectures
- 📝 Syntax Flexibility: Intel and AT&T assembly syntax support
- ⚡ Optimization Levels: Configurable optimization levels (O0-O3)
- 🔄 Watch Mode: Automatically rebuild when source files change
- 📊 Benchmarking: Measure execution performance of compiled programs
- 🐛 Debug Support: Built-in debugging with GDB-compatible output
- 📦 Auto-Dependency Installation: Automatically install required tools (NASM, GCC, LD, etc.)
- 🔄 Self-Updating: Check for and install updates automatically
- 🛠️ Self-Repairing: Repair installation and reinstall dependencies
- 🗑️ Easy Uninstallation: Remove ASM Builder and all associated files
- 🧹 Clean Builds: Remove build artifacts with ease
- 📋 Comprehensive Logging: Detailed logs for troubleshooting
- 🎨 Colorful Output: Enhanced terminal output with colors and progress indicators
- 🔍 Automatic Linker Detection: Automatically detects GCC-compatible or LD-compatible assembly files
- 💾 Smart Backup: Automatic backup creation during updates and repairs
# Download and run the installer
curl -sL https://raw.githubusercontent.com/uzairdeveloper223/ASM-Builder/main/installer.sh -o installer.sh && chmod +x installer.sh && ./installer.sh- Download the
asmbuilderscript:
wget https://raw.githubusercontent.com/uzairdeveloper223/ASM-Builder/main/asmbuilder- Make it executable:
chmod +x asmbuilder- Move to a directory in your PATH:
sudo mv asmbuilder /usr/local/bin/The installer will automatically install required dependencies. Manual installation requires:
- NASM: Netwide Assembler
- GCC: GNU Compiler Collection
- LD: GNU Linker
- make: Build automation tool
- curl: For updates and downloads
ASM Builder automatically detects the type of assembly file and chooses the appropriate linker:
-
GCC-compatible files: Files containing
global main(uses GCC linker)- Supports C library functions and external linking
- Automatically adds
.note.GNU-stacksection to prevent linker warnings - Example: Files that use
printf,scanf, etc.
-
LD-compatible files: Files containing
global _start(uses LD linker)- Direct system calls without C library dependencies
- Smaller binaries, faster execution
- Example: Files that use
syscallinstructions
The tool automatically analyzes your assembly file and selects the optimal linker for your code structure, ensuring clean builds without warnings.
ASM Builder provides multiple ways to uninstall:
# From anywhere (downloads and runs uninstaller automatically)
asmbuilder --uninstall
# Or run the uninstaller directly
./uninstaller.sh- Remove the main script:
sudo rm /usr/local/bin/asmbuilder- Remove configuration files:
rm -rf ~/.config/asmbuilder/- Remove cache files:
rm -rf ~/.cache/asmbuilder/- Clean PATH (if modified):
# Edit ~/.bashrc or ~/.zshrc and remove the ASM Builder PATH lineThe uninstaller automatically removes:
- ✅ Main ASM Builder script from
/usr/local/bin/ - ✅ Man page from system man directories
- ✅ Configuration directory (
~/.config/asmbuilder/) - ✅ Cache directory (
~/.cache/asmbuilder/) - ✅ Desktop entry (Linux only)
- ✅ PATH modifications
- ✅ Temporary files
- ✅ Backup creation for safety
Note: The uninstaller creates backups of important files in ~/.asmbuilder-backups/ before removal, so you can restore if needed.
ASM Builder includes built-in update and repair functionality:
# Check for available updates
asmbuilder --update# Repair installation and reinstall dependencies
asmbuilder --repairUpdate Process:
- ✅ Checks for newer versions on GitHub
- ✅ Downloads latest version automatically
- ✅ Creates backup of current installation
- ✅ Replaces installed script with new version
- ✅ Handles permission requirements automatically
- ✅ Provides restart instructions
Repair Process:
- ✅ Backs up current configuration
- ✅ Clears cache directory
- ✅ Re-checks all dependencies
- ✅ Auto-installs missing dependencies
- ✅ Downloads fresh copy of ASM Builder
- ✅ Replaces installed version
- ✅ Restores configuration if needed
Smart Features:
- 🔍 Automatic Detection: Finds installed script location automatically
- 💾 Backup Creation: Always creates backups before making changes
- 🔐 Permission Handling: Automatically requests sudo when needed
- 🌐 Online Updates: Downloads latest version directly from GitHub
- 🔄 Fallback Support: Works even when script isn't in PATH
# Build and run an assembly program
asmbuilder hello.asm
# Specify output filename
asmbuilder -o myprogram hello.asm
# Build with optimization
asmbuilder -O2 -o optimized hello.asm| Option | Description |
|---|---|
-h, --help |
Show help message |
-v, --version |
Show version information |
-u, --update |
Check for updates |
-r, --repair |
Repair installation |
--uninstall |
Uninstall ASM Builder |
-c, --clean |
Clean build artifacts |
-d, --debug |
Enable debug mode |
-o, --output <name> |
Specify output filename |
-O, --optimize <level> |
Set optimization level (0-3) |
-A, --arch <arch> |
Target architecture (32/64/arm64) |
-S, --syntax <syntax> |
Assembly syntax (intel/att) |
-l, --link <libs> |
Link with libraries |
-w, --watch |
Watch file for changes |
-b, --benchmark |
Benchmark the program |
-p, --profile |
Generate profiling data |
--install-deps |
Auto-install dependencies |
--show-log |
Display log file |
--clear-cache |
Clear cache directory |
--config |
Open configuration file |
--static |
Build static binary |
--strip |
Strip symbols |
--pie |
Build position-independent executable |
Create a file hello.asm:
section .data
hello db 'Hello, World!', 0xA
hello_len equ $ - hello
section .text
global _start
_start:
; Write hello to stdout
mov rax, 1 ; syscall: write
mov rdi, 1 ; file descriptor: stdout
mov rsi, hello ; message
mov rdx, hello_len ; length
syscall
; Exit
mov rax, 60 ; syscall: exit
mov rdi, 0 ; exit code
syscallBuild and run:
asmbuilder hello.asm# Build with math library
asmbuilder -l m -o calculator calc.asm
# Build static binary
asmbuilder --static -o static_calc calc.asm# Automatically rebuild when file changes
asmbuilder -w program.asm# Benchmark your program
asmbuilder -b program.asm# Build for 32-bit
asmbuilder -A 32 -o program32 program.asm
# Build for ARM64 (if supported)
asmbuilder -A arm64 -o program_arm program.asmConfiguration files are stored in ~/.config/asmbuilder/:
config.conf: Main configurationasmbuilder.log: Operation logs
-
Permission Denied: Make sure the script is executable
chmod +x asmbuilder
-
Dependencies Missing: Run auto-install
asmbuilder --install-deps
-
PATH Issues: Ensure installation directory is in PATH
export PATH="$PATH:/usr/local/bin"
-
Architecture Mismatch: Specify correct architecture
asmbuilder -A 64 program.asm
asmbuilder --help
asmbuilder --version
asmbuilder --show-logContributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the GNU GENERAL PUBLIC LICENSE - see the LICENSE file for details.
UzairDeveloper223
- Email: contact@uzair.is-a.dev
- Website: https://uzair.is-a.dev
- GitHub: @uzairdeveloper223
Current Version: 1.0.0
Happy Assembling! 🏗️