flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > The macro is unnamed and executed immediately. How do? |
Author |
|
Tomasz Grysztar 04 Apr 2023, 10:29
You can use MATCH like this:
Code: match p1:p2:p3, esi:ebx:edx { inc byte [p1] mov al, [p2] add al, [p1] mov [p3], al } Code: match p2+p1 -> p3, esi+ebx -> edx { inc byte [p1] mov al, [p2] add al, [p1] mov [p3], al } |
|||
04 Apr 2023, 10:29 |
|
Roman 04 Apr 2023, 10:32
Thanks.
How I sayed weird match |
|||
04 Apr 2023, 10:32 |
|
Roman 04 Apr 2023, 11:29
Problem with include file.
Code: ;code in file ingen.txt mov al,[p1] ;fasm error undefined symbol p1 add al,[p2] ;fasm error undefined symbol p2 mov [pout],al ;fasm error undefined symbol pout ;code in main.asm pupz equ edx,ecx,edi match p1=, p2=, pout , pupz { include 'ingen.txt' } |
|||
04 Apr 2023, 11:29 |
|
Tomasz Grysztar 04 Apr 2023, 12:06
That wouldn't work with regular macro either.
|
|||
04 Apr 2023, 12:06 |
|
Roman 04 Apr 2023, 12:45
Only way is include file must contains match ?
And no exist any others variants fix this ? |
|||
04 Apr 2023, 12:45 |
|
revolution 04 Apr 2023, 12:48
Code: p1 equ edx p2 equ ecx p3 equ edi include 'ingen.txt' restore p1, p2, p3 |
|||
04 Apr 2023, 12:48 |
|
Roman 04 Apr 2023, 12:52
Sometimes its not convenient to use.
Code: p1 equ edx ;because its in main.asm p2 equ ecx ;and I must personal write\rewrite\comment hands, p3 equ edi ;new equs. ;if my generator put in ingen.txt new p4 or p5. ;I must write or comment in main.asm new equs include 'ingen.txt' restore p1, p2, p3 Best way this is all equs and matchs contains in file 'ingen.txt' |
|||
04 Apr 2023, 12:52 |
|
Roman 04 Apr 2023, 19:31
Possible do this for match ?
Code: kk equ p1=, p2=, pout ;i want equ using for match. But this not work pp equ edx,ecx,edi ;this work. match kk , pp { mov al,[p1] ;fasm error undefined p1 add al,[p2] mov [pout+1],al } O ! fix work ! kk fix p1=, p2=, pout |
|||
04 Apr 2023, 19:31 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.