This guide will help you install and set up the ARM2 Emulator on your system.
- Go 1.21 or later (only required if building from source)
- Git (optional) - For cloning the repository
The ARM2 Emulator is cross-platform and supports:
- macOS (Intel and Apple Silicon)
- Windows (10/11)
- Linux (Ubuntu, Fedora, Arch, and other distributions)
Pre-built binaries are available for download from the Releases page.
Available platforms:
- Linux (64-bit):
arm-emulator-linux-amd64 - macOS (Apple Silicon):
arm-emulator-macos-arm64 - Windows:
arm-emulator-win-amd64.exe(AMD64/x64) andarm-emulator-win-arm64.exe(ARM64)
To install:
- Visit the Releases page
- Download the binary for your platform
- On Linux/macOS, make it executable:
chmod +x arm-emulator-* - Optionally verify the download using the provided SHA256 checksums
git clone https://github.com/yourusername/arm_emulator.git
cd arm_emulatorOr download and extract the source code archive.
go build -o arm-emulatorThis will create an executable named arm-emulator (or arm-emulator.exe on Windows) in the current directory.
./arm-emulator --versionYou should see the version information displayed.
On macOS/Linux:
sudo mv arm-emulator /usr/local/bin/On Windows:
Add the directory containing arm-emulator.exe to your PATH environment variable.
Create a file called test.s:
.org 0x8000
_start:
LDR R0, =msg
SWI #0x02 ; WRITE_STRING
SWI #0x07 ; WRITE_NEWLINE
MOV R0, #0
SWI #0x00 ; EXIT
msg:
.asciz "ARM2 Emulator is working!"./arm-emulator test.sYou should see:
ARM2 Emulator is working!
The emulator can be configured using a configuration file:
macOS/Linux: ~/.config/arm-emu/config.toml
Windows: %APPDATA%\arm-emu\config.toml
Example configuration:
[emulator]
default_origin = 0x8000
stack_size = 1048576 # 1 MB
[debugger]
enable_tui = true
history_size = 1000
[output]
show_cycle_count = false
show_register_changes = falseProblem: The system can't find the arm-emulator command.
Solution:
- Make sure the emulator is in your PATH, or
- Run it with the full path:
/path/to/arm-emulator program.s, or - Use
./arm-emulatorif you're in the same directory
Problem: permission denied when trying to run the emulator.
Solution: Make the file executable:
chmod +x arm-emulatorProblem: Error about Go version being too old.
Solution: Install Go 1.21 or later:
- macOS:
brew install go - Linux: Follow instructions at https://go.dev/doc/install
- Windows: Download installer from https://go.dev/dl/
Problem: Errors when running go build.
Solution:
- Make sure you're in the correct directory (should contain
go.mod) - Run
go mod tidyto update dependencies - Check that you have Go 1.21 or later:
go version
Problem: TUI mode doesn't display correctly.
Solution:
- Make sure your terminal supports ANSI colors and cursor control
- On Windows, use Windows Terminal or PowerShell (not cmd.exe)
- Try running in non-TUI mode first
To update to the latest version:
# If installed from source
cd arm_emulator
git pull
go build -o arm-emulator
# If using pre-built binary
# Download the latest release and replace your existing binarymacOS/Linux:
sudo rm /usr/local/bin/arm-emulator
rm -rf ~/.config/arm-emuWindows:
- Remove
arm-emulator.exefrom your installation directory - Delete
%APPDATA%\arm-emufolder
Simply delete the emulator executable and source directory.
- Read the Tutorial to learn ARM2 assembly from scratch
- Browse the Example Programs - 49 programs with descriptions
- Study the Instruction Set Reference - ARM2 CPU instructions and syscalls
- Learn Assembler Directives - .text, .data, .word, .ltorg, etc.
- Check the Programming Reference - Condition codes, addressing modes, shifts
- Read the Assembly Reference for comprehensive syntax guide
- Learn about the Debugger and try the Debugging Tutorial
- Documentation: See
docs/directory - Examples: See
examples/directory - Issues: Report bugs at https://github.com/yourusername/arm_emulator/issues
- FAQ: Check FAQ.md for common questions
- RAM: 100MB minimum (more for large programs)
- Disk Space: 20MB for emulator binary
- Terminal: ANSI-capable terminal (for TUI mode)
- OS: Any system supported by Go 1.21+