Thursday, September 25, 2008

Assemblers :Indroduction

The design and implementation of assemblers. There are certain fundamental functions that any assembler must perform, such as translating mnemonic operation codes to their machine language equivalents and assigning machine addresses to symbolic labels used by the programmer. If we consider only these fundamental functions , most assemblers are very much like.
Beyond this most basic level, however , the features and design of an assembler depend heavily upon the source language it translates and the machine language it produces. One aspect of this dependence is , of course, the existence of different machine instruction formats and codes to accomplish(for example) an ADD operation. As we shall see, there are also many subtler ways that assemblers depend upon machine architecture. On the other hand , there are some features of an assembler language ( and the corresponding , assembler) that have no direct relation to machine architecture – they are , in a sense, arbitrary decisions made by the designers of the language.
We begin by considering the design of a basic assembler for the standard version of our Simplified Instructional Computer (SIC). Its a most fundamental operations performed by a typical assembler , and describes common ways of accomplishing these functions. The algorithms and data structures that we describe are shared by almost all assemblers. Thus this level of presentation gives us a starting point from which to approach the study of more advanced assembler features. We can also use this basic structures as a framework from
Which to begin the design of an assembler for a completely new or unfamiliar machine.
We examine some typical extensions to the basic assembler structure that might be dictated by hardware considerations. We do this by discussing an assembler fo the SIC/XE machine ( XE means Xtra Equipment). Although this SIC/XE assembler certainly does not include all possible hardware-dependent features , it does certain some of the ones most commonly found in real machines. The principles and techniques should be easily applicable to other computer.
We briefly consider some examples of actual assemblers for real machines. We focus on the most intresting features that are introduced by hardware or software design decisions.

Assemblers translate mnemonic code into machine language. Using some functions , assembler directives , etc ,…

No comments: