flat assembler
Message board for the users of flat assembler.

Index > Main > How dublicated proc ?

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1792
Roman 06 Feb 2023, 07:30
Fasmw 1.73
I want do this.

Code:
proc a1
ret
endp
;in some place. redefined without if or macro. Sometimes its more convenient.
proc a1
ret
endp
    


I know fasm macro redefined.
But how redefined proc or label ?
purge proc help me ?


Last edited by Roman on 06 Feb 2023, 07:36; edited 1 time in total
Post 06 Feb 2023, 07:30
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20340
Location: In your JS exploiting you and your system
revolution 06 Feb 2023, 07:35
It isn't possible to have two labels with the same name. Which one would you choose?
Code:
a1:
a1: ; <---- error: symbol already defined.    
Same for this:
Code:
a1:
ret
a1 = $ ; <--- error: symbol already defined.
ret    
But you can use simple variables:
Code:
a1 = $
ret
call a1
;...
a1 = $
ret
call a1    
Post 06 Feb 2023, 07:35
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1792
Roman 06 Feb 2023, 07:39
Thanks.
Post 06 Feb 2023, 07:39
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20340
Location: In your JS exploiting you and your system
revolution 06 Feb 2023, 07:54
If you define a variable more than once then you can't forward reference.
Code:
call a1 ; <--- error: symbol 'a1' out of scope.
a1 = $
a1 = $    
Post 06 Feb 2023, 07:54
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.