Consider a oneaddress machine with an accumulator and memory
Solution
Given data:
address value
100 150
150 200
200 400
300 500
350 400
400 600
500 600
600 0
a)
LOAD immediate 100
immediate will directly store the value 100
AX will store 100 value
------------------------------------------------------------------------------
b)
LOAD directly 200
it stores direct value at given location
AX will store 400 value
------------------------------------------------------------------------------------------
c) INDIRECT addressing mode ..First it will look into address 200 value and it again takes that value as address.
200 -> 400
400 -> 600
AX will store 600 value
---------------------------------------------------------------------------------------------------
d)
LOAD IMMEDIATE 300
immediate will directly store the value 300
AX will store 300 value
------------------------------------------------------------------------------------------------------
e)
LOAD DIRECT 300
it stores direct value at given location
AX will store 500 value
----------------------------------------------------------------------------------------------------
f)
LOAD INDIRECT 300
INDIRECT addressing mode ..First it will look into address 200 value and it again takes that value as address.
300 -> 500
500 -> 600
AX will store 600 value
