Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/menu_gassetup.asm @ 303:9c39cedb662b
disabled live END and EAD (Need some debug work)
author | heinrichsweikamp |
---|---|
date | Sat, 30 Apr 2011 14:07:44 +0200 |
parents | eac799f69360 |
children | ed08d441ed26 |
comparison
equal
deleted
inserted
replaced
302:36cc8f0c1d73 | 303:9c39cedb662b |
---|---|
334 | 334 |
335 ; Show END in m | 335 ; Show END in m |
336 lfsr FSR2, letter | 336 lfsr FSR2, letter |
337 WIN_LEFT .90 | 337 WIN_LEFT .90 |
338 OUTPUTTEXTH .298 ; END: | 338 OUTPUTTEXTH .298 ; END: |
339 GETCUSTOM8 .18 ; ppO2 warnvalue in WREG | 339 |
340 mullw d'10' | 340 rcall gassetup_get_mod ; compute MOD based on CF18 into lo:hi |
341 movff PRODL,xA+0 | |
342 movff PRODH,xA+1 ; ppO2 in [0.01Bar] * 10 | |
343 movf divemins+0,W | |
344 addlw 0x06 | |
345 movwf EEADR | |
346 call read_eeprom ; O2 value | |
347 movff EEDATA,xB+0 | |
348 clrf xB+1 | |
349 call div16x16 ; xA/xB=xC with xA as remainder | |
350 movlw d'10' | |
351 subwf xC+0,F ; Subtract 10m... | |
352 movff xC+0,lo | |
353 movlw d'0' | |
354 subwfb xC+1,F | |
355 movff xC+1,hi ; lo:hi holding MOD in meters | |
356 movlw d'10' | 341 movlw d'10' |
357 addwf lo,F | 342 addwf lo,F |
358 movlw d'0' | 343 movlw d'0' |
359 addwfc hi,F ; lo:hi holding MOD+10m | 344 addwfc hi,F ; lo:hi holding MOD+10m |
360 | 345 |