It seems that only when a calculation is doen, the value is always zero, if I use the calculation directly at the point where it's is used then the correct value pop's up.
In the end I'm trying to define a block of code where I need specific constant that described offsets from the start of the block. Also the total length of this block is needed, so I can transfer it. This works inside an specific z80 assembler but i'm not getting it working inside Z88dk for some reason?
Thanks in advance.
Code: Select all
136 BlockStart:
137 000052 00 Var1: DEFB 0
138 000053 00 Var2: DEFB 0
139 000054 00 Var3: DEFB 0
140 BlockEnd:
141
142 BlockSize EQU (BlockEnd - BlockStart)
143 BlockSize2 = (BlockEnd - BlockStart)
144 DEFC BlockSize3=(BlockEnd - BlockStart)
145 BlockTest EQU 123
146
147 000055 0000 TestVar: DEFW BlockSize
148 000057 0300 TestVar2: DEFW (BlockEnd - BlockStart)
149
150 000059 0600 LD B,BlockSize
151 00005b 0600 LD B,BlockSize2
152 00005d 0600 LD B,BlockSize3
153 00005f 067b LD B,BlockTest
154 000061 010000 LD BC,BlockSize
155 000064 ed4b0300 LD BC,(BlockEnd - BlockStart)