3.4.2. Language Processors (Compilers)

 Idi na Hrvatsku Stranicu  Back  Software  Next


Binary form of writing instruction is very close and comprehensive digital computer, but not the man. This is the 'lowest' PROGRAMMING LANGUAGE, is closely tied to the hardware structure of a digital computer electronics. Binary instruction can be used only one who knows the hardware used by the computer, which includes extensive knowledge of electronics and computer science. Therefore, in the early use of computer techniques require specially trained staff. This way of managing computer was slow and laborious, subject to mistakes and unproductive, and is now no longer used. Therefore, programming languages have been developed that its set of software tools enable easier and more efficient programming. Each of the programming language in its composition has LANGUAGE PROCESSOR that programs written in that language TRANSLATES into a format that your computer recognizes and immediately executed or INTERPRETED.

If the binaries into a hex, writing instruction program is quite easy. Using compiler hex records are converted into binary. Appends to shorter name (mnemonic) for individual instruction, writing instruction in a series conceived logical sequence (program) has become even easier. Translation Programs of this type are called ASSEMBLER, assembler instruction count translates into the same number of binary instructions, and for any other type of processor using a different compiler. However, the programming is still a very demanding job.

Only the emergence of 'higher' level of programming languages has essentially facilitate the work of developers. With them is symbolically written instructions translates into a series of binary instructions, then an instruction programming language combines the number of binary instructions that constitute a single task, such as printing a character on screen or assignment variables ASCII value of a character and more. The development of computer systems have evolved and different programming languages according to usage, for example, COBOL, PASCAL, C, FORTRAN, ALGOL, and others.

When the program writes the instructions in one of these 'higher' language, that represent the original set of instructions (SOURCE) for the program, and then is translated using the translation program (COMPILER) into a set of binary instructions that the microprocessor can recognize and do, called EXECUTIVE (EXECUTABLE ) code. If you wish to make modifications to the operation of the program, then it needs to make the appropriate changes in the source code and re-execute the translation into executable code. Since there is no ideal compiler that will completely minimize the executable code, such programs are made slightly longer and slower than programs written in assembler, but the difference is of no significance in relation to the ease of application of higher programming languages.

Languages that use the translation program not only compiler that translates the source code as a module. Translated module should be added, but the needs of almost linguistic processor modules or other modules already made and all interconnected with software for connecting (LINKER) into a single entity enforceable.

As the binary code specific to DCS, the compiler can not apply one computing platform to another, but the source code can be translated into any platform, if it exists concurrent compiler. Thus, high-level programming languages and provides portability from platform to platform. DCS for which there are more translators for various programming languages systematically richer and more powerful. But here there is a lot of small details that make it impossible to just simply, for example, different standards for image resolution, different ways of storing data on disk, etc. which require a more thorough changes in transfer applications from one computing platform to another.

Some programming languages work on the principle of converting individual instruction language into binary instructions. Their interpreters are shorter and simpler, and does not produce executable code. Through simultaneous translation is executed source code itself. Such translators are called INTERPRETER, and the most famous of them is BASIC. Easier to eliminate errors during execution of the source code, but the execution of the program very slow due to multiple translations.


Example I

What is the difference in the efficiency of the writing and execution of programs written in ASSEMBLER and in a BASIC program?

                To solve one of the task-in assembler has been spent
                two days of work and 100 bytes of memory space of
                executable code. The same program made in BASIC made
                for one hour and takes up 250 bytes of memory space
                of executable code but can not work without a translator
                (194 kB) and slower over ten times.

These lack of interpreters is solved by compilers for interpreters, but not as efficiently as they do compilers aforementioned higher programming languages. However, the development of software tools that have been developed insight into the source code that later translate the principles of one of the following programming languages.

When the application together assembler and high-level programming languages are incorporated in some way the result of MACRO ASSEMBLER. The essence of the matter is that the sequence of assembly instructions connect into one macro instruction that has a symbolic name and as such repeatedly usable, but it is an arbitrary creation of programmers.

In Figure 3.4.5 shows the breakdown of language processors based on previously described.

 Language processors  iStripper
Figure 3.4.5 Division of language processors.  

Instruction language processors are written in one of the ASCII text EDITOR that does not support headers, centering text, alignment, etc., because that for this purpose is not necessary, but will have some other options as required programmer control safety instruction and similar names. Some programming languages have their own editor, essentially with the stated purpose. In addition, a substantial and scripting languages that are used for the administration of operating systems. In the Unix environment are very popular regarding maintenance of the server and its Web site, as BASH (also the user shell access system), AWK, PERL, Python, JavaScript, PHP and others.

Overall computer performance is based essentially on the following: processor receives data from input devices, processing them and make the result sent to the output device to display them to the user. Each processor has a set of instructions that are coded by NUMBERS. Execution of the program is essentially a copy numbers in working memory and their reading and execution by the processor. Each set of numbers arranged in a meaningful whole makes the PROGRAM, and the process of making and using the whole of one language processor is called PROGRAMMING. Sequence of language instruction processor, written in one of the editor, which will then translate them to the processor can execute, it must be logical and aligned with the MODEL unfolding tasks called ALGORITHM. The process of cooking food is nothing but respect algorithm called prescription.

Thus, the algorithm represents the logical sequence of tasks to be carried out to the original settings come to the desired result, and is made by connecting logical structures that display graphical shapes, usually to ANSI standard:

 Flow chart simbols
Figure 3.4.6 Graphical forms of logical structure to create a flow chart.

A series of interconnected logical structure represented by graphic symbols constitutes a FLOW CHART, shown graphically paths (flow), by which the program can be executed, and that actually describe the cause-and-effect relationships in the program. Flow chart or block diagram and a graphic design program task. Based on the flow diagram is a series of instructions written language processor. The first is the simplest logical structure, marks the beginning and end of the algorithm (program).

Second, the logical structure is used for operations that have one input and one output as a function, for example Y=f(X)=2•X admission is a size X and the function outputs a calculated value for the X. To enter X=2 output will be Y=4. Such structures are strung one above the other, forming a sequence (sequence) and represent the basic structure of the algorithm.

Conditional branching (SELECTION) is a choice between two possible ways of running the program, for example, for the previous function f(x)=2•X and condition f(X)>3 program will with X=1 were continuing onto 'YES' for X=2 to exit 'NO' (structure IF-THEN-ELSE). It is possible to edit out the picture which essentially does not change the decision, but only the direction of the picture.

Multiple repetition (ITERATION) may function calculation after a satisfied condition (structure DO-WHILE; probe so doing) or decision after calculating functions (structure DO-UNTIL; doing so probe). If, for example, input X=0, function f(x)=x+1 and the condition f(X)>3, the left shows the structure by examining forwards X=0 on the way out, and the right structure will increase X to get one until X do not assume some value X=4 which is transmitted to the output, then counts up 4th If the input X=7 right structure will increase to 8 ga and forwarded to the output, and the left will continually increase the value X one until it reaches the overflow register microprocessor (overflow). So, in assuming the conditions need to be sensitive and should be consistent with the value at the entrance to the type loop repeats. Left loop will work properly for f(x)<3 and will be passed on X=3 to exit.

Diverse programming techniques. Among the most widely used are:

MODULAR PROGRAMMING - based on the distribution of software functions into smaller INDEPENDENT modules between which communication is achieved by transferring the necessary operands. The modular structure allows the team work as the same module can be used in various other parts of the program or in other programs. For example, a module to delete data in a database will delete the data on the basis of input values as operands sequence numbers of data that are to be deleted. On the other values as operands module will serve to clear in another database of the same structure, but by other criteria, for example, by deleting the name rather than by ordinal number.

STRUCTURED PROGRAMMING - a way to write the program to be respected strictly followed by running the program or its modules. There are no jumps in the course of the program to the beginning or end of each direction are already running the program determines the choice of YES-NO. The modules are connected to each other hierarchically, each module has one of its parent (predecessor) to which was referred to as the top (beginning). Each module belongs to ONE of the levels of the structure and can have only one entry point. This allows the flow of control can be seamlessly monitored from start to finish for easy readability and debugging.

INTERACTIVE PROGRAMMING - technique when used for the production of ready-to-logical structures, for example, made by the supplier of the software tools, and the programmer is adjusted according to your needs and can work results immediately and tested. Productive but less systematic.

OBJECT-ORIENTED PROGRAMMING - was created as a response to the inability of defining global shared data in structured programming. Specifically, the individual modules for the use of common data and instead it passes through layers of the structure of the module that needs them, allowing the module to retrieve them directly regardless of the level in which it is located. Data and operations on these data are combined into groupings called OBJECT. All objects of the same type are to be classified in the CLASS and each of them has a separate state within the class. The class defines the common settings for all its objects that they can not be used and links to other classes. Association class creates a hierarchical structure of the program.

Each of the language processor uses his own set of commands, which are sequentially 'enter' according to the default syntax for its use with regard to the presented logical structure. Differences in the number of applied commands and how their use is very large, and in a general overview like this can not be easily explained. Thanks to the Internet and search engine like 'Google' may be a general example, such as printing text on screen 'Hello, world!', find how to use each of these. Definitely, each of the language processor differ significantly in the application if it is considered relative to one another. Peculiarities of some of the language processor are described on the following page.


 Back
 Search
 Next

Citing of this page:
Radic, Drago. " Informatics Alphabet " Split-Croatia.
{Date of access}; https://informatics.buzdo.com/file.
Copyright © by Drago Radic. All rights reserved. | Disclaimer
 Content - Home
 Content  Informatics Alphabet