// show how to write interrupt code // dummy header for compiler use asm(x) // ISR, assembly // x is r1, y is r2, color is r3 interrupt() asm("st r1 1010") asm("st r2 1011") asm("trap r3 #15") asm("add r1 r1 #1") asm("add r2 r2 #1") // or write in Rz, should not mix //interrupt() // a = 10 // b = b + a main() // setup interrupt asm("mov r1 #interrupt") asm("st r1 1000") x = 10 y = 10 color = 1 while(x < 50) // empty loop // use ISR to plot and step x,y