Assembly Development Setup
Get your development environment ready for authentic retro assembly programming. Choose your system and follow the step-by-step setup guide.
Choose Your System
Select a system above to see setup instructions
Commodore 64 Development Setup
The C64 uses the 6502 processor. We'll use ACME as our primary assembler - it's free, cross-platform, and produces authentic C64 programs.
đ Quick Start (Recommended)
# Windows (using Chocolatey)
choco install acme-crossassembler vice
# macOS (using Homebrew)
brew install acme vice
# Linux (Ubuntu/Debian)
sudo apt install acme vice
This installs ACME assembler and VICE emulator for testing your programs.
âī¸ Your First C64 Program
Create a file called hello.asm
:
; hello.asm - Your first C64 assembly program
* = $0801
; BASIC stub to make program runnable
!byte $0c, $08, $0a, $00, $9e, $20, $32, $30, $36, $34, $00, $00, $00
; Main program starts here
start:
lda #$93 ; Clear screen character
jsr $ffd2 ; Call KERNAL print routine
ldx #0 ; Initialize index
print_loop:
lda message,x ; Load character from message
beq done ; If zero, we're done
jsr $ffd2 ; Print character
inx ; Next character
jmp print_loop ; Continue loop
done:
rts ; Return to BASIC
message:
!text "HELLO FROM ASSEMBLY!"
!byte 0 ; String terminator
Success! You should see "HELLO FROM ASSEMBLY!" printed on the C64 screen. This program demonstrates loading values, calling KERNAL routines, and creating loops.
ZX Spectrum Development Setup
The ZX Spectrum uses the Z80 processor. We'll use z88dk as our primary toolchain - it includes assembler, C compiler, and extensive Spectrum libraries.
đ Quick Start (Recommended)
# Windows: Download installer from z88dk.org
# Extract and run setup.exe
# macOS (using Homebrew)
brew install z88dk
# Linux (Ubuntu/Debian)
sudo apt install z88dk
Also install Fuse emulator for testing: brew install fuse-emulator
âī¸ Your First Spectrum Program
Create a file called hello.asm
:
; hello.asm - Your first ZX Spectrum assembly program
org 32768 ; Start address ($8000)
start:
; Clear screen with black paper, white ink
ld a, %00000111 ; White ink, black paper
ld (23693), a ; Store in ATTR_P (permanent attributes)
call 3503 ; Call ROM routine CLS (clear screen)
; Print message
ld hl, message ; Point to message string
ld bc, msg_end - message ; Length of message
call print_string
; Wait for keypress then return to BASIC
call wait_key
ret
print_string:
ld a, (hl) ; Get character
rst 16 ; Print it (ROM routine)
inc hl ; Next character
dec bc ; Decrement counter
ld a, b ; Check if BC = 0
or c
jr nz, print_string
ret
wait_key:
call 949 ; ROM routine WAIT_KEY
ret
message:
defb "Hello from Z80 Assembly!"
msg_end:
Success! You should see "Hello from Z80 Assembly!" on the Spectrum screen. This program demonstrates memory addressing, ROM calls, and string handling.
Commodore Amiga Development Setup
The Amiga uses the Motorola 68000 processor. We'll use VASM as our assembler - it's actively maintained and produces authentic Amiga executables.
đ Quick Start (Recommended)
# Download VASM from official site
# http://sun.hasenbraten.de/vasm/
# macOS/Linux: Compile from source
make CPU=m68k SYNTAX=mot
sudo make install
# Windows: Download pre-compiled binaries
Also install FS-UAE emulator for testing your programs.
âī¸ Your First Amiga Program
Create a file called hello.s
:
; hello.s - Your first Amiga 68000 assembly program
section text,code
start:
; Open DOS library
move.l 4.w,a6 ; Get ExecBase
lea dosname(pc),a1 ; DOS library name
moveq #0,d0 ; Any version
jsr -552(a6) ; OpenLibrary
move.l d0,dosbase ; Store DOS base
; Print message
move.l dosbase(pc),a6 ; Get DOS base
move.l #message,d1 ; Message pointer
jsr -948(a6) ; PutStr
; Exit cleanly
moveq #0,d0 ; Return code
rts
; Data section
section data,data
dosname:
dc.b 'dos.library',0
message:
dc.b 'Hello from 68000 Assembly!',10,0
; BSS section for uninitialized data
section bss,bss
dosbase:
ds.l 1
Success! You should see "Hello from 68000 Assembly!" in the Amiga CLI. This program demonstrates library calls, memory addressing, and AmigaOS integration.
Nintendo Entertainment System Development Setup
The NES uses the 6502 processor. We'll use cc65 as our primary toolchain - it includes an assembler, C compiler, and linker specifically designed for 6502 systems.
đ Quick Start (Recommended)
# macOS (using Homebrew)
brew install cc65
# Windows: Download installer from cc65.github.io
# Extract and add to PATH
# Linux (Ubuntu/Debian)
sudo apt install cc65
Also install FCEUX emulator for testing: brew install fceux
âī¸ Your First NES Program
Create a file called hello.s
:
; hello.s - Your first NES 6502 assembly program
.segment "HEADER"
.byte $4E, $45, $53, $1A ; "NES" signature
.byte $01 ; PRG ROM chunks
.byte $01 ; CHR ROM chunks
.byte $00 ; Control byte 1
.byte $00 ; Control byte 2
.segment "STARTUP"
Reset:
; Initialize the NES
SEI ; Disable interrupts
CLD ; Clear decimal mode
LDX #$FF
TXS ; Reset stack pointer
; Wait for PPU warmup
LDX #$02
WarmupLoop:
BIT $2002 ; Read PPU status
BPL WarmupLoop ; Wait for VBlank
DEX
BNE WarmupLoop
; Clear PPU memory
LDA $2002 ; Reset PPU address latch
LDA #$20 ; Name table high byte
STA $2006
LDA #$00 ; Name table low byte
STA $2006
LDX #$04 ; Clear 4 screens
ClearLoop:
STA $2007 ; Write to PPU
INY
BNE ClearLoop
DEX
BNE ClearLoop
; Enable PPU
LDA #%10000000 ; Enable NMI
STA $2000
LDA #%00011110 ; Enable sprites and background
STA $2001
MainLoop:
JMP MainLoop ; Infinite loop
; Interrupt vectors
.segment "VECTORS"
.word 0 ; NMI
.word Reset ; Reset
.word 0 ; IRQ
Success! This creates a minimal NES ROM that initializes the system properly. This program demonstrates NES startup sequence, PPU initialization, and memory clearing.
Common Development Tools
These tools are useful across all vintage computing systems for development, debugging, and project management.
Code Editors
- VS Code: Excellent assembly syntax highlighting and debugging
- Vim/Neovim: Lightweight with powerful assembly plugins
- Sublime Text: Fast editing with assembly syntax packages
- Atom: Community packages for retro development
Version Control
- Git: Essential for tracking code changes
- GitHub/GitLab: Share and collaborate on projects
Hex Editors
- HxD (Windows): Free, powerful hex editor
- Hex Fiend (macOS): Fast, native hex editor
- xxd (Linux/macOS): Command-line hex dumping
- ImHex: Cross-platform modern hex editor