Re: Best tools for writing an assembler?

glen herrmannsfeldt <gah@ugcs.caltech.edu>
Wed, 19 Feb 2014 04:25:33 +0000 (UTC)

          From comp.compilers

Related articles
Best tools for writing an assembler? tpphysik@gmail.com (2014-02-18)
Re: Best tools for writing an assembler? cbergstrom@pathscale.com (=?ISO-8859-1?Q?=22C=2E_Bergstr=F6m=22?=) (2014-02-19)
Re: Best tools for writing an assembler? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2014-02-19)
Re: Best tools for writing an assembler? ivan@ootbcomp.com (Ivan Godard) (2014-02-18)
Re: Best tools for writing an assembler? sebastien.fricker@gmail.com (=?ISO-8859-1?Q?S=E9bastien_Fricker?=) (2014-02-19)
Re: Best tools for writing an assembler? bobduff@TheWorld.com (Robert A Duff) (2014-02-19)
Re: Best tools for writing an assembler? bobduff@shell01.TheWorld.com (Robert A Duff) (2014-02-19)
Re: Best tools for writing an assembler? tpphysik@gmail.com (=?ISO-8859-1?Q?Patrik_T=FAri?=) (2014-02-20)
Re: Best tools for writing an assembler? sebastien.fricker@gmail.com (=?ISO-8859-1?Q?S=E9bastien_Fricker?=) (2014-02-21)
[19 later articles]
| List of all articles for this month |

From: glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups: comp.compilers
Date: Wed, 19 Feb 2014 04:25:33 +0000 (UTC)
Organization: Aioe.org NNTP Server
References: 14-02-018
Keywords: assembler
Posted-Date: 19 Feb 2014 17:21:59 EST

tpphysik@gmail.com wrote:


> I want to write an assembler for my own processor architecture. It
> would be of middle complexity. What language/tools would you use?
> I'm thinking of perl or C++, maybe with some (which?) program library.
> What about flex/bison, are those good for this, how hard are they to
> use? Once I have written a very simple assembler in C++, but now I
> want more functions and proper error messages as well. Thank you for
> your help.


The easiest way to write an assembler is to write macros for an
existing macro assembler that will generate the appropriate bytes.
(Assuming memory is byte oriented.)


That also gives you a macro facility without extra work.


You don't say if you need macros, though.


Otherwise, it should be pretty easy with flex/bison.


-- glen


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.