flat assembler
Message board for the users of flat assembler.

Index > Windows > FASM untypical problem

Author
Thread Post new topic Reply to topic
AsmER



Joined: 25 Mar 2006
Posts: 64
Location: England
AsmER 15 Apr 2006, 01:36
Hi everybody,

Why fasm doesn't generate any errors in code bellow only because this procedure is not called in the whole program:
Code:
proc    MyPorc
        mov al, st ; NO COMMENT
        ^%$£^%$£"^%$£"^%$£"
        WOW. I'm here
        TNO 10, eax ;The New Opcode, can force cpu to move value from eax to 10
        ret
endp     
Shocked And is it possible to force fasm to check everything in source code, even if I do not using all of that things Question
PS
Sorry if I should posted it in Feedback forum

_________________
;\\ http://theasmer.spaces.live.com \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Post 15 Apr 2006, 01:36
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20363
Location: In your JS exploiting you and your system
revolution 15 Apr 2006, 03:27
The "proc" macro has the "if used [proc name]" so all code is ignored unless the proc is actually used. To solve your problem you can edit the proc and endp macros to remove "if used .." and "end if".
Post 15 Apr 2006, 03:27
View user's profile Send private message Visit poster's website Reply with quote
UCM



Joined: 25 Feb 2005
Posts: 285
Location: Canada
UCM 15 Apr 2006, 12:50
well then if it is not used it will be stored in the file anyway.. maybe you could put it into a virtual 0 and use some 'store's, but i dunno..
Post 15 Apr 2006, 12:50
View user's profile Send private message Reply with quote
AsmER



Joined: 25 Mar 2006
Posts: 64
Location: England
AsmER 15 Apr 2006, 18:04
Ok. Thanks.

And by the way, if [my_var_name] mean the value in my_var_name, then what's wrong with that:

push byte [my_var_name] ; when my_var_name variable was definied by DB directive. (Error: invalid size of operand)
pop byte [pfd.cColorBits] ; pfd.cColorBits definied as BYTE

Does it mean, that I can't use 8bits push and pop instructions?
Sorry, but I'm new in fasm, and sometimes I asking stupid questions. thx again.

_________________
;\\ http://theasmer.spaces.live.com \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Post 15 Apr 2006, 18:04
View user's profile Send private message Reply with quote
shism2



Joined: 14 Sep 2005
Posts: 248
shism2 15 Apr 2006, 20:35
You just have to do this

Myproc1 dd MyPorc

You have to state at least the name of the proc somewhere in the program
Post 15 Apr 2006, 20:35
View user's profile Send private message Reply with quote
UCM



Joined: 25 Feb 2005
Posts: 285
Location: Canada
UCM 15 Apr 2006, 21:59
push and pop can each only be 32 and 16 bits.. you just can't push/pop a byte.
Post 15 Apr 2006, 21:59
View user's profile Send private message Reply with quote
TDCNL



Joined: 25 Jan 2006
Posts: 56
TDCNL 16 Apr 2006, 09:34
shism2 wrote:
You just have to do this

Myproc1 dd MyPorc

You have to state at least the name of the proc somewhere in the program


Then the whole procedure will be included in the executable code too Wink

_________________
:: The Dutch Cracker ::
Post 16 Apr 2006, 09:34
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 17 Apr 2006, 11:34
...but its only for debugging, so why not?
If you really don't want to add procedure to your executable, then the use of virtual can help you out as UCM suggested...
Post 17 Apr 2006, 11:34
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 17 Apr 2006, 18:28
shism: put this data in virtual block, so there won't be those unneeded 4bytes:

Code:
virtual
dd SomeProcedure
end virtual    


but i suggest separate macro package for debugging version, without if used. or, if you are good with macros, you can edit it so that it will check for some symbol. Or it can be done without preprocessor, with something like "if used a | defined debug", but then compilation will be slower
Post 17 Apr 2006, 18:28
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number 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.