further cleanup of message callback changes
[dcpu16] / docs / clock.txt
1 Name: Generic Clock (compatible)
2 ID: 0x12d0b402
3 Version: 1
4
5 Interrupts do different things depending on contents of the A register:
6
7 A | BEHAVIOR
8 ---+----------------------------------------------------------------------------
9 0 | The B register is read, and the clock will tick 60/B times per second.
10 | If B is 0, the clock is turned off.
11 1 | Store number of ticks elapsed since last call to 0 in C register
12 2 | If register B is non-zero, turn on interrupts with message B. If B is zero,
13 | disable interrupts
14 ---+----------------------------------------------------------------------------
15
16 When interrupts are enabled, the clock will trigger an interrupt whenever it
17 ticks.