Question: Create a RISC V program for each of the following exercises Exercise bex1a: Instruct the assembler to store the values of 1024, 2048, 4096, 8192

 Create a RISC V program for each of the following exercises

Create a RISC V program for each of the following exercises

Exercise bex1a: Instruct the assembler to store the values of 1024, 2048, 4096, 8192 in the beginning of the memory using the ed assembler command. Sum them, calculate their average using a shift instruction, and store the result in memory right after the compiled code. Save your solution as a file named bex1a.asm for possible future use. Exercise bex1b: Instruct the compiler to store the values of 0x2222333344445555 and Ox1111222233334444 at addresses Ox1000100010001000 and Ox1000100010001100 respectively. At run time load the values in the registers x6 and 7 respectively then calculate the sum, the difference, and the bitwise or and xor of the two values, storing the results in the registers x28-x31 respectively. Save your solution as a file named bex1b.asm for possible future use. Exercise bex1c: Instruct the compiler to store the values of a=0xAAAABBBBCCCCDDDD and b=0x4444333322221111 at addresses 0 and 8 respectively. Calculate a+b, a-b, b-a, a AND b, a OR b, a XOR , NOT a, NOT b, then store the results in consecutive double words starting at address 16. Save your solution as a file named bex1c.asm for possible future use

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!