flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > How do you use match to split at a . |
Author |
|
vid 22 Jan 2007, 06:19
"." is normal character, just like any of a-z, A-Z, 0-9. That would be same as trying to split "kernel32xExitProcess"
|
|||
22 Jan 2007, 06:19 |
|
MichaelH 22 Jan 2007, 09:41
Quote:
Below, doCall1 prints out "kernel32 ExitProcess" because : is a symbol character, but as you say . is not a symbol character, it's a normal character. So what is the syntax to achieve the same print out with doCall2 using a non symbol character like a dot? Clearly it must be easy but it seems I'm to stupid to work it out Code: macro doCall1 param { match library:proc, param \{ display \`library, ' ', \`proc, 13,10 \} } macro doCall2 param { match library.proc, param \{ display \`library, ' ', \`proc \} } doCall1 kernel32:ExitProcess doCall2 kernel32.ExitProcess output: doCall1 = kernel32 ExitProcess doCall2 = library proc <-- wrong |
|||
22 Jan 2007, 09:41 |
|
vid 22 Jan 2007, 12:06
Quote: So what is the syntax to achieve the same print out with doCall2 using a non symbol character like a dot? |
|||
22 Jan 2007, 12:06 |
|
MichaelH 22 Jan 2007, 12:35
So there is no solution
Seems strange to be able to concat a string but not split it. Oh well, thanks for the reply. Does anyone have a complicated macro way of doing this? |
|||
22 Jan 2007, 12:35 |
|
vid 22 Jan 2007, 13:59
MichaelH: thing about "`", "load" and "store". that is the ugly way.
|
|||
22 Jan 2007, 13:59 |
|
afw2004 22 Jan 2007, 15:57
Is it possible to parse GUID string {XXXXXXXX-XXXX-XXXX-XXXXXXXXXX} into GUID struct using "match" keyword? How to split last XXXXXXXXXX into db 0XXh,0XXh,0XXh,0XXh,0XXh,0XXh,0XXh,0XXh,0XXh,0XXh ?
|
|||
22 Jan 2007, 15:57 |
|
vid 22 Jan 2007, 16:31
afw2004: i am afraid, you will need ugly `/load/store tricks again. If the number would fit into dq, it would be much easier.
|
|||
22 Jan 2007, 16:31 |
|
Tomasz Grysztar 22 Jan 2007, 16:40
afw2004 wrote: Is it possible to parse GUID string {XXXXXXXX-XXXX-XXXX-XXXXXXXXXX} into GUID struct using "match" keyword? How to split last XXXXXXXXXX into db 0XXh,0XXh,0XXh,0XXh,0XXh,0XXh,0XXh,0XXh,0XXh,0XXh ? Have you seen the GUID macro in the USECOM example in standard Win32 package? |
|||
22 Jan 2007, 16:40 |
|
afw2004 22 Jan 2007, 16:59
Thanks
|
|||
22 Jan 2007, 16:59 |
|
MichaelH 22 Jan 2007, 20:01
Tomasz since match already can separated using symbol characters, would it be out of the question to have match be able to split a string with non symbol characters or is that just too difficult?
split is a very powerful function in javascript and having it in fasm macros would to great if it could be done. |
|||
22 Jan 2007, 20:01 |
|
Tomasz Grysztar 22 Jan 2007, 21:57
I agree that this would be an useful addition to preprocessor, however I really don't understand the reference to JavaScript.
|
|||
22 Jan 2007, 21:57 |
|
MichaelH 22 Jan 2007, 22:55
Yes, you are right, sorry
Given what you still have to achieve with a debug format for fasm etc, I suspect this idea will not happen for some time? |
|||
22 Jan 2007, 22:55 |
|
dead_body 12 Mar 2007, 12:54
MichaelH wrote: Tomasz since match already can separated using symbol characters, would it be out of the question to have match be able to split a string with non symbol characters or is that just too difficult? when we can expect this improvement? |
|||
12 Mar 2007, 12:54 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.