flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
vid
"." is normal character, just like any of a-z, A-Z, 0-9. That would be same as trying to split "kernel32xExitProcess"
|
|||
![]() |
|
MichaelH
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 |
|||
![]() |
|
vid
Quote: So what is the syntax to achieve the same print out with doCall2 using a non symbol character like a dot? |
|||
![]() |
|
MichaelH
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? |
|||
![]() |
|
vid
MichaelH: thing about "`", "load" and "store". that is the ugly way.
|
|||
![]() |
|
afw2004
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 ?
|
|||
![]() |
|
vid
afw2004: i am afraid, you will need ugly `/load/store tricks again. If the number would fit into dq, it would be much easier.
|
|||
![]() |
|
Tomasz Grysztar
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? |
|||
![]() |
|
afw2004
Thanks
![]() |
|||
![]() |
|
MichaelH
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. |
|||
![]() |
|
Tomasz Grysztar
I agree that this would be an useful addition to preprocessor, however I really don't understand the reference to JavaScript.
![]() |
|||
![]() |
|
MichaelH
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? |
|||
![]() |
|
dead_body
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? |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.