flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > CALM: Tomasz, does call inx preserve flags ?

Author
Thread Post new topic Reply to topic
fabbel



Joined: 30 Oct 2012
Posts: 84
fabbel 17 Jun 2023, 07:49
Hello

Another question again reg. CALM :
reg. call inx, does it preserve the flags ?
I feel it isn't but it's not explicited in the doc, which shud imply that it should, according to the doc :
Quote:
The result flag is modified only by some of the commands, like "check", "match" or "transform". Other commands keep it unchanged.


Tomasz, wud u pls clarify ?
many thx
Post 17 Jun 2023, 07:49
View user's profile Send private message Reply with quote
fabbel



Joined: 30 Oct 2012
Posts: 84
fabbel 17 Jun 2023, 08:18
.. Forgive me, actually I think it does... I think I got confused... Let me explain:
I was calling some calm inx to set the flags and was expecting them to be preserved upon return to the caller inx
.. But current scheme is rather to preserve flags from the caller Before the call...
However, wudn'it be a sensible option?
Post 17 Jun 2023, 08:18
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
Tomasz Grysztar 17 Jun 2023, 09:30
Yes, unless it's explicitly stated that a given command modifies the flag, it is unaffected/preserved by default. I chose to do the same with CALL to make it compatible with ASSEMBLE - that is, if you replaced an old ASSEMBLE statement with CALL, it would still behave the same way.

I see how the opposite behavior could be useful - but I had to choose one way or the other.
Post 17 Jun 2023, 09:30
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:  


< 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.