1.section .text
2
3start:
4
5# zero-initialize register file
6addi x1, zero, 0
7# x2 (sp) is initialized by reset
8addi x3, zero, 0
9addi x4, zero, 0
10addi x5, zero, 0
11addi x6, zero, 0
12addi x7, zero, 0
13addi x8, zero, 0
14addi x9, zero, 0
15addi x10, zero, 0
16addi x11, zero, 0
17addi x12, zero, 0
18addi x13, zero, 0
19addi x14, zero, 0
20addi x15, zero, 0
21addi x16, zero, 0
22addi x17, zero, 0
23addi x18, zero, 0
24addi x19, zero, 0
25addi x20, zero, 0
26addi x21, zero, 0
27addi x22, zero, 0
28addi x23, zero, 0
29addi x24, zero, 0
30addi x25, zero, 0
31addi x26, zero, 0
32addi x27, zero, 0
33addi x28, zero, 0
34addi x29, zero, 0
35addi x30, zero, 0
36addi x31, zero, 0
37
38# Update LEDs
39li a0, 0x02000000
40li a1, 0xAA
41sw a1, 0(a0)
42
43call main
44
45loop:
46j loop
47
48