flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > How get all macros?

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1718
Roman 02 May 2023, 07:22
Code:
Macro m1 {mov al, 1}
Macro m2 {mov bl, 2}
Macro m3 {mov CL, 3}
Fer equ m1, m2, m3
Ref equ m2, m3, m1, m3

Rept 3 { irp T, Fer \{ match v=, d, T \\{ V
inc ebx
 \\} \}}
;three times m1
;I want get: m1 than m2 than m3
    

I know irpv but i not want using this:
Fer equ m1
Fer equ m2
Fer equ m3

I need using Fer equ m1, m2, m3
Post 02 May 2023, 07:22
View user's profile Send private message Reply with quote
macomics



Joined: 26 Jan 2021
Posts: 921
Location: Russia
macomics 02 May 2023, 10:16
Code:
Macro m1 {mov al, 1}
Macro m2 {mov bl, 2}
Macro m3 {mov cl, 3}
Fer equ m1, m2, m3
Ref equ m2, m3, m1, m3
match any, Fer {
    irp T, any \{ T
        inc ebx
    \}
}    
Code:
$ fasm -m 1024 test.asm
flat assembler  version 1.73.30  (1024 kilobytes memory)
1 passes, 12 bytes.
$ hexdump -C test.bin
00000000  b0 01 66 43 b3 02 66 43  b1 03 66 43              |..fC..fC..fC|    

Code:
0xb0 0x01 = mov al, 1
0x66 0x43 = inc ebx (use16)
0xb3 0x02 = mov bl, 2
0x66 0x43 = inc ebx (use16)
0xb1 0x03 = mov cl, 3
0x66 0x43 = inc ebx (use16)    
Post 02 May 2023, 10:16
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1718
Roman 02 May 2023, 10:39
Thanks work.
Post 02 May 2023, 10:39
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.