Datasheet

Jon Waddington
96
rc.flush
if code == down 'increment minute
++m
if (m & $0F) => 10
m &= $70
m += 16
if (m & $7F) => $60 'loop minute
m := 0
if code == up 'decrement minute
if (m & $0F) > 1
--m
elseif (m & $70) > 0
m -= 16
m |= $09
else 'loop minute
m := $59
text.xy(6, 3) 'show set minute in white text
text.colour(0)
text.dec(m>>4 & $07)
text.dec(m & $0F)
settimebcd(h, m, 0) 'save changes of time
PRI setd | date, day, m, y
{{shows the set date menu}}
text.out($00) 'clear Display
showdate(3, 3) 'show current date at X, Y
code := 0 'empty code (RC5)
date := getdate 'get date
day := getday 'get day
m := getmonth 'get month
y := getyear 'get year
text.colour(2) 'change text colour to yellow
repeat until code == enter 'repeat until the enter button is pressed
text.xy(3, 3) 'move text cursor to X, Y
case day 'case statement shows day in yellow text
0 : text.str(string("Sun"))
1 : text.str(string("Mon"))
2 : text.str(string("Tue"))
3 : text.str(string("Wed"))
4 : text.str(string("Thu"))
5 : text.str(string("Fri"))
OTHER : text.str(string("Sat")) 'if day is out of range, set to 6
day := 6
repeat until rc.getcommand 'wait until a button is pressed
code := rc.getcommand 'code is equal to the RC5 command
rc.flush 'flush the RC5 value
if code == down 'if down was pressed, day is incremented
++day
if day == 7 'loop if day overflows
day := 0
if code == up 'if up was pressed, day is decremented
--day