0 REM---------------------------------------------------------------
1 REM UNIT TEST FOR KERNAL API:
2 REM   CLOCK_SET_DATE_TIME
3 REM   CLOCK_GET_DATE_TIME
4 REM---------------------------------------------------------------
5 REM (C)2019 REVCURTISP, MICHAEL STEIL, LICENSE: 2-CLAUSE BSD

10 SCREEN 0: REM 40 COLUMN MODE
11 PRINT CHR$(147);:REM CLEAR SCREEN
12 POKE 2,119:REM YEAR (2019)
13 POKE 3,12: REM MONTH
14 POKE 4,31: REM YEAR
15 POKE 5,23: REM HOUR
16 POKE 6,59: REM MINUTES
17 POKE 7,50: REM SECONDS
18 POKE 8,11: REM JIFFIES
19 SYS $FF4D:REM CLOCK-SET-DATE-TIME
20 REM SYSTEM CLOCK VARIABLES
21 PRINT CHR$(19);:REM CURSOR HOME
40 SYS $FF50:REM CLOCK-GET-DATE-TIME
41 PRINT
42 PRINT "YEAR   ";1900+PEEK(2);"  "
43 PRINT "MONTH  ";PEEK(3);"\X9D  "
44 PRINT "DAY    ";PEEK(4);"\X9D  "
45 PRINT "HOUR   ";PEEK(5);"\X9D  "
46 PRINT "MINUTES";PEEK(6);"\X9D  "
47 PRINT "SECONDS";PEEK(7);"\X9D  "
48 PRINT "JIFFIES";PEEK(8);"\X9D  "
49 GOTO 20

RUN
