annotate code_part1/OSTC_code_asm_part1/menu_settime.asm @ 831:0cf00ecf3532

CHANGE: Color-code battery % display in surface mode (Charge, Full, Normal)
author heinrichsweikamp
date Tue, 08 Dec 2015 13:44:39 +0100
parents 2a0e5d884fc3
children 30136fc61392
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1
815
2a0e5d884fc3 BUGFIX: Fix licence in German
heinrichsweikamp
parents: 807
diff changeset
2 ; OSTC Mk.2, 2N and 2C - diving computer code
807
c50296c3059e BUGFIX: Divetime had unwanted "." behind the minutes
heinrichsweikamp
parents: 717
diff changeset
3 ; Copyright (C) 2015 HeinrichsWeikamp GbR
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
5 ; This program is free software: you can redistribute it and/or modify
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
6 ; it under the terms of the GNU General Public License as published by
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
7 ; the Free Software Foundation, either version 3 of the License, or
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
8 ; (at your option) any later version.
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
9
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
10 ; This program is distributed in the hope that it will be useful,
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
11 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
12 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
13 ; GNU General Public License for more details.
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
14
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
15 ; You should have received a copy of the GNU General Public License
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
16 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
17
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
18
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
19 ; menu "Set Time"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
20 ; written by: Matthias Heinrichs, info@heinrichsweikamp.com
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
21 ; written: 5/19/06
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
22 ; last updated: 080904
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
23 ; known bugs:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
24 ; ToDo:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
25
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
26
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
27 menu_settime:
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 576
diff changeset
28 call DISP_ClearScreen
576
ab2686087bce faster font display, code cleaning
heinrichsweikamp
parents: 255
diff changeset
29 call menu_pre_loop_common ; Clear some menu flags, timeout and switches
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
30
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
31 bcf set_minutes
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
32 bcf menubit4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
33 bcf set_year
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
34 bcf set_day
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
35 bcf set_month
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
36 clrf menupos2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
37
717
91ae251d379f "ostc3-style" menu titles
heinrichsweikamp
parents: 681
diff changeset
38 call DISP_divemask_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
39 DISPLAYTEXT .29 ; Set Time
717
91ae251d379f "ostc3-style" menu titles
heinrichsweikamp
parents: 681
diff changeset
40 call DISP_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
41 DISPLAYTEXT .22 ; Time:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
42 DISPLAYTEXT .23 ; Date:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
43
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
44 call set_time_refresh
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
45
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
46 DISPLAYTEXT .24 ; Set Hours
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
47
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
48 settime_loop:
255
1efd59d689f8 small change in the set time menu, default setpoints set to 0.8, 1.0 and 1.2Bar
heinrichsweikamp
parents: 199
diff changeset
49 btfsc switch_right
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
50 call add_hours_or_minutes_or_date
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
51
255
1efd59d689f8 small change in the set time menu, default setpoints set to 0.8, 1.0 and 1.2Bar
heinrichsweikamp
parents: 199
diff changeset
52 btfsc switch_left
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
53 call set_time_next_or_exit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
54
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
55 btfsc menubit4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
56 bra set_time_done
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
57
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
58 btfsc onesecupdate
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
59 call timeout_surfmode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
60
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
61 btfsc onesecupdate
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
62 call set_dive_modes
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
63
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
64 bcf onesecupdate
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
65
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
66 btfsc sleepmode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
67 bra exit_settime
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
68
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
69 btfsc divemode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
70 goto restart
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
71
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
72 bra settime_loop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
73
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
74 set_time_refresh:
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
75 WIN_LEFT .32
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
76 WIN_TOP .65
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
77 lfsr FSR2,letter
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
78 OUTPUTTEXT .22 ; "Hours:" (actual length depends on translation)
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
79
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
80 movff hours,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
81 output_99x
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 53
diff changeset
82 PUTC ':'
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
83 movff mins,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
84 output_99x
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 53
diff changeset
85 STRCAT_PRINT " "
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
86
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
87 set_date_refresh:
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
88 WIN_LEFT .32
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
89 WIN_TOP .95
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
90 lfsr FSR2,letter
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
91 OUTPUTTEXT .23 ; "Date: " (actual length depends on translation)
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
92
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
93 movff month,convert_value_temp+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
94 movff day,convert_value_temp+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
95 movff year,convert_value_temp+2
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 576
diff changeset
96 call DISP_convert_date ; converts into "DD/MM/YY" or "MM/DD/YY" or "YY/MM/DD" in postinc2
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 53
diff changeset
97 STRCAT_PRINT " "
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 53
diff changeset
98 return
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
99
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
100 set_time_done: ; Check date
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
101 movff month,lo ; new month
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
102 dcfsnz lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
103 movlw .31
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
104 dcfsnz lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
105 movlw .28
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
106 dcfsnz lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
107 movlw .31
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
108 dcfsnz lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
109 movlw .30
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
110 dcfsnz lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
111 movlw .31
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
112 dcfsnz lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
113 movlw .30
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
114 dcfsnz lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
115 movlw .31
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
116 dcfsnz lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
117 movlw .31
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
118 dcfsnz lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
119 movlw .30
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
120 dcfsnz lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
121 movlw .31
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
122 dcfsnz lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
123 movlw .30
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
124 dcfsnz lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
125 movlw .31
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
126 cpfsgt day ; day ok?
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
127 bra set_time_done2 ; OK
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
128 movlw .1 ; not OK, set to 1st
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
129 movwf day
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
130
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
131 set_time_done2:
255
1efd59d689f8 small change in the set time menu, default setpoints set to 0.8, 1.0 and 1.2Bar
heinrichsweikamp
parents: 199
diff changeset
132 WIN_LEFT .0
1efd59d689f8 small change in the set time menu, default setpoints set to 0.8, 1.0 and 1.2Bar
heinrichsweikamp
parents: 199
diff changeset
133 WIN_TOP .215
1efd59d689f8 small change in the set time menu, default setpoints set to 0.8, 1.0 and 1.2Bar
heinrichsweikamp
parents: 199
diff changeset
134 movlw (.160-.0)/7 ; full line length, for various translations.
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
135 movwf temp1
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 576
diff changeset
136 call DISP_display_clear_common_y1
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
137
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
138 movlw d'5'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
139 movwf wait_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
140 clrf secs
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
141 bcf onesecupdate
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
142
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
143 set_time_done_loop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
144 btfss onesecupdate
50
heinrichsweikamp
parents: 0
diff changeset
145 bra set_time_done_loop
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
146 bcf onesecupdate
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
147
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
148 call set_date_refresh
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
149
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
150 WIN_LEFT .32
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
151 WIN_TOP .65
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
152 lfsr FSR2,letter
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
153 OUTPUTTEXT .22 ; "Hours:" (actual length depends on translation)
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
154
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
155 movff hours,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
156 output_99x
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 53
diff changeset
157 PUTC ':'
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
158 movff mins,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
159 output_99x
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 53
diff changeset
160 PUTC ':'
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
161 movff secs,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
162 output_99x
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 53
diff changeset
163 STRCAT_PRINT " "
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
164
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
165 decfsz wait_temp,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
166 bra set_time_done_loop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
167 exit_settime: ;Exit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
168 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
169 movwf menupos
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
170 goto more_menu2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
171
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
172
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
173 set_time_next_or_exit:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
174 btfsc set_year
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
175 bsf menubit4 ; quit settime
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
176 incf menupos2,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
177 movff menupos2,menupos3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
178
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
179 dcfsnz menupos3,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
180 bsf set_minutes
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
181 dcfsnz menupos3,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
182 bsf set_month
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
183 dcfsnz menupos3,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
184 bsf set_day
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
185 dcfsnz menupos3,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
186 bsf set_year
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
187
255
1efd59d689f8 small change in the set time menu, default setpoints set to 0.8, 1.0 and 1.2Bar
heinrichsweikamp
parents: 199
diff changeset
188 WIN_LEFT .0
1efd59d689f8 small change in the set time menu, default setpoints set to 0.8, 1.0 and 1.2Bar
heinrichsweikamp
parents: 199
diff changeset
189 WIN_TOP .215
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 576
diff changeset
190 call DISP_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
191 lfsr FSR2,letter
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
192 OUTPUTTEXT .94 ; Set
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
193
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
194 movff menupos2,menupos3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
195 decfsz menupos3,F
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
196 bra set_time_next_or_exit2
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
197 OUTPUTTEXT .90 ; Minutes
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
198 bra set_time_next_or_exit5
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
199 set_time_next_or_exit2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
200 decfsz menupos3,F
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
201 bra set_time_next_or_exit3
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
202 OUTPUTTEXT .91 ; Month
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
203 bra set_time_next_or_exit5
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
204 set_time_next_or_exit3:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
205 decfsz menupos3,F
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
206 bra set_time_next_or_exit4
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
207 OUTPUTTEXT .92 ; Day
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
208 bra set_time_next_or_exit5
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
209 set_time_next_or_exit4:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
210 OUTPUTTEXT .93 ; Year
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
211
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
212 set_time_next_or_exit5:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
213 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
214 call wait_switches ; Waits until switches are released, resets flag if button stays pressed!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
215 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
216
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
217 add_hours_or_minutes_or_date:
576
ab2686087bce faster font display, code cleaning
heinrichsweikamp
parents: 255
diff changeset
218 call wait_switches ; Waits until switches are released, resets flag if button stays pressed!
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
219 clrf secs
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
220
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
221 btfsc set_year
50
heinrichsweikamp
parents: 0
diff changeset
222 bra add_year
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
223
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
224 btfsc set_day
50
heinrichsweikamp
parents: 0
diff changeset
225 bra add_day
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
226
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
227 btfsc set_month
50
heinrichsweikamp
parents: 0
diff changeset
228 bra add_month
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
229
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
230 btfsc set_minutes
50
heinrichsweikamp
parents: 0
diff changeset
231 bra add_minutes
heinrichsweikamp
parents: 0
diff changeset
232 ; Increase hours
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
233 add_hours:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
234 incf hours,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
235 movlw d'23'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
236 cpfsgt hours
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
237 bra set_time_refresh_x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
238 clrf hours
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
239 bra set_time_refresh_x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
240 add_minutes:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
241 incf mins,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
242 movlw d'59'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
243 cpfsgt mins
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
244 bra set_time_refresh_x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
245 clrf mins
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
246 bra set_time_refresh_x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
247 add_day:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
248 incf day,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
249 movlw d'31'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
250 cpfsgt day
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
251 bra set_time_refresh_x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
252 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
253 movwf day
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
254 bra set_time_refresh_x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
255 add_month:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
256 incf month,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
257 movlw d'12'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
258 cpfsgt month
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
259 bra set_time_refresh_x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
260 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
261 movwf month
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
262 bra set_time_refresh_x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
263 add_year:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
264 incf year,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
265 movlw d'20' ; calendar until 2020
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
266 cpfsgt year
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
267 bra set_time_refresh_x
53
263348f83485 1.70 cleaning the code
heinrichsweikamp
parents: 50
diff changeset
268 movlw d'10'
263348f83485 1.70 cleaning the code
heinrichsweikamp
parents: 50
diff changeset
269 movwf year ; Set Year to 2010
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
270
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
271 set_time_refresh_x:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
272 call set_time_refresh
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
273 call wait_switches ; Waits until switches are released, resets flag if button stays pressed!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
274 return