In: Computer Science
Please answer all question for the feedback.
1. What is an Instruction Specifier (or opcode)? What is an Operand Specifier?
2. What is the difference between aaa and a?
3. How do you grow the stack? How do you shrink the stack?
4. Given:
int xyz(int a) {
int b;
... some code
return b;
}
What would the stack look like after the function allocates its local variable of b?
5. The debugger has trace commands that are embedded in the comments. What does #2d mean? With a "subsp 4,i ; #retval #param" why have the #retval and #param?
1.
Instruction specifier:- From the name itself we can know that it specificate a particular instruction to be performed. It actually indicates a operation such as add, sub or mul to a value stored in the register.
Operand specifier:- It just determines or specifies the operand used to perform a operation. Usually the second and third bytes of the instruction holds the operand specifier. It might hold the operand itself and the other case is that it holds the address where the operand is available.
2.
Difference between AAA and A
Actually AAA is the term used in computer networks. which means AUTHENTUCATION, AUTHORIZATION and ACCOUNTING
AAA is a standard framework which is used to control permissions granted to use network resources(which is through authentication), and the successfully authenticated users has limitations upto what extent they can authorize(which is controlled through authorization), and the actions that are performed during the access of the network are captured for security purposes(which is done through accounting). On the whole AAA manages the network analysis.
could you please be more clear with this question ??
3.
A stack can be grown using a command top. The command TOP points to the top of the stack. So to grow a stack the line top++ is used and to shrink a stack top-- is used. it is as simple as that.
5.
#retval and #param are known as attributes.
The retval attribute working would be, it designates the parameter which receives the return value of a member.
The param attribute determines the identifier name of the parameter.
4.
The answer to this question would be nothing. Because the reason is
In order to get the condition of a stack after allocating a variable to the existing stack, first we should know the condition and state of the existing stack. Then after allocating the variable to the existing stack, the change in the stack is recorded and the new stack condition is revealed and known to us.
Hope I am clear with the explanations provided to you. hope you understand. It would be great if you can provide a positive rating.
And in case of any douts or misunderstanding in the solution provided please leave a comment, I will be available to clear them as soon as possible. Thank you