flat assembler
Message board for the users of flat assembler.
Index
> Programming Language Design > On my new assembler Goto page Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 |
Author |
|
VEG 19 Sep 2017, 04:41
Tomasz Grysztar wrote: These additions open up a way for the option of generating multiple files from one source, which I've been planning for years. It would be limited to declaring the extensions of the produced files, analogously to the main file. |
|||
19 Sep 2017, 04:41 |
|
jacobly 02 Oct 2017, 07:15
The addition of format affected the forward referenceability of a format macro I wrote, and while trying to fix it, I realized that a nice solution would be to redirect format? type args& to format?.type args. It seems like this would be a useful feature to have in fasmg natively, similar to how the end directive is implemented, which would make defining custom formats easier.
|
|||
02 Oct 2017, 07:15 |
|
Tomasz Grysztar 02 Oct 2017, 08:15
jacobly wrote: The addition of format affected the forward referenceability of a format macro I wrote, and while trying to fix it, I realized that a nice solution would be to redirect format? type args& to format?.type args. It seems like this would be a useful feature to have in fasmg natively, similar to how the end directive is implemented, which would make defining custom formats easier. PS. I have update the Windows headers package to use this variant, forward-referenced FORMAT does work correctly there. I guess I need to make this a documented feature then. |
|||
02 Oct 2017, 08:15 |
|
jacobly 02 Oct 2017, 18:33
Indeed it does work correctly, I just forgot to search for the next occurence of format in tables.inc...
|
|||
02 Oct 2017, 18:33 |
|
Tomasz Grysztar 11 Oct 2017, 17:07
I have made another tiny addition to the language, which addresses two separate but similar problems.
First is the problem with defining a variable named like one of the instructions. The trick with a trailing dot often works, but the explanation of why it helps is quite complex, and this does not reliably work in all cases - for example trying to define case-insensitive "irp" as a variable with "irp?." identifier would still fail. Second, much less important problem is related to the recent addition of a support for numeric names inside identifiers. While this allowed to define such named symbols inside explicitly specified namespaces, there is no way to directly define or access such symbol from inside such namespace unless the parent symbol of the namespace is known. I have introduced a new syntax variant - with added "?" character right at the start of an identifier - that helps to define symbols with problematic names as mentioned above: Code: ?IRP equ 0007h ; defines case-sensitive symbol IRP namespace IRP ?1 = 'test' end namespace display IRP.1 |
|||
11 Oct 2017, 17:07 |
|
Tomasz Grysztar 15 Oct 2017, 09:32
The addition of VIRTUAL AS has also pushed me to enable a feature that was long lurking from under the surface of fasmg engine, but I was postponing its inclusion because I was not sure what syntax should it use.
That feature is the ability to "continue" previously closed VIRTUAL block, allowing to append new data definitions at the end of such block. I decided to use the simplest possible syntax for it, just VIRTUAL followed by the area label that needs to refer to a previously defined VIRTUAL block: Code: virtual at 0 as 'log' Log:: end virtual virtual Log db 'Hello!',13,10 end virtual Not only does it allow to easily build auxiliary files piece after piece, this feature also makes it much easier to implement things like switching back and forth between definitions for code segment and data segment, etc. Multiple program segments can be assembled in parallel in virtual blocks, and only when they are finished they may be copied into an actual output. This is something that was very hard to do in the fasm 1 architecture, but is really easy within the design of fasmg. |
|||
15 Oct 2017, 09:32 |
|
Goto page Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.