import "io" let slow() be { while true do { for i = 1 to 15 do assembly { pause } outch('.') } } let set_timer(t) be { assembly { load r1, [] setsr r1, $timer } } let timer_gone() be { out("\nBoo!\n"); set_timer(1000000); ireturn; } let key_pressed() be { let c; devctl(dc_terminc, 1, @c); out("You pressed the '%c' key\n", c); ireturn } let start() be { let iv = vec(14); for i = 0 to 13 do iv ! i := nil; iv ! 7 := timer_gone; iv ! 9 := key_pressed; assembly { load r1, [] setsr r1, $intvec load r1, 0 setfl r1, $ip } set_timer(1000000); slow() }