Hi. This is my contribution to FASM improvement :grin: and some experiment about scripting in the assembly languages at all. The idea is simple - this is new directive: "script". The sintax is:

script 'ScriptProg param1 param2 ... paramN'

This acts the folowing way: when preprocessor meets above construction, it executes the external program "ScriptProg" and captures whole text output of the script. Then the preprocessor includes this text at the position of the "script" directive.

So what is the purpose of scripting: at first for dinamic source generation, for example resource section, import section, some strange data sections, lookup tables etc. At second for fast syntax improvements of the FASM - appended example script "section.exe" makes possible to write source level libraries in one file, including in the source only some sections from library. Look in the directory: "ScriptDemo"

Any opinions are appreciated!

Posted on 2003-05-08 12:48:34 by JohnFound
Nice idea!

What about a directive which executes a program (with parameters) after the compilation process? For instance if you want to link the output-file after the compilation process, you could use something like: exec "alink -oPE ..."... What do you think? I'll try to add some stuff to FASM and show you what I mean...

Once again, very nice idea. ;)

Take care! Cheers!
Posted on 2003-05-08 13:33:08 by Tommy
Thank's Tommy!

About "post process" executables: IMHO this will be difficult to implement as part of fasm compiler. (fasmw as IDE is another deal. There it's possible to implement as IDE function.) But fasmw is dedicated to work mainly without linker...
Posted on 2003-05-08 13:51:38 by JohnFound
Ok, I see what you mean... Keep up good work ;)

Posted on 2003-05-08 14:13:55 by Tommy
Powerful, yet simple.
I have in mind several scripts to write and use following your approach.

Personalized programming languages on top of fasm...interesting but dangerous...do you remember Babel?

Posted on 2003-05-09 08:28:59 by pelaillo

A nice example of creative programming:alright:
Posted on 2003-05-10 03:29:45 by Vortex