flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > [solved]fasm1 .namespace

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
Overclick



Joined: 11 Jul 2020
Posts: 669
Location: Ukraine
Overclick 15 Sep 2021, 13:11
Job is done, whait for future update of Multisection macro


Hi
Me as many of you who don't like fasmg know some useful abilities of that boring slowmotion language (people say that). Some of them we can migrate to fasm1 by tricks.
That is the time we try to migrate "namespace" to fasm1. Lets see what we have -- macros. How can we use it? I think we have to use pseudo-names and redefine them by bloks of .data witch aren't the real data section but block of redefining variables. And the real .data section have to be createt by that sort of macro...
Good ideas are welkome.


Last edited by Overclick on 05 Apr 2022, 01:28; edited 1 time in total
Post 15 Sep 2021, 13:11
View user's profile Send private message Visit poster's website Reply with quote
macomics



Joined: 26 Jan 2021
Posts: 1014
Location: Russia
macomics 15 Sep 2021, 13:57
As far as I know, the concept of namespace itself was introduced in high-level languages to speed up the compilation of large programs. Initially, its developers wanted to limit the number of enumerated names in one area of the source text to speed up the process of determining them by the compiler. You suggest feeding the fasm even more names, on the opposite, to slow down its work, just for the sake of its own convenience.

As I believe, the implementation of the namespace macro instruction does not make much sense. It is better to write a patch for the fasm preprocessor. Then maybe Thomas will appreciate it.
Post 15 Sep 2021, 13:57
View user's profile Send private message Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 669
Location: Ukraine
Overclick 15 Sep 2021, 14:03
Question is not about why but how!
But if u ask then yes, I'm too lazy to rename variables for each window or thread or something. I want to have that ability in my arsenal.
Actually I see how to do that, but I want to hear other ideas.
Post 15 Sep 2021, 14:03
View user's profile Send private message Visit poster's website Reply with quote
macomics



Joined: 26 Jan 2021
Posts: 1014
Location: Russia
macomics 15 Sep 2021, 14:12
macomics wrote:
It is better to write a patch for the fasm preprocessor. Then maybe Thomas will appreciate it.
That was the idea
Post 15 Sep 2021, 14:12
View user's profile Send private message Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 669
Location: Ukraine
Overclick 15 Sep 2021, 14:19
Thomas give up with fasm1. People ask him for updates of a lot of ideas but with no feedback Sad

Anyway, macros doing well, so most of everything we can do as it is
Post 15 Sep 2021, 14:19
View user's profile Send private message Visit poster's website Reply with quote
macomics



Joined: 26 Jan 2021
Posts: 1014
Location: Russia
macomics 15 Sep 2021, 14:25
Overclick wrote:
Thomas give up with fasm1. People ask him for updates of a lot of ideas but with no feedback Sad
Probably all because people give him tasks, and do not implement their ideas and provide their implementation options for the judgment of Tamas. There may be millions of ideas, but he is one. Write a patch, send it to him in a personal account and maybe we will finally see the fasm 2.0 version.
Post 15 Sep 2021, 14:25
View user's profile Send private message Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 669
Location: Ukraine
Overclick 15 Sep 2021, 14:36
I suggest to take the best of both and make fasm2. Speed is most critical criteria for me if u ask.
U write ur comment before me, but both of us are not the first who dream about fasm2

What is fasm2 for me: Super easy, super fast with powerful macro where we can play with our new ideas.
1) float precalculation
2) spaces and multisections
3) longer variables
4) updated database of winapi
5) some new gui if u still use default one
The rest is almost ideal...
Post 15 Sep 2021, 14:36
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 15 Sep 2021, 14:38
The requests for namespace feature were, in fact, what sparked the development of fasmg. So I already did implement it, and fasmg is the result.
Post 15 Sep 2021, 14:38
View user's profile Send private message Visit poster's website Reply with quote
macomics



Joined: 26 Jan 2021
Posts: 1014
Location: Russia
macomics 15 Sep 2021, 14:50
Overclick wrote:
U write ur comment before me, but both of us are not the first who dream about fasm2
I'm just fine with everything so far and in the old version. I don't dream about fasm 2, I use the latest released version with gratitude.

Oveclick wrote:
4) updated database of winapi
What exactly do you mean by this? By itself, fasm does not know about any WinAPI. And compiling a database of functions, macros and constants is the lot of every user.

Overclick wrote:
5) some new gui if u still use default one
And here, I think, it would be nice to implement some IDE for all user platforms (not only under "mustdie"). So far, I'm doing gedit and I'm quite happy. Its plug-in with an embedded console allows even gdb to run immediately from the editor.
Post 15 Sep 2021, 14:50
View user's profile Send private message Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 669
Location: Ukraine
Overclick 15 Sep 2021, 14:50
That why it's better to remacro it for fasm1. Even fasm1 is to slowly to recompile changes I make sometime. Sorry for my stupid critic, I don't even try fasmg, but a lot of people says it is slowly. We need easy and fast compiller, not complicated even if it's superpowerful.
Post 15 Sep 2021, 14:50
View user's profile Send private message Visit poster's website Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 669
Location: Ukraine
Overclick 15 Sep 2021, 14:54
Quote:

By itself, fasm does not know about any WinAPI

U rn't right. Includes import known winapi and where some of them is missing and have to be added manually.

Quote:

not only under "mustdie"

I'm happy with RadAsm3 after I find how to edit config files )


Last edited by Overclick on 15 Sep 2021, 14:55; edited 1 time in total
Post 15 Sep 2021, 14:54
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 15 Sep 2021, 14:54
Overclick wrote:
Sorry for my stupid critic, I don't even try fasmg, but a lot of people says it is slowly.
Please at least try it first. For different people and different purposes the threshold of what is considered "slow" may vary. On my current machine fasmg assembles entire fasmw in about 3 seconds, which may be a dozen times slower than fasmw assembling itself, but is still reasonable.

It could get a bit faster with another implementation of x86 instruction set, designed from scratch to utilize CALM better - this is what in my mind is main candidate for "fasm 2", just a set of CALM-based headers for fasmg.


Last edited by Tomasz Grysztar on 15 Sep 2021, 15:00; edited 1 time in total
Post 15 Sep 2021, 14:54
View user's profile Send private message Visit poster's website Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 669
Location: Ukraine
Overclick 15 Sep 2021, 14:59
Quote:

Please at least try it first. For different people and different purposes the threshold of what is considered "slow" may vary.

U r right, I will try it some day. But I don't know even why if all I need can be done by fasm1.
Did u make multisection at fasmg?
It is most important macro for me as I work with huge enough projects. Fasmg needs my attention for all of this basics.
Post 15 Sep 2021, 14:59
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 15 Sep 2021, 15:03
Overclick wrote:
Did u make multisection at fasmg?
See the "How can multiple sections of file be generated in parallel?" section of fasmg's auxiliary documentation for my preferred method. The macro-based approaches ported from fasm 1 do work, too.
Post 15 Sep 2021, 15:03
View user's profile Send private message Visit poster's website Reply with quote
macomics



Joined: 26 Jan 2021
Posts: 1014
Location: Russia
macomics 15 Sep 2021, 15:05
Overclick wrote:
U rn't right. Includes import known winapi where some of them is missing and have to be added manually.
In the Windows version, such files are included in the package, but this is a so-called kickstarter. They do not pretend to be exhaustive and correct. So their addition and correction is a personal matter for everyone.

But if such a dance has gone, then where are the includs for the Linux version. I'm already tired of digging up the endless rubble of C .h files. This is a joke (I explain for some)!!!


Last edited by macomics on 15 Sep 2021, 15:08; edited 1 time in total
Post 15 Sep 2021, 15:05
View user's profile Send private message Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 669
Location: Ukraine
Overclick 15 Sep 2021, 15:08
Tomasz, I promise I'll try it, thanks for all u've done for us, but the thread is about namespaces under fasm1. Any ideas?
Post 15 Sep 2021, 15:08
View user's profile Send private message Visit poster's website Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 669
Location: Ukraine
Overclick 15 Sep 2021, 15:17
Quote:

where are the includs for the Linux version

Nobody care ))
Post 15 Sep 2021, 15:17
View user's profile Send private message Visit poster's website Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 669
Location: Ukraine
Overclick 01 Apr 2022, 11:55
Hi
I'm back to .namespace ideas as much as it possible at war time
Trying to create it as addon for my multisection macro but problem is to generate the unique value names. Please give me some advice.
I tried this too:
Code:
struc dd [data]
                        \\{
                                define list@#currentnamespace . ,list@#currentnamespace
                                .#@#currentnamespace dd data
                                . equ .#@#currentnamespace
                        \\}    


Description:
Filesize: 103.91 KB
Viewed: 8557 Time(s)

Capture.JPG


Post 01 Apr 2022, 11:55
View user's profile Send private message Visit poster's website Reply with quote
macomics



Joined: 26 Jan 2021
Posts: 1014
Location: Russia
macomics 01 Apr 2022, 12:34
Code:
struc dd data& \\{ if ~ data eq
 ...
end if \\}    
or
Code:
struc dd [data] \\{ common \\local temp     
Post 01 Apr 2022, 12:34
View user's profile Send private message Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 669
Location: Ukraine
Overclick 01 Apr 2022, 15:52
Data section seems writing ok but Code


Description:
Filesize: 33.76 KB
Viewed: 8528 Time(s)

Capture.JPG


Description:
Filesize: 17.7 KB
Viewed: 8530 Time(s)

Capture.JPG


Post 01 Apr 2022, 15:52
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.