Sunday, September 28, 2008

Title: Question #:3

Research in the net what is the best assembler and why.

Answer:

Table Driven Assembler

The Table Driven Assembler (TDASM) is a free portable cross assembler for any kind of assembly language. It should be possible to use it as a compiler to any target microprocessor using a table that defines the compilation process.


Main features

  • possible compilation to any target procesor using a table description that will include:
    • definition of target procesor's properties
      • endianess
      • size of basic number types
      • registers and their sizes
      • instruction format
    • definition of syntax of assembly language
      • syntax of numbers with different bases
      • syntax of comments
      • instruction separators
      • strings definition and generation
    • means to control the code generation
      • variable size of any part of instruction support
      • commands to set any part of instruction to general expression
      • modification of any bits of instruction part
      • directives for branch code generation on condition
      • source code's symbol table administration directives
    • definition of general operands using regular expressions with automatic code generation
    • instruction table definition using general operands and regular expressions
    • support for symols in source code
    • support for general expressions in source code
    • instruction and operand prefixes support
    • possibility to define more instruction sets depending on processor mode
    • segmentation support
  • full object oriented design
  • implemetation using Standard Template Library of ISO C++
  • portable to many platforms on source level
  • distributed under the GNU Public License (GPL) version 2

Notes

This project is under developement at school, so many features are not implemented yet. You can download and try developement version. There are two examples of tables that define compilation process to procesors Intel x86 and Zilog Z80. Tables are not complete, they serve only as an ilustration what the implemented prototype can do.

Compilation

  • decompress the source code: tar zxvf tdasm-?.?.?.tar.gz
  • type ./configure to create makefiles for your system
  • compile using make
  • optionaly install into /usr/local/bin by executing make install

Usage

tdasm

The result of execution is an output binary file source_file.out and a file with listing source_file.lst.

Download

Tabular description of Intel x86
Test source code for Intel x86
Tabular description of Zilog Z80
Test source code for Zilog Z80
Source code of latest snapshot
Binary executable code for Linux 2.2 i386
Binary executable code for DOS/Windows

Like many of life's questions, there is no simple answer to the question "which assembler is best?" This is because different people have different criteria for judging what is "best". Without a universal metric for judging between various assemblers, there is no way to pick a single assembler and call it the best.

Maybe for me, no assembler is the best. Because each of us have own opinion about the assembler.

Cite your reference. under Linux RedHat 6.0 under KDevelop 1.1 environment as the school project.http://www.penguin.cz/~niki/tdasm/
Due: September 22, 2008

No comments: