Sunday, January 26, 2020
Assembler, compiler and interpreter
Assembler, compiler and interpreter Assembler 1. An assembler is not equivalent to an interpreter, or compiler, assembly language is a low level language. 2. An assembler is one form of program translation. This is one relationship between assembler, compiler and interpreter. Each assembly language statement directly corresponds to one machine instruction. 3. The Assembler changes Assembly instructions into machine language, whereas a Compiler runs a higher level programming language instructions into Assembly instructions and then those are converted into executable machine language. 4. Accumulated programming languages normally generate lots of lines of Assembly instructions for each program report. 5. An assembler creates object code by changing symbols or substitute names into machine code.One could conclude that Assembly language is not a programming language at all, just guilty by association. Assembly language is nothing more than a shorthand system of writing, machine language, programs using symbols that friendless personality lacking, knuckle dragging WOW players, otherwise known as programmers, can understand. Compiler 1. A compiler converts an entire program written in source code and translates it into object code. 2. A second relationship is that the compiler and interpreter both process source code. 3. A compiler translates source code from a high-level programming language to assembly language/ machine code. A compiler works with what is called higher-levellanguages3rd generation languages, such as Java and C. Typically a person writes source code using an editor in a language such as C, Pascal or C++. The programmer then selects the appropriate compiler for the source code. Interpreter 1. Another relationship is that the interpreter is the step by step version of a compiler. Obviously this takes a lot of time and resources compared to previously compiled program. 2. An interpreter doesnt have to examine the entire program before it can begin executing code. 3. An interpreter is a computer program that takes source code and processes one line at a time. Interpreters translate code one line at time, executing each line as it is translated, Interpreters do generate binary code, but that code is never compiled into one program. Instead, the binary code is interpreted every time the program executes. Nonprocedural Language or Declarative language 1. Non procedural languages say what conditions the answer should match but not how to satisfy them. 2. With nonprocedural language you are stuck with whatever options the program allows 3. A Nonprocedural language example is Excels style of programming. Considered a 4th generation language also called declarative language. Structured Software 1. Structured software is for the most part fitting for applications that have many independent functions that do not correlate to a great extent. 2. This technique is not very fitting where data is going to change as opposed to the function 3. Structured programming is primarily a way of breaking a problem into routines. It gives emphasis to functionality without stressing the data. The most likely application is for problems where significant functionality is probably going to change rather than the data. At the point at which you have recognized the object boundary and you start writing the code to support them within the sections; it is common to change to a structured design. Structured software may fail on projects with 100,000 lines of source code or more. Object-Oriented Software 1. Object-oriented software makes it easier to develop, debug, reuse, and maintain software than is possible with other programming languages. 2. Object orientation takes the concepts of structured programming and puts it in 4-wheel drive. Object oriented software is equivalent to combining the usability of the fork and the food moving abilities of the spoon and comes up with a Spork. 3. object-oriented software is a computer program using object-oriented programming that revolves around the concept of an object. Object-oriented languages make it easier to reuse, and maintain software than is possible with other languages. Now, instead of data structures and separate program structures, both data and program elements are combined into one structure called an object. The object data essentials are called attributes, while the object program essentials are called methods. Together, attributes and methods are called the objects members. Usually, an objects methods are the only programs able to operate on the objects attributes. The easiest way to understand this is an analogy. Pretend you are building a house. With earlier generation programming, each and every component was written and designed for an exact function or result. This would be the same as making kitchen cabinets out of the lumber at the house piece by piece. Every house you built would require making cabinets at the location, out of the lumber that was supplied for the house. The sanity saving technique of object-oriented programming follows the logic of making a kitchen cabinet as a module. In programming terms, these cabinet modules are objects. This type of programming makes the effort much more efficient by allowing instructions from one program to be integrated into another. If for example a circle needs drawn on the screen you can use a circle object from another program. If the circle needs to be modified then a small amount of programming may be needed, but you no longer have to build it from scratch.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.