flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Tomasz Grysztar 28 Apr 2016, 16:37
zhak wrote: I'm trying to understand fasmg functionality and capabilities following examples. The other, more rigorous way to check for such condition is "if ns.imm scale 0 = 0 & ns.imm scale 1 = 1 & ns.imm scale 2 = 0". This would also be true for expressions like "ebx", but not for "ebx*2" (because then "scale 1" would be 2) nor "ebx+eax" (because then "scale 2" would be 1). Note that this variant does not pass the "0" value like the "if ns.imm eq ns.imm element 1" does, because for the zero value the "scale 1" is also zero. But in "8086.inc" this difference does not matter, because there are further restrictions on the "metadata 1" value. zhak wrote: BTW, as I understood, element 1 is always a variable to get, element 0 is constant, which equals to 0 by default. But can there be element 2 or more? If yes, when can this happen? Code: value scale 0 element 1 scale 1 element 2 scale 2 element 3 scale 3 ebx 0 ebx 1 0 0 0 0 ebx*2 0 ebx 2 0 0 0 0 ebx+2 2 ebx 1 0 0 0 0 ebx+eax 0 ebx 1 eax 1 0 0 eax+ebx*2+1 1 eax 1 ebx 2 0 0 eax+ebx+ecx 0 eax 1 ebx 1 ecx 1 |
|||
![]() |
|
zhak 28 Apr 2016, 22:42
Tomasz, thank you for such a detailed explanation! Now everything looks clear and... simple
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.