flat assembler
Message board for the users of flat assembler.

flat assembler > Windows > External function scanner for Fasm

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
Vortex



Joined: 17 Jun 2003
Posts: 334
Here is the external function scanner V3.00.
There is nothing new about the scanner;I only replaced the two
examples with new ones:Privalov's opengl demo and a simple
menu example.

You can find here more about the tool:

http://board.win32asmcommunity.net/showthread.php?s=&threadid=13287


Description: External function scanner for Fasm
with examples

Download
Filename: ScannerV3.ZIP
Filesize: 25.26 KB
Downloaded: 418 Time(s)


_________________
Code it... That's all...
Post 08 Jul 2003, 09:32
View user's profile Send private message Visit poster's website Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 334
Version 3.11
=========

Now,the scanner creates import scripts with decorated names for use with MS Link.
The scanner counts the parameters of the invoked API functions and
generates the decorated external names.Note that the scanner doesn't
do any checking for the parameter numbers.

Direct call:
Code:
extrn '__imp__MessageBoxA@16' as MessageBox:dword
    


Indirect call:
Code:
extrn '_MessageBoxA@16' as MessageBox
    


For the indirect call,you need to use a modified version of stdcall.inc
which can be found in the attachment.

You can specify full paths in scan.ini
Thanks Inskipp for the bug report.

The examples in the attachment are built for:
a)Fasm without any linker
b)Fasm+MS Link (direct/indirect call)
c)Fasm+GoLink

Friends who are interested in using Fasm+MS Link with undecorated
names can have a look at:

http://board.win32asmcommunity.net/showthread.php?s=&threadid=13805


Description: External function scanner V3.11
Download
Filename: Scan311.zip
Filesize: 21.24 KB
Downloaded: 279 Time(s)


_________________
Code it... That's all...
Post 09 Jul 2003, 09:16
View user's profile Send private message Visit poster's website Reply with quote
BiDark



Joined: 22 Jun 2003
Posts: 110
Location: .th
Thanks for the release. Razz
Post 09 Jul 2003, 09:25
View user's profile Send private message Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 334
BiDark,

You are welcome.
Thanks for your "indect call" idea.Image

_________________
Code it... That's all...
Post 09 Jul 2003, 09:35
View user's profile Send private message Visit poster's website Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 334
Version 3.12
=========

Now,you can redirect the message output of the scanner to a text file:

Code:
scan sample.asm -f2 >msg.txt
    


Fixed bug about some invalid warning messages.
Thanks Scientica for his bug report.


Description:
Download
Filename: scan312.zip
Filesize: 21.44 KB
Downloaded: 325 Time(s)


_________________
Code it... That's all...
Post 16 Jul 2003, 13:05
View user's profile Send private message Visit poster's website Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 334
Here is the new version 3.2 which is able to handle projects with multiple source files.

Example:

To "scan" a project composed of source files main.asm, string.asm and graphproc.asm, you create a file with the .prj extension.

Myproject.prj:

Code:
main.asm
string.asm
graphproc.asm
    


To run the scanner:

Code:
scan Myproject.prj
    


To scan a unique source file:

Code:
scan sourcefile.asm
    


Important notice for Fasm COFF output to be linked with MS Link,code sections should be declared as the following to avoid duplicate code sections:

Code:
section '.text' code readable executable
    


Like as the previous versions, the scanners supports also Masm,Tasm,GoAsm plus LzAsm.

11-26-2003, 9 dl, Fixed bug with newline


Description:
Download
Filename: Scan320.zip
Filesize: 16.18 KB
Downloaded: 250 Time(s)


_________________
Code it... That's all...


Last edited by Vortex on 26 Nov 2003, 20:03; edited 1 time in total
Post 26 Nov 2003, 10:02
View user's profile Send private message Visit poster's website Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1095
Location: Poland
Very good work, Vortex! Thanks!
Only thing is that when there is no newline at the end of *.prj file, it can't open last file from the list.
Post 26 Nov 2003, 12:18
View user's profile Send private message Visit poster's website Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 334
Decard,

Thanks for your kind words. I fixed the bug.

New upload at the top.

_________________
Code it... That's all...
Post 26 Nov 2003, 20:06
View user's profile Send private message Visit poster's website Reply with quote
silkodyssey



Joined: 02 Oct 2003
Posts: 205
Location: St.Vincent & the Grenadines
vortex,

Nice tool reduces compile time Smile but I have an idea Smile Why don't you entend it to include support for structures and equates? Smile

_________________
silkodyssey
Post 26 Nov 2003, 21:29
View user's profile Send private message MSN Messenger Reply with quote
silkodyssey



Joined: 02 Oct 2003
Posts: 205
Location: St.Vincent & the Grenadines
I have another question vortex. What are the limitations? Does it support all api functions or only functions from the most used dlls like (kernel32, user32,gdi32 ).

_________________
silkodyssey
Post 26 Nov 2003, 21:40
View user's profile Send private message MSN Messenger Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1095
Location: Poland
You are not limited to this DLLs, file scan.ini contains a list of the libraries to scan, you can even add there your own ones.
Post 27 Nov 2003, 08:13
View user's profile Send private message Visit poster's website Reply with quote
silkodyssey



Joined: 02 Oct 2003
Posts: 205
Location: St.Vincent & the Grenadines
LOL I knew scan.ini was there but I never bothered to check it. Anyway I like this approach. I can include only the dlls that I use. Smile

_________________
silkodyssey
Post 27 Nov 2003, 09:29
View user's profile Send private message MSN Messenger Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 334
Hi silkodyssey,

Just as Decard said, there is no limit for the DLL list. You put the required/frequently used DLLs to the listing file scan.ini

I will think about of adding the feature of scanning structures and equates.

I have a couple of questions:

Do you use the scanner with other assemblers?

Is there an alternate linker which should be supported by the scan tool?
The linker from the Pelles C package,polink is compatible wih MS link. So,the switches -dc,-id (direct and indirect call) are O.K. with polink.

_________________
Code it... That's all...
Post 27 Nov 2003, 10:12
View user's profile Send private message Visit poster's website Reply with quote
silkodyssey



Joined: 02 Oct 2003
Posts: 205
Location: St.Vincent & the Grenadines
vortex,

Its interesting you should ask if I use scanner with any other assemblers Smile I would like to use it with HLA because this tool would be more useful for HLA than any of the other assenbers because HLA has the slowest compile time Smile. If you're interested in adding support for HLA I can give you an example of HLA's external function declaration syntax Smile

_________________
silkodyssey
Post 27 Nov 2003, 11:52
View user's profile Send private message MSN Messenger Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 334
Hi Silkodyssey,

I never tried HLA. Still ,can you present an external function declaration in HLA? I know that HLA is based on Masm,so I guess the declaration style must be similar to that of Masm.

Thanks,

Vortex

_________________
Code it... That's all...
Post 28 Nov 2003, 18:47
View user's profile Send private message Visit poster's website Reply with quote
silkodyssey



Joined: 02 Oct 2003
Posts: 205
Location: St.Vincent & the Grenadines
HLA generates masm (fasm also ) code but its syntax is a little different.

The syntax for api functions is.

Code:
 

CreateWindowEx : Procedure 
    ( 
            P0 : DWORD;
            P1 : DWORD;
            P2 : DWORD;
            P3 : DWORD;
            P4 : DWORD;
            P5 : DWORD;
            P6 : DWORD;
            P7 : DWORD;
            P8 : DWORD;
            P9 : DWORD;
            P10 : DWORD;
            P11 : DWORD
    ); 

    


It's not necessary to have the parameters on different lines though.

A problem you might have with HLA is that the api functions can be invoked without the call instruction with just the api name Smile. Here's an example:

Code:
 

MessageBox( 0,  "Text","Text", MB_OK ); 

    

_________________
silkodyssey
Post 28 Nov 2003, 18:58
View user's profile Send private message MSN Messenger Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 334
Thanks for the example. API functions invoked without the call statement seems to be a potential problem for the scanner.Imagine the tool scanning every item in the source file,it's a lot of processing time.

_________________
Code it... That's all...
Post 28 Nov 2003, 19:04
View user's profile Send private message Visit poster's website Reply with quote
silkodyssey



Joined: 02 Oct 2003
Posts: 205
Location: St.Vincent & the Grenadines
vortex wrote:

Thanks for the example. API functions invoked without the call statement seems to be a potential problem for the scanner.Imagine the tool scanning every item in the source file,it's a lot of processing time.


I don't have to imagine because I tried it Very Happy

_________________
silkodyssey
Post 28 Nov 2003, 19:09
View user's profile Send private message MSN Messenger Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 334
Hi friends,

Here is a new package with the manual and examples builded for Fasm V1.52

To Privalov,

Could you add my tool to the examples section of your website?


Description:
Download
Filename: Scan321.zip
Filesize: 20.27 KB
Downloaded: 274 Time(s)


_________________
Code it... That's all...
Post 28 Apr 2004, 18:58
View user's profile Send private message Visit poster's website Reply with quote
Tommy



Joined: 17 Jun 2003
Posts: 492
Location: Norway
This is a unique tool! I love it! Wink What about a tools section, Privalov - for tools like this?
Post 03 Jun 2004, 12:19
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< 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-2019, Tomasz Grysztar.

Powered by rwasa.