Preview

The Use of Compiler in Machine Coding

Satisfactory Essays
Open Document
Open Document
396 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
The Use of Compiler in Machine Coding
COMPAILERS
Definition
A compailer acceepts aprogram writen in a highlevel languages as input and produces its machine language equivalent as output .
General model of compailer
In analysing the compilation of our simple pl/program w e found distinct logical problems as follows
1. Lexical analsys- recognitio of basic elements and ceratin of uniform symbols
2. Sysnax analysis- recgonition of syntactic constructs through reductions
3. Implementation-definition of exat meanings creatin of matrix and tables by action routines
4. Machine independent optimization-creation of more optimal matrix
5. Storage assignment- modification of identifier and literal tables.it makes entries in matrix that allow code generation to creat code that allocates dynamic storage,and also allow the assembly phase to reserve the proper amounts of STATIC storsge.
6. Code generation-use of macro processor to produce more optimal assembly langage.
7. Assembly and output-resolving symbolic addresses(lables)and generating machine language.
Databases which are used by the compailer
A. Source code- in our example the PL/I program
B. Uniform symbol table –consist of full or partial list of the tokens’as they appear in the program. created by lexical analysis and used for syntax analysis and interpretation
C. Terminal table- a permanent table which lists all key words and specal symbols of language in symbolic form
D. Identifier table –contans all veriables in the program and temparary storage and any information needed to reference or allocate storage of them ;created by lexical analysis,modified by interpretation and storage allocation,and referenced by code generation and assembly.the table may also cotains information of all temparary locations that the compailer creates for use during execution of the source program
E. Literal table-contains all constants in the program creation and use similar to D above.
F. Reductions –permanent table of decision rules in the form of

You May Also Find These Documents Helpful

  • Good Essays

    In this phase a token is generated against all the lexemes in the source code. These lexemes and tokens are stored in the Symbol Table. Tokens against the lexemes are generated based on some patterns or rules.…

    • 703 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Arrays store items that have the same type of data type like a group of employees’ names and social security numbers for a team of 2000 personal. Pointer is a variable that greatly extends the power and flexibility of a program, each memory location that is used to store data value has an address. The address provides the means for a PC hardware to reference a particular data item.…

    • 485 Words
    • 2 Pages
    Good Essays
  • Good Essays

    Comp 220

    • 1463 Words
    • 6 Pages

    Pointers are, essentially, address variables, or variables that hold as their value the address of other variables. In terms of memory management, they are very powerful devices, and they more closely and efficiently use the actual internal hardware registers of the microprocessor that the program operates on.…

    • 1463 Words
    • 6 Pages
    Good Essays
  • Satisfactory Essays

    f. The set of all strings consisting of the keyword begin, followed by zero or more statements with a semicolon after each one, followed by the keyword end. Use the non-terminal for statements, and do not give productions for it.…

    • 470 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Intro the Programming

    • 386 Words
    • 5 Pages

    The _______ is the memory address that is saved by the system when a method is called and is the location to which…

    • 386 Words
    • 5 Pages
    Satisfactory Essays
  • Good Essays

    To apply the stored-program concept, central processing unit (CPUs) are designed to recognize instructions encoded as bit patterns. This collection of instructions along with the encoding system is called the machine language. An instruction expressed in this language is called a machine-level instruction or, more commonly, a machine instruction.…

    • 458 Words
    • 2 Pages
    Good Essays
  • Powerful Essays

    Located in the internal memory is where the list of instructions (computer programs) is stored on a hard drive. The hard drive is a semi-permanent storage area of a computer. There computer programming languages can be added, deleted or modified by the user to perform a variety of operations and task.…

    • 1318 Words
    • 6 Pages
    Powerful Essays
  • Better Essays

    In addition, assembly language allows programmers to utilize symbolic addresses to replace numeric memory addresses in binary bits to execute a command or input data. Computer specialist can link symbolic labels to an instruction or piece of data in the program. In other words, the symbolic label turns into a permanent tag for the instruction or piece of data disregarding where it populates in the program or where it relocates in the memory. However, machine language is more complicated. To perform an instruction or input data in the memory in a specific location, the computer specialist must specify the direct address. For example, “In machine language, to jump to the instruction stored in memory location 18, you must specify directly to address 18 (write JUMP…

    • 2002 Words
    • 9 Pages
    Better Essays
  • Good Essays

    Binary Code

    • 597 Words
    • 3 Pages

    The number that comes before one of these abbreviations represents the computer's memory capacity. For…

    • 597 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Week 1 Homework

    • 843 Words
    • 5 Pages

    2. What does a compiler do? What kinds of errors are reported by a compiler?…

    • 843 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    Homework CH 1 Java

    • 723 Words
    • 5 Pages

    2. Languages that let you use a vocabulary of descriptive terms, such as read, write, or…

    • 723 Words
    • 5 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Chapter 2: Data Manipulation Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear Copyright © 2012 Pearson Education, Inc. Chapter 2: Data Manipulation • • • • • • 2.1 Computer Architecture 2.2 Machine Language 2.3 Program Execution 2.4 Arithmetic/Logic Instructions 2.5 Communicating with Other Devices 2.6 Other Architectures Copyright © 2012 Pearson Education, Inc. 0-2 1 Computer Architecture • Central Processing Unit (CPU) or processor – Arithmetic/Logic unit versus Control unit – Registers • General purpose • Special purpose • B Bus • Motherboard Copyright © 2012 Pearson Education, Inc. 0-3 Figure 2.1 CPU and main memory connected via a bus…

    • 783 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    Set a breakpoint to pause execution of the program at a given line number. It can also print the value of a variable during execution also run a single line of program code, pausing after it completes.…

    • 567 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    Table 2 provides a more exhausting presentation of the spread of names in the group of names with logic content. It provides the distributions of those names among eleven categories of names, and shows the frequency with which those procedures are used within each class.…

    • 1622 Words
    • 7 Pages
    Powerful Essays
  • Good Essays

    int function1(char x) { //parameter x passed to the function, function returns an integer value…

    • 1596 Words
    • 7 Pages
    Good Essays