annotate code_part1/OSTC_code_asm_part1/menu_settime.asm @ 521:33abbc08f01e

Minor cleanups for TESTING=1 emulator mode.
author JeanDo
date Fri, 09 Dec 2011 20:43:39 +0100
parents 1efd59d689f8
children ab2686087bce
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2 ; OSTC - diving computer code
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3 ; Copyright (C) 2008 HeinrichsWeikamp GbR
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:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
28 call PLED_ClearScreen
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
29
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
30 bcf set_minutes
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
31 bcf menubit4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
32 bcf cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
33 clrf timeout_counter2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
34 bcf menubit2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
35 bcf menubit3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
36 bcf sleepmode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
37 bcf set_year
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
38 bcf set_day
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
39 bcf set_month
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
40 clrf menupos2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
41
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
42 call PLED_topline_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
43 WIN_INVERT .1 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
44 DISPLAYTEXT .29 ; Set Time
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
45 WIN_INVERT .0 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
46 DISPLAYTEXT .22 ; Time:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
47 DISPLAYTEXT .23 ; Date:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
48
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
49 call set_time_refresh
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
50
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
51 DISPLAYTEXT .24 ; Set Hours
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
52
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
53 bcf switch_right
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
54 bcf switch_left
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
55
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
56 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
57 btfsc switch_right
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
58 call add_hours_or_minutes_or_date
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
59
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
60 btfsc switch_left
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
61 call set_time_next_or_exit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
62
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
63 btfsc menubit4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
64 bra set_time_done
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
65
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
66 btfsc onesecupdate
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
67 call timeout_surfmode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
68
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
69 btfsc onesecupdate
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
70 call set_dive_modes
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
71
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
72 bcf onesecupdate
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
73
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
74 btfsc sleepmode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
75 bra exit_settime
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
76
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
77 btfsc divemode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
78 goto restart
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
79
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
80 bra settime_loop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
81
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
82 set_time_refresh:
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
83 WIN_LEFT .32
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
84 WIN_TOP .65
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
85 lfsr FSR2,letter
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
86 OUTPUTTEXT .22 ; "Hours:" (actual length depends on translation)
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
87
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
88 movff hours,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
89 output_99x
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 53
diff changeset
90 PUTC ':'
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
91 movff mins,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
92 output_99x
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 53
diff changeset
93 STRCAT_PRINT " "
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
94
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
95 set_date_refresh:
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
96 WIN_LEFT .32
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
97 WIN_TOP .95
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
98 lfsr FSR2,letter
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
99 OUTPUTTEXT .23 ; "Date: " (actual length depends on translation)
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
100
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
101 movff month,convert_value_temp+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
102 movff day,convert_value_temp+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
103 movff year,convert_value_temp+2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
104 call PLED_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
105 STRCAT_PRINT " "
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 53
diff changeset
106 return
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
107
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
108 set_time_done: ; Check date
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
109 movff month,lo ; new month
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 .28
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 .30
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
118 dcfsnz lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
119 movlw .31
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
120 dcfsnz lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
121 movlw .30
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
122 dcfsnz lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
123 movlw .31
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
124 dcfsnz lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
125 movlw .31
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
126 dcfsnz lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
127 movlw .30
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
128 dcfsnz lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
129 movlw .31
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
130 dcfsnz lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
131 movlw .30
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
132 dcfsnz lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
133 movlw .31
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
134 cpfsgt day ; day ok?
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
135 bra set_time_done2 ; OK
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
136 movlw .1 ; not OK, set to 1st
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
137 movwf day
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
138
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
139 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
140 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
141 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
142 movlw (.160-.0)/7 ; full line length, for various translations.
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
143 movwf temp1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
144 call PLED_display_clear_common_y1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
145
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
146 movlw d'5'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
147 movwf wait_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
148 clrf secs
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
149 bcf onesecupdate
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
150
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
151 set_time_done_loop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
152 btfss onesecupdate
50
heinrichsweikamp
parents: 0
diff changeset
153 bra set_time_done_loop
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
154 bcf onesecupdate
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
155
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
156 call set_date_refresh
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
157
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
158 WIN_LEFT .32
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
159 WIN_TOP .65
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
160 lfsr FSR2,letter
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
161 OUTPUTTEXT .22 ; "Hours:" (actual length depends on translation)
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
162
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
163 movff hours,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
164 output_99x
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 53
diff changeset
165 PUTC ':'
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
166 movff mins,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
167 output_99x
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 53
diff changeset
168 PUTC ':'
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
169 movff secs,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
170 output_99x
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 53
diff changeset
171 STRCAT_PRINT " "
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
172
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
173 decfsz wait_temp,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
174 bra set_time_done_loop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
175 exit_settime: ;Exit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
176 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
177 movwf menupos
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
178 goto more_menu2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
179
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
180
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
181 set_time_next_or_exit:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
182 btfsc set_year
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
183 bsf menubit4 ; quit settime
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
184 incf menupos2,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
185 movff menupos2,menupos3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
186
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
187 dcfsnz menupos3,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
188 bsf set_minutes
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
189 dcfsnz menupos3,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
190 bsf set_month
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
191 dcfsnz menupos3,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
192 bsf set_day
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
193 dcfsnz menupos3,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
194 bsf set_year
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
195
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
196 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
197 WIN_TOP .215
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 53
diff changeset
198 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
199 lfsr FSR2,letter
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
200 OUTPUTTEXT .94 ; Set
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
201
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
202 movff menupos2,menupos3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
203 decfsz menupos3,F
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
204 bra set_time_next_or_exit2
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
205 OUTPUTTEXT .90 ; Minutes
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
206 bra set_time_next_or_exit5
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
207 set_time_next_or_exit2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
208 decfsz menupos3,F
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
209 bra set_time_next_or_exit3
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
210 OUTPUTTEXT .91 ; Month
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
211 bra set_time_next_or_exit5
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
212 set_time_next_or_exit3:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
213 decfsz menupos3,F
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
214 bra set_time_next_or_exit4
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
215 OUTPUTTEXT .92 ; Day
199
f5e9db793dd3 Minor missing translations
JeanDo
parents: 123
diff changeset
216 bra set_time_next_or_exit5
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
217 set_time_next_or_exit4:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
218 OUTPUTTEXT .93 ; Year
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
219
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
220 set_time_next_or_exit5:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
221 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
222 call wait_switches ; Waits until switches are released, resets flag if button stays pressed!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
223 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
224
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
225 add_hours_or_minutes_or_date:
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
226 bcf switch_left
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
227 clrf secs
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
228
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
229 btfsc set_year
50
heinrichsweikamp
parents: 0
diff changeset
230 bra add_year
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
231
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
232 btfsc set_day
50
heinrichsweikamp
parents: 0
diff changeset
233 bra add_day
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
234
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
235 btfsc set_month
50
heinrichsweikamp
parents: 0
diff changeset
236 bra add_month
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
237
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
238 btfsc set_minutes
50
heinrichsweikamp
parents: 0
diff changeset
239 bra add_minutes
heinrichsweikamp
parents: 0
diff changeset
240 ; Increase hours
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
241 add_hours:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
242 incf hours,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
243 movlw d'23'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
244 cpfsgt hours
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
245 bra set_time_refresh_x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
246 clrf hours
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
247 bra set_time_refresh_x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
248 add_minutes:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
249 incf mins,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
250 movlw d'59'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
251 cpfsgt mins
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
252 bra set_time_refresh_x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
253 clrf mins
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
254 bra set_time_refresh_x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
255 add_day:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
256 incf day,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
257 movlw d'31'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
258 cpfsgt day
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 day
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
262 bra set_time_refresh_x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
263 add_month:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
264 incf month,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
265 movlw d'12'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
266 cpfsgt month
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
267 bra set_time_refresh_x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
268 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
269 movwf month
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
270 bra set_time_refresh_x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
271 add_year:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
272 incf year,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
273 movlw d'20' ; calendar until 2020
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
274 cpfsgt year
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
275 bra set_time_refresh_x
53
263348f83485 1.70 cleaning the code
heinrichsweikamp
parents: 50
diff changeset
276 movlw d'10'
263348f83485 1.70 cleaning the code
heinrichsweikamp
parents: 50
diff changeset
277 movwf year ; Set Year to 2010
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
278
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
279 set_time_refresh_x:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
280 call set_time_refresh
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
281 call wait_switches ; Waits until switches are released, resets flag if button stays pressed!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
282 return