Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/divemode.asm @ 69:df2d3b28947f
1.71beta for Mk.2
author | heinrichsweikamp |
---|---|
date | Tue, 19 Oct 2010 15:35:23 +0200 |
parents | d0b677e1e9a5 |
children | 6beb680a6130 |
comparison
equal
deleted
inserted
replaced
68:d0b677e1e9a5 | 69:df2d3b28947f |
---|---|
449 | 449 |
450 movff char_O_deco_status,deco_status ; | 450 movff char_O_deco_status,deco_status ; |
451 tstfsz deco_status ; deco_status=0 if decompression calculation done | 451 tstfsz deco_status ; deco_status=0 if decompression calculation done |
452 return ; calculation not yet finished! | 452 return ; calculation not yet finished! |
453 | 453 |
454 rcall divemode_copy_decolist ;copy gf_decolist (0x250:.32) to gf_decolist_copy (0x0E0:.32) | |
455 | |
456 movff char_O_array_decodepth+0,wait_temp ; copy ceiling to temp register | |
457 tstfsz wait_temp ; Ceiling<0m? | |
458 bra calc_deko_divemode3 ; Yes! | |
459 | |
460 btfsc dekostop_active | |
461 call PLED_display_ndl_mask ; Clear deco data, display nostop time | |
462 bcf dekostop_active ; clear flag | |
463 | |
464 clrf decodata+0 ; for profile memory | |
465 movff char_O_nullzeit,decodata+1 ; nostop time | |
466 | |
467 call PLED_display_ndl ; display no deco limit | |
468 return | |
469 | |
470 divemode_copy_decolist: | |
454 ;copy gf_decolist (0x250:.32) to gf_decolist_copy (0x0E0:.32) | 471 ;copy gf_decolist (0x250:.32) to gf_decolist_copy (0x0E0:.32) |
455 lfsr FSR0,0x250 ; Source | 472 lfsr FSR0,0x250 ; Source |
456 lfsr FSR1,0x0E0 ; Target | 473 lfsr FSR1,0x0E0 ; Target |
457 movlw d'32' | 474 movlw d'24' ; Copy 24 stops |
458 movwf wait_temp ; Counter | 475 movwf wait_temp ; Counter |
459 copy_gf_deco_list: | 476 copy_gf_deco_list: |
460 movff POSTINC0,POSTINC1 ; Copy Source to Target | 477 movff POSTINC0,POSTINC1 ; Copy Source to Target |
461 decfsz wait_temp,F ; All done? | 478 decfsz wait_temp,F ; All done? |
462 bra copy_gf_deco_list ; No, continue! | 479 bra copy_gf_deco_list ; No, continue! |
463 | |
464 movff char_O_array_decodepth+0,wait_temp ; copy ceiling to temp register | |
465 tstfsz wait_temp ; Ceiling<0m? | |
466 bra calc_deko_divemode3 ; Yes! | |
467 | |
468 btfsc dekostop_active | |
469 call PLED_display_ndl_mask ; Clear deco data, display nostop time | |
470 bcf dekostop_active ; clear flag | |
471 | |
472 clrf decodata+0 ; for profile memory | |
473 movff char_O_nullzeit,decodata+1 ; nostop time | |
474 | |
475 call PLED_display_ndl ; display no deco limit | |
476 return | 480 return |
477 | 481 |
478 divemode_prepare_flags_for_deco: | 482 divemode_prepare_flags_for_deco: |
479 movff amb_pressure+0,int_I_pres_respiration+0 ; lo and copy result to deco routine | 483 movff amb_pressure+0,int_I_pres_respiration+0 ; lo and copy result to deco routine |
480 movff amb_pressure+1,int_I_pres_respiration+1 ; hi | 484 movff amb_pressure+1,int_I_pres_respiration+1 ; hi |