flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > [Solved]How do long equ \?

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1767
Roman 29 Mar 2023, 07:14
Fasmw 1.73
How do this?

Code:
Txt1 equ 'abcde'\
         '1234' 
;macro not see Txt1 as one line text
; and get error
    


Last edited by Roman on 29 Mar 2023, 22:09; edited 1 time in total
Post 29 Mar 2023, 07:14
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20300
Location: In your JS exploiting you and your system
revolution 29 Mar 2023, 07:26
Code:
Txt1 equ 'abcde1234'    
Post 29 Mar 2023, 07:26
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1767
Roman 29 Mar 2023, 07:39
I know this. As usual.
But I want do how I write in first my post.

Txt1 equ 'abcd'\
'123'
Txt1 exist ok, no error.

But match =\ , Txt1 { } ;get error


Last edited by Roman on 29 Mar 2023, 11:57; edited 2 times in total
Post 29 Mar 2023, 07:39
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20300
Location: In your JS exploiting you and your system
revolution 29 Mar 2023, 07:43
It is seen as one line of text, but you have it as two unconnected strings.
Code:
processed: db 'abcde' '1234'
error: extra characters on line.    
You need a joiner. You can use #
Code:
Txt1 equ 'abcde' # \
        '1234'
match x,Txt1 {db x}    
Post 29 Mar 2023, 07:43
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1767
Roman 29 Mar 2023, 07:50
Nice variant.
Code:
Ar3  equ 877
Ar1  equ '575'
Ar2  equ '-343'
Txt1 equ 'abcde'#\
        `Ar3,`Ar3#\ 
         '1234'#\
         Ar1#\
         '%f, sv',Ar1,Ar2 
;convert text as one line
match x,Txt1 {Txt1 equ x}   
    
Post 29 Mar 2023, 07:50
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.