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: 221
alorent 07 Mar 2013, 05:42
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 08 Mar 2013, 16:37
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.