I'm hoping someone here is familiar with Interlogic's Z80ASM assembler (distributed with z88dk).
I need to fill a space from the current instruction count to the next 255-byte block (e.g. $0100, $0200, $0300 etc. etc.) but all my attempts to create expressions and use defs or .fill etc. are resulting in syntax errors.
Any help would be seriously appreciated.
Anyone know how to do this with Z80ASM?
Re: Anyone know how to do this with Z80ASM?
You can put in a filler with size coputed using a label, i.e. for an interrupt handler in ROM you coud do:
(...)
dummy_label:
defs 56-dummy_label
if (ASMPC<>$0038)
defs CODE_ALIGNMENT_ERROR
endif
(...)
dummy_label:
defs 56-dummy_label
if (ASMPC<>$0038)
defs CODE_ALIGNMENT_ERROR
endif
Re: Anyone know how to do this with Z80ASM?
Brilliant! Thank you very much.
It was the use of a dummy label that I didn't think of and it has given me something workable.
It was the use of a dummy label that I didn't think of and it has given me something workable.
Re: Anyone know how to do this with Z80ASM?
Normally this is done with the "align" statement, followed with the desired boundary.
align $100
would fill with the necessary bytes (nop) up to next address divideable by $100 without any rest.
align $100
would fill with the necessary bytes (nop) up to next address divideable by $100 without any rest.
Re: Anyone know how to do this with Z80ASM?
Unfortunately, the assembler doesn't like that one.PokeMon wrote:Normally this is done with the "align" statement, followed with the desired boundary.
Don't ask me.