flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > need something like 'restore' for all defitions.

Author
Thread Post new topic Reply to topic
dead_body



Joined: 21 Sep 2005
Posts: 187
Location: Ukraine,Kharkov
dead_body 02 Dec 2006, 10:30
need something like 'restore' directive, that will roll back all defitions.

Code:
a equ b
a equ c
a equ v

restore_all a
;instead of 
;restore a
;restore a
;restore a
    


i think, it is not hard to implement it, and such directive will not conflict with other directives.

and this directive will be faster then
Code:
rept 999 {restore a}     
.
Post 02 Dec 2006, 10:30
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 02 Dec 2006, 11:43
What would it be useful for?
Post 02 Dec 2006, 11:43
View user's profile Send private message Visit poster's website Reply with quote
dead_body



Joined: 21 Sep 2005
Posts: 187
Location: Ukraine,Kharkov
dead_body 02 Dec 2006, 13:45
Quote:
What would it be useful for?


such decision will reduce amount of memory for compilation.
it will free the memory with previous values of var.

or fasm doesn't hold in memory previous values of var?
Post 02 Dec 2006, 13:45
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 02 Dec 2006, 14:43
If you don't need the previous value of symbolic variable, it may be better to not restore it at all, from the performance point of view - at least since the last preprocessor re-design. At the time of that preprocessor re-write I was doing some test on this, and it's usually better to not "restore" if you don't have to.

Also, in general, it's the compiler that should designed to deal with a given language in most optimal way - not the opposite. Thus my question did really mean: when it would be useful from the LANGUAGE point of view, omitting what the given implementation of compiler is like.
Post 02 Dec 2006, 14:43
View user's profile Send private message Visit poster's website Reply with quote
dead_body



Joined: 21 Sep 2005
Posts: 187
Location: Ukraine,Kharkov
dead_body 02 Dec 2006, 15:25
thanks.
Post 02 Dec 2006, 15:25
View user's profile Send private message 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.