flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > Not understood how use several args for macro.

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1878
Roman 18 Mar 2023, 08:43
Fasmw 1.73
Code:
macro a [ar1], [ar2], [ar3] {...} 
;how macro a say Whear is ar1 and ar2 and ar3
a 12(ar1) ,Tom(ar2) ,Proc1(ar3), 44(ar1) ,Ron(ar2) ,Proc2(ar3) 
    

How macro a understood wher is ar1 and ar2?
I am confused.
Post 18 Mar 2023, 08:43
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20531
Location: In your JS exploiting you and your system
revolution 18 Mar 2023, 08:56
Maybe you mean this.
Code:
macro a [ar1, ar2, ar3] {...}    
Like this:
Code:
macro x [a,b,c] {
display a,b,c,10,13
}
x 'a','b','c','d','e','f'    
Post 18 Mar 2023, 08:56
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1878
Roman 18 Mar 2023, 09:05
Yes.
Thanks.

How do match for ar1?
a Jack=1,0,5

I want do Jack equ 1
Code:
macro a [ar1, ar2, ar3] {
match d==E, ar1 \{ d equ E \} 
}    

    
Post 18 Mar 2023, 09:05
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1878
Roman 18 Mar 2023, 10:32
Ok.
Its posible do this ?
Code:
 
macro pp [ar1], [ar2] {...} 
pp Some1, <2,3,6,7>,\
   Some2, <5>
    
Post 18 Mar 2023, 10:32
View user's profile Send private message Reply with quote
macomics



Joined: 26 Jan 2021
Posts: 1071
Location: Russia
macomics 18 Mar 2023, 10:54
Code:
macro pp v1, ar1, v2, ar2 {
  display `v1, '  '
  irp val, ar1 \{ display \`val, ', ' \}
  display 13, 10, `v2, '  '
  irp val, ar2 \{ display \`val, ', ' \}
}
pp Some1, <2,3,6,7>,\
   Some2, <5>    
Code:
flat assembler  version 1.73.30  (1024 kilobytes memory)
Some1  2, 3, 6, 7, 
Some2  5, 
1 passes, 0 bytes.    
Post 18 Mar 2023, 10:54
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1878
Roman 18 Mar 2023, 11:24
Nice variant.
Code:
macro usrdt [ar1,ar2] {
      ar1:
;or db 'num:'#`a and easy convert to special text  
           irp a,ar2 \{ dd a \} ;or db `a and easy convert to text  
      } 
;in data write
usrdt    so1,<1,2,3,4,5,6,7,8,9>,\
         so2,<2,2>,\
         so3,<1>    
Post 18 Mar 2023, 11:24
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.