Thursday, October 9, 2008

Question #5

Research in the net the most recent assembler. Describe its history, nature and applications. Evaluate this assembler from its predecessor.


Assemblers
For any given personal computer, mainframe, embedded system, and game console, both past and present, at least one--possibly dozens--of assemblers have been written. For some examples, see the
list of assemblers.
On
Unix systems, the assembler is traditionally called as, although it is not a single body of code, being typically written anew for each port. A number of Unix variants use GAS.
Within processor groups, each assembler has its own dialect. Sometimes, some assemblers can read another assembler's dialect, for example, TASM can read old MASM code, but not the reverse. FASM and NASM have similar syntax, but each support different macros that could make them difficult to translate to each other. The basics are all the same, but the advanced features will differ.
Also, assembly can sometimes be portable across different operating systems on the same type of
CPU. Calling conventions between operating systems often differ slightly to none at all, and with care it is possible to gain some portability in assembly language, usually by linking with a C library that does not change between operating systems. However, it is not possible to link portably with C libraries that require the caller to use preprocessor macros that may change between operating systems.
For example, many things in
libc depend on the preprocessor to do OS-specific, C-specific things to the program before compiling. In fact, some functions and symbols are not even guaranteed to exist outside of the preprocessor. Worse, the size and field order of structs, as well as the size of certain typedefs such as off_t, are entirely unavailable in assembly language, and differ even between versions of Linux, making it impossible to portably call functions in libc other than ones that only take simple integers and pointers as parameters.
Some higher level computer languages, such as
C, support Inline assembly where relatively brief sections of assembly code can be embedded into the high level language code. Borland Pascal also had an assembler compiler, which was initialized with a keyword "asm". It was mainly used to create mouse and COM-port drivers.
Many people use an
emulator to debug assembly-language programs.






Cite your reference.
Due: October 6

No comments: