in Operating System closed by
376 views
0 votes
0 votes
closed as a duplicate of: Addressing mode

 

in Operating System closed by
by
376 views

1 Answer

0 votes
0 votes

 

Given

Operand O1 using PC relative mode: In PC relative mode, the operand is accessed relative to the Program Counter (PC) and typically involves an offset value specified in the instruction. To fetch O1 in PC relative mode, we generally require one memory access to retrieve the operand from the memory location determined by adding the offset to the PC.

Operand O2 using indirect addressing mode: In indirect addressing mode, the operand itself contains a memory address pointing to the actual data or value we want to access. To fetch O2 in indirect addressing mode, we need two memory accesses. The first memory access retrieves the memory address stored in O2, and the second memory access fetches the actual operand/value from the memory location specified by that address.

Therefore, to fetch both operands O1 and O2 , we will require a total of 3 memory accesses: one for O1 in PC relative mode and two for O2 in indirect addressing mode.

Related questions

0 votes
0 votes
2 answers
1
lea asked in CO and Architecture Jun 12, 2023
317 views
lea asked in CO and Architecture Jun 12, 2023
by lea
317 views