irq0: 
br always >main
nop
irq1: 
br always >irq
nop
irq2: 
br always >irq
nop


main: 
ldr sp, >sp_init
nop 
clr sr

addi r2, 1
addi r2, 2
addi r2, 3
trap 1
addi r2, 4
addi r2, 5

loop:
addi r10, 1
foo: br always >loop
nop

end: br always >end
nop

irq: addi r0, 5
reti
nop

.address 100
.word 499
sp_init: .word 500
.word 501
