Question

In: Computer Science

location X

Define: EA = (X)+ is the effective address equal to the contents of location X, with X incremented by one word length after the effective address is calculated; is the effective address equal to the contents of location X, with X decremented by one word length before the effective address is calculated; is the effective address equal to the contents of location X, with X decremented by one word length after the effective address is calculated. Consider the following instructions, each in the format (Operation Source Operand, Destination Operand), with the result of the operation placed in the destination operand.
a. OP X, (X)
b. OP (X), (X)+
c. OP (X), (X)
d. OP (X), (X)
e. OP (X), (X)+
f. OP (X), (X)+
g. OP (X), (X)
Using X as the stack pointer, which of these instructions can pop the top two elements from the stack, perform the designated operation (e.g., ADD source to destination and store in destination), and push the result back on the stack? For each such instruction, does the stack grow toward memory location 0 or in the opposite direction?

 

Solutions

Expert Solution

a.         No, because the source operand is the contents of X, rather than the top of the stack, which is in the location pointed to by X.

 

b.         No, because address of the top of the stack is not changed until after the fetching of the destination operand.

 

c.         Yes. The stack grows away from memory location 0.

 

d.         No, because the second element of the stack is fetched twice.

 

e.         No, because the second element of the stack is fetched twice.

 

f. No, because the stack pointer is incremented twice, so that the result is thrown away.

 

 


g.         Yes. The stack grows toward memory location 0.

Related Solutions

Determine the location and value of the absolute extreme values of: f(x) = sin (1 /x...
Determine the location and value of the absolute extreme values of: f(x) = sin (1 /x ) on [ 1/5 , 2].
Location A Location B Location C Location D 52                   75                &nb
Location A Location B Location C Location D 52                   75                  67                  58 59                   55                  77                  38 81                   95                  47                  82 63                   46                  74                  77 73                   85                  56                  91 Test the following hypotheses and also state the alternate hypothesis in each case. Write a sentence or two summarizing your conclusion after you have completed each hypothesis testing. Hypothesis 1 The average time spent per table in Location A is the same as the average time spent per table in Location B....
Determine the location of the center of mass of the region bounded above x^2 + y^2...
Determine the location of the center of mass of the region bounded above x^2 + y^2 = 100 and below y = 6. Assume the region has a uniform density. Two answer I got were (0, -64/9) & (0, ((2048/3)/100arcsin(4/5)) -48))
At time =0, a proton is at rest at location <4.7, 1.8, 0> x 10^-6m. An...
At time =0, a proton is at rest at location <4.7, 1.8, 0> x 10^-6m. An electron is at <2.9,8.7,0> x 10^-6 m. and is moving with a momentum of <3.6,-7.8,0> x 10^-27 kg*m/s. the proton and electron are in outer space, far from any other matter. The proton has a charge of 1.6 x 10^-19 C, and the elctrons charge is exactly the negative of this value. A.) what is the magnitude of the gravitational force on the electron...
For dispersion modeling we want to find the concentration of a pollutant at a location (x,y,z)...
For dispersion modeling we want to find the concentration of a pollutant at a location (x,y,z) in 3-D space, relative to a point source at (0,0,H). How is the x distance downwind accounted for in the Gaussian dispersion equation?
Find the location on the curve y=(4x^2+3)(x-3) where the slope is -3.
Find the location on the curve y=(4x^2+3)(x-3) where the slope is -3.
1. Find where f(x)= x^5-5x^4 is increasing/decreasing, concave up/down, and the location of any local max...
1. Find where f(x)= x^5-5x^4 is increasing/decreasing, concave up/down, and the location of any local max or min or points of inflection. A good explanation would be great!
Why may a cheap location not be the best location, and why is it costly for...
Why may a cheap location not be the best location, and why is it costly for a small firm to choose a location that is too small?
Annual high temperatures in a certain location have been tracked for several years. Let X represent...
Annual high temperatures in a certain location have been tracked for several years. Let X represent the number of years after 2000 and Y the high temperature. Based on the data shown below, calculate the linear regression equation using technology (each constant to 2 decimal places). x y 2 34.82 3 33.28 4 34.84 5 35.1 6 33.26 7 35.42 8 34.18 9 34.54 10 34.4 11 35.86 12 35.12 13 37.88 The equation is? Interpret the slope For each...
Annual high temperatures in a certain location have been tracked for several years. Let X represent...
Annual high temperatures in a certain location have been tracked for several years. Let X represent the year and Y the high temperature. At the 0.01 significance level, does the data below show significant (linear) correlation between X and Y? x y 5 36.63 6 35.9 7 35.77 8 38.64 9 30.51 10 29.68 11 30.35 12 21.42 13 19.99 14 18.26 15 12.03 16 15.8 Yes, significant correlation No
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT