annotate code_part1/OSTC_code_asm_part1/menu_settime.asm @ 674:3927bc5019c9

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