Code: Select all
z88dk/bin/z80asm -b test1.bin test1.asm
The -b does not take a parameter; it only means "make a binary" as opposed to an object file. So I think what is happening is z80asm is assembling "test1.asm" and is generating "test1.bin" then it is putting together test1.bin with the result of assembling test1.asm, which is also test1.bin, and you get two copies of test1.bin.
It might be a bit strange but z80asm will accept a list of asm files and object files when generating a binary so I guess raw binaries are acceptable too. Since there's nothing to do with a raw binary it just gets tacked onto the result.
The correct assemble line should be:
z80asm -b -o=test1.bin test1.asm
I have always found z80asm's command line parsing a bit finicky (Paulo is working on z80asm now and will correct this eventually). I always put the options before the source files list and usually there isn't a space between an option and its argument.