2 * RGB2R-C128-Kassenprogramm
3 * (c) 2007-2008 phil_fry, sECuRE, sur5r
4 * See LICENSE for license information
14 uint32_t h = PEEK(0x00A0) * 65536,
15 m = PEEK(0x00A1) * 256,
17 static char buffer[9];
22 h -= ((uint32_t)hrs * (uint32_t)3600);
26 sprintf(buffer, "%02d:%02d:%02d", hrs, min, (BYTE)h);
30 void set_time(BYTE hrs, BYTE min, BYTE sec) {
31 uint32_t added = ((uint32_t)sec + ((uint32_t)min * (uint32_t)60) + ((uint32_t)hrs * (uint32_t)3600)) * (uint32_t)60;
32 uint32_t lowbit = (added & 0xFF);
33 uint32_t middlebit = (added >> 8) & 0xFF;
34 uint32_t highbit = (added >> 16) & 0xFF;
36 POKE(0x00A0, (BYTE)highbit);
37 POKE(0x00A1, (BYTE)middlebit);
38 POKE(0x00A2, (BYTE)lowbit);