flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 05 Jan 2018, 22:58
The problem you have is that the dots are not special. They are simply part of the name. So just pretend that they are a normal letter in a label.
Code: macro dummy param { match arg, param \{ arg equ foo \} } |
|||
![]() |
|
fabbel 06 Jan 2018, 15:43
Tx but that doesnt answer my question : i am looking to get only the part following the dot. Is there no way around this?
|
|||
![]() |
|
Tomasz Grysztar 06 Jan 2018, 16:43
Because "." is not treated as a special character by fasm 1 and the preprocessor does not have an ability to split or alter the name tokens, it is not possible. It is one of the limitations that led to the design of the successor engine (fasmg).
|
|||
![]() |
|
a 10 Apr 2025, 10:27
Tomasz, although preprocessor does not have an ability to split or alter the name tokens, it is still possible to detect if the name starts with a dot:
Code: macro check_if_name_starts_with_a_dot a { local b b: if b#a eq a the_first_character_is_a_dot else the_first_character_is_not_a_dot end if } some people might find this to be helpful |
|||
![]() |
|
Roman 10 Apr 2025, 10:34
And how using this macro ?
I try this: Code: macro namedot a { local b b: if b#a eq a display '1_character_is_a_dot' else display '2_character_is_not_a_dot' end if } Start: namedot Start.aa ;get 2_character_is_not_a_dot namedot .aa ;get 1_character_is_a_dot namedot aa ;get 2_character_is_not_a_dot .aa: |
|||
![]() |
|
a 10 Apr 2025, 10:40
Roman,
Code: check_if_name_starts_with_a_dot .wwwwwwwwwwwwwwwwwwwwwwwww Code: check_if_name_starts_with_a_dot wwwwwwwwwwwwwwwwwwwwwwwww so you are supposed to replace the "the_first_character_is_a_dot" and "the_first_character_is_not_a_dot" with your custom code like you did. also: it can only detect if it STARTS with a dot not if it HAS a dot |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.