flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > How to convert a string literal to label?

Author
Thread Post new topic Reply to topic
thetrick



Joined: 19 Feb 2020
Posts: 18
thetrick 19 Feb 2020, 12:29
Hello everyone!

Is there a way to convert a string literal to the label by unquoting the string?

Code:
macro Test param {
       [unquote]param: du param, 0
}    


Thanks in advance!
Post 19 Feb 2020, 12:29
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8357
Location: Kraków, Poland
Tomasz Grysztar 19 Feb 2020, 12:38
With fasm 1 it not possible, you can only work in the other direction - make a string out of a label name.

In case of fasmg it can be done with EVAL.
Post 19 Feb 2020, 12:38
View user's profile Send private message Visit poster's website Reply with quote
thetrick



Joined: 19 Feb 2020
Posts: 18
thetrick 19 Feb 2020, 12:55
Thank you for the answer!
Post 19 Feb 2020, 12:55
View user's profile Send private message Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 1228
Location: Belarus
DimonSoft 19 Feb 2020, 15:45
Tomasz Grysztar wrote:
With fasm 1 it not possible, you can only work in the other direction - make a string out of a label name.

In case of fasmg it can be done with EVAL.

Unless one saves a virtual block to a separate file and manages to guess the filename and encoding (not relevant for latin letters though).

Obligatory warning for casual readers: Do not do this at home/work.
Post 19 Feb 2020, 15:45
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.