comparison code_part1/OSTC_code_asm_part1/menu_gassetup.asm @ 750:e9b7232b4f56

fix change depth ppO2 for OSTC 2C hardware
author heinrichsweikamp
date Mon, 23 Sep 2013 09:03:09 +0200
parents 91ae251d379f
children c50296c3059e
comparison
equal deleted inserted replaced
749:563fe6a201b3 750:e9b7232b4f56
665 ; Show ppO2 after change depth 665 ; Show ppO2 after change depth
666 WIN_TOP .125 666 WIN_TOP .125
667 WIN_LEFT .110 667 WIN_LEFT .110
668 lfsr FSR2,letter 668 lfsr FSR2,letter
669 rcall gassetup_show_ppO2 ; Display the ppO2 of the change depth with the current gas 669 rcall gassetup_show_ppO2 ; Display the ppO2 of the change depth with the current gas
670 clrf WREG
671 movff WREG,letter+7 ; limit to 7 chars
670 672
671 movff xC+0,sub_a+0 673 movff xC+0,sub_a+0
672 movff xC+1,sub_a+1 674 movff xC+1,sub_a+1
673 GETCUSTOM8 d'46' ; color-code ppO2 warning [cbar] 675 GETCUSTOM8 d'46' ; color-code ppO2 warning [cbar]
674 movwf sub_b+0 676 movwf sub_b+0
1017 clrf xB+1 1019 clrf xB+1
1018 call div16x16 ;xA/xB=xC with xA as remainder 1020 call div16x16 ;xA/xB=xC with xA as remainder
1019 movff xC+0,lo ; ((Depth+10m)*O2)/10 = [0.01bar] ppO2 1021 movff xC+0,lo ; ((Depth+10m)*O2)/10 = [0.01bar] ppO2
1020 movff xC+1,hi 1022 movff xC+1,hi
1021 output_16dp d'3' 1023 output_16dp d'3'
1022 OUTPUTTEXT d'150' ; bar: 1024 OUTPUTTEXT d'150' ; "bar "
1023 return 1025 return
1024 1026
1025 gassetup_get_mod: 1027 gassetup_get_mod:
1026 GETCUSTOM8 .18 ; ppO2 warnvalue in WREG 1028 GETCUSTOM8 .18 ; ppO2 warnvalue in WREG
1027 mullw d'10' 1029 mullw d'10'