Assembly Language
The instructions like MOV or ADD are called as opcode. The assembler directives help the program in getting compiled and hence wont be there in the object code. The assembler directive EQU, when used in the instruction : Sum EQU 200 does, Replaces every occurrence of Sum with 200 purpose of the ORIGIN directive is, indicate the starting position in memory, where the program block is to be stored, directive used to perform initialization before the execution of the code is dataword. reserve directive is used to specify and assign the memory required for the block of code
Return directive specifies the end of execution of a program. The last statement of the source program is END, branching code Branch offset and replaces the Branch target with it. assembler stores the object code in magnetic disk. Loader is a utility program used to bring the object code into memory for execution . Two-pass assembler is used to overcome the problems of the assembler in dealing with branching code
High-level programming language
FORTRAN is older high-level programming language. C is the newest high-level programming language. Java is a high level language. Unlike languages such as FORTRAN, C source code is free-form which allows arbitrary use of whitespace to format code, High level language are close to human language eg : pascal, fortran. Low level language are close to machine language, that is assembly language
FORTRAN stands for formula translation
FORTRAN – used for scientific purposes and work is to be done in batches
PASCAL – General use and as a teaching tool
PROLOG – Artificial Intelligence
COBAL – business application
COMAL – common algorithmic language
LOGO – used to encourage logical thinking and for learning geometric shapes
Fourth generation – Artificial intelligence
Fifth generation – OOP
In programming language functions are used to implement top down logic and to enhance logical clarity. Functions can be replaced by values without changing meaning is called referential transparency. The period of time between allocation and its disposal is called life time. Common features in FORTRAN is not in followed by languages because now memory is not a problem and evolution of virtual memory. Aliasing –two commands with different name shares same code, a particular location is associated with two names
- Overloading- function with same names but different parameters,
- Dangling reference – accessing a variable which is declared but not initiated, Accessing a storage which is already disposed by the processor,
Jensen’s device uses property of name parameter. Binding can occur while writing/compiling a program or invoking a subprogram. Binding in a program is an association of an attribute with a program component such as an identifier or a symbol. Binding time for an attribute is the time at which the binding occurs. Binding cannot be done while loading. Top down parsing method handles left recursive grammer. COBOL is not well suited for calculation. Pascal is a procedural programming language, designed by Niklaus Wirth. Pascal is Algol-based language, Algol 60 is a subset of Pascal
Compilers for running pascal – Turbo Pascal, free pascal, turbo51 (8051), Delphi, oxygene, GNU pascal. In LINUX free pascal is of three versions – tar.gz , .rpm , .deb. The source files for Pascal programs are typically named with the extension.pas
Target of an assignment statement should be 1-value, Float is not a data type in pascal. Pascal data type is classified into three – structured, pointer and scalar. In Pascal when a text file is opened for reading then eof and eoln are set to false
Contents