Unit I Introduction To System Software and Machine Structure
Unit I Introduction To System Software and Machine Structure
INTERPRETERS:
It is a translator program that translates a statement of high-level language to
machine language and executes it immediately. The program instructions are
taken line by line.
The interpreter reads the source program and stores it in memory.
During interpretation, it takes a source statement, determines its meaning and
performs actions which increments it. This includes computational and I/O
actions.
Program counter (PC) indicates which statement of the source program is to be
interpreted next. This statement would be subjected to the interpretation cycle.
The interpretation cycle consists of the following steps:
o Fetch the statement.
o Analyze the statement and determine its meaning.
o Execute the meaning of the statement.
The following are the characteristics of interpretation:
o The source program is retained in the source form itself, no target program
exists.
o A statement is analyzed during the interpretation.
Interpreter Memory
Source
Program Program
counter
ASSEMBLERS:
Programmers found it difficult to write or red programs in machine language. In a
quest for a convenient language, they began to use a mnemonic (symbol) for each
machine instructions which would subsequently be translated into machine
language.
2
Such a mnemonic language is called Assembly language.
Programs known as Assemblers are written to automate the translation of
assembly language into machine language.
Assembler
Assembly language program Machine language program
Fundamental functions:
1. Translating mnemonic operation codes to their machine language equivalents.
2. Assigning machine addresses to symbolic tables used by the programmers.
Addressing modes:
Two types of addressing are available namely,
1. Direct addressing mode
2. Indexed addressing mode or indirect addressing mode
3
Mode Indication Target Address calculation
Direct X=0 TA=Address
Indexed X=1 TA=Address + (X)
Where(x) represents the contents of the index register(x)
Instruction set:
It includes instructions like:
1. Data movement instruction
Ex: LDA, LDX, STA, STX.
2. Arithmetic operating instructions
Ex: ADD, SUB, MUL, DIB.
This involves register A and a word in memory, with the result being left in the
register.
3. Branching instructions
Ex: JLT, JEQ, TGT.
4. Subroutine linkage instructions
Ex: JSUB, RSUB.
Input and Output:
I/O is performed by transferring one byte at a time to or from the rightmost 8 bits
of register A.
Each device is assigned a unique 8-bit code.
There are 3 I/O instructions,
1) The Test Device (TD) instructions tests whether the addressed device is
ready to send or receive a byte of data.
2) A program must wait until the device is ready, and then execute a Read
Data (RD) or Write Data (WD).
3) The sequence must be repeated for each byte of data to be read or written.
4)
1.3 SIC/XE ARCHITECTURE & SYSTEM SPECIFICATION
Memory:
1 word = 24 bits (3 8-bit bytes)
Total (SIC/XE) = 220 (1,048,576) bytes (1Mbyte)
Registers:
10 x 24 bit registers
MNEMONIC Register Purpose
A 0 Accumulator
X 1 Index register
L 2 Linkage register (JSUB/RSUB)
B 3 Base register
S 4 General register
T 5 General register
F 6 Floating Point Accumulator (48 bits)
PC 8 Program Counter (PC)
SW 9 Status Word (includes Condition Code, CC)
Data Format:
Integers are stored in 24 bit, 2's complement format
Characters are stored in 8-bit ASCII format
4
Floating point is stored in 48 bit signed-exponent-fraction format:
s exponent {11} fraction {36}
The fraction is represented as a 36 bit number and has value between 0 and 1.
The exponent is represented as a 11 bit unsigned binary number between 0 and
2047.
The sign of the floating point number is indicated by s : 0=positive, 1=negative.
Therefore, the absolute floating point number value is: f*2(e-1024)
Instruction Format:
There are 4 different instruction formats available:
Format 1 (1 byte):
op {8}
Format 2 (2 bytes):
Format 3 (3 bytes):
Format 4 (4 bytes):
6
SIC, SIC/XE ADDRESSING MODES
8
9