flat assembler
Message board for the users of flat assembler.
![]() |
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. |
|||
![]() |
|
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.
|
|||
![]() |
|
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?
|
|||
![]() |
|
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.
|
|||
![]() |
|
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! |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.