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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 23:30, kenken2583
Jaina and tomas are being considered as new tenants in an apartment. the landlord looks at their creditworthiness because he wants to be sure his new tenant pays the rent on time and in full. the table below summarizes the information that was on their applications. application information questions jaina tomas how many years have you had your job? 5 2 what is your monthly salary? $1,850 $2,500 how many credit cards do you have? 4 1 how much debt do you have? $13,000 $7,000 how many times were you late with payments on credit cards in the past year? 5 1 who will the landlord decide to be more creditworthy and why? tomas because the ratio of his debt to income is less. jaina because she has had her job longer, which makes her look more stable. jaina because she has more credit cards available to her. tomas because he makes more money per month.
Answers: 2
image
Computers and Technology, 23.06.2019 23:00, minosmora01
How do you know if the website is secure if you make a purchase
Answers: 2
image
Computers and Technology, 24.06.2019 02:30, journeyhile5
How to apply the fly in effect to objects on a slide
Answers: 1
image
Computers and Technology, 24.06.2019 06:30, titalili0204
Adrawing that places all lines parallel to the z axis at an angle from the horizon is 99 ! a. an oblique drawing b. a perspective drawing c. an auxiliary view d. a one-point perspective drawing
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 in other subjects:

Konu
Mathematics, 02.03.2021 05:20