Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 554 Bytes

ch1_exercises.adoc

File metadata and controls

30 lines (23 loc) · 554 Bytes

Exercises

  1. Create a RISC-V data section that declares variables equivalent to the following. This will not be a runnable program without a main.

    	float a;
    	float b = 2.71;
    	int myarray[10] = { 9, 8, 7, 6, 5, 4, 3, 2, 1 };
    	short array2[10];
    
    	char riscv_str[] = "RISC-V assembly is awesome!";
  2. How would you declare an array of 500 points? The point structure is tightly packed and defined like this:

    struct point {
    	float x;
    	float y;
    	float z;
    };