Mercurial > public > hwos_code
comparison src/ghostwriter.asm @ 99:87cc1adfe4da
show event "bailout" in the internal logbook
author | heinrichsweikamp |
---|---|
date | Fri, 02 May 2014 14:13:35 +0200 |
parents | 24b3fd59e61f |
children | dc44aa645549 |
comparison
equal
deleted
inserted
replaced
98:24b3fd59e61f | 99:87cc1adfe4da |
---|---|
80 check_extended7: | 80 check_extended7: |
81 | 81 |
82 ; Second, check global event flag | 82 ; Second, check global event flag |
83 btfss event_occured ; Check global event flag | 83 btfss event_occured ; Check global event flag |
84 bra store_dive_data3 ; No Event | 84 bra store_dive_data3 ; No Event |
85 | |
85 incf ProfileFlagByte,F ; add one byte (The EventByte) | 86 incf ProfileFlagByte,F ; add one byte (The EventByte) |
86 | 87 |
87 clrf EventByte ; reset EventByte | 88 clrf EventByte ; reset EventByte |
88 clrf EventByte2 ; reset EventByte2 | 89 clrf EventByte2 ; reset EventByte2 |
89 | 90 |
133 btfss event_occured ; Check global event flag (again) | 134 btfss event_occured ; Check global event flag (again) |
134 bra store_dive_data4 ; No Event | 135 bra store_dive_data4 ; No Event |
135 | 136 |
136 ; Store the EventByte(s) + additional bytes now | 137 ; Store the EventByte(s) + additional bytes now |
137 movf EventByte,W | 138 movf EventByte,W |
138 rcall ghostwrite_byte_profile ; WREG -> Profile in ext. Flash | 139 rcall ghostwrite_byte_profile ; WREG -> Profile in ext. Flash |
139 | 140 |
140 movf EventByte2,W ; Write second event byte... | 141 movf EventByte2,W ; Write second event byte... |
141 btfsc EventByte,7 ; =1: Another Eventbyte is available | 142 btfsc EventByte,7 ; =1: Another Eventbyte is available |
142 rcall ghostwrite_byte_profile ; WREG -> Profile in ext. Flash | 143 rcall ghostwrite_byte_profile ; WREG -> Profile in ext. Flash |
143 | 144 |
144 btfss gas6_changed ; Check flag | 145 btfss gas6_changed ; Check flag |
145 bra store_dive_data3b | 146 bra store_dive_data3b |
146 movff char_I_O2_ratio,WREG | 147 movff char_I_O2_ratio,WREG |
147 rcall ghostwrite_byte_profile ; WREG -> Profile in ext. Flash | 148 rcall ghostwrite_byte_profile ; WREG -> Profile in ext. Flash |
148 movff char_I_He_ratio,WREG | 149 movff char_I_He_ratio,WREG |
149 rcall ghostwrite_byte_profile ; WREG -> Profile in ext. Flash | 150 rcall ghostwrite_byte_profile ; WREG -> Profile in ext. Flash |
150 bcf gas6_changed ; Clear this event | 151 bcf gas6_changed ; Clear this event |
151 store_dive_data3b: | 152 store_dive_data3b: |
152 btfss stored_gas_changed ; Check flag | 153 btfss stored_gas_changed ; Check flag |
153 bra store_dive_data3c | 154 bra store_dive_data3c |
154 movf active_gas,W ; Store active gas | 155 movf active_gas,W ; Store active gas |
219 clrf divisor_tank | 220 clrf divisor_tank |
220 | 221 |
221 store_dive_data5: | 222 store_dive_data5: |
222 bcf event_occured ; Clear the global event flag | 223 bcf event_occured ; Clear the global event flag |
223 bcf event2_occured ; Clear the global event2 flag | 224 bcf event2_occured ; Clear the global event2 flag |
225 clrf EventByte ; reset EventByte | |
226 clrf EventByte2 ; reset EventByte2 | |
224 return ; Done. (Sample with all informations written to external flash) | 227 return ; Done. (Sample with all informations written to external flash) |
225 | 228 |
226 store_dive_cns: | 229 store_dive_cns: |
227 movff int_O_CNS_fraction+0,WREG | 230 movff int_O_CNS_fraction+0,WREG |
228 rcall ghostwrite_byte_profile ; WREG -> Profile in ext. Flash | 231 rcall ghostwrite_byte_profile ; WREG -> Profile in ext. Flash |