1.text 2.global _start 3 4_start: 5_reset_handler: 6 xor r0, r0, r0 7 mvhi r1, hi(_start) 8 ori r1, r1, lo(_start) 9 wcsr eba, r1 10 wcsr deba, r1 11 bi _main 12 nop 13 nop 14 15_breakpoint_handler: 16 ori r25, r25, 1 17 addi ra, ba, 4 18 ret 19 nop 20 nop 21 nop 22 nop 23 nop 24 25_instruction_bus_error_handler: 26 ori r25, r25, 2 27 addi ra, ea, 4 28 ret 29 nop 30 nop 31 nop 32 nop 33 nop 34 35_watchpoint_handler: 36 ori r25, r25, 4 37 addi ra, ba, 4 38 ret 39 nop 40 nop 41 nop 42 nop 43 nop 44 45_data_bus_error_handler: 46 ori r25, r25, 8 47 addi ra, ea, 4 48 ret 49 nop 50 nop 51 nop 52 nop 53 nop 54 55_divide_by_zero_handler: 56 ori r25, r25, 16 57 addi ra, ea, 4 58 ret 59 nop 60 nop 61 nop 62 nop 63 nop 64 65_interrupt_handler: 66 ori r25, r25, 32 67 addi ra, ea, 4 68 ret 69 nop 70 nop 71 nop 72 nop 73 nop 74 75_system_call_handler: 76 ori r25, r25, 64 77 addi ra, ea, 4 78 ret 79 nop 80 nop 81 nop 82 nop 83 nop 84 85