ORG redefined problem

ZX80, ZX 81, ZX Spectrum, TS2068 and other clones
Post Reply
maeloterkim
New member
Posts: 1
Joined: Tue Aug 17, 2021 9:37 am

ORG redefined problem

Post by maeloterkim »

Hi
I'm doing a little game ONLY in assembler for the zx spectrum

i'm doing it with linux and only the command z88dk.z88dk-z80asm

The files contains only assembler NOT c inside

The command i use is:

z88dk.z88dk-z80asm -mz80 -m -b +zx
lots of include directory here pojnting to every file
filesToLInkConcatenatedWithSpace $mainFile.tap


if i put org directive in the mainFile.asm says error ORG redefined

but if i delete the org directive in the mainFile.asm creates the tap and runs ok

any hint?

Thanks
User avatar
jorgegv
Well known member
Posts: 287
Joined: Wed Nov 18, 2020 5:08 pm

Re: ORG redefined problem

Post by jorgegv »

I guess the ORG comes from the +zx option you have selected. From the man page:

Code: Select all

  -rADDR                 Relocate binary file to given address (decimal or hex)
(...)
  +zx                    Generate ZX Spectrum .tap file, origin defaults to
                         23760 (in a REM), but can be set with -rORG >= 24000
                         for above RAMTOP
Wouldn't it be easier to use ZCC for compiling? It can handle ASM files and it takes care of everything for you, like this:

Code: Select all

zcc +zx --no-crt -o mainFile -create-app mainFile.asm file1.asm file2.asm 
Post Reply