comparison code_part1/OSTC_code_asm_part1/start.asm @ 45:985607cfb813

1.65beta
author heinrichsweikamp
date Sun, 11 Jul 2010 20:26:43 +0200
parents 65d5b0c8da41
children 56aea9fcdd8f
comparison
equal deleted inserted replaced
44:475a9e536d77 45:985607cfb813
197 197
198 restart_set_modes_and_flags: ; "Call"ed from divemode, as well! 198 restart_set_modes_and_flags: ; "Call"ed from divemode, as well!
199 bcf gauge_mode 199 bcf gauge_mode
200 bcf FLAG_const_ppO2_mode 200 bcf FLAG_const_ppO2_mode
201 bcf FLAG_apnoe_mode 201 bcf FLAG_apnoe_mode
202
203 ; Pre-load modes for OC, GF 90/90 and no Aponoe or Gauge.
204 movlw d'0'
205 movwf wait_temp
206 movff wait_temp,char_I_deco_model ; Clear Flagbyte
207 ; Load GF values into RAM
208 movlw d'90'
209 movwf wait_temp
210 movff wait_temp,char_I_GF_Lo_percentage
211 movff wait_temp,char_I_GF_Hi_percentage ; Set to 90/90...
202 clrf EEADRH 212 clrf EEADRH
203 read_int_eeprom d'34' ; Read deco data 213 read_int_eeprom d'34' ; Read deco data
204 movlw d'1' ; Gauge mode 214 movlw d'1' ; Gauge mode
205 cpfseq EEDATA 215 cpfseq EEDATA
206 bra restart_3_test_ppO2_mode; check for ppO2 mode 216 bra restart_3_test_ppO2_mode; check for ppO2 mode
207 bsf gauge_mode ; Set flag for gauge mode 217 bsf gauge_mode ; Set flag for gauge mode
208 movlw d'0'
209 movwf wait_temp
210 movff wait_temp,char_I_deco_model ; Clear Flagbyte
211 return ; start in Surfacemode 218 return ; start in Surfacemode
212 restart_3_test_ppO2_mode: 219 restart_3_test_ppO2_mode:
213 movlw d'2' ; const ppO2 mode 220 movlw d'2' ; const ppO2 mode
214 cpfseq EEDATA 221 cpfseq EEDATA
215 bra restart_3_test_apnoe_mode; check for apnoe mode 222 bra restart_3_test_apnoe_mode; check for apnoe mode
216 bsf FLAG_const_ppO2_mode ; Set flag for ppO2 mode 223 bsf FLAG_const_ppO2_mode ; Set flag for ppO2 mode
217 movlw d'0'
218 movwf wait_temp
219 movff wait_temp,char_I_deco_model ; Clear Flagbyte
220 return ; start in Surfacemode 224 return ; start in Surfacemode
221 restart_3_test_apnoe_mode: 225 restart_3_test_apnoe_mode:
222 movlw d'3' ; Apnoe mode 226 movlw d'3' ; Apnoe mode
223 cpfseq EEDATA 227 cpfseq EEDATA
224 bra restart_4_test_gf_mode ; check for GF OC mode 228 bra restart_4_test_gf_mode ; check for GF OC mode
225 bsf FLAG_apnoe_mode ; Set flag for Apnoe Mode 229 bsf FLAG_apnoe_mode ; Set flag for Apnoe Mode
226 movlw d'0'
227 movwf wait_temp
228 movff wait_temp,char_I_deco_model ; Clear Flagbyte
229 return ; start in Surfacemode 230 return ; start in Surfacemode
230 restart_4_test_gf_mode: 231 restart_4_test_gf_mode:
231 movlw d'4' ; GF OC mode 232 movlw d'4' ; GF OC mode
232 cpfseq EEDATA 233 cpfseq EEDATA
233 bra restart_5_test_gfO2_mode; check for GF CC mode 234 bra restart_5_test_gfO2_mode; check for GF CC mode
234 movlw d'1' 235 movlw d'1'
235 movwf wait_temp 236 movwf wait_temp
236 movff wait_temp,char_I_deco_model ; Set Flagbyte for GF method 237 movff wait_temp,char_I_deco_model ; Set Flagbyte for GF method
238 ; Load GF values into RAM
239 GETCUSTOM8 d'32' ; GF low
240 movff EEDATA,char_I_GF_Lo_percentage
241 GETCUSTOM8 d'33' ; GF high
242 movff EEDATA,char_I_GF_Hi_percentage
237 return ; start in Surfacemode 243 return ; start in Surfacemode
238 restart_5_test_gfO2_mode: 244 restart_5_test_gfO2_mode:
239 movlw d'5' ; GF CC mode 245 movlw d'5' ; GF CC mode
240 cpfseq EEDATA 246 cpfseq EEDATA
241 return ; Start in Surfacemode 247 return ; Start in Surfacemode
242 bsf FLAG_const_ppO2_mode ; Set flag for ppO2 mode 248 bsf FLAG_const_ppO2_mode ; Set flag for ppO2 mode
243 movlw d'1' 249 movlw d'1'
244 movwf wait_temp 250 movwf wait_temp
245 movff wait_temp,char_I_deco_model ; Set Flagbyte for GF method 251 movff wait_temp,char_I_deco_model ; Set Flagbyte for GF method
252 ; Load GF values into RAM
253 GETCUSTOM8 d'32' ; GF low
254 movff EEDATA,char_I_GF_Lo_percentage
255 GETCUSTOM8 d'33' ; GF high
256 movff EEDATA,char_I_GF_Hi_percentage
246 return ; start in Surfacemode 257 return ; start in Surfacemode
247 258
248 startup_screen1: 259 startup_screen1:
249 call PLED_ClearScreen 260 call PLED_ClearScreen
250 call PLED_startupscreen1 ; show startup sreen 261 call PLED_startupscreen1 ; show startup sreen