flat assembler
Message board for the users of flat assembler.

Index > Main > procs and constants

Author
Thread Post new topic Reply to topic
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 11 Aug 2005, 23:50
why this code works
Code:
proc procedure
endp
call procedure
procedure = 0
mov al, procedure    
but this doesn't
Code:
call procedure
proc procedure
endp
procedure = 0
mov al, procedure
    
?
Post 11 Aug 2005, 23:50
View user's profile Send private message Reply with quote
THEWizardGenius



Joined: 14 Jan 2005
Posts: 382
Location: California, USA
THEWizardGenius 12 Aug 2005, 01:19
Neither of those should work, FASM doesn't have the word "proc" like MASM or TASM. However, I would guess it's probably because you have to declare the procedure first (MASM and TASM are dangerously close to being HLL's).
Post 12 Aug 2005, 01:19
View user's profile Send private message AIM Address Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 12 Aug 2005, 01:47
THEWizardGenius, I'm using the "proc" macro, both codes start with this:
Code:
format PE GUI 4.0
include 'win32axp.inc'
.code    


The non working code fails to compile at the line "procedure = 0", the error is "already defined", but the first one has not that problem.
Post 12 Aug 2005, 01:47
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8349
Location: Kraków, Poland
Tomasz Grysztar 12 Aug 2005, 10:18
That was a small bug which caused assembler to think that "procedure" is just a numeric constant (which can be redefined when is not forward referenced) - I've fixed it and silently updated the 1.64 package on the website. Wink Thanks for finding it out!
Post 12 Aug 2005, 10:18
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 12 Aug 2005, 14:50
Jajajaja, OK. Now I tested the new FASM 1.64 SE (Silently Edition Razz) and both codes doesn't works.

Thanks for fixing it!Very Happy
Post 12 Aug 2005, 14:50
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.