flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > [Solved]Problems match 2*1 |
Author |
|
revolution 03 Sep 2024, 01:38
Works for me. But your example is broken.
Code: flat assembler version 1.73.31 (16384 kilobytes memory) test.asm [6]: xOp h*j ;display h test.asm [2] xOp [1]: match a =* b, op \{ display a \} test.asm [2] match [0]: match a =* b, op \{ display a \} processed: display h error: undefined symbol 'h'. Code: macro xOp op { match a =* b, op \{ display \`a \} } ;in code xOp 2*1 ;display 2 xOp h*j ;display h Code: flat assembler version 1.73.31 (16384 kilobytes memory) 2h 1 passes, 0 bytes. |
|||
03 Sep 2024, 01:38 |
|
revolution 03 Sep 2024, 01:39
I suspect you are outputting the character 0x02, which is a non-printing character so you don't see it.
See the "blank" line in the output above, there is a character 0x02 hidden there. |
|||
03 Sep 2024, 01:39 |
|
Roman 03 Sep 2024, 01:45
And how get Option from match?
I mean symbol * or + or / or - Using for each symbol separate match? |
|||
03 Sep 2024, 01:45 |
|
Roman 03 Sep 2024, 03:33
helped me, chinese karate master Chu
Code: macro xchu op,do,op1 { ueqqu equ 0 match &a=op &b , op1 \{ movaps xmm0,dqword [a] do xmm0,dqword [b] display 'adr;' ueqqu equ 1 \} match a=op b , op1 \{ ; display \`a ; display \`b if ueqqu = 0 display 'xmm;' do xmm\#\a,xmm\#\b end if \} } macro xmOp4 op1 { xchu *,mulps,op1 xchu /,divps,op1 xchu +,addps,op1 xchu -,subps,op1 } ;in code align 16 p1 dd 1.0,2.0,3.0,4.0 p2 dd 10.0,20.0,30.0,40.0 xmOp4 &p2-&p1 xmOp4 0*2 xmOp4 &p2*&p1 xmOp4 &p2/&p1 |
|||
03 Sep 2024, 03:33 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.