0% found this document useful (0 votes)
67 views

QB Module3

This document contains questions about addressing modes and machine code instructions for the Intel 80x86 architecture. It asks the reader to determine addressing modes, machine codes, and memory addresses for various MOV instructions operating in real mode and 16-bit/32-bit protected mode. Examples include determining the register selected based on the REG field, why an instruction produces an error, and decoding instructions involving base registers, indexes, displacements, and segment registers.

Uploaded by

Jasdeep Singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

QB Module3

This document contains questions about addressing modes and machine code instructions for the Intel 80x86 architecture. It asks the reader to determine addressing modes, machine codes, and memory addresses for various MOV instructions operating in real mode and 16-bit/32-bit protected mode. Examples include determining the register selected based on the REG field, why an instruction produces an error, and decoding instructions involving base registers, indexes, displacements, and segment registers.

Uploaded by

Jasdeep Singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CS/ECE/EEE/INSTR F241 – MICROPROCESSOR

PROGRAMMING & INTERFACING

MODULE 3: ADDRESSING MODES OF


80X86
QUESTIONS

ANUPAMA KR
BITS, PILANI – KK BIRLA GOA CAMPUS
Q1. If the register field “REG” of an instruction contains 101 and “w”=0 , What is the register selected
assuming that instruction is a 16-bit mode instruction?

Q2. The instruction MOV DS, 2300h gives an error. Why?

Q3. For the following instructions determine the addressing mode and the Machine code

Assume instructions are in 16-bit mode of operation

 MOV ECX ,CC001267H


 MOV AX,SI
 MOV [SI],CL
 MOV AX,CS:[DI+1000H]
 MOV CL,[EDX+EDI]
 MOV EAX,4020[BX+DI]
 MOV BX,[EBX+2*ECX]
 MOV BL,SS:[ECX]
 MOV CX,CX
 MOV EBX, DS: [EBP+ 4H]
 MOV [DI+BP+2000H], EAX
 MOV EDX, EBP

Q4. Suppose that CS =1000H, ES = 8000H, DS=A000H, SS =7000H , ESI= 0000 0200H , EDI = 0000 0410H,
EBP = 0000 2300H , EBX= 0000 0200H EAX=0000 0400H , ECX = 0000 0020H, EDX = 0000 0008H For
the instructions given below determine the machine code, address & addressing mode. Processor
is working 32-bit mode

 MOV [SI+100H],EAX
 MOV [EAX+2*EBX],CL
 MOV DH,CS:[EBX+4*EAX+1000H ]
 MOV [BP+SI+2000H],CX
 MOV AX, ES:[DI+BP+04H]

Q5. Suppose that in 8086 DS = 1300H, BP = 0100H, SS =1000H ,SI = 0250H. Determine the address
accessed by each of the following instructions

 MOV AX,[BP+200H]
 MOV AL,[BP+SI-200H]
 MOV AL,[SI-0100H
Q6. Determine the instruction from the opcode assume the processor is working in 16-bit mode.

All instructions are some form of MOV.

 66 89 D8
 89 46 10
 B1 45
 67 8A 44 7D 02

Q7. In an 80386 processor that is working in real mode and 16-bit mode: Suppose that CS =0000H ,ES
= F000H , DS=4000H , SS = 2000H ,ESI= 0000 0100H , EDI = 0000 0210H ,EBP = 0300H , EBX=0000
4000H , EAX=0000 0200H , ECX = 0000 0010H, EDX = 0000 0004H For the instructions given below
determine the following: Memory Address, Addressing Mode and Machine Code [Give Values
only in Hex and treat instructions as separate individual instructions]

 MOV ES: [1000H], AH


 MOV EAX, SS:[EBX+ 8]
 MOV CH,[SI+BP+100H]
 MOV EAX, [SI+BX ]
 MOV AL,[EBX+8*ECX+20H ]

You might also like