flat assembler
Message board for the users of flat assembler.

Index > Main > Label not defined if rept 0 {}

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1792
Roman 22 Oct 2022, 12:55
Fasmw 1.73 funny bug ?
Code:
cmp eax,19
jz  .00
rept 0 { inc eax } ;fasm get error undefined .00
.00:

    


Code:
cmp eax,19
jz  .00
rept 1 { inc eax } ;compile ok.
.00:

    
Post 22 Oct 2022, 12:55
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20333
Location: In your JS exploiting you and your system
revolution 22 Oct 2022, 13:00
Roman wrote:
Fasmw 1.73 funny bug ?
Code:
cmp eax,19
jz  .00
rept 0 { inc eax } ;fasm get error undefined .00
.00:

    
Works for me.
Code:
2 passes, 6 bytes.    
Post 22 Oct 2022, 13:00
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1792
Roman 22 Oct 2022, 13:05
Code:
rept 1 {
cmp eax,19
jz  .00
rept 0 { inc eax } ;fasm get error undefined .00
.00:
}
    
Post 22 Oct 2022, 13:05
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20333
Location: In your JS exploiting you and your system
revolution 22 Oct 2022, 13:07
You have to escape the inner brackets.
Code:
rept 1 { ... rept 0 \{ ... \} }    
Post 22 Oct 2022, 13:07
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1792
Roman 22 Oct 2022, 13:15
Thanks.
Work fine.
Post 22 Oct 2022, 13:15
View user's profile Send private message 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.