flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Eqtype in preprocessor |
Author |
|
revolution 14 Jan 2024, 16:27
There are no preprocessor actions that can examine the individual characters of a symbol.
Maybe if irpc existed it could be possible: Code: irpc char, symbol { ; loop through each character of a symbol. But irpc doesn't exist match ... ; something here to look for '0' through '9' maybe? } |
|||
14 Jan 2024, 16:27 |
|
Roman 16 Jan 2024, 09:05
What eqtype for symbols /+-* ?
Or only match for this symbols ? |
|||
16 Jan 2024, 09:05 |
|
revolution 16 Jan 2024, 13:24
We can test it to see what happens.
Code: test.asm [1]: if + eqtype + processed: if+eqtype+ error: reserved word used as symbol. |
|||
16 Jan 2024, 13:24 |
|
ProMiNick 16 Jan 2024, 14:47
eqtypes: {+},{/},{*},{\-},{any started with nonnegate member parentless expression}
backslash within if had a weird effect Code: if {\-\-\-} eqtype {\[\eax\]} display 'no matter what prepended by \' end if if {\-\-\-} eqtype {\eax \+ \1} display 'it is always compared only by count' end if Code: if {+} eqtype {+} ; curvy brackets ecranise from reserved word error {-} not eqtype anything except {-} itself eqtypes: <+>,</>,<*>,<->,<any started with nonnegate member parentless eqtypes: <->,<-->,<---> expression> Code: if <+> eqtype <+> ; less-greater brackets ecranise from reserved word error too have a nice to play brackets and combinations: Code: if {eax-1} eqtype {eax+1} display 'never' end if if <eax-1> eqtype <eax+1> display 'always' end if in some cases "if" could do things that thou thought previously it can`t. but still don`t affect on preprocessor stage. |
|||
16 Jan 2024, 14:47 |
|
Roman 16 Jan 2024, 17:47
We need eqsymbol !
|
|||
16 Jan 2024, 17:47 |
|
Overclick 16 Jan 2024, 19:08
Actually you can read the file as binary and work with opcodes then proceed in own way. You can see such example in my Xeon patcher.
|
|||||||||||
16 Jan 2024, 19:08 |
|
thetrick 01 Feb 2024, 10:19
Thank you guys!
|
|||
01 Feb 2024, 10:19 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.