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: 2
thetrick
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: 7796
Location: Kraków, Poland
Tomasz Grysztar
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: 2
thetrick
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: 821
Location: Belarus
DimonSoft
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.