SS Question Bankss
SS Question Bankss
COM
Part – A
Unit – 1
1.A.2. What are the additional registers provided in SIC/XE then SIC
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)
8 1 15
Opcode
X Address
Format 1 (1 byte)
8
Opcode
Format 2 (2 bytes)
8 4 4
OP R1 R2
R1 – register 1
R2 – register 2
Format 3 (3 bytes)
6 1 1 1 1 1 1 12
OP N i x b p e disp
Format 4 ( 4 bytes)
6 1 1 1 1 1 1 12
OP N i x b p e address
WWW.VIDYARTHIPLUS.COM
e=1
address – Target address
Part – A Unit – 2
2.A.6. What is the data structure used to organize the symbol table and operation code table
in a simple assembler? Why it is preferred?
Hash function base data structures are used to organize the symbol table. Hash
function used to perform well with non-random keys. Division of the entire key by a prime
table length gives good results.
2.A.7. Can an assembler have a single pass? What are the advantages and limitations?
Single Pass Assembler
A single pass assembler scans the program only once and creates the equivalent binary
program. The assembler substitute all of the symbolic instruction with machine code in one
pass.
Advantages
Every source statement needs to be processed once.
Disadvantages
We cannot use any forward reference in our program.
2.A.8. What are the functions of EXTREF and LTORG assembler directives.
When the assembler encounters a LTORG statements, it creates a literal pool that
contains all of the literal operands used since the previous LTORG. This literal
pool is placed in the object program at the location where the LTORG directive
was encountered
empty, labels and entered into it as their definitions are found in the source, and the
table is also searched frequently to find the values and types of symbols whose
names are known.
system from secondary storage to main memory. The operating system then takes
the overall control. This program which is responsible for booting up the system
is called bootstrap loader
in the object program.Assembler passes this information about the program relocation to the
loader through modification record as pert of object program.
3.A.8 What is a boot strap loader?
A small program written and stored in the ROM initially loads the operating
system from secondary storage to main memory. The operating system then takes
the overall control. This program which is responsible for booting up the system
WWW.VIDYARTHIPLUS.COM
Part – A
Unit – 4
WWW.VIDYARTHIPLUS.COM
Two assembler directives (MACRO and MEND ) are used in macro
definitions.
The first MACRO statement identifies the beginning of a macro definition.
Symbol in the label field is the name of the macro.
Entries in the operand field identify the parameters of the macro instruction.
The MEND assembler directive marks the end of the MACRO definition
Keyword Argument
STRG a3 = DATA1 , a2= DATA2, a1= DATA3
GENER TYPE = DIRECT, CHANNEL = 3.
4.A.11. Write any two basic macroprocessor functions
Recognize the macro definition.
2. Save the definition.
3. Recognize the call
Part – A Unit – 5
A dialog manager (DM) is a component of a dialog system (DS), responsible for the state
and flow of the conversation. Usually:
The input to the DM is the human utterance, usually converted to some system-
specific semantic representation by the Natural Language Understanding (NLU)
component. For example, in a flight-planning dialog system, the input may look like
"ORDER(from=TA,to=JER,date=2012-01-01)".
The DM usually maintains some state variables, such as the dialog history, the latest
unanswered question, etc., depending on the system.
The output of the DM is a list of instructions to other parts of the dialog system,
usually in a semantic representation, for example "TELL(flight-num=123,flight-
time=12:34)". This semantic representation is usually converted to human language
by the Natural Language Generation (NLG) component
The mapping of view buffer to a window is done with two components. They are
Viewing component formulates as ideal view
Display component maps to the physical output device.
Break points
Gaits
Tracing
Trace back
1. Visibility of system status. Users should always know where they are and what's
going on.
2. Real world - system match. The system should mirror the real world of the user as
much as possible. Use language, concepts, etc. that are familiar to the user. Order the
processes/screens in a way that is meaningful and logical to the user.
3. Control and freedom. Don't "trap" the user. Support clearly marked exit, undo, and
redo functions. Don't force them into a long linear sequence of operations with no
escape.
4. Consistency and standards. Use objects and phrases consistently. Follow platform
conventions. Here is a checklist of specific items to watch for.
5. Recognition not recall. Provide visual objects, actions, and options (e.g. cue cards) to
assist the user for navigation and input activities. Don't expect they will memorize
commands.
6. Flexibility and efficiency of use. Accelerators (unseen by novice users) can speed up
interaction for expert users. Allow users to customize frequent actions whenever
possible.
7. Aesthetic and minimalist design. Visibility of rarely needed information should be
avoided. The more information that appears on the screen, the less visible each unit of
information becomes.
8. Online help and additional documentation. Though a well designed system can be
used without documentation and help, supplemental information may still be
necessary. Keep this information tied to user tasks, support easy to use search
functions, and don't make this section too large.
WWW.VIDYARTHIPLUS.COM
9. Effective error handling. Assist users to recognize, diagnose, and recover from
errors. Don't just tell them there's an error, suggest corrective action whenever
possible.
10. Error prevention. A design that prevents errors from occurring is better than a good
error message.
Tracing (law), a process by which a one demonstrates the ownership of property, with
the intent to be awarded a claim based on this information
Tracing (criminology), a subject concerning setting up traces of occurrence of objects
generated from trace evidence left at crime scenes
Tracing (as with a gun or camera), tracking an object, as with the use of tracer
ammunition
Tracing in art, copying an object or drawing, especially with the use of translucent
tracing paper
because you can miss out on the computer-related tasks they perform. Get them to provide
you screenshots of the applications they use.
Part – B Unit – 1
1.B.1 Explain in detail the architecture of a SIC machine and SIC/XE machine
Memory
There are 215 bytes in the computer memory, that is 32,768 bytes , It uses Little Endian
format to store the numbers, 3 consecutive bytes form a word , each location in memory contains 8-
bit bytes.
Registers
There are five registers, each 24 bits in length. Their mnemonic, number and use are given in
the following table.
PC 8 Program counter
Data Formats
Integers are stored as 24-bit binary numbers , 2’s complement representation is used for
negative values, characters are stored using their 8-bit ASCII codes, No floating-point hardware on
the standard version of SIC.
Instruction Formats
All machine instructions on the standard version of SIC have the 24-bit format as shown
above
Addressing Modes
There are two addressing modes available, which are as shown in the above table.
Parentheses are used to indicate the contents of a register or a memory location.
Instruction Set
SIC provides, load and store instructions (LDA, LDX, STA, STX, etc.). 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. Two instructions are provided for subroutine
linkage. COMP compares the value in register A with a word in memory, this instruction sets a
condition code CC to indicate the result. There are conditional jump instructions: (JLT, JEQ, JGT),
these instructions test the setting of CC and jump accordingly. JSUB jumps to the subroutine placing
the return address in register L, RSUB returns by jumping to the address contained in register L.
Memory
Maximum memory available on a SIC/XE system is 1 Megabyte (220 bytes)
Registers
Additional B, S, T, and F registers are provided by SIC/XE, in addition to the registers of SIC
B 3 Base register
1 11 36
S exponent fraction
Instruction Formats
The new set of instruction formats fro SIC/XE machine architecture are as follows. Format 1
(1 byte): contains only operation code (straight from table). Format 2 (2 bytes): first eight bits for
operation code, next four for register 1 and following four for register 2. The numbers for the
registers go according to the numbers indicated at the registers section (ie, register T is replaced by
hex 5, F is replaced by hex 6). Format 3 (3 bytes): First 6 bits contain operation code, next 6 bits
contain flags, last 12 bits contain displacement for the address of the operand. Operation code uses
only 6 bits, thus the second hex digit will be affected by the values of the first two flags (n and i). The
WWW.VIDYARTHIPLUS.COM
flags, in order, are: n, i, x, b, p, and e. Its functionality is explained in the next section. The last flag e
indicates the instruction format (0 for 3 and 1 for 4). Format 4 (4 bytes): same as format 3 with an
extra 2 hex digits (8 bits) for addresses that require more than 12 bits to be represented.
Format 1 (1 byte)
Op
Format 2 (2 bytes)
8 4 4
Op r1 r2
Format 3 (3 bytes)
6 1 1 1 1 1 1 12
Op N i x B p e disp
Format 4 (4 bytes)
6 1 1 1 1 1 1 20
Op n i x B p e address
Direct (x, b, and p all set to 0): operand address goes as it is. n and i are both set to the same
value, either 0 or 1. While in general that value is 1, if set to 0 for format 3 we can assume that the
rest of the flags (x, b, p, and e) are used as a part of the address of the operand, to make the format
compatible to the SIC format
WWW.VIDYARTHIPLUS.COM
Relative (either b or p equal to 1 and the other one to 0): the address of the operand should
be added to the current value stored at the B register (if b = 1) or to the value stored at the PC
register (if p = 1)
Immediate (i = 1, n = 0): The operand value is already enclosed on the instruction (ie. lies on
the last 12/20 bits of the instruction)
Indirect (i = 0, n = 1): The operand value points to an address that holds the address for the
operand value.
Indexed (x = 1): value to be added to the value stored at the register x to obtain real address
of the operand. This can be combined with any of the previous modes except immediate.
The various flag bits used in the above formats have the following meanings
Bits x,b,p: Used to calculate the target address using relative, direct, and indexed addressing Modes
Bits i and n: Says, how to use the target address b and p - both set to 0, disp field from format 3
instruction is taken to be the target address. For a format 4 bits b and p are normally set to 0, 20 bit
address is the target address
i=1, n=0 Immediate addressing, TA: TA is used as the operand value, no memory reference
i=0, n=1 Indirect addressing, ((TA)): The word at the TA is fetched. Value of TA is taken as the
address of the operand value i=0, n=0 or i=1, n=1 Simple addressing, (TA):TA is taken as the address
of the operand value
Two new relative addressing modes are available for use with instructions assembled using
format 3.
TA=(B)+ disp
Base relative b=1,p=0
(0disp 4095)
Instruction Set
SIC/XE provides all of the instructions that are available on the standard version. In addition
we have, Instructions to load and store the new registers LDB, STB, etc, Floating-point arithmetic
operations, ADDF, SUBF, MULF, DIVF, Register move instruction : RMO, Register-to-register
arithmetic operations, ADDR, SUBR, MULR, DIVR and, Supervisor call instruction : SVC.
LDA #5
STA ALPHA
LDA #90
STCH C1 .
ALPHA RESW 1
C1 RESB 1
n sets
Instruction x Address
Formats (15)
Opcode(8)
(ii) I/O programming.
Input and Output
Input and Output are performed by transferring 1 byte at a time to or from the rightmost 8 bits
of register A (accumulator). The Test Device (TD) instruction tests 3
whether the addressed device is ready to send or receive a byte of data. Read Data (RD),
Write Data (WD) are used for reading or writing the data.
1.B.3 (i) With a neat diagram<explain the machine architecture of SIC and SIC/XE.
REFER 1.B.1
1.B.4 (b) Write short notes on:
(i) Data and instruction formats.
(ii) Addressing modes of SIC/XE.
REFER 1.B.1
………….
…………..
ALPHA RESW 1
BEETA RESW 1
INCR RESW 1
1.B.7 (b) (i) Explain the SIC/XE machine architecture.
(ii) The variable V1,V2 and V3 are assumed as an array of 100 words each. Write a
sequence of instructions for SIC to add together the corresponding elements of V1,V2 and
store in V3
1.B.8 ). (1). With instruction formats, explain the instruction set of SIC / XE.
(2). Highlight the salient features of SIC / XE machine architecture.
REFER 1.B.1
1.B.9 (b)Describe the following in VAX architecture
3.1 VAX Architecture
Memory - The VAX memory consists of 8-bit bytes. All addresses used are byte addresses.
Two consecutive bytes form a word, Four bytes form a longword, eight bytes form a
quadword, sixteen bytes form a octaword. All VAX programs operate in a virtual address
space of 232 bytes , One half is called system space, other half process space.
Registers – There are 16 general purpose registers (GPRs) , 32 bits each, named as R0 to
R15, PC (R15), SP (R14), Frame Pointer FP ( R13), Argument Pointer AP (R12) ,Others
available for general use. There is a Process status longword (PSL) – for flags.
Data Formats - Integers are stored as binary numbers in byte, word, longword, quadword,
octaword. 2’s complement notation is used for storing negative numbers. Characters are
stored as 8-bit ASCII codes. Four different floating-point data formats are also available.
Instruction Formats - VAX architecture uses variable-length instruction formats – op code 1
or 2 bytes, maximum of 6 operand specifiers depending on type of instruction. Tabak –
Advanced Microprocessors (2nd edition) McGraw-Hill, 1995, gives more information.
Addressing Modes - VAX provides a large number of addressing modes. They are Register
mode, register deferred mode, autoincrement, autodecrement, base relative, program-counter
relative, indexed, indirect, and immediate.
Instruction Set – Instructions are symmetric with respect to data type - Uses prefix – type of
operation, suffix – type of operands, a modifier – number of operands. For example, ADDW2
- add, word length, 2 operands, MULL3 - multiply, longwords, 3 operands CVTCL -
conversion from word to longword. VAX also provides instructions to load and store multiple
registers
Input and Output - Uses I/O device controllers. Device control registers are mapped to
separate I/O space. Software routines and memory management routines are used for
input/output operations.
1.B.10 (a) (i) Generate the object for the following SIC source program.
Label Operation Operand Opcode
SUM START 1000
FIRST LDX ZERO 04
WWW.VIDYARTHIPLUS.COM
LDA ZERO 00
LOOP ADD TABLE,X 18
TIX COUNT 2C
JLT LOOP 38
STA TOTAL OC
RSUB 4C
TABLE RESW 3000
COUNT RESW 1
ZERO WORD 0
TOTAL RESW 1
END FIRST
1.B.11 (ii) Discuss the SIC/XE architecture, explaining in detail the addressing modes and
the instruction formats.
REFER 1.B.1
1.B.12 (b)Generate the object code for the following SIC/XE source program.
Label Operation Operand Opcode
SUM START 0
FIRST LDX #0 04
LDA #0 00
+LDB #TABLE2 68
LOOP ADD TABLE,X 18
ADD TABLE2,X 18
TIX COUNT 2C
JLT LOOP 38
+STA TOTAL 0C
STA @TOTAL
RSUB 4C
COUNT RESW 1
TABLE RESW 3000
TABLE2 RESW 3000
TOTAL RESW 1
END FIRST
1.B.13 a(i) Write and explain the sequence of code in SIC and SIC/XE to read 200 byte
record from the device ‘F1’ using subroutine.
LDT #200
LDX #0
CLOOP TD INDEV
JEQ CLOOP
RD INDEV
WWW.VIDYARTHIPLUS.COM
STCH RECORD, X
TIXR T
JLT CLOOP
.
.
INDEV BYTE X ‘F5’
RECORD RESB 200
Part – B Unit – 2
Pass-2
Suppose it is decided to load and execute the program at location 2000 instead of location
1000. Then at address 102D the required value which needs to be loaded in the register A is
no more available. The address also gets changed relative to the displacement of the program.
WWW.VIDYARTHIPLUS.COM
Hence we need to make some changes in the address portion of the instruction so that we can
load and execute the program at location 2000. Apart from the instruction which will undergo
a change in their operand address value as the program load address changes. There exist
some parts in the program which will remain same regardless of where the program is being
loaded.
2.B.3 ) (i) Explain the necessary of one pass and multi pass assemblers.
Restriction on EQU and ORG
no forward reference, since symbols’ value can’t be defined during the first
pass
Example
Use link list to keep track of whose value depend on an undefined symbol
(ii) Explain about implementation of one pass assembler.
Main Problem
forward reference
data items
labels on instructions
Two types of one-pass assembler
load-and-go
produces object code directly in memory for immediate execution the
other produces usual kind of object code for later execution
The instruction formats depend on the memory organization and the size of the memory.
In SIC machine the memory is byte addressable. Word size is 3 bytes. So the size of the
memory is 212 bytes. Accordingly it supports only one instruction format. It has only two
registers: register A and Index register. Therefore the addressing modes supported by this
architecture are direct, indirect, and indexed. Whereas the memory of a SIC/XE machine is
220 bytes (1 MB). This supports four different types of instruction types, they are:
1 byte instruction
2 byte instruction
3 byte instruction
4 byte instruction
WWW.VIDYARTHIPLUS.COM
During pass 1 the registers can be entered as part of the symbol table itself. The value for
these registers is their equivalent numeric codes. During pass 2, these values are assembled
along with the mnemonics object code. If required a separate table can be created with the
register names and their equivalent numeric values.
Among the instruction formats, format -3 and format-4 instructions are Register-Memory
type of instruction. One of the operand is always in a register and the other operand is in the
memory. The addressing mode tells us the way in which the operand from the memory is to
be fetched.
There are two ways: Program-counter relative and Base-relative. This addressing mode
can be represented by either using format-3 type or format-4 type of instruction format. In
format-3, the instruction has the opcode followed by a 12-bit displacement value in the
address field. Where as in format-4 the instruction contains the mnemonic code followed by a
20-bit displacement value in the address field.
3. Base-Relative Addressing Mode: in this mode the base register is used to mention the
displacement value. Therefore the target address is
This addressing mode is used when the range of displacement value is not sufficient. Hence
the operand is not relative to the instruction as in PC-relative addressing mode. Whenever
this mode is used it is indicated by using a directive BASE. The moment the assembler
encounters this directive the next instruction uses base-relative addressing mode to calculate
the target address of the operand.
When NOBASE directive is used then it indicates the base register is no more used to
calculate the target address of the operand. Assembler first chooses PC-relative, when the
displacement field is not enough it uses Base-relative.
NOBASE
For example:
13 BASE LENGTH
WWW.VIDYARTHIPLUS.COM
::
::
In the above example the use of directive BASE indicates that Base-relative addressing mode
is to be used to calculate the target address. PC-relative is no longer used. The value of the
LENGTH is stored in the base register. If PC-relative is used then the target address
calculated is:
The LDB instruction loads the value of length in the base register which 0033. BASE
directive explicitly tells the assembler that it has the value of LENGTH.
(B) = (0033)16
::
In this mode no memory reference is involved. If immediate mode is used the target address
is the operand itself.
If the symbol is referred in the instruction as the immediate operand then it is immediate with
PC-relative mode as shown in the example below:
In this type of instruction the symbol used in the instruction is the address of the location
which contains the address of the operand. The address of this is found using PC-relative
addressing mode. For example:
WWW.VIDYARTHIPLUS.COM
The instruction jumps the control to the address location RETADR which in turn has the
address of the operand. If address of RETADR is 0030, the target address is then 0003 as
calculated above.
Sometimes it is required to load and run several programs at the same time. The system must
be able to load these programs wherever there is place in the memory. Therefore the exact
starting is not known until the load time.
Absolute Program
In this the address is mentioned during assembling itself. This is called Absolute Assembly.
Consider the instruction:
This statement says that the register A is loaded with the value stored at location 102D.
Suppose it is decided to load and execute the program at location 2000 instead of location
1000. Then at address 102D the required value which needs to be loaded in the register A is
no more available. The address also gets changed relative to the displacement of the program.
Hence we need to make some changes in the address portion of the instruction so that we can
load and execute the program at location 2000. Apart from the instruction which will undergo
a change in their operand address value as the program load address changes. There exist
some parts in the program which will remain same regardless of where the program is being
loaded.
Since assembler will not know actual location where the program will get loaded, it
cannot make the necessary changes in the addresses used in the program. However, the
assembler identifies for the loader those parts of the program which need modification. An
WWW.VIDYARTHIPLUS.COM
object program that has the information necessary to perform this kind of modification is
called the relocatable program.
A control section is a part of the program that maintains its identity after assembly;
each control section can be loaded and relocated independently of the others. Different
control sections are most often used for subroutines or other logical subdivisions. The
programmer can assemble, load, and manipulate each of these control sections separately.
Because of this, there should be some means for linking control sections together. For
example, instructions in one control section may refer to the data or instructions of other
control sections. Since control sections are independently loaded and relocated, the assembler
is unable to process these references in the usual way. Such references between different
control sections are called external references.
The assembler generates the information about each of the external references that
will allow the loader to perform the required linking. When a program is written using
multiple control sections, the beginning of each of the control section is indicated by an
assembler directive
secname CSECT
Control sections differ from program blocks in that they are handled separately by the
assembler. Symbols that are defined in one control section may not be used directly another
control section; they must be identified as external reference for the loader to handle. The
external references are indicated by two assembler directives:
It is the statement in a control section, names symbols that are defined in this section
but may be used by other control sections. Control section names do not need to be named in
the EXTREF as they are automatically considered as external symbols.
WWW.VIDYARTHIPLUS.COM
It names symbols that are used in this section but are defined in some other control
section.
The order in which these symbols are listed is not significant. The assembler must include
proper information about the external references in the object program that will cause the
loader to insert the proper value where they are required.
Case 1
Case 2
There are two external references in the expression, BUFEND and BUFFER.
The assembler inserts a value of zero
passes information to the loader
Add to this data area the address of BUFEND
Subtract from this data area the address of BUFFER
Case 3
On line 107, BUFEND and BUFFER are defined in the same control section and the
expression can be calculated immediately.
2.B.5 (b) Explain in detail about the machine independent features of assembler.
:
LDA FIVE
:
FIVE WORD 5
:
:
LDA =X’0
Implementation of Literals
Pass 1
Build LITTAB with literal name, operand value and length,
leaving the address unassigned
When LTORG or END statement is encountered, assign an address
to each literal not yet assigned an address
The location counter is updated to reflect the
number of bytes occupied by each literal
Pass 2
Search LITTAB for each literal operand encountered
Generate data values usingBYTE or WORD statements
Generate Modification record for literalsthat represent an address
in the program
-Defining Statements
Examples
MAXLEN EQU BUFEND-BUFFER
STAB RESB (6+3+2)*MAXENTRIES
Control sections
can be loaded and relocated independently ofthe other
controlsections
are most often used forsubroutines or otherlogical
subdivisions of a program
the programmer can assemble, load, and manipulate each
ofthese controlsectionsseparately
because ofthis, there should be some meansforlinking
controlsectionstogether
WWW.VIDYARTHIPLUS.COM
2.B.6 Discuss the detailed design of pass 1 of a two-pass assembler. Mention clearly the
formatsof the data structures used.Include all the assembler directives that need to be
processed in pass 1 in your design
Pass 1 - define symbols (assign addresses)
o Assign addresses to all statements in the program
o Save the values assigned to all labels for use in Pass 2
o Process some assembler directives
2.B.7 Discuss the detailed design of pass 2 of a two-pass assembler. Mention clearly the
formats of of the data structures used.Indicate the inputs taken from pass 1 and the outputs
generated by pass 2.
Pass 2 - assemble instructions and generate object program
Assemble instructions
o Generate data values defined by BYTE, WORD, etc.
o Process the assembler directives not done in Pass 1
o Write the object program and the assembly listing
Source
program
Intermediat Object
Pass 1 Pass 2
e
codes
OPTAB SYMTAB file SYMTAB
Eliminating forward reference to data items, by defining all the storage reservation
statements at the beginning of the program rather at the end.
Unfortunately, forward reference to labels on the instructions cannot be avoided.
(forward jumping)
To provide some provision for handling forward references by prohibiting forward
references to data items.
There are two types of one-pass assemblers:
One that produces object code directly in memory for immediate execution (Load-
and-go assemblers).
The other type produces the usual kind of object code for later execution
-pass Assembler
For a two pass assembler, forward references in symbol definition are not allowed:
ALPHA EQU BETA
DELTA RESW 1
2.B.11 With syntax, explain the usage of different symbol defining statements in an
Assembler.
Symbol-Defining Statements:
EQU Statement: Most assemblers provide an assembler directive that allows the programmer
to define symbols and specify their values. The directive used for this EQU (Equate). The
general form of the statement is Symbol EQU value This statement defines the given symbol
(i.e., entering in the SYMTAB) and assigning to it the value specified. The value can be a
constant or an expression involving constants and any other symbol which is already defined.
One common usage is to define symbolic names that can be used to improve readability in
place of numeric values. For example
+LDT #4096
This loads the register T with immediate value 4096, this does not clearly what exactly this
value indicates. If a statement is included as:
MAXLEN EQU 4096 and then
+LDT #MAXLEN
Then it clearly indicates that the value of MAXLEN is some maximum length value. When
the assembler encounters EQU statement, it enters the symbol MAXLEN along with its value
in the symbol table. During LDT the assembler searches the SYMTAB for its entry and its
equivalent value as the operand in the instruction. The object code generated is the same for
both the options discussed, but is easier to understand. If the maximum length is changed
from 4096 to 1024, it is difficult to change if it is mentioned as an immediate value wherever
required in the instructions. We have to scan the whole program and make changes wherever
4096 is used. If we mention this value in the instruction through the symbol defined by EQU,
we may not have to search the whole program but change only the value of MAXLENGTH
in the EQU statement (only once
ORG Statement: This directive can be used to indirectly assign values to the symbols. The
directive is usually called ORG (for origin). Its general format is:
ORG value
2.B.12 1) What are the different types of expressions supported by an Assembler ?Expalin
with examples
EXPRESSIONS:
WWW.VIDYARTHIPLUS.COM
Assemblers also allow use of expressions in place of operands in the instruction. Each such
expression must be evaluated to generate a single operand value or address. Assemblers
generally arithmetic expressions formed according to the normal rules using arithmetic
operators +, - *, /. Division is usually defined to produce an integer result. Individual terms
may be constants, user-defined symbols, or special terms. The only special term used is * (
the current value of location counter) which indicates the value of the next unassigned
memory location. Thus the statement
BUFFEND EQU *
Absolute Expressions: The expression that uses only absolute terms is absolute expression.
Absolute expression may contain relative term provided the relative terms occur in pairs with
opposite signs for each pair. Example:
MAXLEN EQU BUFEND-BUFFER
Assembler Directive USE:
USE [blockname]
2.B.13 (a) How forward references are handled by multi pass assembler? Illustrate with an
example.
Multi-Pass Assemblers
• Prohibiting forward references in symbol definition:
– This restriction is not a serious inconvenience.
– Forward references tend to create difficulty for a person reading the program.
• For a two pass assembler, forward references in symbol definition are not allowed:
ALPHA EQU BETA
BETA EQU DELTA
DELTA RESW 1
• Reason: symbol definition must be completed in pass 1.
• Motivation for using a multi-pass assembler
– DELTA can be defined in pass 1
– BETA can be defined in pass 2
– ALPHA can be defined in pass 3
Implementation
• A symbol table is used
– to store symbol definitions that involve forward references
– to indicate which symbols are dependant on the values of others
– to facilitate symbol evaluation
• For a forward reference in symbol definition, we store in the SYMTAB:
– the symbol name
– the defining expression
– the number of undefined symbols in the defining expression
– the undefined symbol (marked with a flag *) associated with a list of symbols
depend on this undefined symbol.
• When a symbol is defined, we can recursively evaluate the symbol expressions
depending on the newly defined symbol.
2.B.14 (b) (i) How an assembler calculates displacement for PC – relative and Base relative
addressing modes?
Base-Relative Addressing Mode: in this mode the base register is used to mention the
displacement value. Therefore the target address is
TA = (base) + displacement value
This addressing mode is used when the range of displacement value is not sufficient. Hence
the operand is not relative to the instruction as in PC-relative addressing mode. Whenever
this mode is used it is indicated by using a directive BASE. The moment the assembler
encounters this directive the next instruction uses base-relative addressing mode to calculate
the target address of the operand.
When NOBASE directive is used then it indicates the base register is no more used to
calculate the target address of the operand. Assembler first chooses PC-relative, when the
displacement field is not enough it uses Base-relative.
WWW.VIDYARTHIPLUS.COM
NOBASE
In this type of instruction the symbol used in the instruction is the address of the location
which contains the address of the operand. The address of this is found using PC-relative
addressing mode
Part – B Unit – 3
3.B.1 With examples, explain the machine independent features of a loader.
Control statements embedded in the primary input stream between object programs
Control statements are included in the source program, and the assembler or compiler
retains these commands as a part of the object program
3.B.2 With diagrams, explain how loading and calling of a subroutine is done using dynamic
linking.
Dynamic Linking refers to postponing the linking function until execution time.
o A subroutine is loaded and linked to the rest of the program when it is
first called (Dynamic linking, dynamic loading, or load on call)
Allow several executing programs to share one copy of a subroutine or library
In object-oriented system, it allows the implementation of the object and its
methods to be determined at the time the program is run
Dynamic linking provides the ability to load the routines only when they are
needed
WWW.VIDYARTHIPLUS.COM
3.B.3 Discuss the basis loader functions and design relocatable loader.
The most fundamental functions of a loader:
Bringing an object program into memory and starting its execution
3.B.4 Explain in detail how linkage editors are implemented in various machines.
Differentiate linkage editors with linkage loaders.
o Produces a linked version of program (often called a load module or an
executable image), which is written to a file or library for later
execution
o A simple relocating loader can be used to load the linked version of
program into memory
The loading can be accomplished in one pass with no external
symbol table required
A linkage editor
o Resolution of external references and library searching are only
performed once
o In the linked version of programs
All external references are resolved, and relocation is indicated
by some mechanism such as modification records or a bit mask
o External references is often retained in the linked program
To allow subsequent relinking of the program to replace control
sections, modify external references, etc.
WWW.VIDYARTHIPLUS.COM
Avoid the necessity of loading the entire library for each execution
o i.e. load the routines only when they are needed
Allow several executing programs to share one copy of a subroutine or library
(Dynamic Link Library, DLL)
REFER 3.B.1
3.B.9 (1) With a neat flow diagram, explain the working of Linkage editors .
1. nkage editors can perform many useful functions besides simply preparing an object
program for execution.
2. This can also be used to build packages of subroutines or other control sections that
are generally used together.
3. This can be useful when dealing with subroutine library than support high-level
programming languages in a typical implementation of FORTRAN, for example,
there are a large number of subroutines that are used to handle formatted input and
output.
4. These include routines to read and write data blocks, to block and deadlock records.
There are a large number of cross references between these subprograms because of
WWW.VIDYARTHIPLUS.COM
their closely related functions. However, it is desirable that they remain as separate
control sections for reasons of program modularity and maintainability.
1. If a program using formatted I/O were linked in the usual way, all of the cross-
references between these library subroutines would have to be processed
individually. Exactly the same set of cross references would need to be processed for
almost every FORTRAN program linked. This represents a substantial amount of
overhead. The linkage editor would be used to combine the appropriate subroutines
into a packages with a command sequence like:
WWW.VIDYARTHIPLUS.COM
2. The linked module named FTN10 could be indexed in the directory of SUBLIB
under the same names as the original subroutines. Thus a search of SUBLIB before
FTNLIB would retrieve FTN10 instead of the separate routines. Since FTN10 already
has all of the cross-references between subroutine resolved, these linkage would not
be reprocessed when each user’s program is linked. The result would be a much more
efficient linkage editor operation for each program and a considerable overall savings
for the system.
3. Linkage editors often allow the user to specify that external references are not to be
resolved by automatic library search. Suppose, for example, that 100 FORTRAN
programs using the I/O routines described above were to be stored on a library. If all
external references, were resolved, this would mean that a total of 100 copies of
FTN10 would be stored. If library space were an important resource, this might be
highly undesirable.
2.4.Using commands the user would specify that no library search be performed during
linkage editing. Thus only the external references between user-written routines
would be resolved. A linking loader could then be used to combine the linked user
routines with FTN10 at execution time. Because this process involves two separate
linking operations, it would require slightly more over head, however, it would result
in large savings in library space.
WWW.VIDYARTHIPLUS.COM
Absolute loader is simple and efficient, but the scheme has potential disadvantages One of
the most disadvantage is the programmer has to specify the actual starting address, from
where the program to be loaded. This does not create difficulty, if one program to run, but not
for several programs. Further it is difficult to use subroutine libraries efficiently.
This needs the design and implementation of a more complex loader. The loader must
provide program relocation and linking, as well as simple loading functions.
3.4.1 Relocation
The concept of program relocation is, the execution of the object program using any
part of the available and sufficient memory. The object program is loaded into memory
wherever there is room for it. The actual starting address of the object program is not known
until load time. Relocation provides the efficient sharing of the machine with larger memory
and when several independent programs are to be run together. It also supports the use of
subroutine libraries efficiently. Loaders that allow for program relocation are called
relocating loaders or relative loaders.
Use of modification record and, use of relocation bit, are the methods available for
specifying relocation. In the case of modification record, a modification record M is used in
the object program to specify any relocation. In the case of use of relocation bit, each
instruction is associated with one relocation bit and, these relocation bits in a Text record is
gathered into bit masks.
WWW.VIDYARTHIPLUS.COM
Modification records are used in complex machines and is also called Relocation and
Linkage Directory (RLD) specification. The format of the modification record (M) is as
follows. The object program with relocation by Modification records is also shown here.
Modification record
col 1: M
T000000 1D17202D69202D48101036…4B105D3F2FEC032010
T00001D130F20160100030F200D4B10105D3E2003454F46
T001035 1DB410B400B44075101000…33200857C003B850
T0010531D3B2FEA1340004F0000F1..53C003DF2008B850
T00070073B2FEF4F000005
M00000705+COPY
M00001405+COPY
M00002705+COPY
E000000
The relocation bit method is used for simple machines. Relocation bit is 0: no
modification is necessary, and is 1: modification is needed. This is specified in the columns
10-12 of text record (T), the format of text record, along with relocation bits is as follows.
Text record
WWW.VIDYARTHIPLUS.COM
col 1: T
Twelve-bit mask is used in each Text record (col:10-12 – relocation bits), since each
text record contains less than 12 words, unused words are set to 0, and, any value that is to be
modified during relocation must coincide with one of these 3-byte segments. For absolute
loader, there are no relocation bits column 10-69 contains object code. The object program
with relocation by bit mask is as shown below. Observe FFC - means all ten words are to be
modified and, E00 - means first three records are to be modified.
T0000001EFFC140033481039000036280030300015…3C0003 …
T00001E15E000C00364810610800334C0000…000003000000
T0010391EFFC040030000030…30103FD8105D280030...
T0010570A 8001000364C0000F1001000
T00106119FE0040030E01079…508039DC10792C0036...
E000000
The Goal of program linking is to resolve the problems with external references
(EXTREF) and external definitions (EXTDEF) from different control sections.
3.B.13 (a) Why linking loader requires 2 passes to complete loading? Explain the operations
of linking loader.
Dynamic Linking refers to postponing the linking function until execution time.
o A subroutine is loaded and linked to the rest of the program when it is
first called (Dynamic linking, dynamic loading, or load on call)
Allow several executing programs to share one copy of a subroutine or library
In object-oriented system, it allows the implementation of the object and its
methods to be determined at the time the program is run
Dynamic linking provides the ability to load the routines only when they are
needed
Linkage editor
Linking before loading
Dynamic linking
Linking at the execution time
Bootstrap loader
Replacement of subroutines in the linked program
For example:
INCLUDE PLANNER(PROGLIB)
DELETE PROJECT {DELETE from existing PLANNER}
INCLUDE PROJECT(NEWLIB) {INCLUDE new version}
REPLACE PLANNER(PROGLIB)
Construction of a package for subroutines generally used
together
There are a large number of cross-references between these subroutines
due to their closely related functions.
SAVE FTNIO(SUBLIB)
Specification of external references not to be
resolved by automatic library search
Can avoid multiple storage of common librariesin
programs.
Need a linking loaderto combine the common libraries
at execution time.
(II) Describe the various record types in MS-DOS linker.
3. MS-DOS LINK is a linkage editor that combines one-or more modules to produce a
complete executable program (.exe).
4. MS-DOS object
module.
Description
Record Types
THEADR Translator header similar to header record in
SIC/XE
TYPDEF Type definitions of external symbols
PUBDEF Public Definitions of external symbols
defined in object module.
EXTDEF Information about the data and external
name.
LNAMES List of all the segments and class names
used in the program.
SEGDEF Describes the segments in the object module,
including name, length, alignment.
GRPDEF Grouping of Segments.
LEDATA Similar to Text record (SIC/XE) contain
translated instruction and data from the
source program
LIDATA Translated Instruction and data that occur
In repeated pattern
FIXUPP Resolve external references, contains
relocation and linking information and must
immediately follow the LEDATA or LIDATA
record to which it applies
MODEND End of object module.
WWW.VIDYARTHIPLUS.COM
(i) Segments are placed in the same order as given in SEGDEF records.
(ii) Segments from different object modules that have the same segment name and class are
combined.
(iii) Segments with the same class, but different names are concatenated.
(iv) Segments starting address is updated as these combinations and concatenation are
performed.
Pass 2:
Extracts the translated instructions from the object modules.
(i) Process each LEDATA and LIDATA record along with FIXUPP
(ii) Relocation operation’s that involve the starting address of the segment are added to a
table of Segment Fixupps.
(iii) Build an image of the executable program in memory.
(iv) Write it to the executable (.EXE.) file.
(v) This file includes a header that contains table of fixupps,information about memory
requirements .
Part – B Unit – 4
4.B.1 (i) State and explain the algorithm for one pass macro processor.
What are the different data structures used by a macro processor? Explain.
One-Pass Macro Processor:
-pass macro processor that alternate between macro definition and macro
expansion in a recursive way is able to handle recursive macro definition.
o The definition of a macro must appear in the source program before any
statements that invoke that macro.
o This restriction does not create any real inconvenience.
The design considered is for one-pass assembler. The data structures required
are:
o Stores the macro definition including macro prototype and macro body
o Comment lines are omitted.
o References to the macro instruction parameters are converted to a positional
notation for efficiency in substituting arguments.
4.B.3 Explain the various machine independent macro processor features, in detail.
Concatenation of Macro parameters
macro
4.B.5 Explain with an example how macro processor allows the invocation of macro with in
macro.
l Macro invocations within macros
WWW.VIDYARTHIPLUS.COM
4.B.7 Explain the various machine independent featuresof macro processor in detail
Concatenation of Macro parameters
Most macro processors allow parameters to concatenated with other character strings
If similar processing is to be performed on each series of variables, the programmer
might want to incorporate this processing in to a macro instruction
The body of the macro definition might contain a statement like “LDA X&ID1” in
which the parameter &ID is concatenated after the character string X and before the
character string 1
If the macro definition contained both &ID and &ID1 as parameters, the situation
would be ambiguous
Most macro processors deal with this problem by providing a special concatenation
operator (e.g. )
LDA X&ID1
Relative addressing in a source statement may be acceptable for short jumps such as
“JEQ *-3*
For longer jumps spanning several instructions, such notation is very inconvenient,
error-prone and difficult to read
Allow the creation of special types of labels
Each symbol beginning with $ has been modified by replacing $ with $xx, where xx
is a two character alphanumeric counter of the number of macro instructions
expanded
For the first macro expansions, xx will have the value AA
For succeeding macro expansions, xx will be set to AB, AC, etc
Most macro processors can modify the sequence of statements generated for a macro
expansion, depending on the arguments supplied in the macro invocation
The IF statement evaluates a Boolean expression that is its operand
If the value of this expression is TRUE, the statements following the IF are generated
until an ELSE is encountered
Otherwise, these statements are skipped, and the statements following the ELSE are
generated
The ENDIF statement terminates the conditional expression that was begun by the IF
statement
WWW.VIDYARTHIPLUS.COM
Positional parameter: parameters and arguments were associated with each other
according to their positions in the macro prototype and the macro invocation
statement
Keyword parameters: each argument value is written with a keyword that named the
corresponding parameter
Each parameter name is followed by an equal sign, which identifies a keyword
parameter
The parameter is assumed to have the default value if its name does not appear in the
macro invocation statement
4.B.9 Write notes on (i) conditional macro expansion, (ii) ANSI C macro processing.
Pre-concatenation
o LDA X&ID1
Post-concatenation
o LDA X&ID1
Example: Figure 4.6
4.B.10 Discuss in brief about the different data structures used by a macro processor.
Data Structures
o MACRO DEFINITION TABLE (DEFTAB)
Macro prototype
States that make up the macro body
Reference to parameters are converted to a positional notation.
WWW.VIDYARTHIPLUS.COM
ENDIF
………
ENDM
Part I is expanded if condition part is true, otherwise part II is expanded. Compare operators:
NE, EQ, LE, GT.
REFER 4.B.7
4.B.14 Describe the following in detail:
(i)Conditional macro expansion
(ii) MASM macro processor
(iii) ANSI C macro language
4.B.15 With an example program, explain the process of conditional macro expansion.
REFER 4.B.7
4.B.16 Explain the concatenation of macro parameters and handling of lables by macro
processor with examples.
Most macro processor allows parameters to be concatenated with other character strings.
Suppose that a program contains a series of variables named by the symbols XA1, XA2,
XA3,…, another series of variables named XB1, XB2, XB3,…, etc. If similar processing is to
be performed on each series of labels, the programmer might put this as a macro instruction.
The parameter to such a macro instruction could specify the series of variables to be operated
on (A, B, etc.). The macro processor would use this parameter to construct the symbols
required in the macro expansion (XA1, Xb1, etc.).
Suppose that the parameter to such a macro instruction is named &ID. The body of the macro
definition might contain other marco
WWW.VIDYARTHIPLUS.COM
Part – B Unit – 5
5.B.1 (i) With aneat block diagrm,explain the different components of an editor structure.
.
Editing Editing
component buffer
Editing
filter
Traveling Main
component memory
input Command
language Viewing
processor Viewing Viewing filter
component buffer
Paging
Routines
Output
devices Display File
component system
Control
Data
Typical Editor structure
Most Text editors have a structure similar to that shown above.
The command Language Processor It accepts input from the user‟s input devices,
and analyzes the tokens and syntactic structure of the commands. It functions much
WWW.VIDYARTHIPLUS.COM
like the lexical and syntactic phases of a compiler. The command language processor
may invoke the semantic routines directly. In a text editor, these semantic routines
perform functions such as editing and viewing. The semantic routines involve
traveling, editing, viewing and display functions. Editing operations are always
specified by the user and display operations are specified implicitly by the
other three categories of operations. Traveling and viewing operations may be
invoked either explicitly by the user or implicitly by the editing operations
Editing Component In editing a document, the start of the area to be edited is
determined by the current editing pointer maintained by the editing component, which
is the collection of modules dealing with editing tasks. The current editing pointer can
be set or reset explicitly by the user using travelling commands, such as next
paragraph and next screen, or implicitly as a side effect of the previous editing
operation such as delete paragraph.
Traveling Component
The traveling component of the editor actually performs the setting of the current
editing and viewing pointers, and thus determines the point at which the viewing and
/or editing filtering begins.
Viewing Component
The start of the area to be viewed is determined by the current viewing pointer. This
pointer is maintained by the viewing component of the editor, which is a collection of
modules responsible for determining the next view. The current viewing pointer can
be set or reset explicitly by the user or implicitly by system as a result of previous
editing operation. The viewing component formulates an ideal view, often expressed
in a device independent intermediate representation. This view may be a very simple
one consisting of a window‟s worth of text arranged so that lines are not broken in the
middle of the words.
Display Component
It takes the idealized view from the viewing component and maps it to a physical
output device in the most efficient manner. The display component produces a display
by mapping the buffer to a rectangular subset of the screen, usually a window
Editing Filter
Editing Buffer
It contains the subset of the document filtered by the editing filter based on the editing
pointer and editing filter parameters
WWW.VIDYARTHIPLUS.COM
Viewing Filter
95When the display needs to be updated, the viewing component invokes the viewing
filter. This component filters the document to generate a new viewing buffer based on
the current viewing pointer as well as on the viewing filter parameters.
Viewing Buffer
It contains the subset of the document filtered by the viewing filter based on the
viewing pointer and viewing filter parameters. E.g. The user of a certain editor might
travel to line 75,and after viewing it, decide to change all occurrences of “ugly
duckling” to “swan” in lines 1 through 50 of the file by using a change command such
as [1,50] c/ugly duckling/swan/ As a part of the editing command there is implicit
travel to the first line of the file
The cutout can be moved left or right, and up or down, to display other portions of the
document. The user interface is also concerned with the input devices, the output
devices,and the interaction language of the system.
INPUT DEVICES: The input devices are used to enter elements of text being edited,
to enter commands, and to designate editable elements. Input devices are categorized
as: 1)Text devices 2) Button devices 3) Locator devices
Text or string devices are typically typewriter like keyboards on which user presses
and release keys, sending unique code for each key. Virtually all computer key boards
are of the QWERTY type.
2) Button or Choice devices generate an interrupt or set a system flag, usually causing
an invocation of an associated application program. Also special function keys are
also available on the key board. Alternatively, buttons can be simulated in software by
displaying text strings or symbols on the screen. The user chooses a string or symbol
instead of pressing a button.
3) Locator devices: They are two-dimensional analog-to-digital converters that
position a cursor symbol on the screen by observing the user‟s movement of the
device. The most common such devices are the mouse and the tablet.
The Data Tablet is a flat, rectangular, electromagnetically sensitive panel. Either the
WWW.VIDYARTHIPLUS.COM
ballpoint pen like stylus or a puck, a small device similar to a mouse is moved over
the surface. The tablet returns to a system program the co-ordinates of the position on
the data tablet at which the stylus or puck is currently located. The program can then
map these data-tablet coordinates to screen coordinates and move the cursor to the
corresponding screen position. Text devices with arrow (Cursor) keys can be used to
simulate locator devices. Each of these keys shows an arrow that point up, down, left
or right. Pressing an arrow key typically generates an appropriate character sequence;
the program interprets this sequence and moves the cursor in the direction of the
arrow on the key pressed.
The control flow can be traced at different levels of detail – procedure, branch, individual
instruction, and so on…
Traceback can show the path by which the current statement in the program was reached
It can also show which statements have modified a given variable or parameter The
statements are displayed rather than as hexadecimal displacements How functions are
provided
To provide these functions, a debugger should consider the language in which the
program being debugged is written
A single debugger – many programming languages – language independent
The debugger - a specific programming language – language dependent
The debugger must be sensitive to the specific language being debugged
The context being used has many different effects on the debugging interaction
The statements are different depending on the language
Cobol - MOVE 6.5 TO X
Fortran - X = 6.5
C - X = 6.5
Examples of assignment statements
What about optimized code ?
It is also important that a debugging system be able to deal with optimized code
Many optimizations like
- invariant expressions can be removed from loops
- separate loops can be combined into a single loop
- redundant expression may be eliminated
- elimination of unnecessary branch instructions
Leads to rearrangement of segments of code in the program All these optimizations create
problems for the debugger, and should be handled carefully
Relationship with Other Parts of the System
WWW.VIDYARTHIPLUS.COM
The important requirement for an interactive debugger is that it always be available Must
appear as part of the run-time environment and an integral part of the system When an
error is discovered, immediate debugging must be possible
The debugger must communicate and cooperate with other operating system components
such as interactive subsystems
Debugging is more important at production time than it is at application-development
time When an application fails during a production run, work dependent on that
application stops
The debugger must also exist in a way that is consistent with the security and integrity
components of the system
The debugger must coordinate its activities with those of existing and future language
compilers and interpreters
5.B.3 ) Explain any two system software tools highlighting their advantages and
disadvantages.
Depending on how editing is performed, and the type of output that can be generated, editors
can be broadly classified as -
1. Line Editors - During original creation lines of text are recognised and delimited by
end-of-line markers, and during subsequent revision, the line must be explicitly
specified by line number or by some pattern context. eg. edlin editor in early MS-
DOS systems.
2. Stream Editors - The idea here is similar to line editor, but the entire text is treated as
a single stream of characters. Hence the location for revision cannot be specified
using line numbers. Locations for revision are either specified by explicit positioning
or by using pattern context. eg. sed in Unix/Linux.
Line editors and stream editors are suitable for text-only documents.
3. Screen Editors - These allow the document to be viewed and operated upon as a two
dimensional plane, of which a portion may be displayed at a time. Any portion may
be specified for display and location for revision can be specified anywhere within the
displayed portion. eg. vi, emacs, etc.
4. Word Processors - Provides additional features to basic screen editors. Usually
support non-textual contents and choice of fonts, style, etc.
5. Structure Editors - These are editors for specific types of documents, so that the editor
recognises the structure/syntax of the document being prepared and helps in
maintaining that structure/syntax.
WWW.VIDYARTHIPLUS.COM
A text editor has to cover the following main aspects related to document creation, storage
and revision -
Text editors
Debugging systems
5.B.4 ) What are the various criteria of user interface?
The user of an interactive editor is presented with a conceptal model of the editing
system. The model is an abstract framework on which the editor and the world on which
the operations are based.
Some of the early line editors simulated the world of 80-character card image lines.
The Screen-editors define a world in which a document is represented as a quarter-plane
of text lines.unbounded both down and to the right. The user sees ,through a cutout ,only
a rectangular subset of this planeon a multi line display terminal. The cutout can be move
left or right ,and up or down ,to display other portions of the document.
The user interface is also concerned with the input devices,the output devices,and the
interaction language of the system.
Input Devices : The input devices are used to enter elements of text being edited ,to enter
commands,and to designate editable elements.
The interactive debugging system should be user friendly. The facilities of
debugging system should be organized into few basic categories of functions which
should closely reflect common user tasks.
Full – screen displays and windowing systems
-screen display and windowing
systems.
The advantage of such interface is that the information can be should displayed and
changed easily and quickly.
Menus:
remember
menus without having to retrace an entire
hierarchy.
-screen terminal device is not available, user should have an equivalent
action in a linear debugging language by providing commands.
Command language:
a clear, logical, simple syntax. Parameters
names
WWW.VIDYARTHIPLUS.COM
Parameters should automatically be checked for errors for type and range values.
ided for parameters.
special characters.
On Line HELP facility
-line HELP facility that should provide
help for all options of menu
Types
Direct manipulation interface is the name of a general class of user interfaces that allow users
to manipulate objects presented to them, using actions that correspond at least loosely to the
physical world.
Currently (as of 2009) the following types of user interface are the most common:
Graphical user interfaces (GUI) accept input via devices such as a computer keyboard
and mouse and provide articulated graphical output on the computer monitor. There are at
least two different principles widely used in GUI design: Object-oriented user
Web-based user interfaces or web user interfaces (WUI) that accept input and provide
output by generating web pages which are transmitted via the Internet and viewed by the
utilize Java, JavaScript, AJAX, Adobe Flex, Microsoft .NET, or similar technologies to
traditional HTML based web browser. Administrative web interfaces for web-servers,
Touchscreens are displays that accept input by touch of fingers or a stylus. Used in a
growing amount of mobile devices and many types of point of sale, industrial processes
User interfaces that are common in various fields outside desktop computing:
Command line interfaces, where the user provides the input by typing a command
string with the computer keyboard and the system provides output by printing text on the
Touch user interface are graphical user interfaces using a touchpad or touchscreen
display as a combined input and output device. They supplement or replace other forms
The process of creating and revising a document in a computer is called editing. For
interactive editing a text editor displays a document on the terminal and accepts various types
of input from the user through different types of input devices, viz., keyboard, mouse, data-
tablet (flat, rectangular, elctromagnetically sensitive panel over which a ball-point-pen-like
stylus is moved and the coordinates of the stylus is sent to the system).
Initially the text editor may display the starting portion of the document. During editing the
user may give inputs to bring other portions to the display. Besides the displayed page, there
WWW.VIDYARTHIPLUS.COM
is the notion of a point within the page, indicated by an easily distinguishable symbol called
the cursor, where the next insertion, deletion or modification will be effective. An editor
provides various mechanisms (left-right-up-down keys, page-up, page-down keys, mouse
pointer, commands, etc.) for the cursor to be moved throughout the document. If the user
requires it to be moved outside of the displayed page, the editor displays the new portion that
would contain the cursor. Many editors also allows the user to select (and deselect) portions
of the document whose attributes can be modified as a whole (like change of font, delete,
etc.)
The most basic action by a user in creating or revising a document is to type in the text
through the keyboard and, possibly, delete already typed portions. Most text editors support
many other features in order to reduce the work of the user as well as to produce a higher
quality documents. Commonly found features include cut-paste, pattern-search (and
substitute), font-change, working with multiple documents at the same time, etc.
Many text editors allows pictures and other non-text information to be included in a
document. Such editors provide mechanisms to either create/modify such information or
embed such objects inside the document.
The output of an editing process, i.e., the document, can be either saved as file(s) in the
secondary storage or sent to some destination in the network, such as a printer or some
remote host.
(ii) Discuss the nature of the user interface for an interactive debugger.
REFER 5.B.2,,5.B.4
5.B.6 ) (i) Explain the structure of a text editor.
(ii) Explain the important functions of an interative debugging system.
REFER 5.B.2
5.B.7 (a) Discuss clearly the design of the Functional components of a text editor.
REFER 5.B.1
5.B.8 List down the options provided by any debugger that you have used. Discuss briefly the
possible design of this debugger.
REFER 5.B2
5.B.9 With a neat diagram, explain the structure of an editor.
REFER 5.B.1
5.B.10 Discuss in detail about the various issues related to an interative debugging system .
REFER 5.B.2
5.B.11 Explain the editor structure with neat diagram
REFER 5.B.1
5.B.12 Discuss interactive debugging systems in detail.
REFER 5.B.2
5.B.13 Discuss functions and capabilities of an interactive debugging system.
REFER5.B2
WWW.VIDYARTHIPLUS.COM
5.B.14 Describe the structure of a text and discuss some of the system related issues.