Page 1 of 1
z80asm equ
Posted: Fri Nov 23, 2018 9:13 pm
by berk
Hello,
z80asm doesnt support following syntax:
label: equ value
I have to remove colon in this case. Would it be possible to enable also this form?
Thank you
--berk
Posted: Sat Nov 24, 2018 8:55 pm
by stefano
you may be interested inthe awk scripts in {z88dk}/support/8080. toz80.awk converts from 8080 to z80 mnemonics but is also able to convert from equ to defc. z80 to z80 should work as well
Posted: Sun Nov 25, 2018 9:04 pm
by berk
Thank you - I will try
Posted: Tue Nov 27, 2018 5:41 am
by alvin
Posted: Thu Nov 29, 2018 10:52 pm
by pscust
Problem fixed. Thanks for reporting.
Posted: Mon Dec 03, 2018 8:59 pm
by berk
Thank you :-)
Re: z80asm equ
Posted: Mon Sep 19, 2022 4:29 pm
by jorgegv
Hi, just found this thread and my question seems related to it.
I have the following PASMO syntax:
That defines the my_label constant to be the current assembling position at the beginning of the line plus 4 bytes.
Does z88dk-z80asm have a similar syntax? How can I acces the current assembly address from inside the asm file with z88dk-z80asm?
Thanks, and sorry if the question is trivial :-)
J.
Re: z80asm equ
Posted: Mon Sep 19, 2022 4:51 pm
by jorgegv
Mmm maybe ASMPC is what I'm looking for...?
Re: z80asm equ
Posted: Mon Sep 19, 2022 5:10 pm
by pjshumphreys
Re: z80asm equ
Posted: Mon Sep 19, 2022 7:13 pm
by jorgegv
Hi pjshumphreys,
yes, that directive is what I used. So finally I replace the following PASMO statement:
with the following Z80ASM one:
Re: z80asm equ
Posted: Mon Sep 19, 2022 8:35 pm
by dom
It looks like Paulo added support for equ and $ a while back:
Code: Select all
cdom@ermintrude z88dk % cat equ.asm
GLOBAL abc
GLOBAL def
org 32000
abc equ $+4
def: equ $+10
dom@ermintrude z88dk % z88dk-z80asm -b -m equ
dom@ermintrude z88dk % cat equ.map
abc = $7D04 ; addr, public, , equ, , equ.asm:8
def = $7D0A ; addr, public, , equ, , equ.asm:9
__head = $7D00 ; const, public, def, , ,
__tail = $7D00 ; const, public, def, , ,
__size = $0000 ; const, public, def, , ,
Re: z80asm equ
Posted: Mon Sep 19, 2022 8:44 pm
by jorgegv
Arrggh!!! So I could just have compiled It!! :-D
Anyway, experience acquired...
Thanks Dom