Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 446:92304826000d
localisation part2 from Sergei
author | heinrichsweikamp |
---|---|
date | Sat, 13 Aug 2011 09:45:53 +0200 |
parents | f36b93f2fbed |
children | 32e1174fb89e |
comparison
equal
deleted
inserted
replaced
445:6e57b5bb98ce | 446:92304826000d |
---|---|
468 WIN_INVERT .0 ; Init new Wordprocessor | 468 WIN_INVERT .0 ; Init new Wordprocessor |
469 PLED_color_code warn_ceiling ; Color-code Output | 469 PLED_color_code warn_ceiling ; Color-code Output |
470 lfsr FSR2,letter | 470 lfsr FSR2,letter |
471 movff char_O_first_deco_depth,lo ; Ceiling in m | 471 movff char_O_first_deco_depth,lo ; Ceiling in m |
472 output_99 | 472 output_99 |
473 PUTC 'm' | 473 PUTC TXT_METER_C |
474 movff char_O_first_deco_time,lo ; length of first stop in m | 474 movff char_O_first_deco_time,lo ; length of first stop in m |
475 output_99 | 475 output_99 |
476 STRCAT_PRINT "'" | 476 STRCAT_PRINT "'" |
477 WIN_FONT FT_SMALL | 477 WIN_FONT FT_SMALL |
478 | 478 |
506 WIN_TOP .145 | 506 WIN_TOP .145 |
507 WIN_LEFT .0 | 507 WIN_LEFT .0 |
508 WIN_FONT FT_SMALL | 508 WIN_FONT FT_SMALL |
509 PLED_color_code warn_gf ; Color-code Output | 509 PLED_color_code warn_gf ; Color-code Output |
510 | 510 |
511 STRCPY "GF:" | 511 STRCPY TXT_GF3 |
512 movff char_O_gradient_factor,lo ; gradient factor | 512 movff char_O_gradient_factor,lo ; gradient factor |
513 output_8 | 513 output_8 |
514 STRCAT_PRINT "% " | 514 STRCAT_PRINT "% " |
515 call PLED_standard_color | 515 call PLED_standard_color |
516 return | 516 return |
537 bra PLED_simulator_data_2 | 537 bra PLED_simulator_data_2 |
538 | 538 |
539 PLED_simulator_data_1: | 539 PLED_simulator_data_1: |
540 bsf leftbind | 540 bsf leftbind |
541 output_8 | 541 output_8 |
542 STRCAT "0min " | 542 STRCAT TXT_0MIN5 |
543 | 543 |
544 PLED_simulator_data_2: | 544 PLED_simulator_data_2: |
545 call word_processor | 545 call word_processor |
546 | 546 |
547 ;---- Updates bottom time line ------------------------------------------- | 547 ;---- Updates bottom time line ------------------------------------------- |
550 OUTPUTTEXTH .277 ; Bottom Time: | 550 OUTPUTTEXTH .277 ; Bottom Time: |
551 | 551 |
552 movff sim_btm_time,lo | 552 movff sim_btm_time,lo |
553 bsf leftbind | 553 bsf leftbind |
554 output_8 | 554 output_8 |
555 STRCAT_PRINT "min " | 555 STRCAT_PRINT TXT_MIN4 |
556 | 556 |
557 ;---- Updates depth line ------------------------------------------------- | 557 ;---- Updates depth line ------------------------------------------------- |
558 WIN_TOP .125 | 558 WIN_TOP .125 |
559 lfsr FSR2,letter | 559 lfsr FSR2,letter |
560 OUTPUTTEXTH .278 ; Max. Depth: | 560 OUTPUTTEXTH .278 ; Max. Depth: |
561 | 561 |
562 movff sim_btm_depth,lo | 562 movff sim_btm_depth,lo |
563 bsf leftbind | 563 bsf leftbind |
564 output_8 | 564 output_8 |
565 STRCAT_PRINT "m " | 565 STRCAT_PRINT TXT_METER3 |
566 | 566 |
567 bcf leftbind | 567 bcf leftbind |
568 return | 568 return |
569 | 569 |
570 ;============================================================================= | 570 ;============================================================================= |
724 WIN_TOP .25 | 724 WIN_TOP .25 |
725 WIN_LEFT .90 | 725 WIN_LEFT .90 |
726 WIN_FONT FT_SMALL | 726 WIN_FONT FT_SMALL |
727 WIN_INVERT .0 ; Init new Wordprocessor | 727 WIN_INVERT .0 ; Init new Wordprocessor |
728 call PLED_standard_color | 728 call PLED_standard_color |
729 STRCPY "BSat:" | 729 STRCPY TXT_BSAT5 |
730 | 730 |
731 GETCUSTOM8 d'11' | 731 GETCUSTOM8 d'11' |
732 movwf lo | 732 movwf lo |
733 bsf leftbind | 733 bsf leftbind |
734 output_8 | 734 output_8 |
735 STRCAT_PRINT "%" | 735 STRCAT_PRINT "%" |
736 | 736 |
737 WIN_TOP .50 | 737 WIN_TOP .50 |
738 STRCPY "BDes:" | 738 STRCPY TXT_BDES5 |
739 | 739 |
740 GETCUSTOM8 d'12' | 740 GETCUSTOM8 d'12' |
741 movwf lo | 741 movwf lo |
742 bsf leftbind | 742 bsf leftbind |
743 output_8 | 743 output_8 |
744 STRCAT_PRINT "%" | 744 STRCAT_PRINT "%" |
745 | 745 |
746 PLED_show_cf11_cf12_cf29_2: | 746 PLED_show_cf11_cf12_cf29_2: |
747 WIN_TOP .75 | 747 WIN_TOP .75 |
748 STRCPY "Last:" | 748 STRCPY TXT_LAST5 |
749 GETCUSTOM8 d'29' | 749 GETCUSTOM8 d'29' |
750 movwf lo | 750 movwf lo |
751 bsf leftbind | 751 bsf leftbind |
752 output_8 | 752 output_8 |
753 STRCAT_PRINT "m" | 753 STRCAT_PRINT TXT_METER1 |
754 | 754 |
755 bcf leftbind | 755 bcf leftbind |
756 return | 756 return |
757 | 757 |
758 PLED_show_cf32_cf33_cf29:; Display GF_LOW, GF_HIGH and last deco in the customview field | 758 PLED_show_cf32_cf33_cf29:; Display GF_LOW, GF_HIGH and last deco in the customview field |
762 WIN_INVERT .0 ; Init new Wordprocessor | 762 WIN_INVERT .0 ; Init new Wordprocessor |
763 call PLED_standard_color | 763 call PLED_standard_color |
764 GETCUSTOM8 d'32' ; GF_lo | 764 GETCUSTOM8 d'32' ; GF_lo |
765 movwf lo | 765 movwf lo |
766 | 766 |
767 STRCPY "GF_lo:" | 767 STRCPY TXT_GFLO6 |
768 bsf leftbind | 768 bsf leftbind |
769 output_8 | 769 output_8 |
770 STRCAT_PRINT "%" | 770 STRCAT_PRINT "%" |
771 | 771 |
772 WIN_TOP .50 | 772 WIN_TOP .50 |
773 GETCUSTOM8 d'33' ; GF_hi | 773 GETCUSTOM8 d'33' ; GF_hi |
774 movwf lo | 774 movwf lo |
775 STRCPY "GF_hi:" | 775 STRCPY TXT_GFHI6 |
776 bsf leftbind | 776 bsf leftbind |
777 output_8 | 777 output_8 |
778 STRCAT_PRINT "%" | 778 STRCAT_PRINT "%" |
779 | 779 |
780 bra PLED_show_cf11_cf12_cf29_2 ; Display CF29 in the third row and RETURN | 780 bra PLED_show_cf11_cf12_cf29_2 ; Display CF29 in the third row and RETURN |
1064 ostc_debug 't' ; Sends debug-information to screen if debugmode active | 1064 ostc_debug 't' ; Sends debug-information to screen if debugmode active |
1065 WIN_TOP .119 | 1065 WIN_TOP .119 |
1066 WIN_LEFT .0 | 1066 WIN_LEFT .0 |
1067 WIN_FONT FT_SMALL | 1067 WIN_FONT FT_SMALL |
1068 PLED_color_code warn_ppo2 ; Color-code output (ppO2 stored in xC) | 1068 PLED_color_code warn_ppo2 ; Color-code output (ppO2 stored in xC) |
1069 STRCPY "ppO2:" | 1069 STRCPY TXT_PPO2_5 |
1070 | 1070 |
1071 ; Check very high ppO2 manually | 1071 ; Check very high ppO2 manually |
1072 tstfsz xC+2 ; char_I_O2_ratio * p_amb/10 > 65536, ppO2>6,55bar? | 1072 tstfsz xC+2 ; char_I_O2_ratio * p_amb/10 > 65536, ppO2>6,55bar? |
1073 bra PLED_show_ppO2_3 ; Yes, display fixed Value! | 1073 bra PLED_show_ppO2_3 ; Yes, display fixed Value! |
1074 | 1074 |
1212 tstfsz EEDATA | 1212 tstfsz EEDATA |
1213 bra show_decotype_surface2 | 1213 bra show_decotype_surface2 |
1214 | 1214 |
1215 ;ZH-L16 | 1215 ;ZH-L16 |
1216 WIN_TOP .125 | 1216 WIN_TOP .125 |
1217 STRCPY_PRINT "O" | 1217 STRCPY_PRINT TXT_OC_O1 |
1218 | 1218 |
1219 WIN_TOP .150 | 1219 WIN_TOP .150 |
1220 STRCPY_PRINT "C" | 1220 STRCPY_PRINT TXT_OC_C1 |
1221 return | 1221 return |
1222 | 1222 |
1223 show_decotype_surface2: | 1223 show_decotype_surface2: |
1224 decf EEDATA,F | 1224 decf EEDATA,F |
1225 tstfsz EEDATA | 1225 tstfsz EEDATA |
1233 bra show_decotype_surface4 | 1233 bra show_decotype_surface4 |
1234 ; const. ppO2 | 1234 ; const. ppO2 |
1235 WIN_TOP .125 | 1235 WIN_TOP .125 |
1236 call PLED_standard_color | 1236 call PLED_standard_color |
1237 | 1237 |
1238 STRCPY_PRINT "C" | 1238 STRCPY_PRINT TXT_CC_C1_1 |
1239 | 1239 |
1240 WIN_TOP .150 | 1240 WIN_TOP .150 |
1241 #IF TXT_CC_C1_1 == TXT_CC_C2_1 | |
1241 call word_processor ; Twice the same string. | 1242 call word_processor ; Twice the same string. |
1243 #ELSE | |
1244 STRCPY_PRINT TXT_CC_C2_1 | |
1245 #ENDIF | |
1242 return | 1246 return |
1243 | 1247 |
1244 show_decotype_surface4: | 1248 show_decotype_surface4: |
1245 decf EEDATA,F | 1249 decf EEDATA,F |
1246 tstfsz EEDATA | 1250 tstfsz EEDATA |
1253 decf EEDATA,F | 1257 decf EEDATA,F |
1254 tstfsz EEDATA | 1258 tstfsz EEDATA |
1255 bra show_decotype_surface6 | 1259 bra show_decotype_surface6 |
1256 ; Multi-GF OC | 1260 ; Multi-GF OC |
1257 WIN_TOP .125 | 1261 WIN_TOP .125 |
1258 STRCPY_PRINT "G" | 1262 STRCPY_PRINT TXT_GF_G1 |
1259 | 1263 |
1260 WIN_TOP .150 | 1264 WIN_TOP .150 |
1261 STRCPY_PRINT "F" | 1265 STRCPY_PRINT TXT_GF_F1 |
1262 return | 1266 return |
1263 | 1267 |
1264 ;----------------------------------------------------------------------------- | 1268 ;----------------------------------------------------------------------------- |
1265 ; Set color to grey when gas is inactive | 1269 ; Set color to grey when gas is inactive |
1266 ; Inputs: WREG : gas# (0..4) | 1270 ; Inputs: WREG : gas# (0..4) |
1325 PLED_pre_dive_screen2_loop: | 1329 PLED_pre_dive_screen2_loop: |
1326 incf hi,F ; Increase Gas | 1330 incf hi,F ; Increase Gas |
1327 movlw d'4' | 1331 movlw d'4' |
1328 addwf wait_temp,F ; Increase eeprom address for gas list | 1332 addwf wait_temp,F ; Increase eeprom address for gas list |
1329 | 1333 |
1330 STRCPY "G" | 1334 STRCPY TXT_GAS1 |
1331 movff hi,lo ; copy gas number | 1335 movff hi,lo ; copy gas number |
1332 output_8 ; display gas number | 1336 output_8 ; display gas number |
1333 STRCAT ": " | 1337 STRCAT ": " |
1334 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM | 1338 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM |
1335 call read_eeprom ; get byte (stored in EEDATA) | 1339 call read_eeprom ; get byte (stored in EEDATA) |
1384 movlw d'25' | 1388 movlw d'25' |
1385 addwf waitms_temp,F ; Increase row | 1389 addwf waitms_temp,F ; Increase row |
1386 WIN_LEFT .90 | 1390 WIN_LEFT .90 |
1387 movff waitms_temp,win_top ; Set Row | 1391 movff waitms_temp,win_top ; Set Row |
1388 | 1392 |
1389 STRCPY "SP" | 1393 STRCPY TXT_SP2 |
1390 movff apnoe_mins,lo ; copy gas number | 1394 movff apnoe_mins,lo ; copy gas number |
1391 output_8 ; display gas number | 1395 output_8 ; display gas number |
1392 STRCAT ": " | 1396 STRCAT ": " |
1393 movff wait_temp, EEADR ; SP #hi position | 1397 movff wait_temp, EEADR ; SP #hi position |
1394 call read_eeprom ; get byte (stored in EEDATA) | 1398 call read_eeprom ; get byte (stored in EEDATA) |
1414 call read_eeprom ; Read He ratio | 1418 call read_eeprom ; Read He ratio |
1415 movff EEDATA,hi ; And copy into hold register | 1419 movff EEDATA,hi ; And copy into hold register |
1416 | 1420 |
1417 WIN_LEFT .90 | 1421 WIN_LEFT .90 |
1418 WIN_TOP .100 | 1422 WIN_TOP .100 |
1419 STRCPY "Dil:" | 1423 STRCPY TXT_DIL4 |
1420 output_8 ; O2 Ratio | 1424 output_8 ; O2 Ratio |
1421 PUTC '/' | 1425 PUTC '/' |
1422 movff hi,lo | 1426 movff hi,lo |
1423 output_8 ; He Ratio | 1427 output_8 ; He Ratio |
1424 call word_processor | 1428 call word_processor |
1450 movff EEDATA,lo ; copy to lo | 1454 movff EEDATA,lo ; copy to lo |
1451 clrf hi | 1455 clrf hi |
1452 output_16dp d'3' ; outputs into Postinc2! | 1456 output_16dp d'3' ; outputs into Postinc2! |
1453 bcf leftbind | 1457 bcf leftbind |
1454 | 1458 |
1455 STRCAT_PRINT "bar" | 1459 STRCAT_PRINT TXT_BAR3 |
1456 bra PLED_active_gas_surfmode_exit | 1460 bra PLED_active_gas_surfmode_exit |
1457 | 1461 |
1458 PLED_active_gas_surfmode2: | 1462 PLED_active_gas_surfmode2: |
1459 WIN_TOP .130 | 1463 WIN_TOP .130 |
1460 WIN_LEFT .100 | 1464 WIN_LEFT .100 |
1839 | 1843 |
1840 update_surf_press_common: | 1844 update_surf_press_common: |
1841 bsf leftbind | 1845 bsf leftbind |
1842 output_16 | 1846 output_16 |
1843 bcf leftbind | 1847 bcf leftbind |
1844 STRCAT_PRINT "mbar " | 1848 STRCAT_PRINT TXT_MBAR5 |
1845 call PLED_standard_color ; Reset color | 1849 call PLED_standard_color ; Reset color |
1846 return | 1850 return |
1847 | 1851 |
1848 update_surf_press2: | 1852 update_surf_press2: |
1849 movff lo,sub_b+0 | 1853 movff lo,sub_b+0 |
1882 movwf ignore_digits | 1886 movwf ignore_digits |
1883 bsf ignore_digit5 ; do not display mV | 1887 bsf ignore_digit5 ; do not display mV |
1884 bsf leftbind | 1888 bsf leftbind |
1885 output_16dp d'2' ; e.g. 3.45V | 1889 output_16dp d'2' ; e.g. 3.45V |
1886 bcf leftbind | 1890 bcf leftbind |
1887 STRCAT_PRINT "V " | 1891 STRCAT_PRINT TXT_VOLT2 |
1888 return | 1892 return |
1889 | 1893 |
1890 update_batt_voltage2: | 1894 update_batt_voltage2: |
1891 WIN_FRAME_STD .174, .194, .1, .32 | 1895 WIN_FRAME_STD .174, .194, .1, .32 |
1892 | 1896 |
2296 movff avr_rel_pressure+1,hi | 2300 movff avr_rel_pressure+1,hi |
2297 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar] | 2301 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar] |
2298 bsf ignore_digit5 ; do not display 1cm depth | 2302 bsf ignore_digit5 ; do not display 1cm depth |
2299 output_16dp d'3' | 2303 output_16dp d'3' |
2300 bcf leftbind | 2304 bcf leftbind |
2301 STRCAT_PRINT "m" | 2305 STRCAT_PRINT TXT_METER1 |
2302 return | 2306 return |
2303 | 2307 |
2304 PLED_stopwatch_show_gauge: | 2308 PLED_stopwatch_show_gauge: |
2305 btfsc menubit ; Divemode menu active? | 2309 btfsc menubit ; Divemode menu active? |
2306 return ; Yes, return | 2310 return ; Yes, return |
2345 movff avr_rel_pressure+1,hi | 2349 movff avr_rel_pressure+1,hi |
2346 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar] | 2350 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar] |
2347 bsf ignore_digit5 ; do not display 1cm depth | 2351 bsf ignore_digit5 ; do not display 1cm depth |
2348 output_16dp d'3' | 2352 output_16dp d'3' |
2349 bcf leftbind | 2353 bcf leftbind |
2350 STRCAT_PRINT "m" | 2354 STRCAT_PRINT TXT_METER1 |
2351 WIN_FONT FT_SMALL ; Reset... | 2355 WIN_FONT FT_SMALL ; Reset... |
2352 return | 2356 return |
2353 | 2357 |
2354 | 2358 |
2355 PLED_total_average_show: | 2359 PLED_total_average_show: |
2368 movff avr_rel_pressure_total+1,hi | 2372 movff avr_rel_pressure_total+1,hi |
2369 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar] | 2373 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar] |
2370 bsf ignore_digit5 ; do not display 1cm depth | 2374 bsf ignore_digit5 ; do not display 1cm depth |
2371 bcf leftbind | 2375 bcf leftbind |
2372 output_16dp d'3' | 2376 output_16dp d'3' |
2373 STRCAT_PRINT "m" | 2377 STRCAT_PRINT TXT_METER1 |
2374 return | 2378 return |
2375 | 2379 |
2376 ;============================================================================= | 2380 ;============================================================================= |
2377 ; Writes OSTC #Serial and Firmware version in surfacemode | 2381 ; Writes OSTC #Serial and Firmware version in surfacemode |
2378 ; | 2382 ; |
2461 WIN_LEFT .100 | 2465 WIN_LEFT .100 |
2462 WIN_TOP .0 | 2466 WIN_TOP .0 |
2463 WIN_FONT FT_SMALL | 2467 WIN_FONT FT_SMALL |
2464 call PLED_standard_color | 2468 call PLED_standard_color |
2465 | 2469 |
2466 STRCPY "G6:" | 2470 STRCPY TXT_G6_3 |
2467 read_int_eeprom d'24' ; Get Gas6 %O2 | 2471 read_int_eeprom d'24' ; Get Gas6 %O2 |
2468 movff EEDATA,lo | 2472 movff EEDATA,lo |
2469 bcf leftbind | 2473 bcf leftbind |
2470 output_99 ; outputs into Postinc2! | 2474 output_99 ; outputs into Postinc2! |
2471 PUTC '/' | 2475 PUTC '/' |
2516 | 2520 |
2517 PLED_decoplan_nstd_stop: | 2521 PLED_decoplan_nstd_stop: |
2518 lfsr FSR2,letter | 2522 lfsr FSR2,letter |
2519 bsf leftbind | 2523 bsf leftbind |
2520 output_8 ; outputs into Postinc2! | 2524 output_8 ; outputs into Postinc2! |
2521 STRCAT_PRINT "m " | 2525 STRCAT_PRINT TXT_METER2 |
2522 | 2526 |
2523 ;---- Print duration ------------------------------------------------- | 2527 ;---- Print duration ------------------------------------------------- |
2524 WIN_LEFT .140 | 2528 WIN_LEFT .140 |
2525 lfsr FSR2,letter | 2529 lfsr FSR2,letter |
2526 | 2530 |
2778 movlw d'25' | 2782 movlw d'25' |
2779 addwf waitms_temp,F ; Increase row | 2783 addwf waitms_temp,F ; Increase row |
2780 WIN_LEFT .100 | 2784 WIN_LEFT .100 |
2781 movff waitms_temp,win_top ; Set Row | 2785 movff waitms_temp,win_top ; Set Row |
2782 | 2786 |
2783 STRCPY "G" | 2787 STRCPY TXT_GAS1 |
2784 movff hi,lo ; copy gas number | 2788 movff hi,lo ; copy gas number |
2785 output_8 ; display gas number | 2789 output_8 ; display gas number |
2786 PUTC ':' | 2790 PUTC ':' |
2787 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM | 2791 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM |
2788 call read_eeprom ; get byte (stored in EEDATA) | 2792 call read_eeprom ; get byte (stored in EEDATA) |
2840 movlw d'25' | 2844 movlw d'25' |
2841 addwf waitms_temp,F ; Increase row | 2845 addwf waitms_temp,F ; Increase row |
2842 movff waitms_temp,win_top ; Set Row | 2846 movff waitms_temp,win_top ; Set Row |
2843 WIN_LEFT .100 | 2847 WIN_LEFT .100 |
2844 | 2848 |
2845 STRCPY "SP" | 2849 STRCPY TXT_SP2 |
2846 movff decoplan_index,lo ; copy gas number | 2850 movff decoplan_index,lo ; copy gas number |
2847 output_8 ; display gas number | 2851 output_8 ; display gas number |
2848 PUTC ':' | 2852 PUTC ':' |
2849 movff wait_temp, EEADR; SP #hi position | 2853 movff wait_temp, EEADR; SP #hi position |
2850 call read_eeprom ; get byte (stored in EEDATA) | 2854 call read_eeprom ; get byte (stored in EEDATA) |
3031 | 3035 |
3032 movlw .25+7 ; surfmode: 7pix below top border | 3036 movlw .25+7 ; surfmode: 7pix below top border |
3033 btfsc divemode | 3037 btfsc divemode |
3034 movlw .169+7 ; divemode | 3038 movlw .169+7 ; divemode |
3035 movff WREG,win_top | 3039 movff WREG,win_top |
3036 STRCPY_PRINT "N2" | 3040 STRCPY_PRINT TXT_N2_2 |
3037 | 3041 |
3038 movlw .120-.30 ; surfmode: 30pix above bottom border | 3042 movlw .120-.30 ; surfmode: 30pix above bottom border |
3039 btfsc divemode | 3043 btfsc divemode |
3040 movlw .239-.30 ; divemode | 3044 movlw .239-.30 ; divemode |
3041 movff WREG,win_top | 3045 movff WREG,win_top |
3042 STRCPY_PRINT "He" | 3046 STRCPY_PRINT TXT_HE2 |
3043 | 3047 |
3044 ;---- Draw scale and O2[16]% --------------------------------------------- | 3048 ;---- Draw scale and O2[16]% --------------------------------------------- |
3045 btfsc divemode | 3049 btfsc divemode |
3046 return | 3050 return |
3047 | 3051 |
3247 WIN_TOP .192 | 3251 WIN_TOP .192 |
3248 lfsr FSR2,letter | 3252 lfsr FSR2,letter |
3249 movff char_O_EAD,lo | 3253 movff char_O_EAD,lo |
3250 bsf leftbind | 3254 bsf leftbind |
3251 output_8 ; Print EAD w/o leading space. | 3255 output_8 ; Print EAD w/o leading space. |
3252 STRCAT_PRINT "m " | 3256 STRCAT_PRINT TXT_METER2 |
3253 | 3257 |
3254 WIN_TOP .216 | 3258 WIN_TOP .216 |
3255 lfsr FSR2,letter | 3259 lfsr FSR2,letter |
3256 movff char_O_END,lo | 3260 movff char_O_END,lo |
3257 output_8 ; Print END w/o leading space. | 3261 output_8 ; Print END w/o leading space. |
3258 bcf leftbind | 3262 bcf leftbind |
3259 STRCAT_PRINT "m " | 3263 STRCAT_PRINT TXT_METER2 |
3260 | 3264 |
3261 ; Show ppO2[Flush] iff in CCR mode & not in Bailout: | 3265 ; Show ppO2[Flush] iff in CCR mode & not in Bailout: |
3262 btfsc is_bailout ; In bailout mode? | 3266 btfsc is_bailout ; In bailout mode? |
3263 return ; Yes: done. | 3267 return ; Yes: done. |
3264 | 3268 |
3266 return ; No: done. | 3270 return ; No: done. |
3267 | 3271 |
3268 WIN_LEFT .95 | 3272 WIN_LEFT .95 |
3269 WIN_TOP .168 | 3273 WIN_TOP .168 |
3270 call PLED_divemask_color ; Set Color for Divemode mask | 3274 call PLED_divemask_color ; Set Color for Divemode mask |
3271 STRCPY_PRINT "ppO2:" ; ppO2 of diluent | 3275 STRCPY_PRINT TXT_PPO2_5 ; ppO2 of diluent |
3272 | 3276 |
3273 movff char_O_flush_ppO2,WREG ; copy to WREG | 3277 movff char_O_flush_ppO2,WREG ; copy to WREG |
3274 mullw .100 | 3278 mullw .100 |
3275 movff PRODH,xC+1 | 3279 movff PRODH,xC+1 |
3276 movff PRODL,xC+0 ; For color code | 3280 movff PRODL,xC+0 ; For color code |
3360 STRCAT " (" | 3364 STRCAT " (" |
3361 | 3365 |
3362 movlw d'16' | 3366 movlw d'16' |
3363 cpfslt wait_temp | 3367 cpfslt wait_temp |
3364 bra PLED_show_leading_tissue_he | 3368 bra PLED_show_leading_tissue_he |
3365 STRCAT "N2" | 3369 STRCAT TXT_N2_2 |
3366 bra PLED_show_leading_tissue2 | 3370 bra PLED_show_leading_tissue2 |
3367 | 3371 |
3368 PLED_show_leading_tissue_he: | 3372 PLED_show_leading_tissue_he: |
3369 STRCAT "He" | 3373 STRCAT TXT_HE2 |
3370 | 3374 |
3371 PLED_show_leading_tissue2: | 3375 PLED_show_leading_tissue2: |
3372 WIN_LEFT .95 | 3376 WIN_LEFT .95 |
3373 WIN_TOP .192 | 3377 WIN_TOP .192 |
3374 WIN_FONT FT_SMALL | 3378 WIN_FONT FT_SMALL |
3415 WIN_TOP .090 | 3419 WIN_TOP .090 |
3416 WIN_LEFT .0 | 3420 WIN_LEFT .0 |
3417 WIN_FONT FT_SMALL | 3421 WIN_FONT FT_SMALL |
3418 PLED_color_code warn_cns ; Color-code CNS output | 3422 PLED_color_code warn_cns ; Color-code CNS output |
3419 | 3423 |
3420 STRCPY "CNS:" | 3424 STRCPY TXT_CNS4 |
3421 movff char_O_CNS_fraction,lo | 3425 movff char_O_CNS_fraction,lo |
3422 bsf leftbind | 3426 bsf leftbind |
3423 output_8 | 3427 output_8 |
3424 bcf leftbind | 3428 bcf leftbind |
3425 STRCAT_PRINT "%" | 3429 STRCAT_PRINT "%" |
3440 WIN_LEFT .45 | 3444 WIN_LEFT .45 |
3441 WIN_FONT FT_SMALL | 3445 WIN_FONT FT_SMALL |
3442 WIN_INVERT .0 ; Init new Wordprocessor | 3446 WIN_INVERT .0 ; Init new Wordprocessor |
3443 PLED_color_code warn_cns ; Color-code CNS output | 3447 PLED_color_code warn_cns ; Color-code CNS output |
3444 | 3448 |
3445 STRCPY "CNS:" | 3449 STRCPY TXT_CNS4 |
3446 movff char_O_CNS_fraction,lo | 3450 movff char_O_CNS_fraction,lo |
3447 bsf leftbind | 3451 bsf leftbind |
3448 output_8 | 3452 output_8 |
3449 bcf leftbind | 3453 bcf leftbind |
3450 STRCAT_PRINT "%" | 3454 STRCAT_PRINT "%" |
3520 PLED_simdata_screen2_loop: | 3524 PLED_simdata_screen2_loop: |
3521 incf hi,F ; Increase Gas | 3525 incf hi,F ; Increase Gas |
3522 movlw d'4' | 3526 movlw d'4' |
3523 addwf wait_temp,F ; Increase eeprom address for gas list | 3527 addwf wait_temp,F ; Increase eeprom address for gas list |
3524 | 3528 |
3525 STRCPY "G" | 3529 STRCPY TXT_GAS1 |
3526 movff hi,lo ; copy gas number | 3530 movff hi,lo ; copy gas number |
3527 output_8 ; display gas number | 3531 output_8 ; display gas number |
3528 PUTC ':' | 3532 PUTC ':' |
3529 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM | 3533 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM |
3530 call read_eeprom ; get byte (stored in EEDATA) | 3534 call read_eeprom ; get byte (stored in EEDATA) |
3540 addlw d'27' ; -> Adress of change depth register | 3544 addlw d'27' ; -> Adress of change depth register |
3541 call read_int_eeprom_1 | 3545 call read_int_eeprom_1 |
3542 movff EEDATA,lo ; Change depth in m | 3546 movff EEDATA,lo ; Change depth in m |
3543 movff lo,divemins ; Store for grey-out | 3547 movff lo,divemins ; Store for grey-out |
3544 output_99 ; outputs into Postinc2! | 3548 output_99 ; outputs into Postinc2! |
3545 PUTC 'm' | 3549 PUTC TXT_METER_C |
3546 | 3550 |
3547 ; Check if gas is first gas ? | 3551 ; Check if gas is first gas ? |
3548 read_int_eeprom d'33' ; First gas (1-5)? | 3552 read_int_eeprom d'33' ; First gas (1-5)? |
3549 movf hi,W ; Current gas in WREG | 3553 movf hi,W ; Current gas in WREG |
3550 cpfseq EEDATA ; Is equal first gas? | 3554 cpfseq EEDATA ; Is equal first gas? |
3610 movlw d'25' | 3614 movlw d'25' |
3611 addwf waitms_temp,F ; Increase row | 3615 addwf waitms_temp,F ; Increase row |
3612 WIN_LEFT .0 | 3616 WIN_LEFT .0 |
3613 movff waitms_temp,win_top ; Set Row | 3617 movff waitms_temp,win_top ; Set Row |
3614 | 3618 |
3615 STRCPY "SP" | 3619 STRCPY TXT_SP2 |
3616 movff decoplan_index,lo ; copy gas number | 3620 movff decoplan_index,lo ; copy gas number |
3617 output_8 ; display gas number | 3621 output_8 ; display gas number |
3618 STRCAT ": " | 3622 STRCAT ": " |
3619 movff wait_temp, EEADR; SP #hi position | 3623 movff wait_temp, EEADR; SP #hi position |
3620 call read_eeprom ; get byte (stored in EEDATA) | 3624 call read_eeprom ; get byte (stored in EEDATA) |
3645 movff EEDATA, lo ; O2 ratio | 3649 movff EEDATA, lo ; O2 ratio |
3646 | 3650 |
3647 WIN_LEFT .0 | 3651 WIN_LEFT .0 |
3648 WIN_TOP .110 | 3652 WIN_TOP .110 |
3649 | 3653 |
3650 STRCPY "Dil:" | 3654 STRCPY TXT_DIL4 |
3651 output_8 ; O2 Ratio | 3655 output_8 ; O2 Ratio |
3652 STRCAT "/" | 3656 STRCAT "/" |
3653 movff hi,lo | 3657 movff hi,lo |
3654 output_8 ; He Ratio | 3658 output_8 ; He Ratio |
3655 call word_processor | 3659 call word_processor |