subject

Int decode2(int x, int y, int z); is compiled into 32bit x86 assembly code. The body of the code is as follows: NOTE: x at %ebp+8, y at %ebp+12, z at %ebp+16 movl 12(%ebp), %edx subl 16(%ebp), %edx movl %edx, %eax sall $31, %eax sarl $31, %eax imull 8(%ebp), %edx xorl %edx, %eax Parameters x, y, and z are stored at memory locations with offsets 8, 12, and 16 relative to the address in register %ebp. The code stores the return value in register %eax. The shl or sal instruction is used to shift the bits of the operand destination to the left, by the number of bits specified in the count operand Write C code for decode2 that will have an effect equivalent to our assembly Code. int decode2(int x, int y, int z) { }

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:20
Write a program that prompts the user to input a string. the program then uses the function substr to remove all the vowels from the string. for example, if str = "there", then after removing all the vowels, str = "thr". after removing all the vowels, output the string. your program must contain a function to remove all the vowels and a function to determine whether a character is a vowel.
Answers: 2
question
Computers and Technology, 22.06.2019 22:10
Asequential circuit contains a register of four flip-flops. initially a binary number n (0000 ≤ n ≤ 1100) is stored in the flip-flops. after a single clock pulse is applied to the circuit, the register should contain n + 0011. in other words, the function of the sequential circuit is to add 3 to the contents of a 4-bit register. design and implement this circuit using j-k flip-flops.
Answers: 1
question
Computers and Technology, 23.06.2019 18:30
This program should be a short piece of code that prints all of the positive integers from 1 to 100 as described more fully below. the program may contain multiple methods, and if using an oo language, should be contained within a single class or object. the program should be designed so that it begins execution when invoked through whichever mechanism is most common for the implementation language. â–ş print out all positive integers from 1 to 100, inclusive and in order. â–ş print messages to standard output, matching the sample output below. â–ş in the output, state whether the each integer is 'odd' or 'even' in the output. â–ş if the number is divisible by three, instead of stating that the number is odd or even, state that the number is 'divisible by three'. â–ş if the number is divisible by both two and three, instead of saying that the number is odd, even or divisible by three; state that the number is 'divisible by two and three'. â–ş design the logic of the loop to be as efficient as possible, using the minimal number of operations to perform the required logic. sample output the number '1' is odd. the number '2' is even. the number '3' is divisible by three. the number '6' is divisible by two and three.
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
If chris has a car liability insurance, what damage would he be covered for
Answers: 1
You know the right answer?
Int decode2(int x, int y, int z); is compiled into 32bit x86 assembly code. The body of the code is...
Questions
question
Biology, 02.08.2019 13:00
question
Biology, 02.08.2019 13:00
Questions on the website: 13722360