Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/sleepmode.asm @ 116:14a074e1a375
Split C code, and use direct linking.
author | JeanDo |
---|---|
date | Sun, 26 Dec 2010 14:30:13 +0100 |
parents | 73014f788032 |
children | 2907b42c195b |
comparison
equal
deleted
inserted
replaced
115:50a06adabc67 | 116:14a074e1a375 |
---|---|
28 bra sleeploop1 | 28 bra sleeploop1 |
29 ; build hash (about 90sek @ 16MHz) | 29 ; build hash (about 90sek @ 16MHz) |
30 call PLED_ClearScreen ; clear | 30 call PLED_ClearScreen ; clear |
31 DISPLAYTEXT .1 ; "Building MD2 hash" | 31 DISPLAYTEXT .1 ; "Building MD2 hash" |
32 DISPLAYTEXT .2 ; "Please wait..." | 32 DISPLAYTEXT .2 ; "Please wait..." |
33 call deco_main_hash ; calculate MD2 hash | 33 call deco_hash ; calculate MD2 hash |
34 movlb b'00000001' ; Back to Bank1 | 34 movlb b'00000001' ; Back to Bank1 |
35 sleeploop2: | 35 sleeploop2: |
36 call PLED_DisplayOff ; display off | 36 call PLED_DisplayOff ; display off |
37 call disable_rs232 ; disable UART module | 37 call disable_rs232 ; disable UART module |
38 clrf divemins+0 | 38 clrf divemins+0 |
71 | 71 |
72 rcall pressuretest_sleep_fast ; Gets pressure without averaging (faster!) | 72 rcall pressuretest_sleep_fast ; Gets pressure without averaging (faster!) |
73 | 73 |
74 call check_temp_extrema ; Check for temperature extremas | 74 call check_temp_extrema ; Check for temperature extremas |
75 | 75 |
76 call main_calc_CNS_decrease_15min ; compute CNS decay in sleep only | 76 call deco_calc_CNS_decrease_15min ; compute CNS decay in sleep only |
77 movlb b'00000001' | 77 movlb b'00000001' |
78 movff last_surfpressure_15min+0,last_surfpressure_30min+0 ; save older airpressure | 78 movff last_surfpressure_15min+0,last_surfpressure_30min+0 ; save older airpressure |
79 movff last_surfpressure_15min+1,last_surfpressure_30min+1 ; save older airpressure | 79 movff last_surfpressure_15min+1,last_surfpressure_30min+1 ; save older airpressure |
80 movff amb_pressure+0,last_surfpressure_15min+0 ; save new airpressure | 80 movff amb_pressure+0,last_surfpressure_15min+0 ; save new airpressure |
81 movff amb_pressure+1,last_surfpressure_15min+1 ; save new airpressure | 81 movff amb_pressure+1,last_surfpressure_15min+1 ; save new airpressure |
103 movwf wait_temp | 103 movwf wait_temp |
104 movff wait_temp,char_I_saturation_multiplier | 104 movff wait_temp,char_I_saturation_multiplier |
105 GETCUSTOM8 d'12' ; Desaturation multiplier % | 105 GETCUSTOM8 d'12' ; Desaturation multiplier % |
106 movwf wait_temp | 106 movwf wait_temp |
107 movff wait_temp,char_I_desaturation_multiplier | 107 movff wait_temp,char_I_desaturation_multiplier |
108 call deco_main_calc_wo_deco_step_1_m ; "calc_tissue_sleep" | 108 call deco_calc_wo_deco_step_1_min ; "calc_tissue_sleep" |
109 movlb b'00000001' ; RAM Bank1 selected | 109 movlb b'00000001' ; RAM Bank1 selected |
110 | 110 |
111 bcf oneminupdate ; all done | 111 bcf oneminupdate ; all done |
112 return | 112 return |
113 | 113 |