flat assembler
Message board for the users of flat assembler.

Index > Windows > Recommended Tools

Author
Thread Post new topic Reply to topic
calm_observer



Joined: 08 Jan 2005
Posts: 17
Location: New Nexico, USA
calm_observer
I'm new to fasm, but not new to assembly language and would like some recomendations for any tools, IDEs etc. I have download a copy of the Borg disassembler. Thanks Very Happy

_________________
EDUCATION, n.
That which discloses to the wise and disguises from the foolish their lack of understanding.
Post 10 Feb 2005, 21:54
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
WHAT??? You haven't downloaded FASMW yet??? OK, just kiddin' just a hint that FASM is the best assembler there is.

Dissassembly is best with OllyDbg

P.S. There is nothing new to FASM if you have done ASM before. "mov eax, ecx" and "mul edi" are mostly similar in any assembler Wink
Post 10 Feb 2005, 22:28
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
calm_observer



Joined: 08 Jan 2005
Posts: 17
Location: New Nexico, USA
calm_observer
Madis731 wrote:
WHAT??? You haven't downloaded FASMW yet??? OK, just kiddin' just a hint that FASM is the best assembler there is.

Dissassembly is best with OllyDbg

P.S. There is nothing new to FASM if you have done ASM before. "mov eax, ecx" and "mul edi" are mostly similar in any assembler Wink


thanks madis. I downloaded the console version. I'll probably download the windows version also, but for the immediate furture the console version will work all right for what I need to do right now. Or are there some other reasons for using the GUI version? I'll also check out OllyDbg as you have recommended.

I've used nasm in the past which had a list option, but with the size optimization that fasm does thats not an option hence the need for the disassembler. i.e. I want to generate some sloppy, size wise, code and see if fasm optimizes the way I expect (hope?) it will.

I'm also concerned about 'protecting' registers (esi and edi and perhaps ebx) as I will need them for software data structures. Thanks again

_________________
EDUCATION, n.
That which discloses to the wise and disguises from the foolish their lack of understanding.
Post 10 Feb 2005, 23:48
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
calm_observer wrote:
I downloaded the console version. I'll probably download the windows version also, but for the immediate furture the console version will work all right for what I need to do right now. Or are there some other reasons for using the GUI version?


Well, you asked about IDE - FASMW is pretty handy IDE even for big sized applications. Also, check Fresh: http://fresh.flatassembler.net

Regards
Post 11 Feb 2005, 06:44
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
If you worry about FASMWs thickness then I have to say that it is one of the lightest I've seen. Its only a wrap around FASM "engine" with real-time syntax highlighting. It is very convenient to hit F9 to see if your program works - you have everything in one window. I just don't get the idea of using notepad (or other texteditor) and then saving and then compiling and then switching back to notepad (or other) to find the errors by line number. FASMW shows you the exact location and with macros it even cuts it down to pieces and you can follow the path to the lowest level what caused the error.

What comes to sloppy code - assemblers in general are not designed to do speed/size optimizations on it. What this size optimization means is that the shortest (and maybe the fastest) form of codesequence is chosen that does NOT alter the outcome of the instruction.
Example: When you multiply in C/#/++ compiler would usually try to replace constants with ADDs, SUBs and SHL(R)s like
Code:
imul eax,eax,3 ;eax=eax*3

; vs.

lea eax,[eax+eax*2] ;eax=(eax+eax*2)
    

What FASM can do for you is when it finds a jump - it sees if it could pack it short and when you use lea eax,[eax+eax] it might prefer using lea eax,[eax*2] instead (I don't recall if it is shorter this way)

Protecting registers is as easy as it can get:
Code:
proc
  push esi edi ebx ;short-hand form of series of push

  ...;some code

  pop ebx edi esi
  return
endp
    


P.S. I have heard that OllyDbg 2.0 is being developed - Very Happy the tracing should be better hundred fold yet the interface should remain rather simple - the way I like it.
Post 11 Feb 2005, 08:39
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
gumletis



Joined: 18 Dec 2004
Posts: 128
gumletis
And the ndisasm is good for decompile source code for see what i does(or your own code if you wanna see what the assembler changes for you(AUTOMATIC!)).... Smile
Post 11 Feb 2005, 08:57
View user's profile Send private message Reply with quote
calm_observer



Joined: 08 Jan 2005
Posts: 17
Location: New Nexico, USA
calm_observer
Madis731 wrote:
...What comes to sloppy code - assemblers in general are not designed to do speed/size optimizations on it....


Madis... you are correct it does not do what I expected or rather hoped for. I had expected it to be able to take code such as the following:

Code:
        push    edx
        xchg    eax, edx
        lea     eax, [ebx+X]
        mov     eax, [eax]
        add     eax, edx
        pop     edx    


and reduce it to the following:

Code:
        add     eax, [ebx+X]    


It doesn't Sad Back to the drawing board...Thanks

_________________
EDUCATION, n.
That which discloses to the wise and disguises from the foolish their lack of understanding.
Post 11 Feb 2005, 21:03
View user's profile Send private message Reply with quote
gumletis



Joined: 18 Dec 2004
Posts: 128
gumletis
but there is always radasm, but its most commen used for masm and nasm, but its still okay, but even when i don't know fresh by johnfound, i would recommen to use that, its sounds alot better then radasm. And if you come from a asm where the use addr and/or offset, that we don't use in fasm Razz we just use mov eax,ebx and if you wanna do it offset lea eax ebx ....
Post 12 Feb 2005, 12:54
View user's profile Send private message Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend
gumletis, I can't understand what you meant in the last sentence. What did you mean by saying we don't use offsets in fasm? Even tough the second example is incorrect:
Code:
lea eax,ebx    

Will not compile. It should be:
Code:
mov eax,ebx
lea eax,[ebx]    

But these two do the same! So plz explain it more

Returning to main question. Tools I use:
- OllyDbg
- Intereactive Dissasembler (shorter IDA)
- Fresh
- Hiew
- ResHacker

Btw. I am writing ResCracker, my owen vision of resource viewer/editor written in fasm of course Wink
Post 12 Feb 2005, 13:35
View user's profile Send private message Visit poster's website Reply with quote
gumletis



Joined: 18 Dec 2004
Posts: 128
gumletis
owh, lol sorry Embarassed , i mean we use offset, just not like mov eax,offset something
or how they do it in masm or tasm or what else they use it in

_________________
LOOOL
Post 12 Feb 2005, 14:43
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
my favourite for disassembly is IDA, you can write scripts to auomatize some task (naming of windoze's flags, changing value of arguments to proper types, even ORed flags etc.)
Post 12 Feb 2005, 18:11
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
beppe85



Joined: 23 Oct 2004
Posts: 181
beppe85
calm_observer wrote:
Code:
        push    edx
        xchg    eax, edx
        lea     eax, [ebx+X]
        mov     eax, [eax]
        add     eax, edx
        pop     edx    


and reduce it to the following:

Code:
        add     eax, [ebx+X]    

I find this subject very interesting. The snippet you posted hardly anyone would write, but after macro-expansion, could appear sequences like this. Can someone show some patterns that we could indeed write?

_________________
"I assemble, therefore I am"

If you got some spare time, visit my blog: http://www.beppe.theblog.com.br/ and sign my guestmap
Post 13 Feb 2005, 04:02
View user's profile Send private message Reply with quote
calm_observer



Joined: 08 Jan 2005
Posts: 17
Location: New Nexico, USA
calm_observer
beppe85 wrote:
calm_observer wrote:
Code:
        push    edx
        xchg    eax, edx
        lea     eax, [ebx+X]
        mov     eax, [eax]
        add     eax, edx
        pop     edx    


and reduce it to the following:

Code:
        add     eax, [ebx+X]    

I find this subject very interesting. The snippet you posted hardly anyone would write, but after macro-expansion, could appear sequences like this. Can someone show some patterns that we could indeed write?

Your correct beppe, no self respecting programmer would write such code. The source for it could look like this:
Code:
  x @ +    

See Factor Computer Language http://factor.sourceforge.net/

_________________
EDUCATION, n.
That which discloses to the wise and disguises from the foolish their lack of understanding.
Post 13 Feb 2005, 23:19
View user's profile Send private message Reply with quote
calm_observer



Joined: 08 Jan 2005
Posts: 17
Location: New Nexico, USA
calm_observer
JohnFound wrote:
Well, you asked about IDE - FASMW is pretty handy IDE even for big sized applications. Also, check Fresh: http://fresh.flatassembler.net

Regards


I'm honored that you should reply to my question (actually I have just now realized who you are Embarassed ...may I ask how is the developement of Fresh going and how stable is it?

_________________
EDUCATION, n.
That which discloses to the wise and disguises from the foolish their lack of understanding.
Post 13 Feb 2005, 23:29
View user's profile Send private message Reply with quote
calm_observer



Joined: 08 Jan 2005
Posts: 17
Location: New Nexico, USA
calm_observer
I noticed in another thread an interest in making fasm into a dll http://board.flatassembler.net/topic.php?t=2917 has anyone attempted to do it? I think it's a bit more invloved than suggested by Privalov our Site Admin, but he should know more than I. Anyway it seems that the first thing that must be done is to free a register to use for instance variables? Anyway I'm looking into it if anyone is interested let me know.

I figure it's a good start at getting to know the internals of the assembler which I'll have to do since I want to add some peephole (aka pinhole) optimization to do what I want to do.

_________________
EDUCATION, n.
That which discloses to the wise and disguises from the foolish their lack of understanding.
Post 13 Feb 2005, 23:45
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
calm_observer wrote:
...may I ask how is the developement of Fresh going and how stable is it?


Well, unfortunately it goes slower than I wish, but it goes. Currently I am working on new concept about visual editing, that will save a lot of code for creating and initializing controls and other objects.
Except some features, not finished yet, Fresh is pretty stable and I use it on regular basis in my job to write some machine control applications.
The debuger is still not working as it is planed, but you can use OllyDbg as external debuger.

Regards.
Post 14 Feb 2005, 04:09
View user's profile Send private message Visit poster's website 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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.