subject

Given the following C code and assumptions, write the x86 assembly code for the calling function and the subroutine. Assume that variable a is allocated to register %rbx, variable b is allocated to register %rcx, variable min is allocated to register %rdx, variable z is allocated to register %rbx, and finally all input and output parameters are allocated according to the conventions used in x86 assembly. Preserve only those registers that must be preserved across the subroutine call. int subroutine (int x, int y) { int z; z=x+y; if (x < y) return (x); else return (z); } void main (void) { int a, b, min; min = subroutine (a, b) }

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:30
Write a full class definition for a class named player , and containing the following members: a data member name of type string .a data member score of type int .a member function called setname that accepts a parameter and assigns it to name . the function returns no value.a member function called setscore that accepts a parameter and assigns it to score . the function returns no value.a member function called getname that accepts no parameters and returns the value of name .a member function called getscore that accepts no parameters and returns the value of score .this is what i have, aparently this is wrong: class player{private: string name; int score; public: void player: : setname (string n){name =n; }void player: : setscore (int s){score = s; }string player: : getname (){return name; }int player: : getscore (){return score; }};
Answers: 2
question
Computers and Technology, 23.06.2019 14:00
What is html ? give a small description about html
Answers: 2
question
Computers and Technology, 23.06.2019 21:10
Asample of 200 rom computer chips was selected on each of 30 consecutive days, and the number of nonconforming chips on each day was as follows: 8, 19, 27, 17, 38, 18, 4, 27, 9, 22, 30, 17, 14, 23, 15, 14, 12, 20, 13, 18, 14, 20, 9, 27, 30, 13, 10, 19, 12, 26. construct a p chart and examine it for any out-of-control points. (round your answers to four decimal places.)
Answers: 2
question
Computers and Technology, 24.06.2019 14:00
In simple terms, how would you define a protocol?
Answers: 2
You know the right answer?
Given the following C code and assumptions, write the x86 assembly code for the calling function and...
Questions
question
Mathematics, 11.01.2021 07:00
question
Mathematics, 11.01.2021 07:00
question
Mathematics, 11.01.2021 07:00
question
Mathematics, 11.01.2021 07:00
question
Mathematics, 11.01.2021 07:00
question
Mathematics, 11.01.2021 07:00
question
Mathematics, 11.01.2021 07:00
question
Mathematics, 11.01.2021 07:00
question
English, 11.01.2021 07:00
question
Mathematics, 11.01.2021 07:00
Questions on the website: 13722361