edited by
1,127 views
0 votes
0 votes
Given 2 machine instructions,

LW R4 #400

LW R1, 0,(R4)

IN second instruction what will be loaded in R1,is it the operand at memory location 400?or some random memory location operand..I want to clarify whether the value stored in register is same as adress that register points.
edited by

1 Answer

1 votes
1 votes
It will not be some random value - the second instruction is an example of indexed addressing mode.

It means that the value of R4 with an offset of 0 will be loaded.

However, it varies from ISA to ISA - what the actual syntax of the instruction is.

Related questions

4 votes
4 votes
2 answers
2
Na462 asked Jul 31, 2018
2,130 views
A computer has 170 different operations. Word size is 4 bytes one word instructions requires two address fields. One address for register and one address for memory. If t...
12 votes
12 votes
3 answers
3