Mercurial > public > hwos_code
comparison src/simulator.asm @ 548:abf3cbd5815e
minor cleanup, 2.25 stable RC3
author | heinrichsweikamp |
---|---|
date | Fri, 08 Sep 2017 14:04:38 +0200 |
parents | 7e6df19264b6 |
children | 7c408bfaf2e8 |
comparison
equal
deleted
inserted
replaced
547:49be7b31b4db | 548:abf3cbd5815e |
---|---|
109 return ; Done | 109 return ; Done |
110 | 110 |
111 deco_setup: | 111 deco_setup: |
112 banksel char_I_step_is_1min ; Select the right bank... | 112 banksel char_I_step_is_1min ; Select the right bank... |
113 clrf char_I_step_is_1min ; Default to 2sec steps. | 113 clrf char_I_step_is_1min ; Default to 2sec steps. |
114 clrf char_I_const_ppO2 ; Clear for OC, will be set for CC later | |
115 | 114 |
116 ; Fixed ambient surface pressure to 1bar. | 115 ; Fixed ambient surface pressure to 1bar. |
117 movlw LOW(.1000) | 116 movlw LOW(.1000) |
118 movwf int_I_pres_surface+0 | 117 movwf int_I_pres_surface+0 |
119 movwf int_I_pres_respiration+0 | 118 movwf int_I_pres_respiration+0 |
121 movwf int_I_pres_surface+1 | 120 movwf int_I_pres_surface+1 |
122 movwf int_I_pres_respiration+1 | 121 movwf int_I_pres_respiration+1 |
123 | 122 |
124 clrf int_I_divemins+0 ; Dive start | 123 clrf int_I_divemins+0 ; Dive start |
125 clrf int_I_divemins+1 | 124 clrf int_I_divemins+1 |
125 | |
126 banksel common ; Bank1 | 126 banksel common ; Bank1 |
127 bcf use_agf ; =1: Use aGF | 127 bcf use_agf ; =1: Use aGF |
128 | 128 |
129 rcall deco_setup_dive | 129 rcall deco_setup_dive |
130 | 130 |
131 movlw .0 | 131 movlw .0 ; Bank safe "clrf" |
132 movff WREG,char_I_const_ppO2 ; deactivate CCR-mode in deco calculations unless in CCR mode (char_I_const_ppO2 is filled below again) | 132 movff WREG,char_I_const_ppO2 ; deactivate CCR-mode in deco calculations unless in CCR mode (char_I_const_ppO2 is filled below again) |
133 | 133 |
134 ; Setup char_I_const_ppO2 for CC modes | 134 ; Setup char_I_const_ppO2 for CC modes |
135 btfsc FLAG_ccr_mode ; =1: CCR mode (Fixed ppO2 or Sensor) active | 135 btfsc FLAG_ccr_mode ; =1: CCR mode (Fixed ppO2 or Sensor) active |
136 movff char_I_setpoint_cbar+0,char_I_const_ppO2 ; Setup fixed Setpoint (Always start with SP1) | 136 movff char_I_setpoint_cbar+0,char_I_const_ppO2 ; Setup fixed Setpoint (Always start with SP1) |
137 rcall get_first_gas_to_WREG ; Gets first gas (0-4) into WREG | 137 rcall get_first_gas_to_WREG ; Gets first gas (0-4) into WREG |
138 | 138 |
139 ; Overwrite WREG in CCR and PSCR Mode | 139 ; Overwrite WREG in CCR and PSCR Mode |