flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > Bug in FASM .IF macro

Author
Thread Post new topic Reply to topic
alorent



Joined: 05 Dec 2005
Posts: 201
alorent
Hi all,

Not sure if this has been reported, but the following assembles with no problems:

Code:
include 'win32ax.inc'

.code

  start:

    .while eax & ~ebx

            mov     eax, ebx

            .if (ebx = eax)

                mov     ecx, 1

            .endif 

        .endif
        
        add     esi, 5

    .endw

.end start   
    


Notice the double .endif and a single .if

Thanks!
Post 07 Mar 2013, 05:42
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
alorent,

Why do you think it's a bug? This compiles too (though it may look odd).
Code:
include 'win32ax.inc'

.code
  start:
    .if (eax=1)
      .while eax & ~ebx
        mov     eax, ebx
        .if (ebx = eax)
          mov     ecx, 1
        .endif
    .endif
        add     esi, 5
      .endw
.end start    
Post 08 Mar 2013, 16:37
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.