Hello Privalov.

I have some new ideas about FASM improvements.
Yes, I know you are bored of advisers :)
But the ideas are good (IMHO) and I think
that you and the community must at least
discuss them.

1. Extended INCLUDE syntax:

"include filename,section"

The include file contains sections like INI file:



data1 RECT
data2 dd $1234
[code]
mov esi,data1
mov eax,

....
[/code]
This will give us possibility to write small source level
libraries that are entirely in one file and contains all
they need: data, code etc.


2. CGI like source generators. This is another extention of include command:

"include exefilename, params"

This variant of include acts like CGI script. Instead of including
file, the FASM executes the script "exefilename" with "params" and
inserts the standard output of the script in the source.
This is very powerfull command. I even can't imagine the full potentialities this command can provide.
One good using is auto generation of import section.
Posted on 2003-02-13 09:29:43 by JohnFound
I think the lproc macro does all the job of extended include file.
Posted on 2003-02-13 12:55:32 by Vortex
Can't you have more then one data section? Will FASM compress them into one?
Posted on 2003-02-13 15:01:52 by jInuQ
2Vortex:

No, I am not agree. More, I don't see any relation between lproc and extended include syntax.

2 jInuQ:

Actualy I don't know. I will make some tests. If it's possible, it is the same as my first idea and all will be OK.
Posted on 2003-02-13 15:41:30 by JohnFound
Are you wanting to make a FASMLIB or just be able to make libraries for yourself?

If you are wanting to make FASMLIB then take a look at my fasmlib thread which should be a couple below this thread.
Posted on 2003-02-13 16:51:45 by jInuQ
2jInuQ:
Hm. Actually I don't like the big libraries. IMHO the big libs make assembler like a HLL languages and this is not good. If I want big libs, ready for use, useful etc. I will use Delphi (BTW: I like Delphi and I write on Delphi very often) When I write on assembler I like somethink different. Like code snipeds, or small libs, where all is in one, two pages and I can change everything, don't thinking for standards and for the other applications. Assembler is a different language and needs some different type of libs. Maybe some database with code samples.

BTW: FASM have some tendency to compication (mainly in libs and standard includes), that I don't like too much. Good that Privalov holds the project more clean and simple. Other way leads to C->C++->C# :)
Posted on 2003-02-13 18:15:53 by JohnFound
To JohnFound and jInuQ,

You can have a look in my modest project :)

http://www.asmcommunity.net/board/index.php?topic=10663

Regards,

Vortex
Posted on 2003-02-14 05:13:19 by Vortex
2Vortex:

Hi, neighbour :)

Yes, I saw your project, but the case is absolutely different. You are using object files and link process to create executable. I know that in the object file I can put together data and code. But I want to make the same using only source files and compiling directly to exe file. IMHO this is one of the great features of the FASM.

BTW: My second idea (about CGI-like source creating) is more common and powerful. For example the first my idea - for sectioned include files may be realized with simple script program reading given section from include file and printing it to stdout.

Here is the simple example:


section 'data' ......

include 'section.exe', 'MyIncludeFile.inc, '

section 'code' ....

include 'sectionIt.exe', 'MyIncludeFile.inc, [code]'
[/code]

The program sectionIt.exe is simple console application that take 2 parameters: file name and section name, reads given section from the file and prints it to stdout. The FASM just take this output and include it in the source file the same way as normal include command.
Posted on 2003-02-14 05:55:47 by JohnFound
JohnFound,

Yes,I understand your idea.That's O.K. :alright: We must wait for Privalov's reply.
Neighbour,where are you from? :)

Regards,

Vortex
Posted on 2003-02-14 08:53:46 by Vortex
I am from BG.
And you are right about Privalov. He is the man who must sey his strong word Yes/No ;)
Posted on 2003-02-14 09:26:20 by JohnFound
Also maybe another way:

include 'a.inc'
include 'b.inc'

in 'a.inc':
section 'data' readable
db ?

in 'b.inc'
section 'data' writeable
dd ?

common result, after compiling:
section 'data' readable writeable
db ?
dd ?

thanks
Posted on 2003-02-14 09:39:53 by tserk
Vortex,
As JohnFound said, the biggest reason for my use of FASM is that you go from src to binary with out haveing to link. Thus the reason for my own FASM lib.

The abillity to output coff is quite important tho' as it allows people who like to or have to link, the option of using FASM and for contributing I would just like to say thanks.
Posted on 2003-02-14 14:32:58 by jInuQ
Maybe it would be better to make some compiler (like HLA) generating source for FASM and giving you such CGI-like features etc. and leave FASM as a low-level back-end as it is now.
Posted on 2003-02-16 15:36:28 by Tomasz Grysztar
Friends,now there are two kind of coders:
i)Peoples who like to link
ii)Peoles who don't like to link.

O.K. I am joking. Anyway,it's a personal choice to use a linker or not.

Regards,

Vortex
Posted on 2003-02-17 02:35:42 by Vortex