flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > PROC (bug?)

Author
Thread Post new topic Reply to topic
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji

a error ? yes, maybe (with xx)
but certainly not on line 11

with "bts ebx,1" or "bts ebx,3" ...
it does compile without problem.

but with "bts ebx,2, it doesn't compile.


Code:
include 'win32a.inc'

xx equ 2

stdcall toto,eax

proc toto xx:dword

mov eax,[xx]

bts ebx,2  ;<--- line 11: error invalid value

endp
    

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 23 Apr 2011, 23:48
View user's profile Send private message Send e-mail Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Take a look at http://board.flatassembler.net/topic.php?t=12790

If you replace all "xx" occurrences with "2" it becomes more obvious the relationship with the link above.
Post 24 Apr 2011, 00:11
View user's profile Send private message Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji

ok, understood (tks Loco)
indeed, this below does compile


Code:
include 'win32a.inc'

;xx equ 2

stdcall toto,eax

proc toto 2:dword

mov ebx,[2]

endp
    

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 24 Apr 2011, 00:30
View user's profile Send private message Send e-mail Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
If the preprocessor is supposedly correct in the treatment of numbers then a fix could be modifying PROC to make it declare an assembly-time variable with the name of the parameter suffixed with some local symbol. I think that should be enough to restrict the valid names to the ones the assembler stage accepts as name symbols.
Post 24 Apr 2011, 15:42
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 YouTube, Twitter.

Website powered by rwasa.