flat assembler
Message board for the users of flat assembler.
Index
> Windows > declaring api functions |
Author |
|
Tomasz Grysztar 24 Oct 2003, 18:20
It is covered in the FAQ on the main fasm's website.
|
|||
24 Oct 2003, 18:20 |
|
silkodyssey 24 Oct 2003, 19:12
Thank you, I'll check it out
_________________ silkodyssey |
|||
24 Oct 2003, 19:12 |
|
silkodyssey 24 Oct 2003, 20:18
I am having a problem with the EXTRN macro. Its giving me this error:
Code: flat assembler version 1.49 msgbox.asm [11]: EXTRN '__imp__MessageBoxA@16' as MessageBox:dword msgbox.asm [6] EXTRN [1]: if used symbol error: invalid expression. Make error(s) occured. Here's the code Code: format MS COFF macro EXTRN symbol { if used symbol extrn symbol end if } EXTRN '__imp__MessageBoxA@16' as MessageBox:dword include '%include%\win32a.inc' ;include 'c:\fasm\user32.inc' section '.text' code readable executable public start start: invoke MessageBox, 0 ,_caption , _message , 0 ret section '.data' data readable writeable _caption db 'Win32 assembly',0 _message db 'Coffee time!',0 _________________ silkodyssey |
|||
24 Oct 2003, 20:18 |
|
Tomasz Grysztar 24 Oct 2003, 23:58
This macro is designed only for the "EXTRN name" syntax, if you want to use the extended one, try something like:
Code: macro EXTRN symbol,name { if used symbol if name eq extrn symbol else extrn name as symbol end if end if } and use it like here: Code: EXTRN MessageBox,'MessageBoxA' |
|||
24 Oct 2003, 23:58 |
|
silkodyssey 25 Oct 2003, 01:11
Thanks Privalov it works like a charm, you're a genius . The file size went from 70kb down to 2kb . I can upload some of the includes I've converted from the masm32 package if anyone's interested.
_________________ silkodyssey |
|||
25 Oct 2003, 01:11 |
|
Vortex 25 Oct 2003, 08:41
Sikodyssey,
I have a tool converting masm32 include files to fasm includes: http://board.win32asmcommunity.net/showthread.php?s=&threadid=8994 _________________ Code it... That's all... |
|||
25 Oct 2003, 08:41 |
|
silkodyssey 25 Oct 2003, 14:04
I checked out your program. Just what I needed. If only I knew about it yesterday
_________________ silkodyssey |
|||
25 Oct 2003, 14:04 |
|
Vortex 25 Oct 2003, 20:07
Silkodyssey,
You can try also my "scanner" tool,it looks for API functions in the asm source file and creates a list declaring all the necessary functions.With this tool,you don't have to use API include files. You can have a look at: http://board.flatassembler.net/topic.php?t=72 _________________ Code it... That's all... |
|||
25 Oct 2003, 20:07 |
|
silkodyssey 25 Oct 2003, 20:57
This would be a great feature for fasmw. It would be more convient to have the source file scanned from the IDE and the functions declared there instead of having to run an external program.
_________________ silkodyssey |
|||
25 Oct 2003, 20:57 |
|
Tomasz Grysztar 25 Oct 2003, 21:00
Maybe it should become the part of FRESH project?
|
|||
25 Oct 2003, 21:00 |
|
Vortex 26 Oct 2003, 09:31
Nice idea.The problem is that I haven't much time for coding because of long working hours. Yet,I will think of coding a scanner DLL for the FRESH project.
_________________ Code it... That's all... |
|||
26 Oct 2003, 09:31 |
|
decard 26 Oct 2003, 12:46
Vortex,
Good work with your scan program . Unfortunately, it doesn't work with multi-sourcefile projects. Maybe you could add a feature that will also scan files included by the file given in command line? |
|||
26 Oct 2003, 12:46 |
|
Vortex 26 Oct 2003, 18:56
decard wrote: Maybe you could add a feature that will also scan files included by the file given in command line? Yes,I was thinking about this idea.It can be a solution for multi-source files. Thanks, Vortex _________________ Code it... That's all... |
|||
26 Oct 2003, 18:56 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.