flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Directive for specific instruction set?

Author
Thread Post new topic Reply to topic
Dedec0



Joined: 18 Aug 2004
Posts: 5
Dedec0
Hello,

I would like to suggest that FASM could have a directive to choose the instruction set (IS) we want to use at specific times.
AFAIK, FASM will assemble the opcodes at the best way it knows. But if I want to assemble an opcode for specific processor (usually older ones), I don´t know how to.
An example would be the ROR (and the like) instruction, wich on 8086 do not admit immediate byte operand, it only RORs one bit.
The directive could be used like "use" directive.
I hope I was clear.

Thanks. See you.

Dedec0[/code]
Post 18 Aug 2004, 16:05
View user's profile Send private message Reply with quote
Dedec0



Joined: 18 Aug 2004
Posts: 5
Dedec0
Am I missing something here?
Post 19 Aug 2004, 16:56
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
maybe this way you could add also another families of processors, insted of another exectable (and thus keep fasm only-by-source-typed-executable). IBM compatible will be default, but could be changed by some directive in beginning of file. It will decide which "assemble.inc"-like module will be used for rest of preprocessing and assembling.
Post 20 Aug 2004, 19:41
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7750
Location: Kraków, Poland
Tomasz Grysztar
I have already preprared it by separating all the "x86.inc" functions from the main "assemble.inc" file - though to allow more different instruction tables, the processor switching directive would have to be recognized by parser. But that's not hard to do, only a bit of work would be needed to make the ".inc" files for other processors.
Post 21 Aug 2004, 16:26
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
of course, i meant parsing, not preprocessing.
Post 22 Aug 2004, 11:55
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number 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-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.