Podcast
Questions and Answers
Which of these options are correct? (Select all that apply)
Which of these options are correct? (Select all that apply)
There are 7 addressing modes in the 8086 microprocessor.
There are 7 addressing modes in the 8086 microprocessor.
False
What does the term "Opcode" stand for?
What does the term "Opcode" stand for?
Operation Code
What does the term "Operand" refer to?
What does the term "Operand" refer to?
Signup and view all the answers
In immediate addressing mode, the source operand is a constant.
In immediate addressing mode, the source operand is a constant.
Signup and view all the answers
Immediate addressing mode can be used to load information into any register, including segment and flag registers.
Immediate addressing mode can be used to load information into any register, including segment and flag registers.
Signup and view all the answers
In direct addressing mode, what part of the instruction is directly specified?
In direct addressing mode, what part of the instruction is directly specified?
Signup and view all the answers
How is the physical/effective address calculated in direct addressing mode?
How is the physical/effective address calculated in direct addressing mode?
Signup and view all the answers
Register addressing mode is generally preferred because it results in compact and faster executing instructions.
Register addressing mode is generally preferred because it results in compact and faster executing instructions.
Signup and view all the answers
All registers, including IP (Instruction Pointer), can be used in register addressing mode.
All registers, including IP (Instruction Pointer), can be used in register addressing mode.
Signup and view all the answers
What type of register is used in register indirect addressing mode?
What type of register is used in register indirect addressing mode?
Signup and view all the answers
In index addressing mode, where is the offset of the operand stored?
In index addressing mode, where is the offset of the operand stored?
Signup and view all the answers
What is the formula to calculate the effective address in index addressing mode?
What is the formula to calculate the effective address in index addressing mode?
Signup and view all the answers
Register relative addressing mode calculates the effective address by adding a displacement with the content of any register.
Register relative addressing mode calculates the effective address by adding a displacement with the content of any register.
Signup and view all the answers
What registers are involved in based index addressing mode?
What registers are involved in based index addressing mode?
Signup and view all the answers
What is the formula for calculating the effective address in based index addressing mode?
What is the formula for calculating the effective address in based index addressing mode?
Signup and view all the answers
In relative based indexed addressing mode, how is the effective address formed?
In relative based indexed addressing mode, how is the effective address formed?
Signup and view all the answers
What is the formula for calculating the effective address in relative based indexed addressing mode?
What is the formula for calculating the effective address in relative based indexed addressing mode?
Signup and view all the answers
Identify the addressing mode used in the instruction MOV AL, BL
.
Identify the addressing mode used in the instruction MOV AL, BL
.
Signup and view all the answers
Identify the addressing mode used in the instruction MOV AX, 0FFFH
.
Identify the addressing mode used in the instruction MOV AX, 0FFFH
.
Signup and view all the answers
Identify the addressing mode used in the instruction MOV [DI], AX
.
Identify the addressing mode used in the instruction MOV [DI], AX
.
Signup and view all the answers
Identify the addressing mode used in the instruction MOV DI, [SI]
.
Identify the addressing mode used in the instruction MOV DI, [SI]
.
Signup and view all the answers
Identify the addressing mode used in the instruction MOV [BX]+0400H, CX
.
Identify the addressing mode used in the instruction MOV [BX]+0400H, CX
.
Signup and view all the answers
What is the effective address of the instruction MOV CX, [4321H]
if the DS register contains the value 5000H?
What is the effective address of the instruction MOV CX, [4321H]
if the DS register contains the value 5000H?
Signup and view all the answers
A machine language instruction format consists of one or more ____ associated with it.
A machine language instruction format consists of one or more ____ associated with it.
Signup and view all the answers
What is the name of the field that indicates the type of operation to be performed by the CPU?
What is the name of the field that indicates the type of operation to be performed by the CPU?
Signup and view all the answers
The length of an instruction in the 8086 instruction set is always fixed at 1 byte.
The length of an instruction in the 8086 instruction set is always fixed at 1 byte.
Signup and view all the answers
The least significant 3-bits of the opcode are used to specify the register operand in the One Byte Instruction format.
The least significant 3-bits of the opcode are used to specify the register operand in the One Byte Instruction format.
Signup and view all the answers
The second byte in the Register to Register Instruction format specifies the operation code and width of the operand.
The second byte in the Register to Register Instruction format specifies the operation code and width of the operand.
Signup and view all the answers
The MOD field in the Register to/from Memory with no Displacement Instruction format indicates the mode of addressing.
The MOD field in the Register to/from Memory with no Displacement Instruction format indicates the mode of addressing.
Signup and view all the answers
In the Register to/from Memory with Displacement Instruction format, the displacement field can be either 1 or 2 bytes long.
In the Register to/from Memory with Displacement Instruction format, the displacement field can be either 1 or 2 bytes long.
Signup and view all the answers
The Immediate Operand to Register Instruction format uses the entire first byte and only 1 bit from the second byte for the opcode.
The Immediate Operand to Register Instruction format uses the entire first byte and only 1 bit from the second byte for the opcode.
Signup and view all the answers
The Immediate Operand to Memory with 16-bit Displacement Instruction format requires 3 or 4 bytes for coding.
The Immediate Operand to Memory with 16-bit Displacement Instruction format requires 3 or 4 bytes for coding.
Signup and view all the answers
The Instruction set of the 8086 microprocessor is categorized into 6 different types.
The Instruction set of the 8086 microprocessor is categorized into 6 different types.
Signup and view all the answers
Which of these is NOT a category of 8086 instructions?
Which of these is NOT a category of 8086 instructions?
Signup and view all the answers
The MOV
instruction is used to transfer data between one register and another or between a register and a memory location.
The MOV
instruction is used to transfer data between one register and another or between a register and a memory location.
Signup and view all the answers
The PUSH/POP
instruction operates on the stack, which is a last-in, first-out (LIFO) data structure.
The PUSH/POP
instruction operates on the stack, which is a last-in, first-out (LIFO) data structure.
Signup and view all the answers
The IN/OUT
instruction allows data to be moved directly to and from input and output ports.
The IN/OUT
instruction allows data to be moved directly to and from input and output ports.
Signup and view all the answers
The XCHG
instruction enables the swapping of data between two memory locations.
The XCHG
instruction enables the swapping of data between two memory locations.
Signup and view all the answers
The LEA
instruction is used to load the specified register with the actual value of the operand.
The LEA
instruction is used to load the specified register with the actual value of the operand.
Signup and view all the answers
The LDS/LES
instruction loads both the data register (DS or ES) and the specified destination register with the content of the specified source memory location.
The LDS/LES
instruction loads both the data register (DS or ES) and the specified destination register with the content of the specified source memory location.
Signup and view all the answers
The ADD
instruction adds an immediate value or the contents of a memory location to the contents of another register or memory location, but it can't add a register to a register.
The ADD
instruction adds an immediate value or the contents of a memory location to the contents of another register or memory location, but it can't add a register to a register.
Signup and view all the answers
The INC
instruction increases the content of a register or memory location by a value specified by the user.
The INC
instruction increases the content of a register or memory location by a value specified by the user.
Signup and view all the answers
The AAA
instruction adjusts the result in AL after an ADD
instruction that involves two ASCII operands to unpack the decimal digits in a BCD format.
The AAA
instruction adjusts the result in AL after an ADD
instruction that involves two ASCII operands to unpack the decimal digits in a BCD format.
Signup and view all the answers
The DAA
instruction specifically targets the result of addition operations that deal with packed BCD numbers, not unpacked BCD numbers.
The DAA
instruction specifically targets the result of addition operations that deal with packed BCD numbers, not unpacked BCD numbers.
Signup and view all the answers
The SUB
instruction subtracts the source operand from the destination operand and leaves the result in the destination operand.
The SUB
instruction subtracts the source operand from the destination operand and leaves the result in the destination operand.
Signup and view all the answers
The SBB
instruction subtracts the source operand and the carry flag from the destination register, similar to SUB
, but it doesn't take into account the borrow flag.
The SBB
instruction subtracts the source operand and the carry flag from the destination register, similar to SUB
, but it doesn't take into account the borrow flag.
Signup and view all the answers
The NEG
instruction takes the two's complement of the specified operand.
The NEG
instruction takes the two's complement of the specified operand.
Signup and view all the answers
The MUL
instruction performs unsigned multiplication of the operand by the content of either AL or AX, depending on whether the operand is a byte or a word.
The MUL
instruction performs unsigned multiplication of the operand by the content of either AL or AX, depending on whether the operand is a byte or a word.
Signup and view all the answers
The DIV
instruction performs signed division.
The DIV
instruction performs signed division.
Signup and view all the answers
The AAD
instruction converts two unpacked BCD digits into a packed BCD before division.
The AAD
instruction converts two unpacked BCD digits into a packed BCD before division.
Signup and view all the answers
The CBW
instruction converts a signed byte in AL to a signed word in AX.
The CBW
instruction converts a signed byte in AL to a signed word in AX.
Signup and view all the answers
The CWD
instruction converts a signed word in AX to a signed double word in DX:AX, with the sign bit of AX being copied to all bits of the DX register.
The CWD
instruction converts a signed word in AX to a signed double word in DX:AX, with the sign bit of AX being copied to all bits of the DX register.
Signup and view all the answers
What are the two steps involved in the execution of the AAA
instruction?
What are the two steps involved in the execution of the AAA
instruction?
Signup and view all the answers
The DAA
instruction adjusts the result of addition in AL for unpacked BCD numbers.
The DAA
instruction adjusts the result of addition in AL for unpacked BCD numbers.
Signup and view all the answers
Match the following instructions with their descriptions:
Match the following instructions with their descriptions:
Signup and view all the answers
Study Notes
Unit 2: 8086 Instruction Set
- The 8086 instruction set covers addressing modes, instruction formats, and programming.
- Addressing modes determine how operands (data) are accessed from memory.
- Instruction formats detail the structure of machine language instructions.
- 8086 programming uses these modes and formats to execute operations. Key types of operations are integer operations, data transfer, and arithmetic calculations.
Addressing Modes in 8086
- Addressing modes define how data is located for instructions.
- There are 8 primary addressing modes in the 8086.
- Instruction execution categorizes instructions into sequential control flow instructions and control transfer instructions.
- Modes include immediate, direct, register, register indirect, index, register relative, and based indexed addressing modes. Each mode has a specific way of determining the memory address.
Opcode & Operand in Microprocessor 8086
- Opcode is short for operation code. It's a command in machine or assembly language.
- Opcodes can manipulate operands (data values).
- Example: MOV AX, 1000H (MOV is the opcode, AX is the destination, and 1000H the source).
1. Immediate Addressing Modes
- Immediate data is part of the instruction.
- Source operand is constant.
- Example: MOV AX,0005H. This transfers the data from constant 0005H into destination register AX.
- Immediate addressing can load data into most registers (excluding segment and flag registers).
Examples of Immediate Addressing Modes
- MOV AX,2500H.
- MOV BL,22H
- MOV CX,625H
2. Direct Addressing Modes
- Data is found at a specified memory location.
- Address of the data in memory appears directly after the instruction.
- Example: MOV CX, [4321H]. This moves the data from the memory address 4321H to register CX.
3. Register Addressing Modes
- Operands are specified using registers.
- This is a preferred method due to instruction compactness and speed.
- All registers (except IP) can be used.
- Example: MOV AX, BX. Copies the data from register BX to register AX.
4. Register Indirect Addressing Mode
- Transfers data between a register and a memory location.
- Address of data is dependent on the contents of BX, SI, or DI.
- Data's location is in a specified segment (e.g., default data segment).
- Example: MOV AX, [DI] , where data is at an address determined by the contents of register DI.
5. Index Addressing Mode
- Offset of an operand is stored in one of the index registers (SI or DI).
- Default segment is DS.
- Example: MOV AX, [SI] (data is at address based on contents of register SI).
6. Register Relative Addressing Modes
- Data's location is an effective address found by adding a displacement with content in BX, BP, SI or DI and the default segment.
- Example; MOV AX, 50H + [BX].
7. Based Index Addressing Mode
- Data's location is found by adding content of base register to index register, using a default segment.
- Example: MOV AX, [BX][SI]
8. Relative Based Indexed Addressing Mode
- Data is obtained using an effective address derived by adding a displacement and the content of base and the index registers, and a default segment.
- Example: MOV AX, 50H [BX] [SI]
Instruction Format
- Machine language instructions have fields associated with them.
- The first field is the opcode field (indicating the operation).
- Other fields are operand fields for specifying data.
- Instruction lengths vary from 1 to 6 bytes. Different formats include one-byte instructions, register-to-register instructions, register-to/from memory with no displacement, register-to/from memory with displacement, immediate operand-to-register, and immediate operand-to-memory.
Instruction Set in 8086
- 8086 instruction set is grouped into seven categories: data transfer, arithmetic/logic, program control transfer, machine control, shift/rotate, flag manipulation, and string instructions.
Data Transfer Instructions
- Transfer data from one register/memory to another. Includes:
- MOV
- PUSH/POP (for stack operations)
- IN/OUT
- XCHG
- XLAT
- LEA
- LDS
- LES
Arithmetic & Logical Instructions
- Include various arithmetic operations (addition, subtraction, multiplication, division) and logical operations. Examples:
- ADD
- ADC
- INC
- DEC
- SUB
- SBB
- NEG
- MUL
- IMUL
- DIV
- IDIV
- AAM
- AAA
- DAA
- DAS
Additional Q&As
- Specific questions about instruction operations and effects are addressed.
- Example scenarios and data values are used to illustrate application.
- Instructions for manipulation and conversion of packed and unpacked BCD numbers, and programming tasks are given for practical implementation.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
This quiz covers the 8086 instruction set, including addressing modes, instruction formats, and basic programming techniques. Understand the various addressing modes and their implications for data access, as well as the structure of machine language instructions. Test your knowledge on operation types and execution categories within the 8086 microprocessor.