0% found this document useful (0 votes)
76 views17 pages

Board Ques Solution - 3

Assembly language is a low-level programming language that implements a symbolic representation of machine code instructions for a specific CPU architecture. It has some advantages over machine language like being easier for humans to read and write, but it is machine-dependent and lacks high-level features like variables and functions. An assembler is a program that translates assembly language instructions into machine code. Other essential tools are compilers, which translate high-level languages to machine code, linkers, which combine program modules, editors for writing code, and debuggers for testing programs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views17 pages

Board Ques Solution - 3

Assembly language is a low-level programming language that implements a symbolic representation of machine code instructions for a specific CPU architecture. It has some advantages over machine language like being easier for humans to read and write, but it is machine-dependent and lacks high-level features like variables and functions. An assembler is a program that translates assembly language instructions into machine code. Other essential tools are compilers, which translate high-level languages to machine code, linkers, which combine program modules, editors for writing code, and debuggers for testing programs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

1. What is assembly language? Mention advantages and disadvantages.

[2014]

Assembly Language:

An assembly language is a low-level programming language for microprocessors and other


programmable devices. It is not just a single language, but rather a group of languages.
Assembly language implements a symbolic representation of the machine code needed to
program a given CPU architecture.  Assembly languages generally lack high-level
conveniences such as variables and functions, and they are not portable between various
families of processors. It has the same structures and set of commands as machine
language, but it allows a programmer to use names instead of numbers. This language is
still useful for programmers when speed is necessary or when they need to carry out an
operation that is not possible in high-level languages.
Advantages   Disadvantages
Assembly language is
Like machine language, it is
easier to understand and
  also machine
use as compared to
dependent/specific.
machine language.
Since it is machine
It is easy to locate and dependent, the programmer
 
correct errors. also needs to understand the
hardware.
It is easily modified.    

2. Short note: Assembler, Complier, Linker, Debugger, Editor [2014][IST model test]
Assembler: A computer will not understand any program written in a language, other than
its machine language. The programs written in other languages must be translated into the
machine language. Such translation is performed with the help of software. A program
which translates an assembly language program into a machine language program is called
an assembler. If an assembler which runs on a computer and produces the machine codes
for the same computer then it is called self assembler or resident assembler. If an assembler
that runs on a computer and produces the machine codes for other computer then it is
called Cross Assembler.
Assemblers are further divided into two types: One Pass Assembler and Two
Pass Assembler. One pass assembler is the assembler which assigns the memory addresses
to the variables and translates the source code into machine code in the first pass
simultaneously. A Two Pass Assembler is the assembler which reads the source code twice.
In the first pass, it reads all the variables and assigns them memory addresses. In the
second pass, it reads the source code and translates the code into object code.

Compiler: It is a program which translates a high level language program into a machine
language program. A compiler is more intelligent than an assembler. It checks all kinds of
limits, ranges, errors etc. But its program run time is more and occupies a larger part of
the memory. It has slow speed. Because a compiler goes through the entire program and
then translates the entire program into machine codes. If a compiler runs on a computer
and produces the machine codes for the same computer then it is known as a self compiler
or resident compiler. On the other hand, if a compiler runs on a computer and produces
the machine codes for other computer then it is known as a cross compiler.

Linker: In high level languages, some built in header files or libraries are stored. These
libraries are predefined and these contain basic functions which are essential for executing
the program. These functions are linked to the libraries by a program called Linker. If
linker does not find a library of a function then it informs to compiler and then compiler
generates an error. The compiler automatically invokes the linker as the last step in
compiling a program.
Not built in libraries, it also links the user defined functions to the user
defined libraries. Usually a longer program is divided into smaller subprograms called
modules. And these modules must be combined to execute the program. The process of
combining the modules is done by the linker.

Editor:
An editor may refer to any of the following:
1) In general, an editor refers to any program capable of editing files. Good examples
are image editors, such as Adobe Photoshop, and sound editors, such as Audacity.
2) The term editor is commonly used to refer to a text editor, which is a software
program that allows users to create or manipulate plain text computer files. They
are often used in the field of computer programming.

Debugger:

A debugger is a computer program used by programmers to test and debug a target


program. Debuggers may use instruction-set simulators, rather than running a program
directly on the processor to achieve a higher level of control over its execution. This allows
debuggers to stop or halt the program according to specific conditions. However, use of
simulators decreases execution speed.
When a program crashes, debuggers show the position of the error in the target program.
Most debuggers also are capable of running programs in a step-by-step mode, besides
stopping on specific points. They also can often modify the state of programs while they are
running.

3. What is the function of MN/MX pin of Intel 8086?[2011,2a][2011][IST]


4. Describe different types of interrupt.[2015][2013 ,3(c)][2010,5a]

The meaning of ‘interrupts’ is to break the sequence of operation.


While the Microprocessor is executing a program, an ‘interrupt’ breaks the normal sequence of
execution of instructions, diverts its execution to some other program called Interrupt Service
Routine (ISR). After executing, control returns the back again to the main program.

There are two kinds of Interrupts:


a) Hardware Interrupts
i) Maskable Interrupts ii) Non-Maskable Interrupts
b) Software Interrupt (INT n)
----- 256 Types Of Software Interrupts.

Hardware Interrupts :

The interrupts initiated by external hardware by sending an appropriate signal to the


interrupt pin of the processor is called hardware interrupt. The 8086 processor has two
interrupt pins INTR and NMI. The interrupts initiated by applying appropriate signal to
these pins are called hardware interrupts of 8086.

i) Maskable Interrupts
The processor has the facility for accepting or rejecting hardware interrupts. Programming the
processor to reject an interrupt is referred to as masking or disabling and programming the
processor to accept an interrupt is referred to as unmasking or enabling. In 8086 the interrupt flag
(IF) can be set to one to unmask or enable all hardware interrupts and IF is cleared to zero to
mask or disable a hardware interrupts except NMI. The interrupts whose request can be either
accepted or rejected by the processor are called maskable interrupts.

ii) Non-Maskable Interrupts

The interrupts whose request has to be definitely accepted (or cannot be rejected) by the
processor are called non-maskable interrupts. Whenever a request is made by non-maskable
interrupt, the processor has to definitely accept that request and service that interrupt by
suspending its current program and executing an ISR. In 8086 processor all the hardware
interrupts initiated through INTR pin are maskable by clearing interrupt flag (IF). The interrupt
initiated through NMI pin and all software interrupts are non-maskable.

Software Interrupts:

The software interrupts are program instructions. These instructions are inserted at desired
locations in a program. While running a program, if software interrupt instruction is encountered
then the processor initiates an interrupt. The 8086 processor has 256 types of software interrupts.
The software interrupt instruction is INT n, where n is the type number in the range 0 to 255.

8086 INTERRUPT TYPES 256 INTERRUPTS OF 8086 ARE DIVIDED IN TO 3


GROUPS
1. TYPE 0 TO TYPE 4 INTERRUPTS
- --These Are Used For Fixed Operations And Hence Are Called Dedicated Interrupts
2. TYPE 5 TO TYPE 31 INTERRUPTS
----Not Used By 8086,reserved For Higher Processors Like 80286 80386 Etc
3. TYPE 32 TO 255 INTERRUPTS
--- Available For User, called User Defined Interrupts These Can Be H/W Interrupts And
Activated Through Intr Line Or Can Be S/W Interrupts.

Type – 0 Divide Error Interrupt


Quotient Is Large Cant Be Fit In Al/Ax Or Divide By Zero

Type –1 Single Step Interrupt


Used For Executing The Program In Single Step Mode By Setting Trap Flag

Type – 2 Non Maskable Interrupt


This Interrupt Is Used For Execution Of NMI Pin.

Type – 3 Break Point Interrupt


Used For Providing Break Points In The Program

Type – 4 Over Flow Interrupt


Used To Handle Any Overflow Error.

5 . a) What is the advantages of working with segmented memory?[2012,2b]

Segmentation is the process in which the main memory of computer is divided into
different segments and each segment has its own base address. Segmentation is used to
increase the execution speed of computer system so that processor can able to fetch and
execute the data from memory easily and fastly.

Advantages of segmentation :

The main advantages of the segmented memory scheme are as follows:

1. Allows the memory capacity to be 1 Mbyte although the actual addresses to be handled
are of 16-bit size

2. Allows the placing of code data and stack portions of the same program in different
parts (segments) of memory, for data and code protection.

3. Permits a program and/ or its data to be put into different areas of memory each time
program is executed, ie, provision for relocation may be done.

5,b) Write a short note on memory segmentation of 8086.[2011, 6a]

Memory Segmentation is the process in which the main memory of computer is divided
into different segments and each segment has its own base address. Segmentation is used to
increase the execution speed of computer system so that processor can able to fetch and
execute the data from memory easily and fastly.
Segmentation in 8086 :

1. The size of address bus of 8086 is 20 and is able to address 1 Mbytes ( ) of physical
memory.

2. The compete 1 Mbytes memory can be divided into 16 segments, each of 64 Kbytes size.

3. The addresses of the segment may be assigned as 0000H to F000H respectively.

4. The offset values are from 0000H to FFFFFH.

Types of Segmentation:

overlapping segment:

A segment starts at a particular address and its maximum size can go up to 64 Kbytes. But
if another segment starts along this 64 Kbytes location of the first segment, the two
segments are said to be overlapping segment. • The area of memory from the start of the
second segment to the possible end of the first segment is called as overlapped segment.

Non Overlapped Segment :

A segment starts at a particular address and its maximum size can go up to 64 Kbytes. But
if another segment starts before this 64 Kbytes location of the first segment, the two
segments are said to be Non- overlapping segment.

The main advantages of the segmented memory scheme are as follows:

1. Allows the memory capacity to be 1 Mbyte although the actual addresses to be


handled are of 16-bit size
2. Allows the placing of code data and stack portions of the same program in different
parts (segments) of memory, for data and code protection.
3. Permits a program and/ or its data to be put into different areas of memory each
time program is executed, ie, provision for relocation may be done.

6 . What is Based- index addressing mode ? Explain with an example.[2014,3b]


7. What is Register –indirect addressing modes? Explain an example.[ 2014,3c]

Transfers a byte or word between a register and a memory location addressed by an index
or base register
The address of the memory location where the operand resides is held by a register.
The registers used for this purpose are SI, DI, and BX
They must be combined with DS in order to generate the 20-bit physical address .
8. Define and Explain the importance of addressing mode.[2010,2 a][2013,2c]

An addressing mode means the method by which an operand can be specified in a register
or a memory location.
Advantage:
1. Addressing modes are an aspect of the instruction set architecture in most central
processing unit (CPU) designs.
2. The various addressing modes that are defined in a given instruction set
architecture define how machine language instructions in that architecture identify
the operand (or operands) of each instruction.
3. An addressing mode specifies how to calculate the effective memory address of an
operand by using information held in registers and/or constants contained within a
machine instruction or elsewhere.
4. Addressing modes helps the programmer to store or retrieve the data which is
stored in any part of the data memory.
5. In computer programming, addressing modes are primarily of interest
to compiler writers and to those who write code directly in assembly language.

9. What are the function of the control bits in the flag register of intel 8086?[2011,2
c][2013,2 b]
10. Describe the bus control signals generated by Intel 8086 in minimum mode.[2013,4b]

11. Name and Explain segment and pointer registers in 8086.[2011,3c]

There are four kinds of segment:

Code Segment (CS)

Data Segment (DS)

Stack Segment (SS)

Extra Segment (ES)


Pointer Register:
12. Define microcontroller. Difference between PLA & PAL.[2011,1d]

Microcontrollers are the devices that actually fit the profile “Computer – on – a chip” as it
consists of a main processing unit or processor along with some other components that are
necessary to make it a complete computer. The components that are present on a typical
microcontroller IC are CPU, memory, input / output ports and timers.

Difference between PLA and PAL.

 PLA has both programmable AND and OR planes whereas PAL has only
programmable AND planes and OR plane is fixed
 PLA has more flexibility in the logic circuit function implementation than PAL
 PAL is simpler to manufacture than PLA
 PLA have reduced speed performance
 PAL devices are manufactured in smaller size.

13. Define Microprocessor? What are the salient features of fourth and fifth generation
microprocessor?[IST][2013]

A Microprocessor, popularly known as “computer on a chip” in its early days, is a general


purpose central processing unit (CPU) fabricated on a single integrated circuit (IC) and is a
complete digital computer . It is a small but very powerful electronic brain that operates at
a blistering speed and is often used to carry out instructions of a computer program in
order to perform arithmetic and logical operations, storing the data, system control, input /
output operations etc. as per the instructions.

4th Generation:

1. From 1981 to 1995 


2. This generation developed 32 bit microprocessors 
3. Designed using HCMOS fabrication. 
4. Example: INTEL-80386 and Motorola’s 68020/68030

5th Generation:

1. From 1995 to until now


2. 64-bit processors
3. Bringing out high-performance and high-speed processors 
4. Example: Pentium, Celeron, Dual and Quad core processors.
14. Briefly explain the evolution of microprocessor?[2012]

 A microprocessor is also known as a central processing unit in which numbers of


peripherals’ are fabricated on a single chip. It has ALU (arithmetic and logic unit), a
control unit, registers, bus systems and a clock to perform computational tasks.
Generation of Microprocessor
1st Generation:

1. This was the period during 1971 to 1973 of microprocessor’s history.


2. In 1971, INTEL created the first microprocessor 4004 that would run at a clock
speed of 108 KHz.
3. All these were not TTL compatible processors.
4. Example: Rockwell international PPS-4, INTEL-8008 and National semiconductors
IMP-16

2nd Generation:

1. This was the period during 1973 to 1978


2. Very efficient 8-bit microprocessors were implemented 
3. Owing to their superfast speed, they were costly as they were based on NMOS
technology fabrication.
4. Example: Motorola 6800 and 6801, INTEL-8085 and Zilogs-Z80

3rd Generation:

1. From 1979 to 1980


2. During this period 16 bit processors were created
3. Designed using HMOS technology.
4. Speeds of those processors were four times better than the 2nd generation
processors.
5. Example: INTEL 8086/80186/80286 and Motorola 68000 and 68010
4th Generation:

5. From 1981 to 1995 


6. This generation developed 32 bit microprocessors 
7. Designed using HCMOS fabrication. 
8. Example: INTEL-80386 and Motorola’s 68020/68030

5th Generation:

5. From 1995 to until now


6. 64-bit processors
7. Bringing out high-performance and high-speed processors 
8. Example: Pentium, Celeron, Dual and Quad core processors.

15. Write down the advantages of microprocessor.[2014,7a]

The advantages of microprocessors are

 The processing speed is high


 Intelligence has been brought to systems
 Flexible.
 Compact size.
 Easy maintenance
 Complex mathematics

16. What do you mean by program segment prefix(PSP)?

17. Define base pointer and stack pointer? Write down the read and write operation of
stack pointer?[2014 ,1b][IST,1c]
Stack Operation:

1. Processor state is saved on the stack when changes in program flow occur. The
68HC05 has a 64-byte hardware-controlled stack. Reset initializes the stack pointer
to 00FF; the RSP instruction does the same. No other instructions allow direct user
manipulation of the stack.
2. When a byte is 'pushed' onto the stack, it is written to the location pointed to by the
stack pointer, and then the stack pointer is decremented by one. When a byte is
'pulled' from the stack, the stack pointer is incremented by one, and the location
pointed to by the stack pointer is then read.
3. When the stack pointer is at 00C0, the next push will store a byte at 00C0 and roll
the stack pointer to 00FF. This is stack pointer overflow.
4. Subsequent pushes will overwrite information stored on the stack from 00FF on
down. Similarly, underflow occurs when the stack pointer is at $00FF and the next
pull rolls the stack pointer to 00C0 and reads the byte there.
5. Subroutines called with the BSR and JSR instructions save a two byte return
address on the stack. Interrupts save a two byte return address, the index register,
the accumulator, and the condition code register.

18. Draw pin diagram of 8086 and briefly describe all minimum mode pins.[2010,6a]

The pin diagram is given below:


Minimum mode pins :

You might also like