flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2 |
Author |
|
revolution
Yay, I think I understand.
|
|||
![]() |
|
Tomasz Grysztar
I'm testing a modification to make this even more compatible with fasm 1. The fasmg engine allows the "last label" to be from a different namespace than the current one, so I could probably force this to use any label that was not started with a dot, regardless of the namespace where its final symbol resides.
The way initially I designed it for fasmg seemed simple and clear from theoretical point of view, but the parts where it differs from fasm 1 are not very usable in practice. So making it backwards-compatible might be a better choice, even if a little bit more clunky in internal implementation. |
|||
![]() |
|
Tomasz Grysztar
I'm releasing it, it seems to work well. Is it very likely that the parts of fasmg's specification that were so non-intuitive in practical use have never been actually used by anyone, so this change may in fact not break anything. But please let me know if you find anything that stopped working because of this change.
The compatibility with fasm 1 is now stronger, even though underlying structures are very different: Code: BASE: .x = 1 ; this is BASE.x BASE.y: .x = 2 ; this is BASE.y.x Additionally, I made NAMESPACE command nullify the "last label" setting and END NAMESPACE restore it: Code: BASE.x: namespace BASE .y = 1 ; BASE..y = 1 sub: .y = 2 ; BASE.sub.y = 2 end namespace .y = 3 ; BASE.x.y = 3 |
|||
![]() |
|
revolution
Tomasz Grysztar wrote:
![]() |
|||
![]() |
|
Lost_Ghost123
This change seems to be for the better. Will try to keep this in mind.
|
|||
![]() |
|
Tomasz Grysztar
revolution wrote: Hmm. That looks weird to me. Those double dots! Quote: [...] The following example demonstrates the two methods of identifying such symbol: |
|||
![]() |
|
revolution
It looked like an empty namespace.
Code: namespace BASE .y = 1 ; BASE.<empty>.y = 1 |
|||
![]() |
|
Tomasz Grysztar
revolution wrote: It looked like an empty namespace. Quote: When an identifier starts with a dot, but there is no label that would be a parent for it, the identifier refers to the descendant of a special symbol that resides in the current namespace but has no name. |
|||
![]() |
|
Tomasz Grysztar
By making it possible to have a current base label that is not from current namespace, this new system allows for some pretty interesting tricks. I'm not going to encourage them, though - because mixing the two systems too much would be most likely not a good habit, considering clarity of the source text.
|
|||
![]() |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.