Define
system software?
It
consists of a variety of programs that support the operation of computer. This
software makes it possible for the user to focus on an application or other
problem to be solved, without needing to know the details of how the machine
works internally.
2.
What are the components of system software?
1.
Text editor – To write programs in a high-level language.
2.
Compiler – To translate high level language programs into machine language.
3.
Loader or linker – To load the machine language program into memory.
4.
Debugger – To help detect errors in the program.
5.
Assembler -To translate assembly language program into machine language.
6.
Macro processor – it is a part of assembler for translation.
3.
What are the functions of assemblers?
To
translate assembly language program into machine language and assigning machine
addresses to symbolic labels used by the programmer.
4. What are the functions of loaders?
To load
the machine language program into memory
5.
What are the functions of linkers?
Linkers
are used to perform the linking operation. Linking is to combines two or more
separate object programs and supplies the information needed to allow
references between them.
6.
What are the functions of compilers?
The function of
compiler is to translate high level language programs into machine language. In
order to convert into machine language the source program is split into tokens
by lexical analysis. The statement is recognized by syntax analysis or parsing.
The last step is the generation of object code.
7.
What are the functions of text editors?
An
interactive text editor is a program that allows a user to create and revise a
target document. The term document includes objects such as computer programs,
text, equations, tables diagrams line art etc.
8. What are the functions of debuggers? To help
detect errors in the program.
9.
Name the registers available in SIC/XE machine?
Table below indicates the additional register details
Mnemonic Number Special use
B 3 Base register; used for addressing.
S 4 General working register – no special use.
T 5 General working register – no special use.
F 6
Floating-point accumulator (48 bits)
10. Write the addressing mode of SIC/XE
machine? Two new relative addressing modes with format 3
Base relative b=1,
p=0 TA (target address) = (B) + disp (0 ��������������� Program_counter
relative b = 0, p = 1 TA = (PC) + disp (-2048 ������������� For base relative
addressing the disp field is interpreted as 12 bit unsigned integer.
For program_counter relative addressing the disp field
is interpreted as 12 bit signed integer with negative values are in 2’s
complement form. For direct addressing b and p are set to 0. the disp field
indicates the target address. Indexed addressing if x is set to 1. For
immediate addressing i = 1 and n = 0. For indirect addressing i = 0 and n = 1
the value contained in this word is taken as the address of the operand value.
For simple
addressing i and n are both 0. the address is taken as the location of the
operand.
11.
Write a data movement instruction for SIC machine?
LDA
FIVE
STA ALPHA
LDCH CHARZ
STA ALPHA
LDCH CHARZ
12.
Write a data movement instruction for SIC/XE machine?
STCH C1
|
||
-
|
||
-
|
||
-
|
||
ALPHA
|
RESW
|
1
|
FIVE
|
WORD
|
5
|
CHARZ
|
BYTE
|
C ‘Z’
|
C1
|
RESB
|
1
|
LDA #5
STA ALPHA
LDA #90
STCH C1
-
-
-
ALPHA RESW 1
C1 RESB 1
ALPHA RESW 1
C1 RESB 1
13.
Write notes on CISC machines?
Complex
instruction set computers (CISC) has a relatively large and complicated
instruction set, several different instruction formats and lengths, and many
addressing modes.
14.
Write the data formats of VAX architecture?
Integers are stored
as binary numbers in byte, word, longword, quadword, or octaword ; 2’s
complement representation is used for negative values. Character are stored
using 8-bit ASCII codes. Four different floating point data formats on the VAX
ranging from 4 to 16 bytes.
VAX provides a packed decimal data
format. Each byte represents two decimal digits, with each digit encoded using
4 bits of the byte. The sign is encoded in the last 4 bits of the byte.
Numeric format is used to represent numeric values with one
digit per byte. The sign may appear either in the last byte or as a separate
byte preceding the first digit. These variations are called trailing numeric
and leading separate numeric.
VAX supports queues and variable-length bit strings.
15.
How the instruction sets are formed in VAX architecture?
Variable
length instruction formats. Each instruction consist of an operation code (1 or
2 bytes) followed by upto 6 operand specifiers depending on the type of
instruction.
16.
List the registers available in Pentium Pro microprocessor?
There are eight general-purpose registers, which are named
as EAX, EBX, ECX, EDX, ESI, EBP and ESP.Each general purpose registers is 32
bits long. Registers EAX, EBX, ECX and EDX are generally used for data
manipulation. EIP is a 32 bit register that contains a pointer to the next
instruction to be executed.
Floating point computations are performed using a floating point unit
(FPU) . this unit contain eight 80 bit data registers.
17. Write notes on RISC machines?
Reduced instruction set computers. This design can result
in faster and less expensive process development, greater reliability, and
faster instruction execution time.
A RISC system is characterized by a standard, fixed
instruction length, and single-cycle execution of most instructions. Memory
access is usually done by load and store instructions only. All instructions
except for load and store are register-to register operations. There are
typically large numbers of general purpose registers.
18.
Name the various registers available in UltraSPARC architecture?
SPARC
architecture includes a large register file that usually contains more than 100
general-purpose registers. Any procedure can access only 32 registers. The
first eight of these registers can be accessed by all procedures on the system.
The other 24 registers are visualized as a window thorough which part of the
register file can be seen. In original SPARC architecture, the general purpose
registers were 32 bits long. Later it was expanded to 64 bits.
19.
Write the addressing mode of UltraSPARC machines?
1.
Immediate mode – operand value specified as part of the instruction.
2.
Register direct mode – in register
3.
PC relative
4.
Register indirect with displacement
5.
Register indirect indexed.
20.
Write notes on delayed branches?
Instruction
execution is pipelined – while one instruction is being executed, the
next one is being fetched from memory and decoded. SPARC branch instructions
are delayed branches – the instruction immediately following the branch
instruction is executed before the branch is taken.
21.
Write the memory organization of Power PC architecture?
Memory consists of 8-bit bytes; all addresses used are byte
addresses. Two consecutive bytes form a halfword; four bytes form a word; eight
bytes form a doubleword; sisteen bytes form a quadword.
Power PC program can be written using a virtual address
space of 264 bytes. This address space is divided into
fixed-length segments, which are 256 megabytes long. Each segment is
divided into pages, which are 4096 bytes long. The virtual address
specified by instructions is automatically translated into a physical address.
22. Write the addressing mode of Power PC architecture?
Immediate, register direct. Instruction that address memory
are load and store, and branch instruction. Load and store uses the following
addressing modes
Mode Target address calculation
Register
direct TA = (register)
Register indirect
with index TA = (register –1) + (register –2) Register indirect with immediate
index TA = (register) + displacement
23. What are methods for performing I/O operations in Power
PC Architecture?
Two different methods for performing I/O operations. In one
approach, the segments in the virtual address space are mapped onto an external
address space. Segments that are mapped in this way are called direct-store segments.
I/O
is performed using the regular virtual memory management hardware and software.
24. Write the
register details of Cray T3E architecture?
32 general purpose
registers. 64 bits long. Used to store and manipulate integer data and address.
32 floating-point
registers. 64 bits long. 64 bit PC and several other status and control
registers.
25. Write the
addressing modes of Cray T3E architecture?
The operand value may be specified as
part of the instruction itself or it may be in a register
Operands in memory
are addressed using one of the following two modes
PC-relative TA =
(PC) + displacement
Register indirect with displacement TA
= (register) + displacement
Unit II
What
are the functions of assembler?
The
assembler perform functions such as translating mnemonic operation codes to
their machine language equivalents and assigning machine addresses to symbolic
labels used by the programmer.
2.
Name the various assembler directives?
START Speficy the name and starting
address for the program END Indicate the end of the source program and specify
eth first
executable
instruction in the program BYTE Generate character or hexadecimal constant.
WORD Reserve the indicated number of bytes for a data area. RESW Reserve the
indicated number of words for a data area.
Write
the function of a simple SIC assembler?
Convert
the mnemonic operation codes to their machine language equivalents.
b) Convert symbolic operands to their equivalent machine address.
c) Build the machine instructions in the proper format.
d) Convert the data constants specified in the source program into their internal
representation.
e) Write the object program and the assembly listing.
b) Convert symbolic operands to their equivalent machine address.
c) Build the machine instructions in the proper format.
d) Convert the data constants specified in the source program into their internal
representation.
e) Write the object program and the assembly listing.
What
is meant by forward reference?
A reference to a
label that is defined later in the program is called forward reference.
FIRST STL RETADR
RETADR RESW 1
Here REGADR label is
an example of forward reference because; the label is used before it is
declared.
5. Write notes on
the Header record in the object program?
The Header record
contains the program name, starting address, and length. The format is
Col.1 H
Col. 2-7 Program name
Col 8-13 Starting address of object program
Col 14-19 Length of object program in bytes
Col. 2-7 Program name
Col 8-13 Starting address of object program
Col 14-19 Length of object program in bytes
6. Write notes on
the Text record in the object program?
Text record contains
the translated instructions and data of the program, together with an
indication of the address where they are to be loaded. The format is
Col.1 T Col. 2-7
Starting address for object code in this record Col 8-9 Length of object code
in this record in bytes Col 10-69 Object code, represented in hexadecimal
7. Write notes on
the End record in the object program?
The End record
marked the end of the object program and specifies the address in the program
where execution is to begin. The format is
Col 1 E Col. 2-7
Address of first executable instruction in object program
8.
What are the functions of Pass 1 of an assembler?
Assign
address to all statements in the program. b) Save the values assigned to all
labels for use in Pass2. c) Perform some processing of assembler directives.
9.
What are the functions of Pass 2 of an assembler?
Assemble
instruction.
b) Generate data value define by BYTE, WORD, etc.
c) Perform processing of assembler directives not done during Pass 1.
d) Write the object program and the assembly listing.
b) Generate data value define by BYTE, WORD, etc.
c) Perform processing of assembler directives not done during Pass 1.
d) Write the object program and the assembly listing.
10.
Write the data structure for symbol table in assembler?
The
symbol table includes the name and value for each label in the source program,
together with flags to indicate error conditions. This table may also contain
other information about the data area or instruction labeled-for example its
type and length.
11.
List the details available in the intermediate file generated by Pass1?
The
intermediate file contains each source statement together with its assigned
address, error indicators, etc. This file is used as the input to Pass 2. This
working copy of the source program can also be used to retain the results of
certain operations that may be performed during Pass 1, so that these need not
be performed during Pass 2. Similarly pointer into OPTAB and SYMTAB may also be
retained for each operation code and symbol table used.
12.
What is meant by program relocation?
When more than one program at a time, sharing the memory
and other resources of the machine. The address for loading is not known in
advance.
Since the assembler does not know the actual location where
the program will be loaded, it cannot make the necessary changes in the address
used in the program. The assembler can identify those part of the object
program that need modification. An object program that contains the information
necessary to perform his kind of modification is called relocatable program.
13.
Write notes on the Modification record in the object program?
14.
Define literals in assembly language?
The command for the loader must also be a part of the
object program. We can accomplish it with a modification record. The format is
col
1
|
M
|
col
2 -7
|
Starting address of the address
field to be modified, relative to the
|
|
beginning of the program.
|
col
8 – 9
|
Length of the address field to be
modified in half-bytes.
|
The
programmer can be able to write the value of a constant operand as a part of
the instruction that uses it. Such type of operand is called a literal. In some
assembler languages the literal is identified with the prefix = which is
followed by a specification of the literal value.
Ex:-
215 1062 WLOOP TD =X’ 05’ E32011
All of the literal operands used in a program are gathered
together into ore or more literal pools.
The basic data structure needed to store literals is
literal table LITTAB.
15.
What is the structure of a literal table?
The
basic data structure needed to store literals is literal table LITTAB. For each
literals used this table contains the literal name, the operand value and
length, and the address assigned to the operand when it is placed in a literal
pool. LITTAB is often organized as a hash table, using the literal name or
value as the key.
16.
What are the various symbol defining statements?
Most assembler provides an assembler directive that allows
the programmer to define symbols and specify their values. The assembler
directive generally used is EQU. The general form is
symbol EQU value
This statement defines the given symbol in the SYMTAB and
assigns to it the value specified.
Another common use of EQU is in defining mnemonic names for
registers.
A
EQU 0
X EQU 1
L EQU 2
X EQU 1
L EQU 2
There is another common assembler directive that can be
used to indirectly assign values to symbols is ORG.
ORG value
17. What are program blocks?
Program blocks refer to segment of code that are rearranged
within a single object program unit, and control sections to refer to segments
that are translated into independent object program unit.
The assembler directive USE indicates which portions of the
source program belong to the various blocks.
18. What is a control section in assembly language
statement?
A
control section is a part of the program that maintains its identity after
assembly; each such control section can be loaded and relocated independently
of
each other’ s.
When control sections form logically related parts of a
program, it is necessary to provide some means for linking them together.
19.
What are external references?
Control
sections are independently loaded and located, the assembler is unable to
process these references in the usual way. The assembler has no idea where any
other control section will be located at execution time. Such references
between control sections are called external references.
20.
What are external symbols?
They
are symbols that are defined in a control section, and may be used by other
sections.
21.
Write notes on Define record?
A Define record gives information about external symbols
that are defined in this control section. The format is
col 1 D
col 2-7 Name of external symbol defined in this control section.
col 2-7 Name of external symbol defined in this control section.
col 8 – 13 Relative
address of symbol within this control section.
col 14 – 73 Repeat information in col 2-13.
col 14 – 73 Repeat information in col 2-13.
22. Write notes on
Refer record?
A Refer record lists
symbols that are used external references by the control section. The format is
col 1 R
col 2 – 7 Name of external symbol referred to in this control section.
col 8 – 73 names of other external reference symbols.
col 2 – 7 Name of external symbol referred to in this control section.
col 8 – 73 names of other external reference symbols.
23. Define
load-and-go assembler?
There are two main
types of one-pass assembler.
One type produces
object code directly in memory for immediate execution. This type generate
object program in memory for immediate execution. No object program is written
out, and no loader is needed. This kind of load-and-go assembler is
useful in a system that is oriented toward program development and testing.
24.
What is the function of multi-pass assembler?
Restrictions
such as prohibiting forward reference in symbol definition are not normally a
serious inconvenience for the programmer. The general solution is the
multi-pass assembler that can make as any passes as are needed to process the
definitions of symbols. The portions of the program that involve forward
references in symbol definitions are saved during pass1.
25.
Name the various sections in SPARC assembler?
SPARC assembler
language program is divided into units called sections. The assembler
provides a set of predefined section names. They are
.TEXT
Executable instructions.DATA Initialized read/write data
.RODATA Read only data
.BSS Unintialized data areas
Hashing Functions with Example
ReplyDeleteHeap Sort Algorithm
Height Balanced Tree
Hermit Interpolation
Heuristics for Planning using Constraint Posting
Hexadecimal counter program
Computer Network
Operating System
Code Optimization Technique