.makeexe jump start // we need an interrupt vector inters: .space 20 timhand: // timer interrupt handler type '.' // restart timer load r1, 20000 setsr r1, $timer // special return to restore everything iret start: // say where the interrupt vector is load r1, inters setsr r1, $intvec // put handler in interrupt vector load r2, timhand store r2, [r1 + iv$timer] // allow interrupts but saying NOT processing one now load r1, 0 setfl r1, $ip // set a timer load r1, 20000 setsr r1, $timer slow: load r1, 80 load r2, 0 loop: add r2, 1 pause sub r1, 1 jpos r1, loop halt