flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Is it safe to change bit operators with C/MASM syntax? |
Author |
|
baldr 10 Feb 2010, 12:51
alorent,
ASCII punctuation is almost used up in FASM. AFAIK only !?@^_ can be used in constant names safely (single and double quotes can be used too, only not as a first character). Thus most of your equs won't compile. For example, "!= equ <>" is the definition of numeric constant named "!" with [invalid numeric expression] value of "equ<>". |
|||
10 Feb 2010, 12:51 |
|
alorent 10 Feb 2010, 13:36
Hi baldr,
Thanks for the explanation. Isn't it possible to do it in another flavour? that is, without using EQUs. Thanks! |
|||
10 Feb 2010, 13:36 |
|
baldr 10 Feb 2010, 16:41
alorent,
I highly doubt it. From my analysis of PREPROCE.INC: Tokenizer disallows the following ASCII codes in symbols: Code: db 9,0Ah,0Dh,1Ah,20h,'+-/*=<>()[]{}:,|&~#`;\' Single and double quotes handled separately. Thus we have: !$%.?@^_ and alphanumeric, plus control characters not mentioned above and 80…FF — first-class name characters; ' and " — can be used if not first character. As you can see, there is not a much left to choose from. |
|||
10 Feb 2010, 16:41 |
|
revolution 10 Feb 2010, 17:12
Have you tried using 'fix'?
|
|||
10 Feb 2010, 17:12 |
|
baldr 10 Feb 2010, 17:47
revolution,
fix won't help. Tokenized != fix <> is symbol("!")=symbol("fix")<> (by symbol("name") I denote structure that holds symbol name). symbol("fix") should be second token of line to be recognized by preprocessor (and in our case second token is =). |
|||
10 Feb 2010, 17:47 |
|
Borsuc 10 Feb 2010, 18:04
baldr wrote: For example, "!= equ <>" is the definition of numeric constant named "!" with [invalid numeric expression] value of "equ<>". But for example this: Code: neq equ <> _________________ Previously known as The_Grey_Beast |
|||
10 Feb 2010, 18:04 |
|
baldr 10 Feb 2010, 19:03
Borsuc,
I know what equ directive does, but FASM doesn't recognize "!= equ <>" as that directive. This line compiles as definition of numeric constant (and fails because "equ<>" does not compute). OTOH, "! equ ~" defines symbolic constant "!" with value of "~" just fine. |
|||
10 Feb 2010, 19:03 |
|
Borsuc 10 Feb 2010, 22:15
oh you're right, I didn't think about that. Clever
|
|||
10 Feb 2010, 22:15 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.