Computer Organization
Lab 1: RISC-V Programming
郭家宏
Lab 1 : RISC-V Assembly Programming
• Factorial
• Bubble_sort • Gcd
• Fibonacci
Revision
Revision
Revision
Revision
Revision Example
Example
How to calculate the instruction
Example: factorial.s
– In this case, there are 121 instructions will be
executed.
– There are 16 variables in stack at most.
Demo