flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > problem with < in macro. How fix this ? |
Author |
|
revolution 22 Jun 2022, 09:23
Escape it with a backslash.
Code: jif -edx,\<11,.lb1 |
|||
22 Jun 2022, 09:23 |
|
Tomasz Grysztar 22 Jun 2022, 09:40
You can use fasmg-like greedy argument and then MATCH to cut the things yourself:
Code: macro jif agrs& { match ar1=,ar2=,mtk, args \{ |
|||
22 Jun 2022, 09:40 |
|
Roman 22 Jun 2022, 12:38
revolution wrote: Escape it with a backslash. Compile but no jb asm instruction. macro jif failed Only ebx. |
|||
22 Jun 2022, 12:38 |
|
Roman 22 Jun 2022, 12:40
Quote:
And how this help ? For this Code: jif +ebx,<10,.lb1 ;Because fasm used this < and macro failed |
|||
22 Jun 2022, 12:40 |
|
macomics 22 Jun 2022, 12:48
Code: format binary as "txt" macro jif args& { restore jifR match ar1=,ar2=,mtk, args \{ match =+X, ar1 \\{ inc X jifR equ X\\} match =-X, ar1 \\{ dec X jifR equ X\\} match =jifR, jifR \\{ jifR equ ar1 \\} match =>X, ar2 \\{ cmp jifR,X ja mtk \\} match =<X, ar2 \\{ cmp jifR,X jb mtk \\} match =~X, ar2 \\{ cmp jifR,X jnz mtk \\} match ==X, ar2 \\{ cmp jifR,X jz mtk \\} \} } use32 test0: jif ebx,<10,.lb1 ; <- works fine nop nop nop .lb1: jif +ebx,<10,.lb2 ; <- works fine nop nop nop .lb2: jif -ebx,<10,.lb3 ; <- works fine nop nop nop .lb3: jif ebx,>10,.lb4 ; <- works fine nop nop nop .lb4: jif +ebx,>10,.lb5 ; <- works fine nop nop nop .lb5: jif -ebx,>10,.lb6 ; <- works fine nop nop nop .lb6: use64 test1: jif ebx,<10,.lb1 ; <- works fine nop nop nop .lb1: jif +ebx,<10,.lb2 ; <- works fine nop nop nop .lb2: jif -ebx,<10,.lb3 ; <- works fine nop nop nop .lb3: jif ebx,>10,.lb4 ; <- works fine nop nop nop .lb4: jif +ebx,>10,.lb5 ; <- works fine nop nop nop .lb5: jif -ebx,>10,.lb6 ; <- works fine nop nop nop .lb6: Last edited by macomics on 13 Nov 2024, 20:44; edited 1 time in total |
|||
22 Jun 2022, 12:48 |
|
Roman 22 Jun 2022, 14:40
Big thanks.
Good job ! All work fine. |
|||
22 Jun 2022, 14:40 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.