Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 296:2986e7cdb68c
Apply salinity for ceiling warning
author | Heinrichsweikamp |
---|---|
date | Thu, 28 Apr 2011 18:51:48 +0200 |
parents | 21a0f7393468 |
children | ceedf078b2d8 |
comparison
equal
deleted
inserted
replaced
295:1a15d75702f7 | 296:2986e7cdb68c |
---|---|
141 movwf lo | 141 movwf lo |
142 movlw d'1' | 142 movlw d'1' |
143 cpfseq lo ; =1? | 143 cpfseq lo ; =1? |
144 bra PLED_color_code_ceiling1 ; No, Set to default color | 144 bra PLED_color_code_ceiling1 ; No, Set to default color |
145 | 145 |
146 movff rel_pressure+1,hi | |
147 movff rel_pressure+0,lo | |
148 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mBar] | |
149 movff hi,xA+1 | |
150 movff lo,xA+0 | |
146 movff char_O_first_deco_depth,lo ; Ceiling in m | 151 movff char_O_first_deco_depth,lo ; Ceiling in m |
147 decf lo,F ; -1 | 152 decf lo,F ; -1 |
148 movff rel_pressure+1,xA+1 | |
149 movff rel_pressure+0,xA+0 | |
150 movlw LOW d'100' | 153 movlw LOW d'100' |
151 movwf xB+0 | 154 movwf xB+0 |
152 clrf xB+1 ; Devide/100 -> xC+0 = Depth in m | 155 clrf xB+1 ; Devide/100 -> xC+0 = Depth in m |
153 call div16x16 ; xA/xB=xC with xA as remainder | 156 call div16x16 ; xA/xB=xC with xA as remainder |
154 movf xC+0,W ; Depth in m | 157 movf xC+0,W ; Depth in m |