k1.spdns.de / Develop / Projects / zasm / Distributions /

Welcome to the zasm download page

zasm is a command-line assembler for the Zilog Z80 cpu. it is available as source, which should compile on many unix-style operating systems, and as pre-compiled binary. Choose a version from the list below. Archive names indicate version, date and build host. Select a binary which matches your OS best. If it fails to run then use the source.

Quick links: Documentation, zasm online assembler, Git repository.


zasm is a Z80 assembler.
zasm can assemble code extended for the Hitachi HD64180 or Zilog Z80180.
zasm can assemble code limited to the Intel 8080 e.g. for CP/M.
zasm can also assemble native 8080 assembler source.
zasm can compile and include c source files. (choose the version with sdcc below)
zasm can generate binary files or Intel Hex or Motorola S19 files.
zasm supports generating various special files for Sinclair and Jupiter Ace emulators, e.g. snapshot files and .tap and .tzx tape files.
zasm supports character set conversion, e.g. for the ZX80 and ZX81.
The list file can include the generated opcodes and accumulated cpu cycles and a list of all labels.
zasm supports various historically used syntax variants and the syntax emitted by sdcc.
zasm supports multiple code and data segments, nested conditional assembly and nested local scopes.
zasm supports code and data compression using ZX7, Einar Saukas' 'optimal' LZ77 packer.

Typical invocations

# assemble file into myrom.bin and create plain list file
> zasm myrom.asm
# assemble file into myrom.bin and create list file with opcodes, cpu cycles and labels list
> zasm -uwy myrom.asm
# assemble source for the Intel 8080 cpu using Z80 syntax
> zasm --8080 myrom.asm
# assemble native 8080 assembler source
> zasm --asm8080 myrom.asm
# create Intel hex output
> zasm -x myrom.asm

Notes on sdcc version 3.4.0

The following is for users who want to include c sources and use the current stable version of sdcc, which is version 3.4.0, released 2014-04-11.

It does not apply to OSX users who download the file "sdcc for zasm OSX.zip" from this directory or users who use sdcc 3.4.1 or later, which currently must be a snapshot build, or people who don't want to include c source files in their z80 assembler files.

sdcc folks have renamed some global symbols which are referenced by compiled programs right after they released version 3.4.0. Unluckily the library provided with "sdcc for zasm ….zip" below already expects the new symbols as used in version 3.4.1. Due to this mismatch sdcc 3.4.0 cannot be used, unless you rename the files in sdcc/lib/ from this archive to the old names and rename the defined labels therein to the old names too.

So it's probably easier to download a snapshot from the sdcc website. Unluckily this seems to be not so easy either: At least for my properly updated Linux Mint installation their requirements to the version of the stdclib++ library are still too high… At this point i gave up and leave it as an excercise to the informed Linux user to solve this problem.

What's new

2016-05-01: Version 4.0.16: FreeBSD version
2016-10-01: Version 4.0.18: illegals: allow 'ixh' … 'iyl' as names for index register halfes
2016-10-25: Version 4.0.19: added TextMate bundle, added #cpath to set c-compiler path in source
2017-04-29: Version 4.0.21: new: multiple opcodes in one line after '\'.
2017-06-27: Version 4.0.23: allow ahead-of-definition first operand in pruning operators
2017-07-15: Version 4.1.0: included ZX7 "optimal" LZ77 compression written by Einar Saukas
2017-07-25: Version 4.1.3: new function sin() and cos() to easily build wave tables
2018-05-27: Version 4.2.0: new #target TZX: directly write to .tzx tape files
2020-01-08: Version 4.2.6: Added text replacement in macros for values between '{' and '}'
2020-04-12: Version 4.2.7: #target BIN now stores actual segment addresses in hex files suitable for ram loaders
2020-04-13: Version 4.2.8: new command line option "--date=2020-04-13,12:34:56" to use a reproducible time stamp
2020-05-01: Version 4.2.9: fixed cpu cycle calculation for Z80180
2020-05-04: Version 4.3.0: new option --convert8080 to convert 8080 sources to Z80 syntax
2020-05-15: Version 4.3.1: fixed casefolding issue in macro argument evaluation if --casefold active

Git Repository


The Libraries/ should be placed side-by-side with zasm/ because symlink zasm/Libraries points to ./Libraries.

Online Assembler

A cgi interface for online assembling is at cgi-bin/zasm.cgi. It allows to assemble z80 assembler source files with some include files. It can generate binary, Intel hex or Motorola S19 output and a listing, which can optionally include the generated assembler source, a label listing and accumulated cpu cycles. You can even include c source files here! Don't assemble closed-source sources here. ;-)


Here you find zasm and matched versions of sdcc for OSX/BSD and Linux.
The OSX versions of zasm up version 4.0.22 were compiled on OSX 10.9 but will probably work on other versions as well. Since Version 4.1.0 they are compiled on macos 10.12 "Sierra". Finally i had to upgrade. Sorry.
If you want to include c sources and have sdcc already installed you still need "sdcc for zasm (headers and libs).zip" for the modified libs/ folder.

Name Letzte Änderung Länge 
old versions/ 2020-05-01 14:46 86 
sdcc for zasm (headers and lib).zip 2016-05-09 15:59 868994 
sdcc for zasm Linux.zip 2016-05-09 15:58 2197835 
sdcc for zasm OSX.zip 2016-05-09 15:57 1678403 
zasm-4.0.16-FreeBSD64.zip 2016-05-01 12:01 200493 
zasm-4.0.20-Linux32.zip 2017-03-05 16:31 187229 
zasm-4.2.3-macos10.12.zip 2018-09-14 16:46 231651 
zasm-4.2.4-macos10.12.zip 2019-01-03 15:10 231639 
zasm-4.2.8-Linux64.zip 2020-04-13 16:22 202970 
zasm-4.2.9-Linux64.zip 2020-05-01 14:37 203600 
zasm-4.3.0-Linux64.zip 2020-05-04 20:35 226273 
zasm-4.3.1-Linux64.zip 2020-05-15 15:59 226279 
github:z88dk:math 277 
www.cemetech.net:learn:Z80-Math_Routines 271 
www.z88dk.org:forum 251 
Z80 Heaven - Math 263 
Z80 Number Cruncher 280 
Z80.info 253 
zasm TextMate Bundle 282 
zx7 at WoS forum 312 

powered by vipsi - your friendly VIP Script Interpreter

Valid HTML Valid CSS