Professional Documents
Culture Documents
System Software S5 Unit - 12
System Software S5 Unit - 12
INTRODUCTION
What is system software?
System software consists of a variety of programs that support the
operation of a computer.
System programs were developed to make computers better adapted
to the needs of their users.
It allows us to focus on application without knowing details of
machine.
Examples of system software are text editor, compiler, loader or
linker, debugger, macro processor, operating system etc.
Text editor is used to create and modify the program.
Compiler translate the user program into machine
language
Loaders are system programs that prepare machine
language programs for execution
Debugger helps to detect errors in the program.
A translator is used to translate the assembly code into
machine code. This translator is called an assembler.
The most important system software is the OS, which is an integrated
system of programs that manages the system resources, and provides various
support services such as the computer executing the application programs of
users
Page 1
SYSTEM SOFTWARE UNIT - I
Machine dependency
Page 2
SYSTEM SOFTWARE UNIT - I
Machine independency
There are some aspects of system software that do not directly depend
upon the type of computing system being supported.
Page 4
SYSTEM SOFTWARE UNIT - I
Registers
There are five registers each is 24 bits in length.
The following table indicates the numbers, mnemonics and uses of these registers
Mnemonics Number Special Use
A 0 Accumulator, used for
arithmetic operation
X 1 Index register, used for
addressing
L 2 Linkage register, the
Jump to Subroutine
(JSUB) instruction
stores the return address
in this register.
PC 8 Program Counter,
contains the address of
the next instruction to
be fetched for
execution.
SW 9 Status word, contains a
variety of information,
including a condition
code (CC)
The numbering scheme has been chosen for compatibility with the XE
version of SIC. i.e., number 3 to 7 is used by SIC / XE.
Data formats
Integers are stored as 24-bit binary number
Negative values are represented as 2’s compliment representation.
Page 5
SYSTEM SOFTWARE UNIT - I
Instruction formats
All machine instructions on the standard version of SIC have
the 24-bit format as follows:
8 1 15
Opcode X Address
Addressing modes
There are two addressing modes available, by setting the x bit of the
instruction. They are:
Mode Indication Target Address
Calculation
1. Direct X=0 TA = address
2. Indexed X=1 TA = address + (X)
(Parenthesis are used to
indicate the contents of
a register or memory
location)
(X) – Content of Index register
Instruction Set
SIC provides a basic set of instructions that are sufficient for most
simple tasks. It includes:
Page 6
SYSTEM SOFTWARE UNIT - I
Arithmetic instructions
ADD, SUB, MUL, DIV
(Ex) ADD WORD (Adds register A with memory WORD and result is
stored in A)
Comparison instruction
COMP
(ex) COMP WORD (Compares the value in register A with WORD and sets
condition code CC to indicate the result <, = or >)
Registers
Page 8
SYSTEM SOFTWARE UNIT - I
Data formats
1 11 36
S Exponent fraction
Instruction formats
Page 9
SYSTEM SOFTWARE UNIT - I
Format (1 byte)
Format ( 2 bytes)
Format (3 bytes)
Format ( 4 bytes)
Format 1 (1 byte):
op {8}
Format 2 (2 bytes):
op {8} r1 r2
{4} {4}
Format 3 (3 bytes):
Format 4 (4 bytes):
Page
10
SYSTEM SOFTWARE UNIT - I
Flag x:
x=1 Indexed addressing add contents of X register to TA calculation
Flag e:
e=0 use Format 3
e=1 use Format 4
28 (256) I/O devices may be attached, each has its own unique 8-bit
address
Page
11
SYSTEM SOFTWARE UNIT - I
SIC/XE Has capability for programmed I/O (I/O device may input/output
data while CPU does other work) - 3 additional instructions are provided:
SIO Start I/O
HIO Halt I/O
TIO Test I/O .
Example Programs
LDA FIVE
STA ALPHA
LDCH CHARZ
STCH C1
.
ALPHA RESW 1
FIVE WORD 5
CHARZ BYTE C’Z’
C1 RESB 1
LDA ALPHA
ADD INCR
SUB ONE
Page
12
SYSTEM SOFTWARE UNIT - I
STA BEETA
……..
……..
……..
……..
ONE WORD 1
ALPHA RESW 1
BEETA RESW 1
INCR RESW 1
Page
13
SYSTEM SOFTWARE UNIT - I
LDX ZERO
CLOOP TD INDEV
JEQ CLOOP
RD INDEV
STCH RECORD, X
TIX B200
JLT CLOOP
.
.
INDEV BYTE X ‘F5’
RECORD RESB 200
ZERO WORD 0
B200 WORD 200
LDA #5
STA ALPHA
LDA #90
STCH C1 .
.
ALPHA RESW 1
C1 RESB 1
Arithmetic operations
LDS INCR
LDA ALPHA
ADD S,A
SUB #1
STA BETA
………….
…………..
ALPHA RESW 1
BEETA RESW 1
INCR RESW 1
LDT #11
LDX #0 : X=0
MOVECH LDCH STR1, X : LOAD A FROM STR1
STCH STR2, X : STORE A TO STR2
TIXR T : ADD 1 TO X, TEST (T)
JLT MOVECH
……….
……….
………
STR1 BYTE C ‘HELLO WORLD’
STR2 RESB 11
LDT #200
LDX #0
CLOOP TD INDEV
JEQ CLOOP
RD INDEV
STCH RECORD, X
TIXR T
JLT CLOOP
.
.
INDEV BYTE X ‘F5’
RECORD RESB 200
JSUB READ
……….
……….
READ LDT #200
LDX #0
CLOOP TD INDEV
JEQ CLOOP
RD INDEV
STCH RECORD, X
TIXR T : add 1 to index compare T
JLT CLOOP
RSUB
……..
……..
INDEV BYTE X ‘F5’
RECORD RESB 200
Page
16