flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > [solved] Flat assember G - Macros and address calculation |
Author |
|
Tomasz Grysztar 10 Aug 2020, 09:58
I see one probable problem here:
Code: macro table_lookup table, offset, dest zmgen offset, l1 local l1 l1: zmgen table, dest end macro You should move "local l1" line to the beginning of the macro in order for it to affect all uses of the "l1" name. |
|||
10 Aug 2020, 09:58 |
|
ctlaltdel 10 Aug 2020, 10:07
Actually, it was originally at the beginning of the macro - I moved it to see what effect it would have (nothing useful), and forgot to move it back.
|
|||
10 Aug 2020, 10:07 |
|
Tomasz Grysztar 10 Aug 2020, 10:10
What value is incorrect then? Can you give a minimal complete source that can be assembled to demonstrate your problem?
|
|||
10 Aug 2020, 10:10 |
|
ctlaltdel 11 Aug 2020, 06:07
I'll do a bit more investigation and see if I can come up with a compact demonstration of the problem.
|
|||
11 Aug 2020, 06:07 |
|
ctlaltdel 11 Aug 2020, 08:26
Ok, found (and fixed) the problem. It was of course, my fault, not the assembler's. I overlooked the fact that the 'zmgen' macro invokes the 'pbrk' macro on a byte boundary, so an earlier instruction that is supposed to overwrite part of the source address of the 'zmgen' instruction actually overwrites part of the 'pbrk' code instead, causing the wheels to fly off. Oops. Added conditional assembly of an offset and all is good.
Anyway, thanks for a great assembler, Tomasz! |
|||
11 Aug 2020, 08:26 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.