System Software UNIT I
System Software UNIT I
AIM
To have an understanding of foundations of design of assemblers, loaders, linkers, and macro processors.
OBJECTIVES
• To understand the relationship between system software and machine architecture.
• To know the design and implementation of assemblers
• To know the design and implementation of linkers and loaders.
• To have an understanding of macroprocessors.
• To have an understanding of system software tools.
UNIT I INTRODUCTION 8
System software and machine architecture – The Simplified Instructional Computer (SIC) - Machine architecture -
Data and instruction formats - addressing modes - instruction sets - I/O and programming.
UNIT II ASSEMBLERS 10
Basic assembler functions - A simple SIC assembler – Assembler algorithm and data structures - Machine
dependent assembler features - Instruction formats and addressing modes – Program relocation - Machine
independent assembler features - Literals – Symbol-defining statements – Expressions - One pass assemblers and
Multi pass assemblers - Implementation example - MASM assembler.
TOTAL : 45
TEXT BOOK
rd
1. Leland L. Beck, “System Software – An Introduction to Systems Programming”, 3 Edition, Pearson
Education Asia, 2000.
REFERENCES
1. D. M. Dhamdhere, “Systems Programming and Operating Systems”, Second Revised Edition, Tata
McGraw-Hill, 1999.
2. John J. Donovan “Systems Programming”, Tata McGraw-Hill Edition, 1972.
4) What are the important machine structures used in the design of system software?
Memory structure
Registers
Data formats
Instruction formats
Addressing modes
Instruction set
Addressing Modes
Instruction Set
o integer arithmetic operations: ADD, SUB, MUL, DIV, etc.
All arithmetic operations involve register A and a word in memory, with the result
being left in the register
o comparison: COMP
COMP compares the value in register A with a word in memory, this instruction
sets a condition code CC to indicate the result
o conditional jump instructions: JLT, JEQ, JGT
these instructions test the setting of CC and jump accordingly
o subroutine linkage: JSUB, RSUB
JSUB jumps to the subroutine, placing the return address in register L
RSUB returns by jumping to the address contained in register L
8)
9)
10)
11) Explain SIC/XE architecture
SIC/XE Machine Architecture
Memory
More Registers
Mnemonic Number Special use
B 3 Base register; used for addressing
S 4 General working register
T 5 General working register
F 6 Floating-point acumulator (48bits)
Data Formats
o Floating-point data type: frac*2(exp-1024)
frac: 0~1
exp: 0~2047
Instruction Formats
Format 1
op(8)
Format 2
op(8) r1(4) r2(4)
Format 3 e=0
op(6) n I xb p e disp(12)
Format 4 e=1
op(6) n I x b p e address (20)
Instruction Set
o new registers: LDB, STB, etc.
o floating-point arithmetic: ADDF, SUBF, MULF, DIVF
o register move: RMO
o register-register arithmetic: ADDR, SUBR, MULR, DIVR
o supervisor call: SVC
generates an interrupt for OS
Input/Output
SIO, TIO, HIO: start, test, halt the operation of I/O device
Addressing modes
Base relative (n=1, i=1, b=1, p=0)
Program-counter relative (n=1, i=1, b=0, p=1)
Direct (n=1, i=1, b=0, p=0)
Immediate (n=0, i=1, x=0)
Indirect (n=1, i=0, x=0)
Indexing (both n & i = 0 or 1, x=1)
Extended (e=1 for format 4, e=0 for format 3)
(a)