flat assembler
Message board for the users of flat assembler.

Index > IDE Development > "uglobal" macro optimization

Author
Thread Post new topic Reply to topic
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 10 Aug 2004, 18:26
why is macro "uglobal" done using nested macros? Wouldn't be "virtual" enough? And this way, it will also be possible to allow forward-reference, so data can be reserved before it is declared (not very useful but nice).
I had such macros in my last project and they worked just fine.
Post 10 Aug 2004, 18:26
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 10 Aug 2004, 19:57
Hi.
Some example?
Post 10 Aug 2004, 19:57
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 11 Aug 2004, 11:36
not tested, but should be somthing like this
Code:
macro uglobal
{
   virtual at ..UninitDataBuffer + ..UninitDataSize
}
macro endg
{
  ..UninitDataSize = $-..UninitDataBuffer
  end virtual
}
macro DefineUninitData
{
  ..UninitDataBuffer rb ..UninitDataSize
}
    

i was wrong with possibility of forward reference, it would require something like
Code:
  ..TotalUninitDataSize  = ..UninitDataSize
    

after last "endg".

Connected with this - there could be a defined standard macro that will be presend at the end of source. I think it would be very useful, for example for things like this.
Post 11 Aug 2004, 11:36
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 11 Aug 2004, 12:07
Hm, actually I can't see big difference... Now, at least, both initialized and uninitialised macroses are written in one style. Also I don't think it would be faster. Actually the "proc" macroses with nested macro definitions are faster than older one - with symbolic constants...

Regards.
Post 11 Aug 2004, 12:07
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 11 Aug 2004, 19:13
depends on number of assembling cycles, it takes one more cycle in some cases (it is forward refenced). Anyway, it would be best to test it under more environments.

I was just trying to help, if it is faster this way, then, of course, it would be best to keep it.
Post 11 Aug 2004, 19:13
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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.