Features of High Level Programming Language
Mostly,
in computer architecture, contemporary programming is carried out using
high-level languages. It has the following characteristics:
·
Require
translation
·
Portable
·
Easier to
read, write and maintain as commands are similar to English
·
Allow
access to module libraries
·
Use data
types and data structures, selection statements and repetition/iteration
constructs
·
Use logic
operators and functions that are built into the language
Program Editors
The program editors or
text editors are software programs that enable the user to create and edit text
files. In the programming, the program editor usually refers to source code
editors that include many special features for writing and editing code. The Notepad
and Wordpad are common program editors on Window operating system and vi,
emacs, Jed, pico are the program editors on UNIX operating system. The text editors’
features are moving the cursor, deleting, replacing, pasting, finding, finding
and replacing, saving etc.
Program Translation
There is a
translator software in random access memory (RAM) during the program execution.
The translator software will take the code written in a high-level language and
translate it into an executable code. The executable code is in binary form and
can be understood by the processor. In high level programming language, there
is no one to one conversion between code and binary instructions.
There are
two forms of translator software; compiler or an interpreter.
CompilerThe compiler will
translate the source code into an object code. It is held in random access
memory (RAM) only for the time that it takes to translate the source code into
object code. The compilers will translate lines one after the other however they do not execute a line immediately after
translation. Instead, the object code file can be used to run the
program after translation. The run time is more efficient when the object code
creation by compiler however if there are errors in the source code, the
programmer will be responsible to re-compile for the corrected code.
Interpreters
The translation with interpreter will translate each line of code one
line at a time. The code will be executed once the line of code is translated
and if there is error, the interpreter will not move on to translate the next
line. The notification on the error will be sent immediately to user. The
interpreter is less efficient than a compiler because it is only presenting in
main memory during the program execution and for the execution of every line
only. The benefit of using an interpreter is that the execution will stop
immediately if the interpreter translates a line of source code that results in
an error. It will help the programmers to identify and rectify the errors. It
cannot determine the actual error but can indicate the line that was not
translated into executable machine code.
Assemblers
Assemblers are the program that translates assembly program (input) into object
code (output).
The
assembler is a software utility that takes an assembly program as input and
produces object code as output. The assembler views this file as a block of
memory starting at relative location 0.
There
are two general approaches of assemblers; Two-pass Assembler (more common) and One
pass Assembler.
In
the first pass of two-assembler, the assembler is only concerned with label
definitions which construct a symbol table that consists of label and location
counter values. The second pass reads the program again from the beginning.
The, each instruction is translated into the appropriate binary machine code.
It
is possible to implement as assembler that makes only a single pass through the
source code however the main difficulty in trying to assemble a program in one
pass involves forward references to labels. The instruction operands may be
symbols that have not yet been defined in the source program
Linking and Loading
Debuggers
In programming, the debugger is a program or
tool that can run other program
one line at a time. The debugger
can show exactly how the computer sees the code. The debugger shows what is happening in the program
at any moment in time, and allows to perform step by step through the program. Proper
use of the debugger is essential to finding semantic (logical) errors in how the
program behaves.