comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 647:e6ac142e82b0

New Diluent Submenu in Divemode
author heinrichsweikamp
date Sun, 07 Oct 2012 21:31:19 +0200
parents 420e62cd88ad
children 994a04d7ae57
comparison
equal deleted inserted replaced
646:06ffc99a405f 647:e6ac142e82b0
1448 1448
1449 movlw d'3' ; list all three SP 1449 movlw d'3' ; list all three SP
1450 cpfseq apnoe_mins ; All gases shown? 1450 cpfseq apnoe_mins ; All gases shown?
1451 bra PLED_pre_dive_screen3_loop ;no 1451 bra PLED_pre_dive_screen3_loop ;no
1452 1452
1453 movlw .1
1454 movwf EEADRH
1455 read_int_eeprom d'96' ; Read O2 1453 read_int_eeprom d'96' ; Read O2
1456 movff EEDATA,lo 1454 movff EEDATA,lo
1457 read_int_eeprom d'97' ; Read He 1455 read_int_eeprom d'97' ; Read He
1458 clrf EEADRH 1456 movff EEDATA,hi
1459 1457
1460 WIN_LEFT .90 1458 WIN_LEFT .90
1461 WIN_TOP .100 1459 WIN_TOP .100
1462 STRCPY TXT_DIL4 1460 STRCPY TXT_DIL4
1463 output_8 ; O2 Ratio 1461 output_8 ; O2 Ratio
2888 2886
2889 PLED_show_change_depth_clear: 2887 PLED_show_change_depth_clear:
2890 STRCPY_PRINT " " 2888 STRCPY_PRINT " "
2891 return 2889 return
2892 2890
2891 PLED_diluent_list:
2892 ostc_debug 'm' ; Sends debug-information to screen if debugmode active
2893 WIN_LEFT .100
2894 WIN_FONT FT_SMALL
2895 bsf leftbind
2896 movlw d'94'
2897 movwf wait_temp ; here: stores eeprom address for diluent list (96-2)
2898 movlw d'231'
2899 movwf waitms_temp ; here: stores row for gas list
2900 clrf hi ; here: Diluent counter
2901
2902 PLED_diluent_list_loop:
2903 incf hi,F ; Increase Diluent
2904 movlw .2
2905 addwf wait_temp,F ; Increase eeprom address for gas list
2906 movlw d'25'
2907 addwf waitms_temp,F ; Increase row
2908 WIN_LEFT .100
2909 movff waitms_temp,win_top ; Set Row
2910 STRCPY TXT_DIL_C
2911 movff hi,lo ; copy dil number
2912 output_8 ; display dil number
2913 PUTC ':'
2914 movff wait_temp, EEADR; Dil #hi: %O2 - Set address in internal EEPROM
2915 call read_eeprom ; get byte (stored in EEDATA)
2916 movff EEDATA,lo ; copy to lo
2917 output_8 ; outputs into Postinc2!
2918 PUTC '/'
2919 incf EEADR,F ; Dil #hi: %He - Set address in internal EEPROM
2920 call read_eeprom ; get byte (stored in EEDATA)
2921 movff EEDATA,lo ; copy to lo
2922 output_8 ; outputs into Postinc2!
2923
2924 decf EEADR,F ; Dil #hi: %O2 - Set address in internal EEPROM
2925 call read_eeprom ; get byte (stored in EEDATA)
2926 PLED_color_code warn_gas_in_gaslist ; Color-code output (%O2 in "EEDATA")
2927
2928 call word_processor
2929 call PLED_standard_color
2930
2931 movlw d'5' ; list all five Diluents
2932 cpfseq hi ; All diluents shown?
2933 bra PLED_diluent_list_loop ; No
2934 return ; return
2935
2893 2936
2894 PLED_gas_list: 2937 PLED_gas_list:
2895 ostc_debug 'm' ; Sends debug-information to screen if debugmode active 2938 ostc_debug 'm' ; Sends debug-information to screen if debugmode active
2896 2939
2897 WIN_LEFT .100 2940 WIN_LEFT .100