flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > fasm macro bug? |
Author |
|
lazer1 26 Jan 2006, 16:52
Hi,
after many hours trying to locate a bug, I think the bug is in fasm's macros, if you compile bug1.asm and run it, it wrongly echoes 'b' but if you change rx__ equ ax to rx__ equ bx it now correctly echoes 'a' I think this is a bug because if you study the code you will see the read__ macro ignores rx__ as rx__ is only used if an argument is non register, so changing rx__ shouldnt change anything in this example, or have I misunderstood something?
|
|||||||||||
26 Jan 2006, 16:52 |
|
lazer1 26 Jan 2006, 17:41
ok,
I tried that and it functioned, I have to look at the other macros I'm using. can you make fasm give an error message for the wrong usage I tried? (the example I uploaded shouldnt have had the "include fasm.i", so delete that ) |
|||
26 Jan 2006, 17:41 |
|
Tomasz Grysztar 26 Jan 2006, 17:53
It's not really the wrong usage, you can have both the "registers__" macro and "registers__" symbolic constant at the same time, so assembler is not able to tell whether it was what you intended or not.
|
|||
26 Jan 2006, 17:53 |
|
Borsuc 26 Jan 2006, 19:26
yeah, but defining "registers__" after a macro via equ is not possible because macroinstruction is processed before equ.. you have to use define:
Code: define registers__ ax,bx,cx,dx,cs,ds,es,fs,gs,ss,si,di and when you use restore it goes back to macroinstruction. |
|||
26 Jan 2006, 19:26 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.