|
How a computer processes information Over the years many machine code programs have been written to do common tasks, for example to display a message on the screen in a similar manner to that shown in the sample program. Although this is a program in its own right it could be run many times with a different message if a different set of characters is used. In a large program this could be regarded as a sub-routine being run many times but only included in the main code once. Many common tasks can be run as sub-routines in machine code. It was realised that these subroutines could be made into individual commands in a similar way to that of the individual instructions. Each command would do a specific job, for example the display a message could have the name DISPLAY which could place on the screen a string of characters defined as a string variable. A set of successive memory locations hold a string of data, in this case characters. The variable would need to be defined early in the program and used whenever it was required, but it could be redefined at any time in the program. A sample program is given below:
This is called a high level language as it is very much easier to use than the assembly language. Most applications are written today in a High Level Programming Language such as Basic All-purpose Symbolic Instruction Code (BASIC); COBOL; FORTRAN; C ; C++ or Java to name but a few.
|
