The documented OS library is all there is. The OS is designed to be as simple as possible so that students can implement it completely in project 12.
Your program will need to have a main loop that runs continuously, calling the required services periodically. If all you need is keyboard, continuing movement and countdown it would be something like
method void run() {
var int t_move, t_count;
while (true) {
if (Keyboard.keyPressed()) {
do processKey();
}
let t_move = t_move+1;
if (t_move > 100) {
do processMove();
let t_move = 0;
}
let t_count = t_count +1;
if (t_count > 2500) {
do processCount();
let t_count = 0;
}
}
Notice that this loop does not use Sys.wait() because it is a blocking delay—it does not return until the requested time elapses.
--Mark