Assembling Z80 source using TASM or similar

User avatar
Pacman
Posts: 171
Joined: Mon Feb 05, 2018 2:59 pm

Re: Assembling Z80 source using TASM or similar

Post by Pacman »

Personally, I created a bash script for this. So it is possible.
I use geany+z80asm under linux and geny is configured to execute the script and automatically generate a .MZF for me with the correct addresses (start+execution) as well as comments.
hlide
Posts: 670
Joined: Thu Jan 25, 2018 9:31 pm

Re: Assembling Z80 source using TASM or similar

Post by hlide »

I use z80asm from Youkan that I modified so it displays messages in English by default and not all messages had a translation so I added them. The HTML file is still in Japanese but using Google or DeepL translation should help here.

I also use a simple .bat file to build.

To build a .mzt file from <input file> (I used .a80 but it could be .s or .asm or whatever):
z80as.exe -x -m "<file name in tape image>" <input file>

And the usual build:

Code: Select all

cd ..

REM Delete the last binary
del BRICKBUSTER.mzf

REM Assemble the source file into MZT file
exe\z80as.exe -x -m "BRICK BUSTER" BRICKBUSTER.a80

REM Rename the MZT file as a  MZF file
ren BRICKBUSTER.mzt BRICKBUSTER.mzf

REM Turn the MZT file into a self-decompressed MZF file (MZ0)
exe\mz0c.exe -f "BRICKBUSTER.mzf"

REM Delete the uncompressed MZF file
del BRICKBUSTER.mzf

REM Rename the MZ0 file as a  MZF file
ren BRICKBUSTER.mz0 BRICKBUSTER.mzf
z80as_012_hlide_en.zip
(135.95 KiB) Downloaded 26 times
Note that mzc0 is a tool I wrote from ZX0 to generate a self-compressed MZF which allows at least to half the loading time.
Post Reply