flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
coconut 30 Mar 2006, 13:20
do you mean simplified/shortened? check the fasmw examples folder for a macro version. that example there is a raw way of building a pe executable, which is why it looks so complicated for such a simple task
|
|||
![]() |
|
Urff 30 Mar 2006, 13:48
Of course I checked the fasmw examples before I wrote thread here. I was trying to compile that example but there is mistake or something wrong there. That is why I found this example and want to know how to simplified it.
|
|||
![]() |
|
RedGhost 30 Mar 2006, 15:14
Urff wrote: I found such example of the Hello World, see below: it's not really possible to optimize just two API calls, but if you want to make it smaller, remove the data section and make it all one giant section Code: section '.flat' code readable writeable executable and the imports can be merged aswell Code:
section '.idata' import data readable writeable
to Code:
data import
;;;
end data
you could also remove Code: jmp .local1 it is not needed _________________ redghost.ca |
|||
![]() |
|
Urff 30 Mar 2006, 15:39
Ок, I downloaded zip-archive fasmw 1.65.17, open example Hello World and see next when compile:
Error: setting already Specified Display: Instruction: entry Source: Hello.asm[12] win32ax.inc[136] What is wrong? |
|||
![]() |
|
Tomasz Grysztar 30 Mar 2006, 16:49
Error in win32ax.inc[136] means that you either specified entry point with the "entry" directive and ".end" macro, or used ".end" macro twice.
|
|||
![]() |
|
Urff 30 Mar 2006, 19:02
I did nothing, only compile Hello.asm from the Examples folder of the fasmw 1.65.17 distributive. Please,see below:
Code: format PE GUI 4.0 entry start include 'win32ax.inc' .code start: invoke MessageBox,HWND_DESKTOP,"Hi! I'm the example program!","Win32 Assembly",MB_OK invoke ExitProcess,0 .end start I still can't understand where is the mistake? I didn't do anything, only open file Hello.asm and push run only...... |
|||
![]() |
|
Tomasz Grysztar 30 Mar 2006, 20:57
Remove "entry start", ".end start" is enough to declare entrypoint here.
|
|||
![]() |
|
Urff 31 Mar 2006, 08:31
@Tomasz Grysztar thanks, but the other examples in the examples directory also have mistakes...
|
|||
![]() |
|
Tomasz Grysztar 31 Mar 2006, 09:33
In what examples directory?
|
|||
![]() |
|
Madis731 31 Mar 2006, 11:11
I checked - the ones that come with 1.65.17 - no mistakes found!
|
|||
![]() |
|
RedGhost 31 Mar 2006, 14:17
Madis731 wrote: I checked - the ones that come with 1.65.17 - no mistakes found! as did i, and the hello example does not have 'entry start' as it makes use of the '.end label' macro _________________ redghost.ca |
|||
![]() |
|
Urff 31 Mar 2006, 17:41
Fasmw 1.65.17 arhive - Example directory, I was trying only examples for Windows, and everytime to run the example, I need to copy this example to the Include directory to run it... And in most attempts difficulties in at the running
Code: include 'win32ax.inc' I understand what is the mistake of Code: include 'win32ax.inc' The correct code must be Code: include '%path to the Include directory%\win32ax.inc' I'm just starting to learn my fist programming language and I chose fasm, so now I have some difficulties and problems, I can't find any good fasm's source in the Internet on my native language that is why I'll will learn it with the help of this site and help of the members of this forum. |
|||
![]() |
|
RedGhost 01 Apr 2006, 01:52
Urff wrote:
wise choice ![]() _________________ redghost.ca |
|||
![]() |
|
UCM 01 Apr 2006, 02:29
Urff wrote:
Wrong. The newer versions of FASM (i think 1.63 and above, correct me if i am wrong) will automatically look for win32ax.inc (or anything else you include) first in the current directory, then relative to the %INCLUDE% environment variable (if it exists). Therefore, if you have the %INCLUDE% environment variable set to the correct directory, then Code: include 'win32ax.inc' _________________ This calls for... Ultra CRUNCHY Man! Ta da!! *crunch* |
|||
![]() |
|
Urff 01 Apr 2006, 17:31
This may be works in the exe.install archive but not in the zip's one!...
|
|||
![]() |
|
Tomasz Grysztar 01 Apr 2006, 17:53
The section "1.1.1 System Requirements" of FASM.PDF contains the installation instructions.
|
|||
![]() |
|
UCM 01 Apr 2006, 18:25
There is no exe install archive. The idea is basically: you have to set the INCLUDE environment variable yourself.
|
|||
![]() |
|
Urff 01 Apr 2006, 18:34
Thanks again to Tomasz Grysztar.....
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.