Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/menu_settime.asm @ 576:ab2686087bce
faster font display, code cleaning
author | heinrichsweikamp |
---|---|
date | Sun, 22 Apr 2012 14:38:10 +0200 |
parents | 1efd59d689f8 |
children | 6e456a6398e0 |
comparison
equal
deleted
inserted
replaced
575:cbdcbbc91877 | 576:ab2686087bce |
---|---|
24 ; ToDo: | 24 ; ToDo: |
25 | 25 |
26 | 26 |
27 menu_settime: | 27 menu_settime: |
28 call PLED_ClearScreen | 28 call PLED_ClearScreen |
29 call menu_pre_loop_common ; Clear some menu flags, timeout and switches | |
29 | 30 |
30 bcf set_minutes | 31 bcf set_minutes |
31 bcf menubit4 | 32 bcf menubit4 |
32 bcf cursor | |
33 clrf timeout_counter2 | |
34 bcf menubit2 | |
35 bcf menubit3 | |
36 bcf sleepmode | |
37 bcf set_year | 33 bcf set_year |
38 bcf set_day | 34 bcf set_day |
39 bcf set_month | 35 bcf set_month |
40 clrf menupos2 | 36 clrf menupos2 |
41 | 37 |
48 | 44 |
49 call set_time_refresh | 45 call set_time_refresh |
50 | 46 |
51 DISPLAYTEXT .24 ; Set Hours | 47 DISPLAYTEXT .24 ; Set Hours |
52 | 48 |
53 bcf switch_right | |
54 bcf switch_left | |
55 | |
56 settime_loop: | 49 settime_loop: |
57 btfsc switch_right | 50 btfsc switch_right |
58 call add_hours_or_minutes_or_date | 51 call add_hours_or_minutes_or_date |
59 | 52 |
60 btfsc switch_left | 53 btfsc switch_left |
221 call word_processor | 214 call word_processor |
222 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! | 215 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! |
223 return | 216 return |
224 | 217 |
225 add_hours_or_minutes_or_date: | 218 add_hours_or_minutes_or_date: |
226 bcf switch_left | 219 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! |
227 clrf secs | 220 clrf secs |
228 | 221 |
229 btfsc set_year | 222 btfsc set_year |
230 bra add_year | 223 bra add_year |
231 | 224 |