Hi I am a newbie to Assembler  construction .I am basically a hardware Designer .....We are currently developing a RISC micro controller  and it has 35 Instructions ....We have realized the MC on FPGA ...and We need to write an assembler for  particular RISC controlller code named 'RT7'....

could you help us ....What would be a a good starting point  ....Currently we are hand Assembling the program...

thanks in advance .....

with regards
Posted on 2011-02-04 21:55:02 by blooz
It depends on the complexity and intent of the assembler. If you are looking to make a macro assembler, you can look at assemblers such as NASM, FASM and YASM for ideas. FASM has an ARM add-on (FASMARM) that might give you more specific ideas.

If you want to rapidly prototype the assembler without committing to a final design/implementation just yet, you can utilize NASM's, FASM's or YASM's preprocessor to build the syntax via macros. I know, at least with NASM, that you have the option to "preprocess only" and use that output for manual verification. PERL, PHP or any other Regular Expression capable scripting languages are also good alternatives for rapid prototyping.

Other questions also come to mind, such as:
1.) Is this for in-house development, or to be shipped with the controller and thus require maximum portability?
2.) Does it have to support object formats? E.g. ELF, AOUT, custom, etc.
3.) Do you have the capability to program this in-house?

Short of specifics, you can find multitudes of a tutorials/guides/books by searching Google for "how to build a compiler" (not assembler) or similar terms. THIS LINK is a pretty decent summary of the compilation process.
Posted on 2011-02-05 10:29:24 by SpooK
Here is a more traditional book involving the subject matter: http://www.davidsalomon.name/assem.advertis/AssemAd.html
Posted on 2011-02-05 11:02:53 by SpooK