unit 3

82
UNIT III LINKERS AND LOADERS AND SOFTWARE TOOLS Pre requisite :- Know the basic of fundamental of operating system. Outcomes Aim of this chapter students are aware with loader . Software tool

Upload: pmghate

Post on 06-May-2015

1.027 views

Category:

Education


0 download

DESCRIPTION

Linkers and Loaders and Software tools

TRANSCRIPT

Page 1: Unit 3

UNIT III

LINKERS AND LOADERS AND SOFTWARE

TOOLS

� Pre requisite :-

� Know the basic of fundamental of operating system.

� Outcomes

� Aim of this chapter students are aware with loader .

� Software tool

Page 2: Unit 3

UNIT III

LINKERS AND LOADERS AND SOFTWARE

TOOLS

� Contents :

� Basic loaders functions, central loaders scheme Absolute loaders,

Subroutine linkers, relocation

� Loader, Direct linking loader, Dynamic linking loader, Design of

absolute loaders direct linking loader,

� Implantation of MS DOS linker,� Implantation of MS DOS linker,

� Software tools for program development, editors, debug monitor,

programming environment, user interfaces.

Page 3: Unit 3

LINKERS AND LOADERS & SOFTWARE TOOLS

� Execution of program involves the following steps

� Translation of the programs .

� Linking of the program with other program needed for its

execution.

� Relocation of the program to execute from the specific memory

area allocated to it.

� Loading of the program in the memory for the purpose of

execution .

Page 4: Unit 3

LINKERS & LOADERS & SOFTWARE TOOLS

A schematic of Program execution

Translator Linker LoaderBinary

Program

Source

Program

Object

Modules

Binary

Programs

Control Flow Data Flow

Page 5: Unit 3

FUNCTIONS OF LOADER

� Loader:

The loader is a program which accepts object codes and prepares

them for execution and initiates execution.

� The loader is responsible for the activities such as � The loader is responsible for the activities such as

allocation ,linking, relocation and loading

� It allocates the space for program in the memory, by

calculating the size of the program. This activity is

called allocation.

Page 6: Unit 3

CONT…

�It resolves the symbolic reference (code/data) between

the object modules by assigning all the user subroutine

and library subroutine addresses. This activity is called

linking

�There are some address dependant locations in the program, such �There are some address dependant locations in the program, such

address constants must be adjusted according to allocated space,

such activity done by loader is called relocation.

Page 7: Unit 3

� Finally it places all the machine instruction and data of correspondingprograms and subroutines into the memory .Thus program now become readyfor execution, this activity is called loading.

General loading scheme diagram-

object

Program moduls A and B are

loaded in memory after linking.

It is ready for execution.

Module A

Object

Module B

LOADER A

B

Page 8: Unit 3

CONT…

� The following terminology is used to refer to the address

to refer to the address of the program entity at different

times

� Translation time(or translated) address : address

assigned by the translator

� Linked address : address by the linker

� load time(or load) address : address assigned by the

loader.loader.

Page 9: Unit 3

CONT…

o The same prefixes above are used with the origin and

execution start address of a program. thus,-

1. Translated origin :

Address of the origin assumed by the translator .This is the address

specified by the programmer in an ORIGIN statement.

2. Linked Origin :2. Linked Origin :

Address of the origin assigned by the linker while producing a

binary program.

3. Load Origin :

Address of the origin assigned by the loader while loading the

program for execution.

Page 10: Unit 3

TYPES OF LOADERS

1. General Loader

2. Bootstrap Loader (Absolute Loader)

3. Subroutine Linkage

4. Relocating Loaders

4.1- Relocation bits

4.2- Relocation maps (modification records)

5. Direct Linking Loader

Page 11: Unit 3

GENERAL LOADERS

� In this scheme ,the source program is converted to object programby translator (assembler).

� The loader accepts these modules and puts machine instruction anddata in an executable form at their assigned memory.

Advantages:-

� The program need not be retranslated each time while running it.The program need not be retranslated each time while running it.

� There is no wastage of memory.

� It is possible to write source program with multiple programs andmultiple languages.

Page 12: Unit 3

ASSEMBLE-&-GO LOADER

� Characteristics

� The Object Code is stored in Memory after Assembly.

� Single JUMP Instruction.

� Advantage

� Simple, Developing Environment.

� Disadvantage

� Whenever the Assembly Program is to be executed, it has to be

assembled again.

� Programs have to be coded in the same language.

Page 13: Unit 3

ABSOLUTE LOADER

� It is kind of loader in which relocated object files are created

,loader accepts these files and places them at specified locations

in the memory.

� This type of loader is called absolute because no relocation

information is needed; rather it is obtained from the programmer information is needed; rather it is obtained from the programmer

or assembler.

� The task of an absolute loader is virtually trivial. The simply

accepts the machine language code produced by an assembler

and places it into main memory at the location specified by the

assembler.

Page 14: Unit 3

ABSOLUTE LOADER

� If the operating system loads the loader, how the operating

system itself loaded into memory?

Given an idle computer with no program in

memory, how do we gets things started?

� Memory empty ⇒ no need for program relocation =>Memory empty ⇒ no need for program relocation =>

� OS kernel is loaded into a predefined location in memory by

absolute loader

� This absolute loader may be a software function, resident in

ROM or “primary loaded” by some hardware function.

Page 15: Unit 3

ABSOLUTE LOADER

� Absolute Loader accepts machine language code produced

by an assembler & places it into main memory at the

location specified by the assembler.

� Absolute loader example –

The main program is assigned to location 100 to 250 and

the function F1 is assigned location 400 to 500. The

programmer should be careful not to assign overlapping programmer should be careful not to assign overlapping

location to modules to be linked.

Page 16: Unit 3

ABSOLUTE LOADER

Page 17: Unit 3

ABSOLUTE LOADER – ADVANTAGE & DISADVANTAGE

� Advantages

�Simple and Efficient.

�No reallocation information is required , so the size of

the object module is comparatively small.

�It makes memory available for loading, since the

assembler is not in memory at the time of loading.

�No modification of address sensitive entities is �No modification of address sensitive entities is

required & it supports multiple object modules.

Page 18: Unit 3

CONT..

� Disadvantages

�The need for programmer to specify the actual address.

�Difficult to use Subroutine libraries.

�The programmer has to be careful not to assign �The programmer has to be careful not to assign overlapping location to modules to be linked.

�Lot of memory lying between modules will be wasted.

�If changes are made to one module that increses it size then it can overlap the start of another module. It may required manual shifting of module.thismanual shifting can become very complex and tedios.

Page 19: Unit 3

ALGORITHM FOR AN ABSOLUTE LOADER

Begin

read Header record

verify program name and length

read first Text record

while record type is not ‘E’ dowhile record type is not ‘E’ do

begin

{if object code is in character form, convert into internal representation}

move object code to specified location in memory

read next object program record

end

jump to address specified in End record

end

Page 20: Unit 3

ALGORITHM.

intialize

Read record

type=0 type=1Card

type

Mover binary image

at the address

specified in the record

Transfer the control

to the entry point

Page 21: Unit 3

DESIGN.

� In absolute loading scheme the programmer and

the assembler perform the following tasks.

1) Allocation

2) Relocation

3) Linking3) Linking

4) Loading

� The absolute loader reads the object program

line by line and moves the text of the program

in to the memory at the location specified by the

assembler.

Page 22: Unit 3

CONT.

� The object program generated by the assembler

must communicate the following information to

the loader.

1) It must convey the machine instructions that

the assembler has created along with the the assembler has created along with the

memory address.

2) It must convey the starting execution

point.program execution will start at this point

after the program is loaded.

Page 23: Unit 3

CONT.

� The object program is a sequence of object record.

� Each object record specifies some specific aspect

of the program in the object module.

� There are two types of record:

1) Text record containing binary image of the 1) Text record containing binary image of the

assembly program

2) Transfer record containing the starting point of

execution.

Page 24: Unit 3

CONT..

•TEXT RECORD

Record typeNumber bytes of

information

Memory

address

Binary image of

data or instruction

•TRANSFER RECORD

Record typeNumber of bytes of

information =0

Address of entry

point

Page 25: Unit 3

SUBROUTINE LINKAGE

� A program consisting of main program and a set

of function(subroutine) could reside in several

files.

� The problem of subroutine linkage is this: A main

program a wishesh to call the subroutine B and if program a wishesh to call the subroutine B and if

the subroutine B resides in another file then the

assembler will not know the address of B and

declare it as an undefined symbol.

� To realize such interreaction,A and B must

contain public definition and external references.

Page 26: Unit 3

EXTERN STATEMENT

� The EXTERN statement lists the symbol to

which external references are made in the

current program unit. These symbols are defined

in other program units.

Page 27: Unit 3

ENTRY STATEMENT

� The ENTRY statement lists the public definition

of a program unit, i.e. it lists those symbols

defined in the program unit which may be

referenced in other program units.

Page 28: Unit 3

RELOCATING LOADERS

� When a single subroutine is changed then all the subroutines need to be reassembled. The task of allocation and linking must be carried out once again.

To avoid this rework a new class of loaders is introduced which is called as relocating of loaders.

� Two methods for specifying relocation

◦ Modification record

◦ Relocation bit

� Each instruction is associated with one relocation bit.

� These relocation bits in a Text record is gathered into bit masks.

Page 29: Unit 3

RELOCATING LOADERS (CONTD.)

� Absolute loader loads a program on a specific memory

location, but it is often desirable to have two or more

programs residing in memory sharing the different

resources of a computer system.

� It would be impractical to assign starting addresses to � It would be impractical to assign starting addresses to

each program to plan program execution.

� A loader able to load a program into memory wherever

there is room for it is called a Relocating Loader.

Page 30: Unit 3

MODIFICATION RECORD

� Interleaving relocation bits with the program text makes

cumbersome the

process of loading the text directly into memory.

� This problem can be resolve by collecting all relocation bits into a

single

contiguous relocation map that we will call the relocation section contiguous relocation map that we will call the relocation section

of the

object code file.

� The relocation section will be appended to the text and data

sections.

� The header will contain the entry point and length of the relocation

section

in the object module.

Page 31: Unit 3

RELOCATION BIT

� Used for simple machines.

� Relocation bit

� 0: no modification is necessary

� 1: modification is needed

� Twelve-bit mask is used in each Text record� Twelve-bit mask is used in each Text record

� Since each text record contains less than 12 words

� Unused words are set to 0

� Any value that is to be modified during relocation must

coincide with one of these 3-byte segments.

Page 32: Unit 3

DIRECT LINKING LOADER

� It is a general relocated loader and is perhaps

the most popular loading scheme presently

used.

1. It is a relocatable loader

2. It allows multiple procedure segments and 2. It allows multiple procedure segments and

multiple data segment.

� The assembler must give the loader the

following information with each procedure or

data segment

Page 33: Unit 3

CONT..

� The assembler must give the loader the following

information with each procedure or data segment

1. The lengthss of segment.

2. A list of symbols defined in the current segment

that may be referenced by other segments-that may be referenced by other segments-

public declaration.

3. A list of all symbols not defined in the segment

but referenced in the segment-external

variables.

4. Information about address constants.

5. The machine code translation of source program

and the relative addresses assigned.

Page 34: Unit 3

CONT

� The object module produced by the assembler is

divided into 4 sections:

1. External symbol directory(ESD)

2. Actual assembled program(TXT)

3. Relocation directory(RLD)3. Relocation directory(RLD)

4. End of the object module(END)

Page 35: Unit 3

EXTERNAL SYMBOL DIRECTORY(ESD)

� It contains information about all symbol that are

defined in this program but may be refrenced by

other programs.it also contains symbols

referenced in this program but defined in other

program.program.

Page 36: Unit 3

CONT..

LC

1. MAIN START 0

2. ENTRY RESULT -

3. EXTRN SUM -

4. -4. -

5. -

6. -

7. -

8. -

9. -

10. RESULT DS 4 32

END 36

Page 37: Unit 3

CONT..

� Line no. Symbol type relative location length

1. MAIN SD 0 36

2. RESULT LD 32 -

3. SUM ER - -

� SD- symbol is asegment definition

� LD- symbol is defined in this program but it can

be referenced by other program.

� ER- symbol is an external reference,it is defined

in some external program.

Page 38: Unit 3

CONT..

• The relative location of the program (MAIN) is 0

and size is 36.

• The symbol RESULT is locally defined(LD) and

relative address is 32

• The symbol SUM is an external reference(ER).• The symbol SUM is an external reference(ER).

Page 39: Unit 3

ACTUAL ASSEMBLED PROGRAM(TXT)

� Text portion of object module contain the

relocatable machine language instruction and

data that were produced during translation.

Page 40: Unit 3

RELOCATION DIRECTORY(RLD)

� It contains one entry for each address that must

be changed when the module is loaded into main

memory.

� The relocation directory contains the following

information:information:

1. The address of each operand that needs to be

changed due to relocation.

2. By what it has to be changed

3. The operation to be performed

Page 41: Unit 3

END OF OBJECT MODULE(END)

� This indicated the end of object module.

Page 42: Unit 3

DESIGN OF DIRECT LINKING LOADER

� The design of adirect linking loader is more

complicated than that of the absolute loader.

� The input to the loader is set of object

programs(generated by assembler/compiler) to be

linked together. Each object module is divided in linked together. Each object module is divided in

to four section:

1. External symbol directory(ESD)

2. Actual assembled progrsm containing the

binary code(TXT)

3. Relocation directory(RLD)

4. End of the object module(END)

Page 43: Unit 3

CONT…

� A direct linking loader requires two passes to

compelete the linking processes:

1. Pass 1,assigns addresses to all external symbol.

2. Pass 2,performs actual loading,relocation and

linking.linking.

� In pass 1 , aglobal external symbol table(GEST)

is prepared.it contains every exrernal symbol

and the corresponding absolute address value.

Page 44: Unit 3

CONT…

� The two-pass limking loader scheme in shown

below:

Object

module

Copy of object

records

main

memory

Pass 1 of

loaderObject

module

Global external

symbol table

Pass 2 of

loader

Page 45: Unit 3

LINKER FOR MS DOS

OBJECT MODULE FORMAT

� MS DOS compiler & assembler produces object modules. The

object module is a sequence of object records.

� There are 14 types of object records containing the following 5

basic categories of information:-

1) Binary image (i.e. code generated by a translator)

2) External references.2) External references.

3) Public definitions.

4) Debugging information (e.g. line number in source program).

5) Miscellaneous information (e.g. comments in the source

program).

We only consider the object record corresponding to first three

Categories - a total of 8 record types

Page 46: Unit 3

OBJECT RECORDS OF INTEL 8088

Page 47: Unit 3

1.THEADER RECORDS

� The module name in THEADER record is typically derived

by the translator from the source file name.

� This name is used by the linker to report errors.

80H length T-module name Check-sum

Page 48: Unit 3

2.LNAMES RECORDS

� An assembly programmer can specify the module name

in NAME directive.

� This record lists the names for use by SEGDEF records.

96H length Name list Check-sum

Page 49: Unit 3

3. SEGDEF RECORDS

� This record designates a segment name using an index

into LNAMES list.

� Attribute field indicates whether the segment is

rellocatable or absolute, whether (and in what manner )

it can be combined with other segments as also the it can be combined with other segments as also the

alignment requirement of its base address.

98H LengthAttributes

(1-4)Check-sum

Segment Length

(2)

Name

Index

(1)

Page 50: Unit 3

SEGDEF RECORDS

� Stack segments with the same name are concatenated

with each other, while common segments with the same

name are overlapped with one another.

� The attribute field also contains the origin specification

for an absolute segment.for an absolute segment.

Page 51: Unit 3

4. EXTDEF RECORDS

� This record contains a list of external references used by

the programs of this module.

� A FIXUPP record designates an external symbols name

by using an index into this list.

8CH Length External Reference List Check-sum

Page 52: Unit 3

5. PUBDEF RECORDS

� It contains the list of public names declared in a

segment of the object module.

� The base specification identifies the segment.

� Each (name, offset) pair in the record defines � Each (name, offset) pair in the record defines

one public name, specifying the name of the

symbol and its offset within the segment

designed by the base specification.

90H Length Base(2-4) Name Offset(2) ..... Check-sum

Page 53: Unit 3

6. LEDATA RECORDS

� It contains the binary image of the code generated by

the language translator.

� Segment index identifies the segment to which the code

belongs, and offset specifies the location of the code

within the segment.within the segment.

A0H Length Segment index(1-2) Data offset(2) Data Check-sum

Page 54: Unit 3

7. FIXUPP RECORDS

� It contains information for one or more relocation and

linking fixups to be performed.

� The locat field contains a numeric code called loc code

to indicate the type of a fixup.

� The meanings of these codes are given below:� The meanings of these codes are given below:

9CH Length Locate(1) Fix datFrame

datum(1)

Target

datum(1)

Target

offset(2)… Check sum

Page 55: Unit 3

CONT……

� Locat also contains the offset of the fixup location in the

previous LEDATA record.

� The frame datum field , which refers to a SEGDEF record ,

identifies the segment to which the fixup location belongs.

� The target datum and target offset fields specify the � The target datum and target offset fields specify the

relocation or linking information.

� target datum contains a segment index or an external index,

while target offset contains an offset from the name

indicated in target datum.

� The fix dat field indicates the manner in which the target

datum and target offset fields are to be interpreted.

� The numeric codes used for this purpose are given below

Page 56: Unit 3

SOFTWARE TOOLS FOR PROGRAMMING DEVELOPMENT

� A software tool is system program which Interfaces a

program with the entity generating its input data or

interfaces the results of a program with the entity

consuming them.

Page 57: Unit 3

CONT..

� The software tools include:-

� Assembler

� Linker

� Loader

� Macro processor

� Text editor� Text editor

� Compiler

� Operating system

� Debugging system

� Source Code Control System

� (Optional) Database Management System

� User Interface

Page 58: Unit 3

A SOFTWARE TOOL

originator Software

tool

Consumer

Raw program or

data

Transformed program or data

Page 59: Unit 3

FUNDAMENTAL STEPS IN PROGRAM

DEVELOPMENT

� Program design, coding, documentation.

� Preparation of programs in machine readable

form.

� Program translation, linking and loading.

Program testing and debugging.� Program testing and debugging.

� Performance tuning.

� Reformatting the data and results of a program

to suit other programs.

Page 60: Unit 3

PROGRAM DESIGN AND CODING

� Two categories of tools used in program design and coding are :

�Program generators :A program generator generates a program which performs a set of functions described in its specification. Coding effort is saved since the program performs a set of functions described in its specification. Coding effort is saved since the program is generated rather than coded by hand.

�Programming environments :

A programming environment supports program

coding by incorporating awareness of the programming language syntax and semantics in the language editor.

Page 61: Unit 3

PROGRAM ENTRY AND EDITING

� These tools are text editors or more sophisticated

programs with text editors as front ends. The

editor functions in two modes. In the command

mode, it accepts user commands specifying the

editing function to be performed. In the data editing function to be performed. In the data

mode, the user keys in the text to be added to the

file.

� Failure to recognize the current mode of the

editor can lead to mix up of command and data.

� This can be avoided by providing a quick exit e.g.

escape key, such that the editor enters the

command mode.

Page 62: Unit 3

PROGRAM TESTING & DEBUGGING

� Important steps in program testing and debugging are selection of test data for the program, analysis of test results to detect errors and debugging, i.e. localization and removal of errors. Software tools to assist the programmer come in following form :come in following form :

1. Test data generators help the user in selecting test data for his program. Their use helps in ensuring that a program is thoroughly tested.

2. Automated test drivers help in regression testing, wherein a programs correctness is verified by subjecting it to a standard set of tests after every modification.

Page 63: Unit 3

CONT..

Regression testing is performed as follows: Many

sets of test data are prepared for a program.

These are given as inputs to the test driver. The

driver selects one set of test data at a time and

organizes execution of the program on the data.organizes execution of the program on the data.

4. Debug monitors help in obtaining information for

localization of errors.

5. Source code control system help to keep track of

modifications in the source code.

Page 64: Unit 3

DEBUGGING MONITOR

� An interactive debugging system provides programmers with facilities that aid in the testing & debugging of programs. Debug monitors provide following facilities:-

� 1. Setting Breakpoints

� 2. Initiating debug conversations

� 3. Single-stepping� 3. Single-stepping

� 4. Inspection & Assignment of variables

� Debugging system provides functions such as tracing & trace back.

Tracing can be used to track flow of execution logic & data modification.

� While debugging a program, user specifies a list of breakpoints & actions to be performed at breakpoints. Debug monitor builds a table containing statement no. & debug action.

Page 65: Unit 3

ENHANCEMENT OF PROGRAM

PERFORMANCE

� A profile monitor is a software tool that collects

information regarding the execution behavior of a

program, e.g. the amount of execution time

consumed by its modules, and presents in the

form of an execution profile. form of an execution profile.

� Program efficiency depends on two factors :

1. The efficiency of the algorithm.

2. The efficiency of its coding.

3. An optimizing compiler can improve efficiency

of the code but it cannot improve efficiency of

the algorithm.

Page 66: Unit 3

PROGRAM DOCUMENTATION

� Most programming projects suffer from lack of up

to date documentation. Automatic documentation

tools are motivated by the desire to overcome this

deficiency. These tools work on the source

program to produce different forms of program to produce different forms of

documentation, e.g. flow charts, IO specifications

showing files and their records, etc.

Page 67: Unit 3

DESIGN OF SOFTWARE TOOLS

� Program preprocessing techniques are used to

support static analysis of programs. Tools

generating cross reference listings and lists of

unreferenced symbols; test data generators, and

documentation aids use this technique.documentation aids use this technique.

� Program instrumentation implies insertion of

statements in a program. The instrumented

program is translated using standard translator.

Page 68: Unit 3

SOFTWARE TOOLS USING INTERPRETATION & PROGRAM GENERATION

InterpreterTask

specification

Results

Data

Program Generated Program

GeneratorTask specification Generated

program

Data

Results

Page 69: Unit 3

EDITORS

� Text editors come in the following forms :

1. Line editors.

2. Stream editors.

3. Screen editors.

Word processors.4. Word processors.

5. Structure editors

Page 70: Unit 3

EDITOR

� The scope of edit operations in a line editor is limited to a line of text. The primary advantage of line editors is there simplicity.

� A stream editor views the entire text as a stream of characters. This permits edit operations to cross line boundaries. Stream editors typically support character, line and context oriented commands based character, line and context oriented commands based on the current editing context indicated by the position of a text pointer.

� Screen editors display a screenful of text at a time. The user can move the cursor over the screen, position it at the point where he desires to perform some editing and proceed with the editing directly. Thus it is possible to see the effect of an edit operation on the screen. This is very useful while formatting the text to produce printed documents.

Page 71: Unit 3

EDITOR

� Word processors are basically document editors with additional features to produce well formatted hard copy output. Essential features of word processors are commands for moving sections of text from one place to another, merging of text, and searching and replacement merging of text, and searching and replacement of words.

� A structural editors incorporates an awareness of the structure of a document. This is useful in browsing through a document, e.g. if a programmer wishes to edit a specific function in a program file. The structure is specified by the user while creating or modifying the document.

Page 72: Unit 3

EDITOR STRUCTURE

Command

processor

Editing

manager

Viewing

managerTravelling

manager

Viewing filter

Editing bufferViewing

buffer

Editing filter

Test

Page 73: Unit 3

USER INTERFACES

� A user interface plays a vital role in simplifying

the interaction of user with an

application.classically,UI functionalities have two

important aspects- issuing of commands and

exchange of data.exchange of data.

� Hence an understanding commands and data

was implicit in the use of an application.

� A UI can be visulized to consist of two compenent

a dialog manager and presentation manager

Page 74: Unit 3

CONT…

� A dialog manager manages the conversation

between the user and the application. This

involves prompting the user for a command and

transmitting the command to the application.

� The presentation manager displays the data � The presentation manager displays the data

produced by the application in an appropriate

manner on the user’s display or printer device.

Page 75: Unit 3

COMMAND DIALOG

� Command are issued to an application through a

command dialog. Three ways to implement

command dialogs are:

1) Command language

2) Command menus2) Command menus

3) Direct manipulation

� Command language for computer application

are similar to command language for operating

system.

� Primitive command language support

imperative commands with syntax<action>

<parameters>.sss

Page 76: Unit 3

CONT..

� Command menus provide obivous advantades to

the casual user of an application,as the basic

funcationalities of the application are reflected in

the menu choices.

� A hierarchy of menus can be used to guide the � A hierarchy of menus can be used to guide the

user into the details concerning a functionality.

Page 77: Unit 3

CONT…

� A direct manipulation system provides the user

with a visual display of the universe of the

application. The display shows the important

objects in the universe.

� Actions or opreations over objects are indicated � Actions or opreations over objects are indicated

using some kind of pointing device,

� EG. A cursor or mouse.

Page 78: Unit 3

PRINCIPLE OF COMMAND DIALOG DESIGN

1) Ease of use

2) Consistency in command structure

3) Immediate feedback on user commands

4) Error handling

On line help to avoid memorizing command 5) On line help to avoid memorizing command

details

6) Undo facility

7) Shortcut for experienced users

Page 79: Unit 3

STRUCTURE OF A USER INTERFACE

� The UI consist of two main compenents,presentation manager and dialog manager.

� Structure diagram for user interface:

Application

user

interface

user

Application

code

Graphics

package

Dialog

manager

Presentation

manager

Page 80: Unit 3

USER INTERFACE MANAGEMENT SYSTEM

� A user interface management system automates

the generation of user interface. UIMS accepts

specification of the presentation and dialog

semantics to produce the presentation and dialog

managers of the UI resp. managers of the UI resp.

� In the following we describe two UIMS.

1) Menulay

2) hypercard

Page 81: Unit 3

MENULAY

� Menulay is an early UIMS using the screen

layout as the basis for the dialog model. The UI

designer starts by designing the user screen.

Page 82: Unit 3

HYPERCARD

� This UIMS from appale incorporates object

orientation in the event oriented approach.

� A card has an associated screen layout containing

buttons and field.