Skip to content
A simple Z80 assembler, written for the Soviet-era microcomputer I built. See https://github.com/thatoddmailbox/computer
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
assembler.go
config.go
gbz80.sublime-syntax
main.go
opcodes.go
opcodes_test.go
parser.go
rom.go
utils.go

README.md

z80asm

A simple Z80 assembler, based heavily on gbasm. Many things, such as the special instructions (asciz, db, .incasm, etc.) are shared between the two, and you should look at gbasm's documentation for more, specifically the known issues and assembler-specific instructions. This assembler was written for use with the Soviet-era microcomputer I built, and is probably missing a few features or instructions. Notable omissions include the ability to create local labels and the relative jump instruction.

If you use Sublime Text, you can use the gbz80.sublime-syntax file in the repository for syntax highlighting, but as it was originally intended for use with the Gameboy's LR35902 (a Z80 derivative), it's missing a few instructions.

Usage

You will need Go installed and set up properly to build the assembler.

go get https://github.com/thatoddmailbox/z80asm
cd ~/go/src/github.com/thatoddmailbox/z80asm # you might need to change this depending on the location of your GOPATH
go install
# the next command should be run from the directory that contains your source code
~/go/bin/z80asm --weird-mapping

The --weird-mapping flag enables the modified address decoding, which was necessary to adapt modern-day ROM and RAM chips to the computer when the Soviet parts didn't work.

You can’t perform that action at this time.