SSMOD1
SSMOD1
SSMOD1
KTU ASSIST
type of computing system being supported. These are known as machine-
independent features.
· For example, the general design and logic of an assembler is basically the same
on most computers.System software can be broadly classified into
System control programs: controls the execution of program manages the
storage, processing resources of the computer and performs other
management and monitoring functions. Operating systems, DBMS and
communication monitors are the examples of such systems.
System support programs: provide routine service functions to the other
computer programs and computer users. Eg: Utilities, libraries,
performance monitors and job accounting.
System development programs: programs assist in the creation of
application program.
TYPES OF SYSTEM SOFTWARE:
1. Operating system
2. Language translators
a. Compilers
b. Interpreters
c. Assemblers
d. Preprocessors
3. Loaders
4. Linkers
5. Macro processors
Operating System
It is the most important system program that act as an interface between the users
and the system. It makes the computer easier to use.
It provides an interface that is more user-friendly than the underlying hardware.
The functions of OS are:
1. Process management
2. Memory management
3. Resource management
4. I/O operations
5. Data management
6. Providing security to user’s job.
Language Translators
It is the program that takes an input program in one language and produces an output in
another language.
Language
Source Program Translator Object Program
Compilers
A compiler is a language program that translates programs written in any high-
KTU ASSIST
level language into its equivalent machine language program.
It bridges the semantic gap between a programming language domain and the
execution domain.
Two aspects of compilation are:
o Generate code to increment meaning of a source program in the execution
domain.
o Provide diagnostics for violation of programming language, semantics in a
source program.
The program instructions are taken as a whole.
Compiler
High level language Machine language program
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.
Such a mnemonic language is called Assembly language.
Programs known as Assemblers are written to automate the translation of
assembly language into machine language.
KTU ASSIST
Assembly language program
Fundamental functions:
Assembler
Machine language program
APPLICATION SOFTWARES
Application software is a computer software which is designed to help the user in performing
single or multiple related tasks. In other words, application software is actually a subclass of
computer software, which employs the capabilities of a computer directly to a task that the user
wishes it to perform. Hence, often application software is looked upon as software as well as its
implementation.
There are different types of application software, which include Enterprise Resource Planning
Software, Accounting Software, Customer Relationship Management Software, Graphics
Software, Media Players, etc.
It is specific purpose
Purpose It is general-purpose software.
software.
Time Sharing,
Resource Sharing,
Client Server
Classificat Package Program, Batch Processing Operating System
ion Customized Program Real time Operating System
Multi-processing Operating System
KTU ASSIST
Multi-programming Operating System
Distributed Operating System
Application Software
System Software Create his own
Environm performs in a environment
environment to run itself and run other
ent which created by
application.
System/Operating System
Data Formats
Integers stored as 24 bit binary numbers.
For storing negative numbers, 2’s complement representation is used
Characters are stored using their 8 bit ASCII codes.
Supports floating point data items. Floating point is used in 48 bit signed exponent
fraction format.
Instruction Format
- Four different instruction formats
Format 1
1 byte / 8 bits
Format 2
2 bytes / 16 bits
Format 3
3 bytes / 24 bits
Format 4
4 bytes / 32 bits
- Formats 1 and 2 do not reference memory at all.
- Formats 3 and 4 introduce addressing mode flag bits.
Flag e:
e=0, Format 3
e=1, Format 4
Flag p:
p=1, Program Counter Relative Addressing
Flag b:
b=1, Base Register Relative Addressing
Flag x:
x=1, Indexing (uses index register)
Flag i:
i=1, Immediate Addressing
Flag n:
n=1, Indirect Addressing
Instruction Set
- Supports all instructions that are available on standard SIC
Data Movement Instructions
LDCH – Load Accumulator with character
STCH – Store the character on accumulator to specified location
LDX – Load X register
STX – Store the content of X register to specified location
Integer Arithmetic Operating Instructions
ADD, SUB, MUL, DIV
Involves register A and a word in memory, with the result being left in A
register.
Floating Point Arithmetic Instructions
ADDF, SUBF, MULF, DIVF
F stands for floating point.
Compare Instruction
COMP
Compares a value in A with a word in memory and set the condition code CC
to indicate the result of <, > and =
Branching Instructions (Conditional Jump Instructions)
Test the settings of CC and jump accordingly.
JLT – Jump on less than
JEQ – Jump on Equal
JGT – Jump on Greater Than
Subroutine Linkage Instructions
JSUB – Jumps to the subroutine placing the return address in register L.
RSUB – Returns by jumping to the address contained in register L.
Register Related Instructions
Involves instructions for register manipulation, operands-from-registers and
register-to-register arithmetic operations.
RMO – Register Move
AADR, SUBR, MULR, DIVR – Register Arithmetic Operations
COMPR – Register Comparison
SHIFTR – Register Shift
Supervisor Call Instructions
Generates an interrupt that can be used for communicating with the
operating system
Input and Output Operations
- Performed by transferring one byte at a time to or from the rightmost 8 bits of A.
- Each device is assigned a unique 8-bit code.
- Three I/O instructions, each of which specifies device code a s an operand.
TD (Test Device)
Test whether the addressed device is ready to send or receive a byte of
data.
Condition Code is set to indicate the result of this test.
If CC is <, the device is ready.
If CC is =, the device is not ready.
RD (Read Data)
For reading data from I/O device.
WD (Write Data)
For writing data to I/O device.
- Programmed I/O
Devices may input or output data while CPU is busy with other works
Three instructions are provided for handling programmed I/O
SIO – Start I/O
HIO – Halt I/O
TIO – Test I/O
Addressing Modes
- Refers to way in which the operand of an instruction is specified.
- Instruction format 3 and 4 introduce addressing mode flag bits.
- Format 3
3 bytes / 24 bits
- Format 4
4 bytes / 32 bits
Flag e:
e=0, Format 3
e=1, Format 4
Flag p:
p=1, Program Counter Relative Addressing
Flag b:
b=1, Base Register Relative Addressing
Flag x:
x=1, Indexing (uses index register)
Flag i:
i=1, Immediate Addressing
Flag n:
n=1, Indirect Addressing
Immediate Addressing Mode
i=1, n=0
Operand is directly given in the instruction
No memory reference
Direct Addressing mode
b=0, p=0
Address of operand is provided in the instruction
Indirect Addressing Mode
i=0, n=1
The word at the location given by the target address is fetched. The value
contained in this word is taken as the address of the operand value.
Base Register Relative Addressing
b=1, p=0
Operand will be available at the location obtained by adding the content of
Base register and the value of displacement field.
Target Address calculation
TA = [B] + disp
Program Counter Relative Addressing
b=0, p=1
Operand will be available at the location obtained by adding the content of
Program Counter and the value of displacement field.
Target Address calculation
TA = [PC] + disp
Indexed Addressing Mode
x=1
Content of X register is added with the address/disp for the target address
calculation
TA = Address/disp + [X]
Indexed Addressing Mode can be combined with PC Relative and Base
Relative Addressing Modes. In this case, content of X register is also added
for the target address calculation.
Simple Addressing Mode
i=0, n=0 or i=1, n=1
Value of address filed is the location of the operand.
- Example:
opcode n i x b p e Displacement/address
1 000000 1 1 0 0 1 0 0110 0000 0000
2 000000 1 1 1 1 0 0 0011 0000 0000
3 000000 1 0 0 0 1 0 0000 0011 0000
4 000000 0 1 0 0 0 0 0000 0011 0000
5 000000 1 1 0 0 0 1 0000 1100 0011 0000 0011
[B] = 006000
[PC] = 003000
[X] = 000090
03600 3030
103000 3600
00C303 6390
003030 C303
000000 is the code for the instruction LDA which means Load Accumulator
1) n=1, i=1 – Simple Addressing
b=0, p=1 – PC Relative Addressing
e=0 – Format 3
TA = [PC] + disp = 03000 + 600 = 3600
[3600] = 103000
So, [A] = 103000
2) n=1, i=1 – Simple Addressing
x=1 – Indexed Addressing
b=1, p=0 – Base Relative Addressing
e=0 – Format 3
TA = [B] + disp + [X] = 6000 + 300 + 90 = 6390
[6390] = 00C303
So, [A] = 00C303
3) n=1, i=0 – Indirect Addressing
b=0, p=1 – PC Relative
e=0 – Format 3
TA = [PC] + disp = 003000 + 030 = 3030
[3030] = 3600
[3600] = 103000
So, [A] = 103000
4) n=0, i=1 – Immediate Addressing
e=0 – Format 3
disp = 30
So, [A] = 30
5) e=1 – Format 4
n=1, i=1 – Simple Addressing
address = 0C303
[0C303] = 3030
So, [A] = 3030
Assembler Directives
- Pseudo Instructions
- Provide instruction to assembler itself
- Not translated to machine operation code
START – Specify name and starting address of program
END – Indicate end of the source program and specify first executable statement in
the program
BYTE – Generate character or hexadecimal constant
WORD – Generate one word integer constant
RESB – Reserves the indicated number of bytes for data area.
RESW – Reserves the indicated number of words for data area.