Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assume that 8086 registers are loaded with the following values. Go through each

ID: 3668175 • Letter: A

Question

Assume that 8086 registers are loaded with the following values. Go through each instruction in the following list and show what effective "address" or "addresses" will be used (if any) by the CPU for executing the instruction. For example, if DS = 1000H. the instruction MOV AX. [5000H] will use the address 15000H = 10000H+5000H to access the memory and copy two bytes of data from this location (one from 15000h and one from 15001H) into register AX. IN and OUT instructions do not access memory, but still need to use the address bus (without using segments).

Explanation / Answer

Ex: (1). ADI DATA   ; Add immediate the data to the contents of the accumulator.
(2).LXIH 8500H : Load immediate the H-L pair with the operand 8500H
(3). MVI 08H      ; Move the data 08 H immediately to the accumulator
(4). SUI 05H       ; Subtract immediately the data 05H from the accumulator

(ii) Direct Addressing mode: The mode of addressing in which the 16-bit address of the operand is directly available in the instruction itself is called Direct Addressing mode. i.e., the address of the operand is available in the instruction itself. This is a 3-byte instruction.

Ex: (1). LDA 9525H; Load the contents of memory location into Accumulator.

(2). STA 8000H; Store the contents of the Accumulator in the location 8000H

(3). IN 01H; Read the data from port whose address is 01H.

(iii). Register addressing modes: In this mode the operands are microprocessor registers only. i.e. the operation is performed within various registers of the microprocessor.

Ex: (1). MOV A, B;      Move the contents of B register to A register.

(2). SUB D;          Subtract the contents of D register from Accumulator.

(3). ADD B, C;     Add the contents of C register to the contents of B register.

(iv). Register indirect addressing modes: The 16-bit address location of the operand stored in a register pair (H-L) is given in the instruction. The address of the operand is given in an indirect way with the help of a register pair. So it is called Register indirect addressing mode.

Ex: (1). LXIH 9570H   : Load immediate the H-L pair with the address of the location 9570H

MOV A, M      : Move the contents of the memory location pointed by the H-L pair to   accumulator

(v). Implicit Addressing mode: The mode of instruction which do not specify the operand in the instruction but it is implicated, is known as implicit addressing mode. i.e., the operand is supposed to be present generally in accumulator.

Ex: (1).CMA; complement the contents of Accumulator

(2).CMC; Complement carry

(3). RLC; Rotate Accumulator left by one bit

(4). RRC; Rotate Accumulator right by one bit

(5). STC; Set carry.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote