flat assembler
Message board for the users of flat assembler.

Index > Main > Possible bug in proc macro (Edited)

Author
Thread Post new topic Reply to topic
Indrekis



Joined: 24 Sep 2006
Posts: 2
Location: Ukraine, Lviv
Indrekis
I am relatively new to the fasm, so excuse me if I just do not understand something.

Fragment of code:
Code:
format COFF
include 'macro/proc32.inc'
section '.text' code
public test1  as "_test1"
proc test1 a:dword, b:dword
local c1:dword
        ret
endp
    

fails to assemble, producing error message:
Code:
flat assembler  version 1.67.9  (215266 kilobytes memory)
pub.asm [6]:
local c1:dword
<PATHTOFASM>/fasm/win/INCLUDE/macro/proc32.inc [262] local [40]:
       match , done@local \\{ varname vartype
error: illegal instruction.
    


But it looks, like this code do not contradict the documentation.
Furthermore, this code assembles successfully if either
Code:
public test1  as "_test1"
    

or
Code:
local c1:dword
    

is commented out!

Code, using locals assembles normally:
Code:
format COFF
include 'macro/proc32.inc'
section '.text' code
public test1  as "_test1"
proc test1 a:dword, b:dword
locals
ci      dd      ?
endl
        ret
endp
    

Result:
Code:
flat assembler  version 1.67.9  (212249 kilobytes memory)
3 passes, 110 bytes.
    


I have tested this using fasm 1.66 and 1.67 under WindowsXP.

P.S. Some mistypes were corrected during editing Embarassed


Last edited by Indrekis on 24 Sep 2006, 06:24; edited 1 time in total
Post 24 Sep 2006, 03:30
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17247
Location: In your JS exploiting you and your system
revolution
You must type DWORD in capitals.
Code:
format COFF 
include 'macro/proc32.inc' 
section '.text' code 
public test1  as "_test1" 
proc test1 a:DWORD, b:DWORD 
local c1:DWORD 
        ret 
endp    
Post 24 Sep 2006, 05:53
View user's profile Send private message Visit poster's website Reply with quote
Indrekis



Joined: 24 Sep 2006
Posts: 2
Location: Ukraine, Lviv
Indrekis
Thank you for the quick and useful answer Smile

Using capital letters really helped, by I am still wondering, why it do assembled without public directive...
Post 24 Sep 2006, 06:30
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
because then the "test1" symbol wasn't used, so the procedure didn't even try to be assembled.

but i think it isn't mentioned in manual...
Post 24 Sep 2006, 09:37
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
okasvi



Joined: 18 Aug 2005
Posts: 382
Location: Finland
okasvi
weird that it requires capitals, I think I saw Tomasz saying somewhere here on board that he'll change it to accept lower-case too? And iirc it wasnt very long time ago like within 4months or so Neutral
Post 24 Sep 2006, 12:53
View user's profile Send private message MSN Messenger 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.

Powered by rwasa.