List of vari-WPS Office
List of vari-WPS Office
List of vari-WPS Office
The 8086 microprocessor has a wide range of instructions that can be categorized into different types.
Here are some commonly used instructions and a brief explanation of how they work:
• Data Transfer Instructions: These instructions are used to move data between registers, memory, and
immediate values. Examples Include MOV (move), XCHG (exchange), PUSH (push onto stack), and POP
(pop from stack).
• Arithmetic Instructions: These instructions perform various arithmetic operations on data stored in
registers or memory locations. They include ADD (addition), SUB (subtraction), MUL (multiplication), DIV
(division), and INC (increment).
• Logical Instructions: Logical instructions perform logical operations such as AND, OR, XOR, and NOT on
data. They can be used for bitwise operations and logical comparisons.
• Control Transfer Instructions: These instructions are used to control the flow of program execution.
They include JMP (unconditional jump), JZ (jump if zero), JE (Jump if equal), JNE (jump if not equal), and
CALL (call a subroutine).
String Instructions: These instructions are used to perform operations on strings or arrays of data. They
include MOVSB (move byte from string to string), LODSB (load byte from string), STOSB (store byte to
string), and REP (repeat instruction prefix).
Input/Output Instructions: These instructions are used to transfer data between the microprocessor and
input/output devices. They include IN (input from port), OUT (output to port), and INT (interrupt).
• Flag Control Instructions: These instructions manipulate the flags in the flag register, which indicate
the status of the microprocessor. They include CLC (clear carry flag), STC (set carry flag), CMP (compare),
and TEST (perform bitwise AND and update flags).
Various control instructions in assembly language allow programmers to manipulate the flow of
program execution. These instructions determine which instructions are executed next based on certain
conditions or perform unconditional jumps to specific locations in the program. Here are explanations of
some commonly used control instructions:
1. JMP (Jump): The JMP instruction is an unconditional jump instruction that transfers program control
to a specified memory location or label. It allows the program to continue execution from a different
part of the code. For example, JMP label will transfer control to the memory location or label specified.
2. JZ (Jump if Zero) and JNZ (Jump if Not Zero): These conditional jump instructions are used to perform
jumps based on the state of the Zero Flag (ZF) in the flag register. JZ transfers control to a specified
location if the ZF is set (indicating that the result of a previous operation was zero), while JNZ transfers
control if the ZF is not set.
3. JE (Jump if Equal) and JNE (Jump if Not Equal): These conditional jump instructions are
similar to JZ and JNZ but are specifically used for comparing two values. JE transfers control if the
compared values are equal (ZF set), while JNE transfers control if the values are not equal (ZF not set).
4. JC (Jump if Carry) and JNC (Jump if No Carry): These instructions are used to perform jumps based on
the state of the Carry Flag (CF) in the flag register JC transfers control if the CF is set (indicating a carry or
borrow occurred in a previous operation), while JNC transfers control if the CF is not set.
5. JA (Jump if Above), JAE (Jump if Above or Equal), JB (Jump if Below), and JBE (Jump if Below or Equal):
These conditional jump instructions are used for unsigned comparisons. JA transfers control if the value
is above (CF and ZF not set), JAE transfers control if the value is above or equal (CF not set), JB transfers
control if the value is below (CF set), and JBE transfers control if the value is below or equal (CF or ZF
set).
the BX register.
The 8086 microprocessor supports various addressing modes, which determine how operands are
accessed or addressed in memory or registers. These addressing modes provide flexibility and efficiency
in programming. Here are explanations of some commonly used addressing modes in the 8086:
1. Immediate Addressing: In immediate addressing mode, the operand is a constant or immediate value
directly specified in the instruction itself. For example, MOV AX, 1000h moves the immediate value
1000h into the AX register.
2. Register Addressing: In register addressing mode, the operand is stored in a register. Both the source
and destination operands are registers. For example, ADD AX, BX adds the contents of the BX register to
the AX register.
3. Direct Addressing: In direct addressing mode, the operand specifies a memory address directly. The
instruction accesses the data at that memory location. For example, MOV AX, [1000h] moves the value
stored at memory location 1000h into the AX register
4. Indirect Addressing: In indirect addressing mode, the operand is a memory address stored in a
register. The instruction accesses the data at the memory location pointed to by the register. For
example, MOV AX, [BX] moves the value stored at the memory location pointed to by the BX register
into the AX register.
5. Base Addressing: Base addressing mode involves adding an offset to a base register to calculate the
memory address. The base register can be any general-purpose register like BX, BP, or Sl. For example,
MOV AX, [BX+10h] moves the value stored at the memory location BX+10h into the AX register.
6. Indexed Addressing: Indexed addressing mode involves adding an offset to an index register to
calculate the memory address. The index register can be any general-purpose register like SI, DI, or BX.
For example, MOV AX, [SI+10h] moves the value stored at the memory location SI+10h into the AX
register.
4. Write the difference between 8087 Intel-co processor and 8086 microprocessors
The 8087 Intel co-processor and the 8086 microprocessor are two distinct components with different
functionalities. Here are the key differences between them:
⚫ 8086 Microprocessor: The 8086 microprocessor is a central processing unit (CPU) that performs
general-purpose computing tasks. It executes instructions, performs arithmetic and logical operations,
controls program flow, and manages data storage and retrieval.
8087 Intel Co-processor. The 8087 Intel co- processor, also known as the math co- processor, is an
optional extension to the 8086 microprocessor. Its primary function is to accelerate floating-point
arithmetic operations, such as mathematical calculations involving real numbers, trigonometric
functions, logarithms, etc.
2. Instruction Set:
⚫ 8086 Microprocessor: The 8086 microprocessor has its own instruction set, which includes a wide
range of instructions for data transfer, arithmetic and logical operations, control flow, and other
general- purpose computations.
⚫ 8087 Intel Co-processor: The 8087 co- processor has its own specialized instruction set, known as the
x87 instruction set. This instruction set is specifically designed for floating-point arithmetic operations,
providing instructions for tasks like addition, subtraction, multiplication, division, and transcendental
functions.
3. Data Processing:
8086 Microprocessor: The 8086 microprocessor primarily handles integer- based data processing. It
performs arithmetic and logical operations on integers, character data, and memory addresses.
⚫ 8087 Intel Co-processor: The 8087 co- processor specializes in floating-point data processing. It
performs high-speed calculations involving real numbers, providing enhanced precision and accuracy for
floating- point arithmetic operations.
4. Integration:
⚫ 8086 Microprocessor: The 8086 microprocessor is a standalone chip that can function independently
as a CPU in a computer system. It can execute instructions and perform general computing tasks on its
own.
⚫ 8087 Intel Co-processor: The 8087 co- processor is an optional chip that works in tandem with the
8086 microprocessor. It is designed to be connected to the 8086 and operates as a coprocessor,
offloading floating- point calculations from the main CPU.
⚫ 8087 Intel Co-processor: The 8087 co- processor requires software applications specifically written to
utilize its floating-point capabilities. While many software programs were developed to take advantage
of the 8087 co-processor, its usage was not as widespread as the 8086 microprocessor.
5. What are the function of Ready, ALE, HOLD, DEN and RESET pins of 8086 microprocessor?
The 8086 microprocessor has several control pins, each serving a specific function. Here's an explanation
of the functions of the Ready, ALE, HOLD, DEN, and RESET pins:
1. Ready (RDY):
The Ready pin is an input pin that indicates whether the 8086 microprocessor is ready to accept data or
perform a memory or 1/0 operation. When the Ready pin is high (active), it indicates that the external
device is ready to provide or accept data. The microprocessor will halt its operation until the Ready pin
becomes active.
The ALE pin is an output pin used to indicate when the address bus contains a valid address. It is
typically connected to an external latch that captures the address from the address bus. The ALE pin
goes high for one clock cycle to indicate that the address bus lines have stable valid address
The Hold pin is an input pin used to pause the operation of the microprocessor. When the Hold pin is
activated by an external device, it requests the microprocessor to release the control of the system bus
temporarily. This allows another device to gain control and access the system bus for a specific period.
4. Data Enable (DEN):
The DEN pin is an output pin that indicates the availability of valid data on the data bus. It is used in
conjunction with the control signals for memory or I/O operations. When the DEN pin is high, it signifies
that the data bus contains valid data for reading or writing.
5. Reset (RESET):
The Reset pin is an input pin used to reset the microprocessor and initialize it to a known state. When
the Reset pin is activated, the microprocessor stops its execution, clears internal registers, and begins
execution from a predefined address. It is typically used during system startup or when a reset condition
is required.
The 80x86 family of CPUs refers to a series of microprocessors developed by Intel and compatible
processors from other manufacturers. The name "80x86" comes from the original Intel 8086 processor,
which was released in 1978. The family includes a wide range of processors with varying features and
capabilities, and it has had a significant impact on the world of computing. Here are some key points
about the 80x86 family:
The 80x86 family has evolved over several generations, each introducing new features, improved
performance, and architectural enhancements. The major generations include the 8086, 80286, 80386,
80486, Pentium, Pentium Pro, Pentium II, Pentium III, Pentium 4, Pentium D, Core 2, and the more
recent Core 13, 15, 17, and 19 processors.
3. Compatibility:
One of the significant strengths of the 80x86 family is its backward compatibility. Newer processors in
the family can generally run software designed for older processors. This backward compatibility has
allowed for the smooth transition and widespread adoption of new processor generations while
maintaining
The 80x86 family has seen significant improvements in performance over the years, including higher
clock speeds, increased cache sizes, improved instruction pipelines, and the addition of multiple cores.
The family has also introduced various features such as floating-point units, MMX (Multi-Media
Extensions), SSE (Streaming SIMD Extensions), virtualization support, advanced power management, and
security enhancements.
The 80x86 family has seen significant improvements in performance over the years, including higher
clock speeds, increased cache sizes, improved instruction pipelines, and the addition of multiple cores.
The family has also introduced various features such as floating-point units, MMX (Multi-Media
Extensions), SSE (Streaming SIMD Extensions), virtualization support, advanced power management, and
security enhancements.
5. Market Dominance:
The 80x86 family has achieved remarkable market dominance in the personal computer (PC) and server
markets. The processors have been widely used in desktops, laptops, workstations, servers, and
embedded systems. The family's compatibility, performance, and wide availability of software and
development tools have contributed to its popularity.
6. 64-bit Architecture: With the introduction of the Intel 64 architecture (formerly known as x86-64 or
AMD64), the 80x86 family expanded its addressable memory space beyond the 32-bit limit. 64-bit
processors in the family can handle larger amounts of memory and perform computations on 64-bit
data types, providing improved performance for certain applications.
Certainly! Let's compare the 8085, 8086, and 8088 microprocessors across various aspects:
1. Architecture:
• 8085: The 8085 microprocessor is an 8-bit processor with an 8-bit data bus and a 16-bit address bus. It
follows the von Neumann architecture and has a single accumulator register.
⚫ 8086: The 8086 microprocessor is a 16-bit processor with a 16-bit data bus and a 20-bit address bus. It
follows the von Neumann architecture and has two general-purpose registers, AX and BX, along with
other specialized registers.
8088: The 8088 microprocessor is similar to the 8086 but has an 8-bit external data bus, making it an 8-
bit processor with a 16-bit data bus. It has the same 20-bit address bus as the 8086.
2. Performance:
8085: The 8085 microprocessor operates at a clock speed of up to 3 MHz and has a maximum memory
addressable space of 64 KB.
8086: The 8086 microprocessor operates at a clock speed of up to 10 MHz (later versions reached higher
speeds) and has a maximum memory addressable space of 1 MB.
8088: The 8088 microprocessor operates at a clock speed of up to 5 MHz and has a maximum memory
addressable space of 1 MB.
3. Instruction Set:
8085: The 8085 microprocessor has a relatively simple instruction set with fewer instructions compared
to the 8086/8088. It supports 8-bit arithmetic and logical operations.
8086/8088: The 8086/8088 microprocessors have a more extensive instruction set compared to the
8085. They support 16-bit arithmetic and logical operations, as well as additional instructions for
memory access, string operations, and more.
4. Bus Architecture:
• 8085: The 8085 microprocessor has a single bus architecture, where both data and addresses share
the same bus.
8086/8088: The 8086/8088 microprocessors have a separate data bus and address bus, allowing for
simultaneous data transfer and address calculation.
8. What do you mean interrupt in hardware and software? And List the types of hardware
Interrupts, both in hardware and software, play crucial roles in computer systems. They allow for the
interruption of the normal program execution to handle specific events or conditions. Here's an
explanation of hardware and software interrupts and the types of interrupts in the 8086
microprocessor:
Hardware Interrupt:
A hardware interrupt is a signal or event generated by external hardware devices to request attention
from the microprocessor. It occurs when an external device requires Immediate attention or when a
predefined condition is met. The microprocessor responds to the interrupt by suspending its current
execution, saving the necessary context, and transferring control to an interrupt handling routine called
an Interrupt Service Routine (ISR).
1. Non-Maskable Interrupt (NMI): It is a high- priority interrupt that cannot be disabled by software. It is
typically used for critical events like power failures or hardware malfunctions.
2. External Interrupts (INTO-INT15): These are maskable interrupts that can be enabled or disabled by
software. They are used for events generated by external devices, such as keyboard input or I/O devices.
3. Interrupt Request (IRQO-IRQ15): These are also maskable interrupts used for various hardware
devices, like timers, serial ports, or disk controllers. They are typically associated with the Programmable
Interrupt Controller (PIC) to manage interrupt priorities.
Software Interrupt:
A software interrupt, also known as a software trap or a software interrupt instruction, is a special
instruction executed by the program itself to request a specific service from the operating system or to
invoke a predefined routine. Software interrupts are typically used for system calls, I/O operations, or to
handle exceptional conditions.
1. INT n: The INT instruction generates a software interrupt, where 'n' is a value between 0 and 255.
These interrupts are typically used for invoking predefined routines or services provided by the
operating system.
2. INTO: The INTO instruction generates a software interrupt specifically used for interrupting the
program flow if the Overflow Flag (OF) is set.
3. IRET: The IRET instruction is used to return from an interrupt service routine. It restores the saved
context and resumes program execution.
9. What are the purposes of using directives? Show by giving different kinds of examples.
Directives in programming languages, such as assembly languages, serve specific purposes in guiding the
assembler or compiler in the translation and organization of the source code.
These directives provide instructions to the assembler or compiler regarding memory allocation, code
organization, inclusion of external files, and other aspects. Here are a few examples of different kinds of
directives and their purposes:
⚫ORG (Origin): Specifies the starting address for the code or data.
2. Macro Directives:
• MACRO: Defines a macro, which is a set of instructions that can be reused throughout the code.
3. Control Directives:
• IF, ELSE, ENDIF: Provides conditional assembly, allowing different parts of the code to be assembled
based on conditions.
4. Include Directives:
⚫ INCLUDE: Inserts the contents of an external file into the source code at the specified location.
⚫INCBIN: Includes binary data from a separate file into the code.
5. Export/Import Directives:
⚫ SECTION: Defines different sections of the code, such as code section, data section, or stack section.
• EXTERN: Declares external symbols for linking with other modules or files.
10. Explain the difference between immediate and indirect operand instructions
In computer architecture and assembly language programming, the terms "immediate operand" and
"indirect operand" refer to different addressing modes used in instructions to access data or operands.
Here's an explanation of the difference between immediate and indirect operand instructions:
1. Immediate Operand:
An immediate operand is a value or constant that is directly specified in the instruction itself. It is used
as an operand for an instruction without the need to fetch it from memory. The immediate value is
typically a constant or a literal value that is known at assembly time or determined during program
execution.
For example, consider the instruction "MOV AX, 5000h in x86 assembly language. Here, 5000h is the
immediate operand, and it is directly loaded into the AX register without accessing memory. Immediate
operands are useful when a constant value needs to be used in an instruction or when performing
simple arithmetic or logical operations
2. Indirect Operand:
An indirect operand is an addressing mode that involves using a memory address to access the operand.
Instead of directly specifying the value, the instruction refers to a memory location where the actual
operand is stored. The memory location is typically specified by a register or a memory pointer.
For example, in the instruction "MOV AX, [BX]", the content of the memory location pointed to by the
BX register is accessed and loaded into the AX register. Here, [BX] represents the indirect operand,
where the value is retrieved from the memory location pointed to by the BX register.
Indirect operands are useful when working with data structures, arrays, or when the actual operand is
stored in memory and needs to be fetched dynamically during program execution. They allow for more
flexible and dynamic access to data compared to immediate operands.
a) Pass by value
In pass by value, the value of the parameter is copied and passed to the function or subroutine. Any
modifications made to the parameter within the function do not affect the original value in the calling
code. The function works with a local copy of the parameter.
b) Pass by reference
In pass by reference, the memory address (reference) of the parameter is passed to the function. This
allows the function to access and modify the original value directly. Any changes made to the parameter
within the function will affect the value in the calling code.
c) Pass by value-returned
In pass by value-returned, the function computes the result and returns it as the function's return value.
The initial value of the parameter is passed to the function, but the function's modified result is returned
separately. This mechanism allows the function to return multiple values.
d) Pass by name
Pass by name is a parameter passing mechanism where the name of the parameter is substituted with
its corresponding code or expression at the call site. The code is evaluated whenever the parameter is
used within the function. It allows for delayed evaluation of the parameter's value.