annotate code_part1/OSTC_code_asm_part1/menu_ppO2.asm @ 584:15e132a699c6

Updated FRENCH translation.
author JeanDo
date Mon, 07 May 2012 21:59:45 +0200
parents ab2686087bce
children 2ab9e9a8a189
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 ; Constant ppO2 Setup menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
20 ; written by: Matthias Heinrichs, info@heinrichsweikamp.com
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
21 ; written: 08/04/04
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 menu_const_ppO2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
27 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
28 movwf menupos
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
29
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
30 bcf menubit4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
31 clrf decodata+0 ; Here: # of SP
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
32 bcf first_FA ; Here: =1: -, =0: +
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
33 bcf second_FA ; Here: =1: 1, =0: 10 steps
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
34
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
35 menu_const_ppO20:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
36 call PLED_ClearScreen
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
37 call PLED_topline_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
38
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
39 WIN_INVERT .1 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
40 DISPLAYTEXT .111 ; Constant ppO2 Setup
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
41 WIN_INVERT .0 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
42
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
43
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
44 menu_const_ppO21:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
45 WIN_LEFT .20
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
46 WIN_TOP .35
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
47 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
48 OUTPUTTEXT .112 ; SP#
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
49 movff decodata+0,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
50 incf lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
51 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
52 output_99
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 0
diff changeset
53 STRCAT " ("
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
54
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
55 OUTPUTTEXT d'192' ; Dil.
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 0
diff changeset
56 PUTC ' '
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
57
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
58 read_int_eeprom d'33' ; Read byte (stored in EEDATA)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
59 movff EEDATA,active_gas ; Read start gas (1-5)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
60
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
61 decf active_gas,W ; Gas 0-4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
62 mullw d'4'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
63 movf PRODL,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
64 addlw d'6' ; = address for O2 ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
65 movwf EEADR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
66 call read_eeprom ; Read O2 ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
67 movff EEDATA, lo ; O2 ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
68
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
69
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
70 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
71 output_99
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
72
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 0
diff changeset
73 PUTC '/'
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
74
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
75 decf active_gas,W ; Gas 0-4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
76 mullw d'4'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
77 movf PRODL,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
78 addlw d'7' ; = address for He ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
79 movwf EEADR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
80 call read_eeprom ; Read He ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
81 movff EEDATA,lo ; And copy into hold register
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
82
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
83 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
84 output_99
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 0
diff changeset
85 STRCAT_PRINT ")"
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
86
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
87
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
88 WIN_LEFT .20
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
89 WIN_TOP .65
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
90
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
91 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
92 OUTPUTTEXT .97 ; "Current: "
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
93 movf decodata+0,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
94 addlw d'36' ; offset in eeprom
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
95 movwf EEADR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
96 call read_eeprom ; ppO2 value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
97 movff EEDATA,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
98 clrf hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
99 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
100 output_16dp d'3'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
101 bcf leftbind
445
6e57b5bb98ce localisation part 1 from Sergei
heinrichsweikamp
parents: 398
diff changeset
102 STRCAT_PRINT TXT_BAR4
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
103
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
104 WIN_LEFT .20
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
105 WIN_TOP .95
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
106
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
107 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
108 OUTPUTTEXT d'190' ; ppO2 +
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
109 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
110
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
111 WIN_LEFT .20
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
112 WIN_TOP .125
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
113
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
114 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
115 OUTPUTTEXT d'191' ; ppO2 -
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
116 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
117
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
118 WIN_LEFT .20
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
119 WIN_TOP .155
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
120
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
121 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
122 OUTPUTTEXT .89 ; "Default: "
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 0
diff changeset
123 STRCAT_PRINT "1.00"
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
124
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
125 DISPLAYTEXT .11 ; Exit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
126 call wait_switches ; Waits until switches are released, resets flag if button stays pressed!
576
ab2686087bce faster font display, code cleaning
heinrichsweikamp
parents: 575
diff changeset
127 call menu_pre_loop_common ; Clear some menu flags, timeout and switches
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
128 call PLED_menu_cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
129
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
130 menu_const_ppO2_loop:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
131 call check_switches_logbook
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
132
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
133 btfsc menubit3
575
cbdcbbc91877 some code cleaning
heinrichsweikamp
parents: 445
diff changeset
134 bra menu_const_ppO22 ; move cursor
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
135
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
136 btfsc menubit2
575
cbdcbbc91877 some code cleaning
heinrichsweikamp
parents: 445
diff changeset
137 bra do_menu_const_ppO2 ; call submenu
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
138
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
139 btfsc onesecupdate
575
cbdcbbc91877 some code cleaning
heinrichsweikamp
parents: 445
diff changeset
140 call menu_check_dive_and_timeout ; "Goto restart" or sets sleepmode flag
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
141
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
142 bcf onesecupdate ; 1 sec. functions done
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
143
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
144 btfsc sleepmode
575
cbdcbbc91877 some code cleaning
heinrichsweikamp
parents: 445
diff changeset
145 bra exit_menu_const_ppO2
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
146
575
cbdcbbc91877 some code cleaning
heinrichsweikamp
parents: 445
diff changeset
147 bra menu_const_ppO2_loop
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
148
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
149 menu_const_ppO22:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
150 incf menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
151
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
152 movlw d'2'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
153 cpfseq menupos ; =2?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
154 bra menu_const_ppO22a ; No
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
155 incf menupos,F ; Skip pos. 2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
156
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
157 menu_const_ppO22a:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
158 movlw d'7'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
159 cpfseq menupos ; =7?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
160 bra menu_const_ppO23 ; No
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
161 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
162 movwf menupos
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
163
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
164 menu_const_ppO23:
576
ab2686087bce faster font display, code cleaning
heinrichsweikamp
parents: 575
diff changeset
165 call menu_pre_loop_common ; Clear some menu flags, timeout and switches
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
166 call PLED_menu_cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
167 bra menu_const_ppO2_loop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
168
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
169 do_menu_const_ppO2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
170 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
171 bra next_ppO2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
172 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
173 bra change_ppo2_plus
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
174 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
175 bra change_ppo2_plus
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
176 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
177 bra change_ppo2_minus
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
178 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
179 bra change_ppo2_reset
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
180 exit_menu_const_ppO2: ; exit...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
181 movlw d'2'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
182 movwf menupos
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
183 goto more_menu2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
184
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
185 change_ppo2_plus:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
186 movf decodata+0,W ; read current value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
187 addlw d'36' ; offset in memory
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
188 movwf EEADR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
189 call read_eeprom ; Low-value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
190 movff EEDATA,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
191
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
192 incf lo,F ; increase depth
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
193 movlw d'251'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
194 cpfseq lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
195 bra change_ppo2_plus2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
196 movlw d'250'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
197 movwf lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
198 change_ppo2_plus2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
199 movff lo,EEDATA ; write result
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
200 call write_eeprom ; save result in EEPROM
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
201 movlw d'3'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
202 movwf menupos
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
203 bra menu_const_ppO21
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
204
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
205 change_ppo2_minus:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
206 movf decodata+0,W ; read current value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
207 addlw d'36' ; offset in memory
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
208 movwf EEADR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
209 call read_eeprom ; Low-value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
210 movff EEDATA,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
211
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
212 decf lo,F ; decrease depth
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
213 movlw d'255'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
214 cpfseq lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
215 bra change_ppo2_minus2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
216 movlw d'0'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
217 movwf lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
218
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
219 change_ppo2_minus2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
220 movff lo,EEDATA ; write result
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
221 call write_eeprom ; save result in EEPROM
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
222
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
223 movlw d'4'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
224 movwf menupos
576
ab2686087bce faster font display, code cleaning
heinrichsweikamp
parents: 575
diff changeset
225 bra menu_const_ppO21
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
226
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
227 change_ppo2_reset: ; reset to 1.00Bar
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
228 movf decodata+0,W ; read current value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
229 addlw d'36' ; offset in memory
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
230 movwf EEADR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
231 movlw d'100'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
232 movwf EEDATA
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
233 call write_eeprom ; save result in EEPROM
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
234 movlw d'5'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
235 movwf menupos
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
236 bra menu_const_ppO21
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
237
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
238 next_ppO2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
239 incf decodata+0,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
240 movlw d'3'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
241 cpfseq decodata+0 ; =3?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
242 bra next_ppO22
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
243 clrf decodata+0 ; yes, so reset to zero
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
244 next_ppO22:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
245 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
246 movwf menupos
576
ab2686087bce faster font display, code cleaning
heinrichsweikamp
parents: 575
diff changeset
247 bra menu_const_ppO21