flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Code execution at assemble-time?

Author
Thread Post new topic Reply to topic
bitRAKE



Joined: 21 Jul 2003
Posts: 4039
Location: vpcmpistri
bitRAKE 07 Nov 2007, 17:30
Is it possible to modify FASM to execute code prior to completion of assembly process? I'd like to code macro-like routines in x86 for use at assembly time.
Post 07 Nov 2007, 17:30
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8353
Location: Kraków, Poland
Tomasz Grysztar 07 Nov 2007, 17:32
That's an interesting idea, and I was thinking about it already a long time ago, but the main problem with that was the fasm's portability. Also this would be a perhaps very exploitable feature.
Post 07 Nov 2007, 17:32
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4039
Location: vpcmpistri
bitRAKE 07 Nov 2007, 17:42
Maybe, we have even talked about it in the past? Rolling Eyes
Post 07 Nov 2007, 17:42
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 07 Nov 2007, 22:20
What if this feature supports only a subset of the CPU instructions? Things like not supporting any kind of branching instructions nor memory operands nor system instructions. In such case fasm would need to support register initalization before entering the assembly block.

Although this way reduces the usability a lot, at least we could have FPU/SSE operations that are not available in the interpreter layer.
Post 07 Nov 2007, 22:20
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.