flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Unexpected handling of labels

Author
Thread Post new topic Reply to topic
Frank



Joined: 17 Jun 2003
Posts: 100
Frank
FASMW 1.49 (interface 0.90) seems to handle some label names (specifically: E2, and E6 -- there may be more) in an unexpected way. I don't see anything special about these names, maybe someone can explain it.

Here is sample code, derived from the FASM example HELLO.ASM:

Code:
include '%include%/win32ax.inc'

.data
E2      db 'Title',0
E6      db 'Text',0
_E2     db 'Title',0
_E6     db 'Text',0

.code
start:  invoke  MessageBox,HWND_DESKTOP,E2,E6,MB_OK
        invoke  MessageBox,HWND_DESKTOP,_E2,_E6,MB_OK
        invoke  ExitProcess,0
.end start
    


Here is the disassembly:
Code:
00402000                    start:
00402000 6A00                   push    0
00402002 6A00                   push    0
00402004 6A00                   push    0
00402006 6A00                   push    0
00402008 FF156A304000           call    dword ptr [MessageBoxA]
0040200E 6A00                   push    0
00402010 6811104000             push    401011h
00402015 680B104000             push    40100Bh
0040201A 6A00                   push    0
0040201C FF156A304000           call    dword ptr [MessageBoxA]
00402022 6A00                   push    0
00402024 FF1554304000           call    dword ptr [ExitProcess]
    


Regards, Frank
Post 04 Dec 2003, 21:14
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7796
Location: Kraków, Poland
Tomasz Grysztar
Oops, fasm sees E2 used in expresison as a floating point number (same as 0E2) - this is of course a bug, thanks for the report (will be fixed in 1.50).
Post 04 Dec 2003, 21:27
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.