�Chapter-3�Programming the Basic Computer �
Introduction
Machine Language
…….but the computer can execute programs only when they are represented internally in binary for programs written in any other language must be translated to the binary representations before they can be executed by the computer.
2. Octal or hexadecimal code. This is an equivalent translation of the binary code to octal or hexadecimal representation.
3. Symbolic code. The user employs symbols (letters, numerals, or special characters) for the operation part, the address part, and other parts of the instruction code.
Each symbolic instruction can be translated into one binary coded instruction.
This translation is done by a special program called an assembler.
Because an assembler translates the sym bois, this type of symbolic program is referred to as an assembly language program.
Assembly Language
Rules of the Language
1. The label field may be empty or it may specify a symbolic address.
2. The instruction field specifies a machine instruction or a pseudo instruction.
3. The comment field may be empty or it may include a comment.
1. A memory-reference instruction (MRI)
2. A register-reference or input-output instruction (non-MRI)
3. A pseudo instruction with or without an operand
Pseudo instruction
The Assembler
Representation of Symbolic Program in Memory
line of code
Example : PL3, LDA SUB I
First Pass
Second Pass
Program Loops
Programming Arithmetic�and Logic Operations
Multiplication Program
Flow Chart Description
Double-Precision Addition
Logic Operations
Shift Operations
Subroutines
Input-Output Programming
Program Interrupt