Consider a oneaddress machine with an accumulator and memory

Consider a one-address machine with an accumulator and memory values as shown below: cell 100 contains 150, cell 150 contains 200, cell 200 contains 400, cell 300 contains 500, cell 350 contains 400, cell 400 contains 600, cell 500 contains 600, and cell 600 contains 0 For each case below, indicate clearly the effective memory address (i.e., the address of the operand, if applicable), and the operand value the instruction loads into the accumulator? LOAD IMMEDIATE 1000 LOAD DIRECT 200 LOAD INDIRECT 200 Single Memory Indirect LOAD IMMEDIATE 300 LOAD DIRECT 300 LOAD INDIRECT2 300//Double Memory Indirect

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

 Consider a one-address machine with an accumulator and memory values as shown below: cell 100 contains 150, cell 150 contains 200, cell 200 contains 400, cell

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site