0% found this document useful (0 votes)
70 views55 pages

Ss CD Module 1 Presentation Notes

It contains module 1 notes of ss cd of 2018 scheme.......of all slides and information on compilers and architecture in module 1 notes

Uploaded by

Manoj Ramesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views55 pages

Ss CD Module 1 Presentation Notes

It contains module 1 notes of ss cd of 2018 scheme.......of all slides and information on compilers and architecture in module 1 notes

Uploaded by

Manoj Ramesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Module 1

SYSTEM SOFTWARE
INTRODUCTION TO SYSTEM SOFTWARE
• The Software is set of instructions or programs written to carry out
certain task on digital computers.
• It is classified into system software and application software.
• System software consists of a variety of programs that support the
operation of a computer.
• Application software focuses on an application or problem to be solved.
Examples for system software are Operating system, compiler, assembler, macro processor, loader or
linker, debugger, text editor, database management systems (some of them) and, software engineering
tools.
System Software and Machine Architecture:
• One characteristic in which most system software differs from
application software is machine dependency.
• One characteristic in which most system software differs from
application software is machine dependency.
2.1.2 ASSEMBLER TABLES AND
LOGIC
• Our simple assembler uses two internal tables: The
OPTAB and SYMTAB.
• OPTAB is used to look up mnemonic operation codes and
translate them to their machine language equivalents.
• LDA→00, STL→14, …
• SYMTAB is used to store values (addresses) assigned to
labels.
• COPY→1000, FIRST→1000 …
• Location Counter LOCCTR
• LOCCTR is a variable for assignment addresses.
• LOCCTR is initialized to address specified in START.
• When reach a label, the current value of LOCCTR gives the
address to be associated with that label.
2.1.2 ASSEMBLER TABLES AND LOGIC

• The Operation Code Table (OPTAB)


• Contain the mnemonic operation & its machine language
equivalents (at least).
• Contain instruction format& length.
• Pass 1, OPTAB is used to look up and validate operation
codes.
• Pass 2, OPTAB is used to translate the operation codes to
machine language.
• In SIC/XE, assembler search OPTAB in Pass 1 to find the
instruction length for incrementing LOCCTR.
• Organize as a hash table (static table).
2.1.2 ASSEMBLER TABLES AND LOGIC
• The Symbol Table (SYMTAB)
• Include the name and value (address) for each
label.
• Include flags to indicate error conditions
• Contain type, length.
• Pass 1, labels are entered into SYMTAB, along
with assigned addresses (from LOCCTR).
• Pass 2, symbols used as operands are look up in
SYMTAB to obtain the addresses.
• Organize as a hash table (static table).
• The entries are rarely deleted from table.
SYMTAB
SYMBOL ADDRESS
FIRST 4000
LOOP 4006
TABLE 4015
COUNT 5785
ZERO 5788
TOTAL 578B
2.2 MACHINE-DEPENDENT ASSEMBLER
FEATURES
• Indirect addressing
• Adding the prefix @ to operand (line 70).
• Immediate operands
• Adding the prefix # to operand (lines 12, 25, 55, 133).
• Base relative addressing
• Assembler directive BASE (lines 12 and 13).
• Extended format
• Adding the prefix + to OP code (lines 15, 35, 65).
• The use of register-register instructions.
• Faster and don’t require another memory reference.
2.2 MACHINE-DEPENDENT ASSEMBLER
FEATURES

• SIC/XE
• PC-relative/Base-relative addressing op m
• Indirect addressing op @m
• Immediate addressing op #c
• Extended format +op m
• Index addressing op m, X
• register-to-register instructions COMPR
• larger memory →multi-programming (program allocation)
2.2 MACHINE-DEPENDENT
ASSEMBLER FEATURES
• Register translation
• register name (A, X, L, B, S, T, F, PC, SW) and their
values (0, 1, 2, 3, 4, 5, 6, 8, 9)
• preloaded in SYMTAB
• Address translation
• Most register-memory instructions use program counter
relative or base relative addressing
• Format 3: 12-bit disp (address) field
• PC-relative: -2048~2047
• Base-relative: 0~4095
• Format 4: 20-bit address field (absolute addressing)
2.2.1 INSTRUCTION FORMATS &
ADDRESSING MODES

• The START statement


• Specifies a beginning address of 0.
• Register-register instructions
• CLEAR & TIXR, COMPR
• Register-memory instructions are using
• Program-counter (PC) relative addressing
• The program counter is advanced after each instruction is fetched and before it
is executed.
• PC will contain the address of the next instruction.
10 0000 FIRST STL RETADR 17202D
TA -(PC) = disp= 30H –3H= 2D
LOCCTR

IF Register involved
If no register or +
If +
2.3 MACHINE-INDEPENDENT ASSEMBLER
FEATURES
• Write the value of a constant operand as a part of the
instruction that uses it (Fig. 2.9).
• A literal is identified with the prefix =
45 001A ENDFIL LDA =C’EOF’
032010
• Specifies a 3-byte operand whose value is
the character string EOF.
215 1062 WLOOP TD =X’05’
E32011
• Specifies a 1-byte literal with the
hexadecimal value 05
RDREC
WRREC

Figure 2.9 Program demonstrating additional assembler features


2.3.1 LITERALS
• The difference between literal operands and immediate
operands
• =, #
• Immediate addressing, the operand value is assembled as
part of the machine instruction, no memory reference.
• With a literal, the assembler generates the specified value as
a constant at some other memory location. The address of
this generated constant is used as the TA for the machine
instruction, using PC-relative or base-relative addressing
with memory reference.
• Literal pools
• At the end of the program (Fig. 2.10).
• Assembler directive LTORG, it creates a literal pool that
contains all of the literal operands used since the previous
LTORG.
RDREC
WRREC

Figure 2.10 Program from figure 2.9 with object code

You might also like