comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 123:6a94f96e9cea

The big cleanup, again.
author JeanDo
date Thu, 30 Dec 2010 23:45:20 +0100
parents e0f29e20bd24
children 4f9f477bb452
comparison
equal deleted inserted replaced
122:3003a8040b78 123:6a94f96e9cea
273 movwf POSTINC2 273 movwf POSTINC2
274 movf debug_char+4,W 274 movf debug_char+4,W
275 movwf POSTINC2 275 movwf POSTINC2
276 movf debug_char+5,W 276 movf debug_char+5,W
277 movwf POSTINC2 277 movwf POSTINC2
278 movlw ' ' 278
279 movwf POSTINC2 279 STRCAT_PRINT " "
280 call word_processor
281 return 280 return
282 281
283 282
284 PLED_resetdebugger: 283 PLED_resetdebugger:
285 call PLED_boot ; PLED boot 284 call PLED_boot ; PLED boot
312 movwf POSTINC2 311 movwf POSTINC2
313 movf debug_char+4,W 312 movf debug_char+4,W
314 movwf POSTINC2 313 movwf POSTINC2
315 movf debug_char+5,W 314 movf debug_char+5,W
316 movwf POSTINC2 315 movwf POSTINC2
317 movlw '.' 316 STRCAT ". "
318 movwf POSTINC2
319 movlw ' '
320 movwf POSTINC2
321 movff flag1,lo 317 movff flag1,lo
322 output_8 318 output_8
323 movlw ' ' 319 PUTC ' '
324 movwf POSTINC2
325 movff flag2,lo 320 movff flag2,lo
326 output_8 321 output_8
327 call word_processor 322 call word_processor
328 323
329 WIN_TOP .125 324 WIN_TOP .125
333 call PLED_standard_color 328 call PLED_standard_color
334 329
335 lfsr FSR2,letter 330 lfsr FSR2,letter
336 movff flag3,lo 331 movff flag3,lo
337 output_8 332 output_8
338 movlw ' ' 333 PUTC ' '
339 movwf POSTINC2
340 movff flag4,lo 334 movff flag4,lo
341 output_8 335 output_8
342 movlw ' ' 336 PUTC ' '
343 movwf POSTINC2
344 movff flag5,lo 337 movff flag5,lo
345 output_8 338 output_8
346 movlw ' ' 339 PUTC ' '
347 movwf POSTINC2
348 movff flag6,lo 340 movff flag6,lo
349 output_8 341 output_8
350 movlw ' ' 342 PUTC ' '
351 movwf POSTINC2
352 movff flag7,lo 343 movff flag7,lo
353 output_8 344 output_8
354 call word_processor 345 call word_processor
355 346
356 WIN_TOP .150 347 WIN_TOP .150
360 call PLED_standard_color 351 call PLED_standard_color
361 352
362 lfsr FSR2,letter 353 lfsr FSR2,letter
363 movff flag8,lo 354 movff flag8,lo
364 output_8 355 output_8
365 movlw ' ' 356 PUTC ' '
366 movwf POSTINC2
367 movff flag9,lo 357 movff flag9,lo
368 output_8 358 output_8
369 movlw ' ' 359 PUTC ' '
370 movwf POSTINC2
371 movff flag10,lo 360 movff flag10,lo
372 output_8 361 output_8
373 movlw ' ' 362 PUTC ' '
374 movwf POSTINC2
375 movff flag11,lo 363 movff flag11,lo
376 output_8 364 output_8
377 movlw ' ' 365 PUTC ' '
378 movwf POSTINC2
379 movff flag12,lo 366 movff flag12,lo
380 output_8 367 output_8
381 call word_processor 368 call word_processor
382 369
383 bcf switch_left 370 bcf switch_left
393 DISPLAYTEXT .87 ; Depth 380 DISPLAYTEXT .87 ; Depth
394 call PLED_standard_color 381 call PLED_standard_color
395 return 382 return
396 383
397 PLED_clear_customview_divemode: 384 PLED_clear_customview_divemode:
398 movlw .0 385 WIN_BOX_BLACK .168, .239, .90, .159
399 movff WREG,box_temp+0 ; Data
400 movlw .168
401 movff WREG,box_temp+1 ; row top (0-239)
402 movlw .239
403 movff WREG,box_temp+2 ; row bottom (0-239)
404 movlw .090
405 movff WREG,box_temp+3 ; column left (0-159)
406 movlw .159
407 movff WREG,box_temp+4 ; column right (0-159)
408 call PLED_box
409 return 386 return
410 387
411 PLED_clear_customview_surfmode: 388 PLED_clear_customview_surfmode:
412 movlw .0 389 WIN_BOX_BLACK .25, .121, .82, .159
413 movff WREG,box_temp+0 ; Data
414 movlw .25
415 movff WREG,box_temp+1 ; row top (0-239)
416 movlw .121
417 movff WREG,box_temp+2 ; row bottom (0-239)
418 movlw .82
419 movff WREG,box_temp+3 ; column left (0-159)
420 movlw .159
421 movff WREG,box_temp+4 ; column right (0-159)
422 call PLED_box
423 return 390 return
424 391
425 PLED_clear_decoarea: 392 PLED_clear_decoarea:
426 movlw .0 393 WIN_BOX_BLACK .54, .168, .90, .159
427 movff WREG,box_temp+0 ; Data
428 movlw .54
429 movff WREG,box_temp+1 ; row top (0-239)
430 movlw .168
431 movff WREG,box_temp+2 ; row bottom (0-239)
432 movlw .090
433 movff WREG,box_temp+3 ; column left (0-159)
434 movlw .159
435 movff WREG,box_temp+4 ; column right (0-159)
436 call PLED_box
437 return 394 return
438 395
439 PLED_display_ndl_mask: 396 PLED_display_ndl_mask:
440 ; Clear Dekostop and Dekosum 397 ; Clear Dekostop and Dekosum
441 rcall PLED_clear_decoarea 398 rcall PLED_clear_decoarea
466 call PLED_standard_color 423 call PLED_standard_color
467 424
468 lfsr FSR2,letter 425 lfsr FSR2,letter
469 movff char_O_nullzeit,lo ; NDL in minutes 426 movff char_O_nullzeit,lo ; NDL in minutes
470 output_8 427 output_8
471 movlw 0x27 ; "'" 428 STRCAT_PRINT "'"
472 movwf POSTINC2 429
473 call word_processor
474 WIN_FONT FT_SMALL 430 WIN_FONT FT_SMALL
475 return 431 return
476 432
477 PLED_display_deko_mask: 433 PLED_display_deko_mask:
478 rcall PLED_clear_decoarea 434 rcall PLED_clear_decoarea
498 WIN_INVERT .0 ; Init new Wordprocessor 454 WIN_INVERT .0 ; Init new Wordprocessor
499 PLED_color_code warn_ceiling ; Color-code Output 455 PLED_color_code warn_ceiling ; Color-code Output
500 lfsr FSR2,letter 456 lfsr FSR2,letter
501 movff char_O_array_decodepth+0,lo ; Ceiling in m 457 movff char_O_array_decodepth+0,lo ; Ceiling in m
502 output_99 458 output_99
503 movlw 'm' ; "m" 459 PUTC 'm'
504 movwf POSTINC2
505 movff char_O_array_decotime,lo ; length of first stop in m 460 movff char_O_array_decotime,lo ; length of first stop in m
506 output_99 461 output_99
507 movlw 0x27 ; "'" 462 STRCAT_PRINT "'"
508 movwf POSTINC2
509 call word_processor
510 WIN_FONT FT_SMALL 463 WIN_FONT FT_SMALL
511 464
512 ;PLED_display_deko1: 465 ;PLED_display_deko1:
513 ostc_debug 'x' ; Sends debug-information to screen if debugmode active 466 ostc_debug 'x' ; Sends debug-information to screen if debugmode active
514 467
522 movlw d'199' ; limit display of total ascend time to 99mins.... 475 movlw d'199' ; limit display of total ascend time to 99mins....
523 cpfslt lo ; skip if 199 (WREG) > lo 476 cpfslt lo ; skip if 199 (WREG) > lo
524 movwf lo 477 movwf lo
525 bcf leftbind 478 bcf leftbind
526 output_8 479 output_8
527 movlw 0x27 ; "'" 480 STRCAT_PRINT "'"
528 movwf POSTINC2
529 call word_processor
530 481
531 PLED_display_deko1: 482 PLED_display_deko1:
532 movff char_O_gradient_factor,lo ; gradient factor 483 movff char_O_gradient_factor,lo ; gradient factor
533 GETCUSTOM8 d'8' ; threshold for display 484 GETCUSTOM8 d'8' ; threshold for display
534 cpfslt lo ; show value? 485 cpfslt lo ; show value?
541 ;GF 492 ;GF
542 WIN_TOP .145 493 WIN_TOP .145
543 WIN_LEFT .0 494 WIN_LEFT .0
544 WIN_FONT FT_SMALL 495 WIN_FONT FT_SMALL
545 PLED_color_code warn_gf ; Color-code Output 496 PLED_color_code warn_gf ; Color-code Output
546 lfsr FSR2,letter 497
547 movlw 'G' 498 STRCPY "GF:"
548 movwf POSTINC2
549 movlw 'F'
550 movwf POSTINC2
551 movlw ':'
552 movwf POSTINC2
553 movff char_O_gradient_factor,lo ; gradient factor 499 movff char_O_gradient_factor,lo ; gradient factor
554 output_8 500 output_8
555 movlw '%' 501 STRCAT_PRINT "% "
556 movwf POSTINC2
557 movlw ' '
558 movwf POSTINC2
559 call word_processor
560 call PLED_standard_color 502 call PLED_standard_color
561 return 503 return
562 504
563 PLED_simulator_data: 505 PLED_simulator_data:
564 WIN_TOP .65 506 WIN_TOP .65
568 lfsr FSR2,letter 510 lfsr FSR2,letter
569 movff logbook_temp1,lo 511 movff logbook_temp1,lo
570 bsf leftbind 512 bsf leftbind
571 output_8 513 output_8
572 bcf leftbind 514 bcf leftbind
573 movlw 'm' 515 STRCAT_PRINT "min "
574 movwf POSTINC2
575 movlw 'i'
576 movwf POSTINC2
577 movlw 'n'
578 movwf POSTINC2
579 movlw ' '
580 movwf POSTINC2
581 call word_processor
582 516
583 WIN_TOP .95 517 WIN_TOP .95
584 WIN_LEFT .100 518 WIN_LEFT .100
585 WIN_FONT FT_SMALL 519 WIN_FONT FT_SMALL
586 call PLED_standard_color 520 call PLED_standard_color
587 lfsr FSR2,letter 521 lfsr FSR2,letter
588 movff logbook_temp2,lo 522 movff logbook_temp2,lo
589 bsf leftbind 523 bsf leftbind
590 output_8 524 output_8
591 bcf leftbind 525 bcf leftbind
592 movlw 'm' 526 STRCAT_PRINT "m "
593 movwf POSTINC2
594 movlw ' '
595 movwf POSTINC2
596 call word_processor
597 return 527 return
598 528
599 PLED_display_velocity: 529 PLED_display_velocity:
600 btfsc multi_gf_display ; Is the Multi-GF Table displayed? 530 btfsc multi_gf_display ; Is the Multi-GF Table displayed?
601 return ; Yes, No update and return! 531 return ; Yes, No update and return!
640 PLED_display_clear_common_y1: ; Clears with y-scale=1 570 PLED_display_clear_common_y1: ; Clears with y-scale=1
641 WIN_FONT FT_SMALL 571 WIN_FONT FT_SMALL
642 PLED_display_clear_common1: 572 PLED_display_clear_common1:
643 lfsr FSR2,letter 573 lfsr FSR2,letter
644 PLED_display_clear_common2: 574 PLED_display_clear_common2:
645 movlw ' ' 575 PUTC ' '
646 movwf POSTINC2
647 decfsz temp1,F 576 decfsz temp1,F
648 bra PLED_display_clear_common2 577 bra PLED_display_clear_common2
649 call word_processor 578 call word_processor
650 WIN_FONT FT_SMALL 579 WIN_FONT FT_SMALL
651 return 580 return
663 WIN_INVERT .0 ; Init new Wordprocessor 592 WIN_INVERT .0 ; Init new Wordprocessor
664 call PLED_standard_color 593 call PLED_standard_color
665 lfsr FSR2,letter 594 lfsr FSR2,letter
666 movff hours,lo 595 movff hours,lo
667 output_99x 596 output_99x
668 movlw ':' 597 PUTC ':'
669 movwf POSTINC2
670 movff mins,lo 598 movff mins,lo
671 output_99x 599 output_99x
672 call word_processor 600 call word_processor
673 return 601 return
674 602
680 WIN_INVERT .0 ; Init new Wordprocessor 608 WIN_INVERT .0 ; Init new Wordprocessor
681 call PLED_standard_color 609 call PLED_standard_color
682 lfsr FSR2,letter 610 lfsr FSR2,letter
683 movff hours,lo 611 movff hours,lo
684 output_99x 612 output_99x
685 movlw ':' 613 PUTC ':'
686 movwf POSTINC2
687 movff mins,lo 614 movff mins,lo
688 output_99x 615 output_99x
689 movlw ':' 616 PUTC ':'
690 movwf POSTINC2
691 movff secs,lo 617 movff secs,lo
692 output_99x 618 output_99x
693 movlw ' ' 619 STRCAT_PRINT " "
694 movwf POSTINC2
695 call word_processor
696 return 620 return
697 621
698 PLED_interval: 622 PLED_interval:
699 WIN_TOP .75 623 WIN_TOP .75
700 WIN_LEFT .90 624 WIN_LEFT .90
709 633
710 movf hi,W 634 movf hi,W
711 movff lo,hi 635 movff lo,hi
712 movwf lo ; exchange lo and hi 636 movwf lo ; exchange lo and hi
713 output_99x 637 output_99x
714 movlw ':' 638 PUTC ':'
715 movwf POSTINC2
716 movff hi,lo 639 movff hi,lo
717 output_99x 640 output_99x
718 movlw ' ' 641 STRCAT_PRINT " "
719 movwf POSTINC2
720 call word_processor
721 return 642 return
722 643
723 644
724 PLED_show_cf11_cf12_cf29:; Display saturations/desaturation multiplier and last deco in the customview field 645 PLED_show_cf11_cf12_cf29:; Display saturations/desaturation multiplier and last deco in the customview field
725 WIN_TOP .25 646 WIN_TOP .25
726 WIN_LEFT .90 647 WIN_LEFT .90
727 WIN_FONT FT_SMALL 648 WIN_FONT FT_SMALL
728 WIN_INVERT .0 ; Init new Wordprocessor 649 WIN_INVERT .0 ; Init new Wordprocessor
729 call PLED_standard_color 650 call PLED_standard_color
730 lfsr FSR2,letter 651 STRCPY "CF11:"
652
731 GETCUSTOM8 d'11' 653 GETCUSTOM8 d'11'
732 movwf lo 654 movwf lo
733 movlw 'C'
734 movwf POSTINC2
735 movlw 'F'
736 movwf POSTINC2
737 movlw '1'
738 movwf POSTINC2
739 movlw '1'
740 movwf POSTINC2
741 movlw ':'
742 movwf POSTINC2
743 bsf leftbind 655 bsf leftbind
744 output_8 656 output_8
745 movlw '%' 657 STRCAT_PRINT "%"
746 movwf POSTINC2
747 call word_processor
748 658
749 WIN_TOP .50 659 WIN_TOP .50
750 lfsr FSR2,letter 660 STRCPY "CF12:"
661
751 GETCUSTOM8 d'12' 662 GETCUSTOM8 d'12'
752 movwf lo 663 movwf lo
753 movlw 'C'
754 movwf POSTINC2
755 movlw 'F'
756 movwf POSTINC2
757 movlw '1'
758 movwf POSTINC2
759 movlw '2'
760 movwf POSTINC2
761 movlw ':'
762 movwf POSTINC2
763 bsf leftbind 664 bsf leftbind
764 output_8 665 output_8
765 movlw '%' 666 STRCAT_PRINT "%"
766 movwf POSTINC2
767 call word_processor
768 667
769 PLED_show_cf11_cf12_cf29_2: 668 PLED_show_cf11_cf12_cf29_2:
770 WIN_TOP .75 669 WIN_TOP .75
771 lfsr FSR2,letter 670 STRCPY "CF29:"
772 GETCUSTOM8 d'29' 671 GETCUSTOM8 d'29'
773 movwf lo 672 movwf lo
774 movlw 'C'
775 movwf POSTINC2
776 movlw 'F'
777 movwf POSTINC2
778 movlw '2'
779 movwf POSTINC2
780 movlw '9'
781 movwf POSTINC2
782 movlw ':'
783 movwf POSTINC2
784 bsf leftbind 673 bsf leftbind
785 output_8 674 output_8
786 movlw 'm' 675 STRCAT_PRINT "m"
787 movwf POSTINC2 676
788 call word_processor 677 bcf leftbind
789 bcf leftbind 678 return
790 return
791
792 679
793 PLED_show_cf32_cf33_cf29:; Display GF_LOW, GF_HIGH and last deco in the customview field 680 PLED_show_cf32_cf33_cf29:; Display GF_LOW, GF_HIGH and last deco in the customview field
794 WIN_TOP .25 681 WIN_TOP .25
795 WIN_LEFT .90 682 WIN_LEFT .90
796 WIN_FONT FT_SMALL 683 WIN_FONT FT_SMALL
797 WIN_INVERT .0 ; Init new Wordprocessor 684 WIN_INVERT .0 ; Init new Wordprocessor
798 call PLED_standard_color 685 call PLED_standard_color
799 lfsr FSR2,letter
800 GETCUSTOM8 d'32' 686 GETCUSTOM8 d'32'
801 movwf lo 687 movwf lo
802 movlw 'G' 688
803 movwf POSTINC2 689 STRCPY "GF_lo:"
804 movlw 'F'
805 movwf POSTINC2
806 movlw '_'
807 movwf POSTINC2
808 movlw 'l'
809 movwf POSTINC2
810 movlw 'o'
811 movwf POSTINC2
812 movlw ':'
813 movwf POSTINC2
814 bsf leftbind 690 bsf leftbind
815 output_8 691 output_8
816 movlw '%' 692 STRCAT_PRINT "%"
817 movwf POSTINC2
818 call word_processor
819 693
820 WIN_TOP .50 694 WIN_TOP .50
821 lfsr FSR2,letter
822 GETCUSTOM8 d'33' 695 GETCUSTOM8 d'33'
823 movwf lo 696 movwf lo
824 movlw 'G' 697 STRCPY "GF_hi:"
825 movwf POSTINC2
826 movlw 'F'
827 movwf POSTINC2
828 movlw '_'
829 movwf POSTINC2
830 movlw 'h'
831 movwf POSTINC2
832 movlw 'i'
833 movwf POSTINC2
834 movlw ':'
835 movwf POSTINC2
836 bsf leftbind 698 bsf leftbind
837 output_8 699 output_8
838 movlw '%' 700 STRCAT_PRINT "%"
839 movwf POSTINC2
840 call word_processor
841 701
842 bra PLED_show_cf11_cf12_cf29_2 ; Display CF29 in the third row and RETURN 702 bra PLED_show_cf11_cf12_cf29_2 ; Display CF29 in the third row and RETURN
843 703
844 704
845 PLED_logbook_cursor: 705 PLED_logbook_cursor:
846 706
847 PLED_menu_cursor: 707 PLED_menu_cursor:
848 movlw .0 708 WIN_BOX_BLACK .35, .239, .0, .16
849 movff WREG,box_temp+0 ; Data
850 movlw .35
851 movff WREG,box_temp+1 ; row top (0-239)
852 movlw .239
853 movff WREG,box_temp+2 ; row bottom (0-239)
854 movlw .0
855 movff WREG,box_temp+3 ; column left (0-159)
856 movlw .16
857 movff WREG,box_temp+4 ; column right (0-159)
858 call PLED_box
859 709
860 WIN_LEFT .0 710 WIN_LEFT .0
861 WIN_FONT FT_SMALL 711 WIN_FONT FT_SMALL
862 WIN_INVERT .0 ; Init new Wordprocessor 712 WIN_INVERT .0 ; Init new Wordprocessor
863 call PLED_standard_color 713 call PLED_standard_color
875 movlw d'155' 725 movlw d'155'
876 dcfsnz temp1,F 726 dcfsnz temp1,F
877 movlw d'185' 727 movlw d'185'
878 728
879 movff WREG,win_top 729 movff WREG,win_top
880 lfsr FSR2,letter 730 STRCPY_PRINT "\xB7"
881 movlw 0xB7
882 movwf POSTINC2
883 call word_processor
884 return 731 return
885 732
886 PLED_menu_mask: 733 PLED_menu_mask:
887 call PLED_topline_box 734 call PLED_topline_box
888 WIN_INVERT .1 ; Init new Wordprocessor 735 WIN_INVERT .1 ; Init new Wordprocessor
979 movlw d'3' 826 movlw d'3'
980 movwf ignore_digits 827 movwf ignore_digits
981 bsf leftbind ; left orientated output 828 bsf leftbind ; left orientated output
982 output_16dp d'2' 829 output_16dp d'2'
983 bcf leftbind 830 bcf leftbind
984 movlw '°' 831 STRCAT_PRINT "°C "
985 movwf POSTINC2
986 movlw 'C'
987 movwf POSTINC2
988 movlw ' '
989 movwf POSTINC2
990 call word_processor
991 return 832 return
992 833
993 PLED_temp_divemode: 834 PLED_temp_divemode:
994 btfsc multi_gf_display ; Is the Multi-GF Table displayed? 835 btfsc multi_gf_display ; Is the Multi-GF Table displayed?
995 return ; Yes, No update and return! 836 return ; Yes, No update and return!
1015 movlw d'3' 856 movlw d'3'
1016 movwf ignore_digits 857 movwf ignore_digits
1017 bsf leftbind ; left orientated output 858 bsf leftbind ; left orientated output
1018 output_16dp d'2' 859 output_16dp d'2'
1019 bcf leftbind 860 bcf leftbind
1020 movlw '°' 861 STRCAT_PRINT "° "
1021 movwf POSTINC2
1022 movlw ' '
1023 movwf POSTINC2
1024 call word_processor
1025 return 862 return
1026 863
1027 PLED_show_ppO2: ; Show ppO2 864 PLED_show_ppO2: ; Show ppO2
1028 ostc_debug 't' ; Sends debug-information to screen if debugmode active 865 ostc_debug 't' ; Sends debug-information to screen if debugmode active
1029 WIN_TOP .120 866 WIN_TOP .120
1030 WIN_LEFT .0 867 WIN_LEFT .0
1031 WIN_FONT FT_SMALL 868 WIN_FONT FT_SMALL
1032 PLED_color_code warn_ppo2 ; Color-code output (ppO2 stored in xC) 869 PLED_color_code warn_ppo2 ; Color-code output (ppO2 stored in xC)
1033 870
1034 lfsr FSR2,letter 871 STRCPY "ppO2:"
1035 movlw 'p'
1036 movwf POSTINC2
1037 movlw 'p'
1038 movwf POSTINC2
1039 movlw 'O'
1040 movwf POSTINC2
1041 movlw '2'
1042 movwf POSTINC2
1043 movlw ':'
1044 movwf POSTINC2
1045 872
1046 ; Check very high ppO2 manually 873 ; Check very high ppO2 manually
1047 tstfsz xC+2 ; char_I_O2_ratio * p_amb/10 > 65536, ppO2>6,55Bar? 874 tstfsz xC+2 ; char_I_O2_ratio * p_amb/10 > 65536, ppO2>6,55Bar?
1048 bra PLED_show_ppO2_3 ; Yes, display fixed Value! 875 bra PLED_show_ppO2_3 ; Yes, display fixed Value!
1049 876
1051 movff xC+1,hi 878 movff xC+1,hi
1052 bsf ignore_digit4 879 bsf ignore_digit4
1053 output_16dp d'1' 880 output_16dp d'1'
1054 bcf ignore_digit4 881 bcf ignore_digit4
1055 PLED_show_ppO2_2: 882 PLED_show_ppO2_2:
1056 movlw ' ' 883 STRCAT_PRINT " "
1057 movwf POSTINC2
1058 call word_processor
1059 call PLED_standard_color 884 call PLED_standard_color
1060 return 885 return
1061 886
1062 PLED_show_ppO2_3: 887 PLED_show_ppO2_3:
1063 movlw '>' 888 STRCAT ">6.6"
1064 movwf POSTINC2
1065 movlw '6'
1066 movwf POSTINC2
1067 movlw '.'
1068 movwf POSTINC2
1069 movlw '6'
1070 movwf POSTINC2
1071 bra PLED_show_ppO2_2 889 bra PLED_show_ppO2_2
1072 890
1073 PLED_show_ppO2_clear: ; Clear ppO2 891 PLED_show_ppO2_clear: ; Clear ppO2
1074 movlw d'10' 892 movlw d'10'
1075 movwf temp1 893 movwf temp1
1161 979
1162 PLED_active_gas_divemode4: 980 PLED_active_gas_divemode4:
1163 lfsr FSR2,letter 981 lfsr FSR2,letter
1164 bsf leftbind ; left orientated output 982 bsf leftbind ; left orientated output
1165 output_8 ; O2 ratio is still in "lo" 983 output_8 ; O2 ratio is still in "lo"
1166 movlw '/' 984 PUTC '/'
1167 movwf POSTINC2
1168 movff char_I_He_ratio,lo ; copy He ratio into lo 985 movff char_I_He_ratio,lo ; copy He ratio into lo
1169 output_8 986 output_8
1170 movlw ' ' 987 movlw ' '
1171 btfsc better_gas_available ;=1: A better gas is available and a gas change is advised in divemode 988 btfsc better_gas_available ;=1: A better gas is available and a gas change is advised in divemode
1172 movlw '*' 989 movlw '*'
1179 996
1180 PLED_display_decotype_surface: 997 PLED_display_decotype_surface:
1181 WIN_LEFT .85 998 WIN_LEFT .85
1182 WIN_FONT FT_SMALL 999 WIN_FONT FT_SMALL
1183 WIN_INVERT .0 ; Init new Wordprocessor 1000 WIN_INVERT .0 ; Init new Wordprocessor
1001 call PLED_standard_color
1002
1184 clrf EEADRH 1003 clrf EEADRH
1185 read_int_eeprom d'34' ; Read deco data 1004 read_int_eeprom d'34' ; Read deco data
1186 tstfsz EEDATA 1005 tstfsz EEDATA
1187 bra show_decotype_surface2 1006 bra show_decotype_surface2
1188 1007
1189 ;ZH-L16 1008 ;ZH-L16
1190 WIN_TOP .125 1009 WIN_TOP .125
1191 call PLED_standard_color 1010 STRCPY_PRINT "O"
1192 1011
1193 lfsr FSR2,letter
1194 movlw 'O'
1195 movwf POSTINC2
1196 call word_processor
1197 WIN_LEFT .85
1198 WIN_FONT FT_SMALL
1199 WIN_INVERT .0 ; Init new Wordprocessor
1200 WIN_TOP .150 1012 WIN_TOP .150
1201 call PLED_standard_color 1013 STRCPY_PRINT "C"
1202
1203 lfsr FSR2,letter
1204 movlw 'C'
1205 movwf POSTINC2
1206 call word_processor
1207 return 1014 return
1015
1208 show_decotype_surface2: 1016 show_decotype_surface2:
1209 decf EEDATA,F 1017 decf EEDATA,F
1210 tstfsz EEDATA 1018 tstfsz EEDATA
1211 bra show_decotype_surface3 1019 bra show_decotype_surface3
1212 ; Gauge 1020 ; Gauge
1213 return 1021 return
1214 1022
1215 show_decotype_surface3: 1023 show_decotype_surface3:
1216 decf EEDATA,F 1024 decf EEDATA,F
1217 tstfsz EEDATA 1025 tstfsz EEDATA
1218 bra show_decotype_surface4 1026 bra show_decotype_surface4
1219 ; const. ppO2 1027 ; const. ppO2
1220 WIN_TOP .125 1028 WIN_TOP .125
1221 call PLED_standard_color 1029 call PLED_standard_color
1222 1030
1223 lfsr FSR2,letter 1031 STRCPY_PRINT "C"
1224 movlw 'C' 1032
1225 movwf POSTINC2 1033 WIN_TOP .150
1226 WIN_LEFT .85 1034 call word_processor ; Twice the same string.
1227 WIN_FONT FT_SMALL 1035 return
1228 WIN_INVERT .0 ; Init new Wordprocessor 1036
1229 call word_processor
1230 WIN_TOP .150
1231 call PLED_standard_color
1232
1233 lfsr FSR2,letter
1234 movlw 'C'
1235 movwf POSTINC2
1236 WIN_LEFT .85
1237 WIN_FONT FT_SMALL
1238 WIN_INVERT .0 ; Init new Wordprocessor
1239 call word_processor
1240 return
1241 show_decotype_surface4: 1037 show_decotype_surface4:
1242 decf EEDATA,F 1038 decf EEDATA,F
1243 tstfsz EEDATA 1039 tstfsz EEDATA
1244 bra show_decotype_surface5 1040 bra show_decotype_surface5
1245 ; Apnoe 1041 ; Apnoe
1246 return 1042 return
1043
1247 show_decotype_surface5: 1044 show_decotype_surface5:
1248 decf EEDATA,F
1249 tstfsz EEDATA
1250 bra show_decotype_surface6
1251 ; Multi-GF OC
1252 WIN_TOP .125
1253 lfsr FSR2,letter
1254 movlw 'G'
1255 movwf POSTINC2
1256 WIN_LEFT .85
1257 WIN_FONT FT_SMALL
1258 WIN_INVERT .0 ; Init new Wordprocessor
1259 call PLED_standard_color
1260
1261 call word_processor
1262 WIN_TOP .150
1263 lfsr FSR2,letter
1264 movlw 'F'
1265 movwf POSTINC2
1266 WIN_LEFT .85
1267 WIN_FONT FT_SMALL
1268 WIN_INVERT .0 ; Init new Wordprocessor
1269 call PLED_standard_color
1270
1271 call word_processor
1272 return
1273
1274 show_decotype_surface6: 1045 show_decotype_surface6:
1275 ; Multi-GF CC 1046 decf EEDATA,F
1276 WIN_TOP .125 1047 tstfsz EEDATA
1277 lfsr FSR2,letter 1048 bra show_decotype_surface6
1278 movlw 'G' 1049 ; Multi-GF OC
1279 movwf POSTINC2 1050 WIN_TOP .125
1280 WIN_LEFT .85 1051 STRCPY_PRINT "G"
1281 WIN_FONT FT_SMALL 1052
1282 WIN_INVERT .0 ; Init new Wordprocessor 1053 WIN_TOP .150
1283 call PLED_standard_color 1054 STRCPY_PRINT "F"
1284 1055 return
1285 call word_processor
1286 WIN_TOP .150
1287 lfsr FSR2,letter
1288 movlw 'F'
1289 movwf POSTINC2
1290 WIN_LEFT .85
1291 WIN_FONT FT_SMALL
1292 WIN_INVERT .0 ; Init new Wordprocessor
1293 call PLED_standard_color
1294
1295 call word_processor
1296 return
1297 1056
1298 ;----------------------------------------------------------------------------- 1057 ;-----------------------------------------------------------------------------
1299 ; Set color to grey when gas is inactive 1058 ; Set color to grey when gas is inactive
1300 ; Inputs: WREG : gas# (0..4) 1059 ; Inputs: WREG : gas# (0..4)
1301 ; Trashes: lo 1060 ; Trashes: lo
1332 PLED_grey_gas: 1091 PLED_grey_gas:
1333 movlw color_grey 1092 movlw color_grey
1334 goto PLED_set_color ; grey out inactive gases! 1093 goto PLED_set_color ; grey out inactive gases!
1335 1094
1336 ;----------------------------------------------------------------------------- 1095 ;-----------------------------------------------------------------------------
1337 1096 ; Display Pre-Dive Screen
1338 PLED_pre_dive_screen: ;Display Pre-Dive Screen 1097
1339 ; movlw .0 1098 PLED_pre_dive_screen:
1340 ; movff WREG,box_temp+0 ; Data
1341 ; movlw .25
1342 ; movff WREG,box_temp+1 ; row top (0-239)
1343 ; movlw .120
1344 ; movff WREG,box_temp+2 ; row bottom (0-239)
1345 ; movlw .82
1346 ; movff WREG,box_temp+3 ; column left (0-159)
1347 ; movlw .159
1348 ; movff WREG,box_temp+4 ; column right (0-159)
1349 ; call PLED_box
1350
1351 ; List active gases/Setpoints 1099 ; List active gases/Setpoints
1352 1100
1353 btfsc FLAG_const_ppO2_mode ; in ppO2 mode? 1101 btfsc FLAG_const_ppO2_mode ; in ppO2 mode?
1354 bra PLED_pre_dive_screen3 ; Yes, display SetPoint/Sensor result list 1102 bra PLED_pre_dive_screen3 ; Yes, display SetPoint/Sensor result list
1355 1103
1369 PLED_pre_dive_screen2_loop: 1117 PLED_pre_dive_screen2_loop:
1370 incf hi,F ; Increase Gas 1118 incf hi,F ; Increase Gas
1371 movlw d'4' 1119 movlw d'4'
1372 addwf wait_temp,F ; Increase eeprom address for gas list 1120 addwf wait_temp,F ; Increase eeprom address for gas list
1373 1121
1374 lfsr FSR2,letter 1122 STRCPY "G"
1375 movlw 'G'
1376 movwf POSTINC2
1377 movff hi,lo ; copy gas number 1123 movff hi,lo ; copy gas number
1378 output_8 ; display gas number 1124 output_8 ; display gas number
1379 movlw ':' 1125 STRCAT ": "
1380 movwf POSTINC2
1381 movlw ' '
1382 movwf POSTINC2
1383 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM 1126 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM
1384 call read_eeprom ; get byte (stored in EEDATA) 1127 call read_eeprom ; get byte (stored in EEDATA)
1385 movff EEDATA,lo ; copy to lo 1128 movff EEDATA,lo ; copy to lo
1386 output_8 ; outputs into Postinc2! 1129 output_8 ; outputs into Postinc2!
1387 movlw '/' 1130 PUTC '/'
1388 movwf POSTINC2
1389 incf EEADR,F ; Gas #hi: %He - Set address in internal EEPROM 1131 incf EEADR,F ; Gas #hi: %He - Set address in internal EEPROM
1390 call read_eeprom ; get byte (stored in EEDATA) 1132 call read_eeprom ; get byte (stored in EEDATA)
1391 movff EEDATA,lo ; copy to lo 1133 movff EEDATA,lo ; copy to lo
1392 output_8 ; outputs into Postinc2! 1134 output_8 ; outputs into Postinc2!
1393 1135
1433 movlw d'25' 1175 movlw d'25'
1434 addwf waitms_temp,F ; Increase row 1176 addwf waitms_temp,F ; Increase row
1435 WIN_LEFT .90 1177 WIN_LEFT .90
1436 movff waitms_temp,win_top ; Set Row 1178 movff waitms_temp,win_top ; Set Row
1437 1179
1438 lfsr FSR2,letter 1180 STRCPY "SP"
1439 movlw 'S'
1440 movwf POSTINC2
1441 movlw 'P'
1442 movwf POSTINC2
1443 movff temp6,lo ; copy gas number 1181 movff temp6,lo ; copy gas number
1444 output_8 ; display gas number 1182 output_8 ; display gas number
1445 movlw ':' 1183 STRCAT ": "
1446 movwf POSTINC2
1447 movlw ' '
1448 movwf POSTINC2
1449 movff wait_temp, EEADR; SP #hi position 1184 movff wait_temp, EEADR; SP #hi position
1450 call read_eeprom ; get byte (stored in EEDATA) 1185 call read_eeprom ; get byte (stored in EEDATA)
1451 movff EEDATA,lo ; copy to lo 1186 movff EEDATA,lo ; copy to lo
1452 clrf hi 1187 clrf hi
1453 output_16dp d'3' ; outputs into Postinc2! 1188 output_16dp d'3' ; outputs into Postinc2!
1474 call read_eeprom ; Read O2 ratio 1209 call read_eeprom ; Read O2 ratio
1475 movff EEDATA, lo ; O2 ratio 1210 movff EEDATA, lo ; O2 ratio
1476 1211
1477 WIN_LEFT .90 1212 WIN_LEFT .90
1478 WIN_TOP .100 1213 WIN_TOP .100
1479 lfsr FSR2,letter 1214 STRCPY "Dil:"
1480 movlw 'D'
1481 movwf POSTINC2
1482 movlw 'i'
1483 movwf POSTINC2
1484 movlw 'l'
1485 movwf POSTINC2
1486 movlw ':'
1487 movwf POSTINC2
1488 output_8 ; O2 Ratio 1215 output_8 ; O2 Ratio
1489 movlw '/' 1216 PUTC '/'
1490 movwf POSTINC2
1491 movff hi,lo 1217 movff hi,lo
1492 output_8 ; He Ratio 1218 output_8 ; He Ratio
1493 call word_processor 1219 call word_processor
1494 1220
1495 bcf leftbind 1221 bcf leftbind
1517 lfsr FSR2,letter 1243 lfsr FSR2,letter
1518 read_int_eeprom d'36' 1244 read_int_eeprom d'36'
1519 movff EEDATA,lo ; copy to lo 1245 movff EEDATA,lo ; copy to lo
1520 clrf hi 1246 clrf hi
1521 output_16dp d'3' ; outputs into Postinc2! 1247 output_16dp d'3' ; outputs into Postinc2!
1522 movlw 'B' 1248 bcf leftbind
1523 movwf POSTINC2 1249
1524 movlw 'a' 1250 STRCAT_PRINT "Bar"
1525 movwf POSTINC2
1526 movlw 'r'
1527 movwf POSTINC2
1528 bcf leftbind
1529 call word_processor
1530 bra PLED_active_gas_surfmode_exit 1251 bra PLED_active_gas_surfmode_exit
1531 1252
1532 PLED_active_gas_surfmode2: 1253 PLED_active_gas_surfmode2:
1533 WIN_TOP .130 1254 WIN_TOP .130
1534 WIN_LEFT .100 1255 WIN_LEFT .100
1585 1306
1586 PLED_active_gas_surfmode4: 1307 PLED_active_gas_surfmode4:
1587 lfsr FSR2,letter 1308 lfsr FSR2,letter
1588 bsf leftbind ; left orientated output 1309 bsf leftbind ; left orientated output
1589 output_99 ; O2 ratio is still in "lo" 1310 output_99 ; O2 ratio is still in "lo"
1590 movlw '/' 1311 PUTC '/'
1591 movwf POSTINC2
1592 movff char_I_He_ratio,lo ; copy He ratio into lo 1312 movff char_I_He_ratio,lo ; copy He ratio into lo
1593 output_99 1313 output_99
1594 bcf leftbind 1314 bcf leftbind
1595 call word_processor 1315 call word_processor
1596 bra PLED_active_gas_surfmode_exit 1316 bra PLED_active_gas_surfmode_exit
1597 1317
1598 PLED_active_gas_surfmode_exit: 1318 PLED_active_gas_surfmode_exit:
1599 movlw .0 1319 ; WIN_FRAME_BLACK .122, .175, .82, .159
1600 movff WREG,box_temp+0 ; Data
1601 movlw .122
1602 movff WREG,box_temp+1 ; row top (0-239)
1603 movlw .175
1604 movff WREG,box_temp+2 ; row bottom (0-239)
1605 movlw .82
1606 movff WREG,box_temp+3 ; column left (0-159)
1607 movlw .159
1608 movff WREG,box_temp+4 ; column right (0-159)
1609 call PLED_frame
1610 return 1320 return
1611 1321
1612 PLED_confirmbox: 1322 PLED_confirmbox:
1613 movlw .0 1323 WIN_BOX_BLACK .68, .146, .34, .101
1614 movff WREG,box_temp+0 ; Data 1324 WIN_FRAME_STD .70, .144, .35, .100
1615 movlw .68 1325
1616 movff WREG,box_temp+1 ; row top (0-239)
1617 movlw .146
1618 movff WREG,box_temp+2 ; row bottom (0-239)
1619 movlw .34
1620 movff WREG,box_temp+3 ; column left (0-159)
1621 movlw .101
1622 movff WREG,box_temp+4 ; column right (0-159)
1623 call PLED_box
1624
1625 GETCUSTOM8 d'35' ; Standard output color
1626 movff WREG,box_temp+0 ; Data
1627 movlw .70
1628 movff WREG,box_temp+1 ; row top (0-239)
1629 movlw .144
1630 movff WREG,box_temp+2 ; row bottom (0-239)
1631 movlw .35
1632 movff WREG,box_temp+3 ; column left (0-159)
1633 movlw .100
1634 movff WREG,box_temp+4 ; column right (0-159)
1635 call PLED_frame
1636 DISPLAYTEXT .143 ; Confirm: 1326 DISPLAYTEXT .143 ; Confirm:
1637 DISPLAYTEXT .145 ; Cancel 1327 DISPLAYTEXT .145 ; Cancel
1638 DISPLAYTEXT .146 ; OK! 1328 DISPLAYTEXT .146 ; OK!
1639 1329
1640 movlw d'1' 1330 movlw d'1'
1641 movwf menupos 1331 movwf menupos
1642 1332
1643 PLED_confirmbox2: 1333 PLED_confirmbox2:
1644 movlw .0 1334 WIN_BOX_BLACK .96, .143, .39, .51
1645 movff WREG,box_temp+0 ; Data
1646 movlw .96
1647 movff WREG,box_temp+1 ; row top (0-239)
1648 movlw .143
1649 movff WREG,box_temp+2 ; row bottom (0-239)
1650 movlw .39
1651 movff WREG,box_temp+3 ; column left (0-159)
1652 movlw .51
1653 movff WREG,box_temp+4 ; column right (0-159)
1654 call PLED_box
1655 1335
1656 movff menupos,temp1 1336 movff menupos,temp1
1657 movlw d'96' 1337 movlw d'96'
1658 dcfsnz temp1,F 1338 dcfsnz temp1,F
1659 movlw d'96' 1339 movlw d'96'
1663 WIN_LEFT .39 1343 WIN_LEFT .39
1664 WIN_FONT FT_SMALL 1344 WIN_FONT FT_SMALL
1665 WIN_INVERT .0 ; Init new Wordprocessor 1345 WIN_INVERT .0 ; Init new Wordprocessor
1666 call PLED_standard_color 1346 call PLED_standard_color
1667 1347
1668 lfsr FSR2,letter 1348 STRCPY_PRINT "\xB7"
1669 movlw 0xB7 ; Arrow for menu
1670 movwf POSTINC2
1671 call word_processor
1672 1349
1673 bcf sleepmode ; clear some flags 1350 bcf sleepmode ; clear some flags
1674 bcf menubit2 1351 bcf menubit2
1675 bcf menubit3 1352 bcf menubit3
1676 bcf switch_right 1353 bcf switch_right
1773 output_16 ; Full meters in Big font 1450 output_16 ; Full meters in Big font
1774 bcf leftbind 1451 bcf leftbind
1775 bra pled_depth3 1452 bra pled_depth3
1776 1453
1777 pled_depth2: 1454 pled_depth2:
1778 movlw '0' 1455 PUTC '0'
1779 movwf POSTINC2 1456
1780 pled_depth3: 1457 pled_depth3:
1781 call word_processor 1458 call word_processor
1782 bcf ignore_digit4 1459 bcf ignore_digit4
1783 1460
1784 WIN_FONT FT_MEDIUM 1461 WIN_FONT FT_MEDIUM
1787 PLED_color_code warn_depth ; Color-code the output 1464 PLED_color_code warn_depth ; Color-code the output
1788 1465
1789 movff rel_pressure+1,hi 1466 movff rel_pressure+1,hi
1790 movff rel_pressure+0,lo 1467 movff rel_pressure+0,lo
1791 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mBar] 1468 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mBar]
1792 lfsr FSR2,letter 1469
1793 movlw '.' 1470 STRCPY "."
1794 movwf POSTINC2
1795 1471
1796 movlw HIGH d'9' 1472 movlw HIGH d'9'
1797 movwf sub_a+1 1473 movwf sub_a+1
1798 movlw LOW d'9' 1474 movlw LOW d'9'
1799 movwf sub_a+0 1475 movwf sub_a+0
1808 bsf ignore_digit5 1484 bsf ignore_digit5
1809 output_16dp d'0' 1485 output_16dp d'0'
1810 bra pled_depth5 1486 bra pled_depth5
1811 1487
1812 pled_depth4: 1488 pled_depth4:
1813 movlw '0' 1489 PUTC '0'
1814 movwf POSTINC2
1815 1490
1816 pled_depth5: 1491 pled_depth5:
1817 call word_processor ; decimeters in medium font 1492 call word_processor ; decimeters in medium font
1818 bcf ignore_digit5 1493 bcf ignore_digit5
1819 WIN_FONT FT_SMALL 1494 WIN_FONT FT_SMALL
1840 bcf ignore_digit4 1515 bcf ignore_digit4
1841 WIN_FONT FT_SMALL 1516 WIN_FONT FT_SMALL
1842 return 1517 return
1843 1518
1844 depth_less_10mtr: 1519 depth_less_10mtr:
1845 movlw ' ' 1520 PUTC ' '
1846 movwf POSTINC2
1847 return 1521 return
1848 1522
1849 PLED_clear_depth ; No, clear depth area and set flag 1523 PLED_clear_depth ; No, clear depth area and set flag
1850 movlw .0 1524 WIN_BOX_BLACK .24, .90, .0, .90
1851 movff WREG,box_temp+0 ; Data
1852 movlw .24
1853 movff WREG,box_temp+1 ; row top (0-239)
1854 movlw .90
1855 movff WREG,box_temp+2 ; row bottom (0-239)
1856 movlw .0
1857 movff WREG,box_temp+3 ; column left (0-159)
1858 movlw .90
1859 movff WREG,box_temp+4 ; column right (0-159)
1860 call PLED_box
1861 bsf depth_greater_100m ; Set Flag 1525 bsf depth_greater_100m ; Set Flag
1862 return 1526 return
1863
1864 1527
1865 PLED_desaturation_time: 1528 PLED_desaturation_time:
1866 ostc_debug 'h' 1529 ostc_debug 'h'
1867 WIN_TOP .150 1530 WIN_TOP .150
1868 WIN_LEFT .1 1531 WIN_LEFT .1
1870 WIN_INVERT .0 ; Init new Wordprocessor 1533 WIN_INVERT .0 ; Init new Wordprocessor
1871 call PLED_standard_color 1534 call PLED_standard_color
1872 1535
1873 lfsr FSR2,letter 1536 lfsr FSR2,letter
1874 OUTPUTTEXT d'14' ; Desat 1537 OUTPUTTEXT d'14' ; Desat
1875 movlw ' ' 1538 PUTC ' '
1876 movwf POSTINC2
1877 movff int_O_desaturation_time+0,lo ; divide by 60... 1539 movff int_O_desaturation_time+0,lo ; divide by 60...
1878 movff int_O_desaturation_time+1,hi 1540 movff int_O_desaturation_time+1,hi
1879 call convert_time ; converts hi:lo in minutes to hours (hi) and minutes (lo) 1541 call convert_time ; converts hi:lo in minutes to hours (hi) and minutes (lo)
1880 bsf leftbind 1542 bsf leftbind
1881 movf lo,W 1543 movf lo,W
1882 movff hi,lo 1544 movff hi,lo
1883 movwf hi ; exchange lo and hi... 1545 movwf hi ; exchange lo and hi...
1884 output_8 ; Hours 1546 output_8 ; Hours
1885 movlw ':' 1547 PUTC ':'
1886 movwf POSTINC2
1887 movff hi,lo ; Minutes 1548 movff hi,lo ; Minutes
1888 output_99x 1549 output_99x
1889 bcf leftbind 1550 bcf leftbind
1890 call word_processor 1551 call word_processor
1891 return 1552 return
1898 WIN_INVERT .0 ; Init new Wordprocessor 1559 WIN_INVERT .0 ; Init new Wordprocessor
1899 call PLED_standard_color 1560 call PLED_standard_color
1900 1561
1901 lfsr FSR2,letter 1562 lfsr FSR2,letter
1902 OUTPUTTEXT d'35' ; NoFly 1563 OUTPUTTEXT d'35' ; NoFly
1903 movlw ' ' 1564 PUTC ' '
1904 movwf POSTINC2
1905 movff nofly_time+0,lo ; divide by 60... 1565 movff nofly_time+0,lo ; divide by 60...
1906 movff nofly_time+1,hi 1566 movff nofly_time+1,hi
1907 call convert_time ; converts hi:lo in minutes to hours (hi) and minutes (lo) 1567 call convert_time ; converts hi:lo in minutes to hours (hi) and minutes (lo)
1908 bsf leftbind 1568 bsf leftbind
1909 movf lo,W 1569 movf lo,W
1910 movff hi,lo 1570 movff hi,lo
1911 movwf hi ; exchange lo and hi... 1571 movwf hi ; exchange lo and hi...
1912 output_8 ; Hours 1572 output_8 ; Hours
1913 movlw ':' 1573 PUTC ':'
1914 movwf POSTINC2
1915 movff hi,lo ; Minutes 1574 movff hi,lo ; Minutes
1916 decf lo,F 1575 decf lo,F
1917 btfsc lo,7 ; keep Nofly time 1576 btfsc lo,7 ; keep Nofly time
1918 clrf lo 1577 clrf lo
1919 output_99x 1578 output_99x
1937 movff amb_pressure+0,lo 1596 movff amb_pressure+0,lo
1938 movff amb_pressure+1,hi 1597 movff amb_pressure+1,hi
1939 bsf leftbind 1598 bsf leftbind
1940 output_16 1599 output_16
1941 bcf leftbind 1600 bcf leftbind
1942 movlw 'm' 1601 STRCAT_PRINT "mbar "
1943 movwf POSTINC2
1944 movlw 'b'
1945 movwf POSTINC2
1946 movlw 'a'
1947 movwf POSTINC2
1948 movlw 'r'
1949 movwf POSTINC2
1950 movlw ' '
1951 movwf POSTINC2
1952 call word_processor
1953 return 1602 return
1954 1603
1955 update_batt_voltage_divemode: 1604 update_batt_voltage_divemode:
1956 1605
1957 update_batt_voltage: 1606 update_batt_voltage:
1976 movwf ignore_digits 1625 movwf ignore_digits
1977 bsf ignore_digit5 ; do not display mV 1626 bsf ignore_digit5 ; do not display mV
1978 bsf leftbind 1627 bsf leftbind
1979 output_16dp d'2' ; e.g. 3.45V 1628 output_16dp d'2' ; e.g. 3.45V
1980 bcf leftbind 1629 bcf leftbind
1981 movlw 'V' 1630 STRCAT_PRINT "V "
1982 movwf POSTINC2
1983 movlw ' '
1984 movwf POSTINC2
1985 call word_processor
1986 return 1631 return
1987 1632
1988 update_batt_voltage2: 1633 update_batt_voltage2:
1989 GETCUSTOM8 d'35' ; Standard output color 1634 WIN_FRAME_STD .174, .194, .1, .32
1990 movff WREG,box_temp+0 ; Data
1991 movlw .174
1992 movff WREG,box_temp+1 ; row top (0-239)
1993 movlw .194
1994 movff WREG,box_temp+2 ; row bottom (0-239)
1995 movlw .1
1996 movff WREG,box_temp+3 ; column left (0-159)
1997 movlw .32
1998 movff WREG,box_temp+4 ; column right (0-159)
1999 call PLED_frame
2000 1635
2001 ; 4100-Vbatt 1636 ; 4100-Vbatt
2002 movlw LOW d'4100' 1637 movlw LOW d'4100'
2003 movwf sub_a+0 1638 movwf sub_a+0
2004 movlw HIGH d'4100' 1639 movlw HIGH d'4100'
2037 movlw d'3' 1672 movlw d'3'
2038 cpfsgt wait_temp 1673 cpfsgt wait_temp
2039 movwf wait_temp ; Minimum = 3 1674 movwf wait_temp ; Minimum = 3
2040 1675
2041 update_batt_voltage2a: 1676 update_batt_voltage2a:
2042 GETCUSTOM8 d'35' ; Standard output color 1677 WIN_BOX_STD .181, .187, .32, .34
2043 movff WREG,box_temp+0 ; Data
2044 movlw .181
2045 movff WREG,box_temp+1 ; row top (0-239)
2046 movlw .187
2047 movff WREG,box_temp+2 ; row bottom (0-239)
2048 movlw .32
2049 movff WREG,box_temp+3 ; column left (0-159)
2050 movlw .34
2051 movff WREG,box_temp+4 ; column right (0-159)
2052 call PLED_box ; Full Cap
2053 1678
2054 update_batt_voltage3: 1679 update_batt_voltage3:
2055 GETCUSTOM8 d'34' ; Color battery 1680 GETCUSTOM8 d'34' ; Color battery
2056 movff WREG,box_temp+0 ; Color Data 1681 call PLED_set_color
1682
2057 movlw .176 1683 movlw .176
2058 movff WREG,box_temp+1 ; row top (0-239) 1684 movff WREG,win_top ; row top (0-239)
2059 movlw .192 1685 movlw .192-.176
2060 movff WREG,box_temp+2 ; row bottom (0-239) 1686 movff WREG,win_height ; row bottom (0-239)
2061 movlw .2 1687 movlw .2
2062 movff WREG,box_temp+3 ; column left (0-159) 1688 movff WREG,win_leftx2 ; column left (0-159)
2063 movff wait_temp,box_temp+4 ; column right (0-159) 1689 movff wait_temp,win_width ; column right (0-159)
2064 call PLED_box 1690 call PLED_box
2065 1691
2066 call PLED_standard_color 1692 call PLED_standard_color
2067 return 1693 return
2068 1694
2084 ; Use MMDDYY 1710 ; Use MMDDYY
2085 movff convert_value_temp+0,lo ;month 1711 movff convert_value_temp+0,lo ;month
2086 bsf leftbind 1712 bsf leftbind
2087 output_99x 1713 output_99x
2088 bcf leftbind 1714 bcf leftbind
2089 movlw '/' 1715 PUTC '/'
2090 movwf POSTINC2
2091 movff convert_value_temp+1,lo ;day 1716 movff convert_value_temp+1,lo ;day
2092 bra PLED_convert_date1_common ;year 1717 bra PLED_convert_date1_common ;year
2093 1718
2094 PLED_convert_date1: 1719 PLED_convert_date1:
2095 read_int_eeprom d'91' ; Read date format (0=MMDDYY, 1=DDMMYY, 2=YYMMDD) 1720 read_int_eeprom d'91' ; Read date format (0=MMDDYY, 1=DDMMYY, 2=YYMMDD)
2099 ; Use DDMMYY 1724 ; Use DDMMYY
2100 movff convert_value_temp+1,lo ;day 1725 movff convert_value_temp+1,lo ;day
2101 bsf leftbind 1726 bsf leftbind
2102 output_99x 1727 output_99x
2103 bcf leftbind 1728 bcf leftbind
2104 movlw '/' 1729 PUTC '/'
2105 movwf POSTINC2
2106 movff convert_value_temp+0,lo ;month 1730 movff convert_value_temp+0,lo ;month
2107 1731
2108 PLED_convert_date1_common: 1732 PLED_convert_date1_common:
2109 bsf leftbind 1733 bsf leftbind
2110 output_99x 1734 output_99x
2111 bcf leftbind 1735 bcf leftbind
2112 movlw '/' 1736 PUTC '/'
2113 movwf POSTINC2
2114 movff convert_value_temp+2,lo ;year 1737 movff convert_value_temp+2,lo ;year
2115 bsf leftbind 1738 bsf leftbind
2116 output_99x 1739 output_99x
2117 return 1740 return
2118 1741
2120 ; Use YYMMDD 1743 ; Use YYMMDD
2121 movff convert_value_temp+2,lo ;year 1744 movff convert_value_temp+2,lo ;year
2122 bsf leftbind 1745 bsf leftbind
2123 output_99x 1746 output_99x
2124 bcf leftbind 1747 bcf leftbind
2125 movlw '/' 1748 PUTC '/'
2126 movwf POSTINC2
2127 movff convert_value_temp+0,lo ;month 1749 movff convert_value_temp+0,lo ;month
2128 bsf leftbind 1750 bsf leftbind
2129 output_99x 1751 output_99x
2130 bcf leftbind 1752 bcf leftbind
2131 movlw '/' 1753 PUTC '/'
2132 movwf POSTINC2
2133 movff convert_value_temp+1,lo ;day 1754 movff convert_value_temp+1,lo ;day
2134 bsf leftbind 1755 bsf leftbind
2135 output_99x 1756 output_99x
2136 return 1757 return
2137 1758
2144 PLED_convert_date_short_common: 1765 PLED_convert_date_short_common:
2145 movff convert_value_temp+0,lo ;month 1766 movff convert_value_temp+0,lo ;month
2146 bsf leftbind 1767 bsf leftbind
2147 output_99x 1768 output_99x
2148 bcf leftbind 1769 bcf leftbind
2149 movlw '/' 1770 PUTC '/'
2150 movwf POSTINC2
2151 movff convert_value_temp+1,lo ;day 1771 movff convert_value_temp+1,lo ;day
2152 bsf leftbind 1772 bsf leftbind
2153 output_99x 1773 output_99x
2154 bcf leftbind 1774 bcf leftbind
2155 return 1775 return
2162 ; Use DDMMYY 1782 ; Use DDMMYY
2163 movff convert_value_temp+1,lo ;day 1783 movff convert_value_temp+1,lo ;day
2164 bsf leftbind 1784 bsf leftbind
2165 output_99x 1785 output_99x
2166 bcf leftbind 1786 bcf leftbind
2167 movlw '/' 1787 PUTC '/'
2168 movwf POSTINC2
2169 movff convert_value_temp+0,lo ;month 1788 movff convert_value_temp+0,lo ;month
2170 bsf leftbind 1789 bsf leftbind
2171 output_99x 1790 output_99x
2172 bcf leftbind 1791 bcf leftbind
2173 return 1792 return
2188 call PLED_convert_date ; converts into "DD/MM/YY" or "MM/DD/YY" or "YY/MM/DD" in postinc2 1807 call PLED_convert_date ; converts into "DD/MM/YY" or "MM/DD/YY" or "YY/MM/DD" in postinc2
2189 call word_processor 1808 call word_processor
2190 return 1809 return
2191 1810
2192 PLED_menu_clear: 1811 PLED_menu_clear:
2193 movlw .0 1812 WIN_BOX_BLACK .0, .26, .65, .100
2194 movff WREG,box_temp+0 ; Data
2195 movlw .0
2196 movff WREG,box_temp+1 ; row top (0-239)
2197 movlw .26
2198 movff WREG,box_temp+2 ; row bottom (0-239)
2199 movlw .65
2200 movff WREG,box_temp+3 ; column left (0-159)
2201 movlw .100
2202 movff WREG,box_temp+4 ; column right (0-159)
2203 call PLED_box
2204 return 1813 return
2205 1814
2206 PLED_max_pressure: 1815 PLED_max_pressure:
2207 ostc_debug 'p' ; Sends debug-information to screen if debugmode active 1816 ostc_debug 'p' ; Sends debug-information to screen if debugmode active
2208 movff max_pressure+0,lo 1817 movff max_pressure+0,lo
2250 bcf ignore_digit4 1859 bcf ignore_digit4
2251 WIN_FONT FT_SMALL 1860 WIN_FONT FT_SMALL
2252 return 1861 return
2253 1862
2254 PLED_clear_maxdepth: 1863 PLED_clear_maxdepth:
2255 movlw .0 1864 WIN_BOX_BLACK .184, .215, .0, .41
2256 movff WREG,box_temp+0 ; Data
2257 movlw .184
2258 movff WREG,box_temp+1 ; row top (0-239)
2259 movlw .215
2260 movff WREG,box_temp+2 ; row bottom (0-239)
2261 movlw .0
2262 movff WREG,box_temp+3 ; column left (0-159)
2263 movlw .41
2264 movff WREG,box_temp+4 ; column right (0-159)
2265 call PLED_box
2266 bsf maxdepth_greater_100m ; Set Flag 1865 bsf maxdepth_greater_100m ; Set Flag
2267 return 1866 return
2268 1867
2269 PLED_divemins: 1868 PLED_divemins:
2270 btfsc menubit ; Divemode menu active? 1869 btfsc menubit ; Divemode menu active?
2316 1915
2317 movff apnoe_surface_mins,lo 1916 movff apnoe_surface_mins,lo
2318 bcf leftbind 1917 bcf leftbind
2319 lfsr FSR2,letter 1918 lfsr FSR2,letter
2320 output_8 1919 output_8
2321 movlw ':' 1920 PUTC ':'
2322 movwf POSTINC2
2323 movff apnoe_surface_secs,lo 1921 movff apnoe_surface_secs,lo
2324 output_99x 1922 output_99x
2325 call word_processor 1923 call word_processor
2326 WIN_FONT FT_SMALL 1924 WIN_FONT FT_SMALL
2327 return 1925 return
2328 1926
2329 PLED_apnoe_clear_surface: 1927 PLED_apnoe_clear_surface:
2330 ; Clear Surface timer.... 1928 ; Clear Surface timer....
2331 movlw .0 1929 WIN_BOX_BLACK .60, .119, .90, .159
2332 movff WREG,box_temp+0 ; Data
2333 movlw .60
2334 movff WREG,box_temp+1 ; row top (0-239)
2335 movlw .119
2336 movff WREG,box_temp+2 ; row bottom (0-239)
2337 movlw .90
2338 movff WREG,box_temp+3 ; column left (0-159)
2339 movlw .159
2340 movff WREG,box_temp+4 ; column right (0-159)
2341 call PLED_box
2342 return 1930 return
2343 1931
2344 1932
2345 PLED_display_apnoe_descent: 1933 PLED_display_apnoe_descent:
2346 call PLED_divemask_color ; Set Color for Divemode mask 1934 call PLED_divemask_color ; Set Color for Divemode mask
2355 1943
2356 1944
2357 movff apnoe_mins,lo 1945 movff apnoe_mins,lo
2358 lfsr FSR2,letter 1946 lfsr FSR2,letter
2359 output_8 1947 output_8
2360 movlw ':' 1948 PUTC ':'
2361 movwf POSTINC2
2362 movff apnoe_secs,lo 1949 movff apnoe_secs,lo
2363 output_99x 1950 output_99x
2364 call word_processor 1951 call word_processor
2365 WIN_FONT FT_SMALL 1952 WIN_FONT FT_SMALL
2366 return 1953 return
2372 movff divemins+1,hi 1959 movff divemins+1,hi
2373 bcf leftbind 1960 bcf leftbind
2374 bsf show_last3 1961 bsf show_last3
2375 lfsr FSR2,letter 1962 lfsr FSR2,letter
2376 output_16_3 ;Displays only 0...999 1963 output_16_3 ;Displays only 0...999
2377 movlw ':' 1964 PUTC ':'
2378 movwf POSTINC2
2379 movff divesecs,lo 1965 movff divesecs,lo
2380 output_99x 1966 output_99x
2381 WIN_TOP .20 1967 WIN_TOP .20
2382 WIN_LEFT .90 1968 WIN_LEFT .90
2383 WIN_FONT FT_MEDIUM 1969 WIN_FONT FT_MEDIUM
2417 2003
2418 movlw d'0' 2004 movlw d'0'
2419 bcf leftbind 2005 bcf leftbind
2420 bsf show_last3 2006 bsf show_last3
2421 output_16_3 ;Displays only 0...999 2007 output_16_3 ;Displays only 0...999
2422 movlw ':' 2008 PUTC ':'
2423 movwf POSTINC2
2424 movff wait_temp,lo 2009 movff wait_temp,lo
2425 output_99x 2010 output_99x
2426 bcf leftbind 2011 bcf leftbind
2427 call word_processor 2012 call word_processor
2428 2013
2438 movff avr_rel_pressure+1,hi 2023 movff avr_rel_pressure+1,hi
2439 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mBar] 2024 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mBar]
2440 bsf ignore_digit5 ; do not display 1cm depth 2025 bsf ignore_digit5 ; do not display 1cm depth
2441 output_16dp d'3' 2026 output_16dp d'3'
2442 bcf leftbind 2027 bcf leftbind
2443 movlw 'm' 2028 STRCAT_PRINT "m"
2444 movwf POSTINC2
2445 call word_processor
2446 return 2029 return
2447 2030
2448 2031
2449 PLED_serial: ; Writes OSTC #Serial and Firmware version in surfacemode 2032 PLED_serial: ; Writes OSTC #Serial and Firmware version in surfacemode
2450 ostc_debug 'a' ; Sends debug-information to screen if debugmode active 2033 ostc_debug 'a' ; Sends debug-information to screen if debugmode active
2464 call read_eeprom ; read byte 2047 call read_eeprom ; read byte
2465 movff EEDATA,hi 2048 movff EEDATA,hi
2466 2049
2467 bsf leftbind 2050 bsf leftbind
2468 output_16 2051 output_16
2469 movlw ' ' 2052 STRCAT " \x85\x86 V"
2470 movwf POSTINC2
2471 movlw 0x85 ; New aa_font_28 5 grays HW logo.
2472 movwf POSTINC2
2473 movlw 0x86
2474 movwf POSTINC2
2475 movlw ' '
2476 movwf POSTINC2
2477 movlw 'V'
2478 movwf POSTINC2
2479 movlw softwareversion_x 2053 movlw softwareversion_x
2480 movwf lo 2054 movwf lo
2481 bsf leftbind 2055 bsf leftbind
2482 output_8 2056 output_8
2483 movlw '.' 2057 PUTC '.'
2484 movwf POSTINC2
2485 movlw softwareversion_y 2058 movlw softwareversion_y
2486 movwf lo 2059 movwf lo
2487 bsf leftbind 2060 bsf leftbind
2488 output_99x 2061 output_99x
2489 bcf leftbind 2062 bcf leftbind
2063
2490 call word_processor 2064 call word_processor
2491 return 2065 return
2492 2066
2493 PLED_divemode_menu_mask_first: ; Write Divemode menu1 mask 2067 PLED_divemode_menu_mask_first: ; Write Divemode menu1 mask
2494 ostc_debug 'o' ; Sends debug-information to screen if debugmode active 2068 ostc_debug 'o' ; Sends debug-information to screen if debugmode active
2495 call PLED_menu_clear ; clear "Menu?" 2069 call PLED_menu_clear ; clear "Menu?"
2070 call PLED_standard_color
2496 2071
2497 btfsc FLAG_const_ppO2_mode ; are we in ppO2 mode? 2072 btfsc FLAG_const_ppO2_mode ; are we in ppO2 mode?
2498 bra PLED_divemode_menu_mask_first2 2073 bra PLED_divemode_menu_mask_first2
2499 2074
2500 ; in OC Mode 2075 ; in OC Mode
2518 WIN_LEFT .100 2093 WIN_LEFT .100
2519 WIN_TOP .0 2094 WIN_TOP .0
2520 WIN_FONT FT_SMALL 2095 WIN_FONT FT_SMALL
2521 call PLED_standard_color 2096 call PLED_standard_color
2522 2097
2523 lfsr FSR2,letter 2098 STRCPY "Sel"
2524 movlw 'S'
2525 movwf POSTINC2
2526 movlw 'e'
2527 movwf POSTINC2
2528 movlw 'l'
2529 movwf POSTINC2
2530 read_int_eeprom d'24' ; Get Gas6 %O2 2099 read_int_eeprom d'24' ; Get Gas6 %O2
2531 movff EEDATA,lo 2100 movff EEDATA,lo
2532 bcf leftbind 2101 bcf leftbind
2533 output_99 ; outputs into Postinc2! 2102 output_99 ; outputs into Postinc2!
2534 movlw '/' 2103 PUTC '/'
2535 movwf POSTINC2
2536 read_int_eeprom d'25' ; Get Gas6 %He 2104 read_int_eeprom d'25' ; Get Gas6 %He
2537 movff EEDATA,lo 2105 movff EEDATA,lo
2538 output_99 ; outputs into Postinc2! 2106 output_99 ; outputs into Postinc2!
2539 call word_processor 2107 call word_processor
2540 DISPLAYTEXT .123 ; O2 + 2108 DISPLAYTEXT .123 ; O2 +
2549 DISPLAYTEXT .251 ; - 1m 2117 DISPLAYTEXT .251 ; - 1m
2550 DISPLAYTEXT .252 ; +10m 2118 DISPLAYTEXT .252 ; +10m
2551 DISPLAYTEXT .253 ; -10m 2119 DISPLAYTEXT .253 ; -10m
2552 return 2120 return
2553 2121
2122 ;-----------------------------------------------------------------------------
2123 ; Draw the bar graph used for deco stops (decoplan in simulator or dive).
2124 ; Inputs: lo = minutes. range 1..many.
2554 PLED_decoplan_bargraph: 2125 PLED_decoplan_bargraph:
2555 GETCUSTOM8 d'35' ; Standard output color 2126 ; Common bargraph setup:
2556 movff WREG,box_temp+0 ; Data 2127 movf hi,W ; hi+1 --> top (bank safe !)
2557 movff hi,win_top 2128 incf WREG
2558 incf win_top,F ; +1 2129 movff WREG,win_top
2559 movff win_top,box_temp+1 ; row top (0-239) 2130 movlw d'18'+1 ; 19 --> height (bank safe !)
2560 movff win_top,box_temp+2 ; 2131 movff WREG,win_height
2561 movlw d'18'
2562 addwf box_temp+2,F ; row bottom (0-239)
2563 movlw .122 2132 movlw .122
2564 movff WREG,box_temp+3 ; column left (0-159) 2133 movff WREG,win_leftx2 ; column left (0-159)
2565 addwf lo,F ; Add time offset 2134
2566 btfsc STATUS,C ; >255? 2135 ; Draw used area (lo = minutes):
2567 setf lo ; limit to 255 2136 call PLED_standard_color
2568 decf lo,F ; No, minus one 2137 movlw d'16' ; Limit length (16min)
2569 movlw d'138' ; Limit length (16min)
2570 cpfslt lo 2138 cpfslt lo
2571 movwf lo 2139 movwf lo
2572 movff lo,box_temp+4 ; column right (0-159) 2140 movff lo,win_width ; Bar width
2141 tstfsz lo ; Skip 0-size bar...
2573 call PLED_box 2142 call PLED_box
2574 2143
2144 ; Clear unused area:
2575 movlw .0 2145 movlw .0
2576 movff WREG,box_temp+0 ; Data 2146 movff WREG,win_color1
2577 movff win_top,box_temp+1 ; row top (0-239) 2147 movff WREG,win_color2
2578 movff win_top,box_temp+2 ; 2148 movlw .122 ; (width+left-1)+1
2579 movlw d'18' 2149 addwf lo,W
2580 addwf box_temp+2,F ; row bottom (0-239) 2150 movff WREG,win_leftx2 ; --> left
2581 movff lo,box_temp+3 ; 2151 movf lo,W
2582 incf box_temp+3,F ; column left (0-159) 2152 sublw .16 ; 16-left --> width
2583 movlw .139 2153 movff WREG,win_width
2584 movff WREG,box_temp+4 ; column right (0-159) 2154 tstfsz WREG ; Skip 0-size bar.
2585 call PLED_box 2155 goto PLED_box
2586 return 2156
2587 2157 ;-----------------------------------------------------------------------------
2588 PLED_decoplan_delete_gf: ; Delete unused rows 2158 PLED_decoplan_delete_gf: ; Delete unused rows (GF model)
2589 movlw .238 2159 PLED_decoplan_delete: ; Delete unused rows (OC model)
2590 movff WREG,box_temp+2 ; row bottom (0-239)
2591 bra PLED_decoplan_delete_common
2592
2593 PLED_decoplan_delete: ; Delete unused rows
2594 movlw .171 2160 movlw .171
2595 movff WREG,box_temp+2 ; row bottom (0-239)
2596 PLED_decoplan_delete_common: 2161 PLED_decoplan_delete_common:
2597 movlw .0 2162 movff hi,win_top ; row top (0-239)
2598 movff WREG,box_temp+0 ; data 00, x0, 0y, xy clear, links, rechts, beide 2163 subwf hi,W
2599 movff hi,box_temp+1 ; row top (0-239) 2164 negf WREG
2165 movff WREG,win_height
2600 movlw .100 2166 movlw .100
2601 movff WREG,box_temp+3 ; column left (0-159) 2167 movff WREG,win_leftx2 ; column left (0-159)
2602 movlw .159 2168 movlw .60
2603 movff WREG,box_temp+4 ; column right (0-159) 2169 movff WREG,win_width ; area width (right-left+1, 0-159)
2604 call PLED_box 2170
2171 clrf WREG ; BG color is black.
2172 movff WREG,win_color1
2173 movff WREG,win_color2
2174
2605 bsf last_ceiling_gf_shown ; Set flag 2175 bsf last_ceiling_gf_shown ; Set flag
2606 return 2176 goto PLED_box
2607 2177
2608 2178 ;-----------------------------------------------------------------------------
2609 PLED_decoplan_gf_page_current: 2179 PLED_decoplan_gf_page_current:
2610 movlw d'0' 2180 movlw d'0'
2611 cpfseq temp8 2181 cpfseq temp8
2612 bra PLED_decoplan_gf_page2 ; =1: Dispplay Page 2 2182 bra PLED_decoplan_gf_page2 ; =1: Dispplay Page 2
2613 bra PLED_decoplan_gf_page1 ; =0, Display Page 1 2183 bra PLED_decoplan_gf_page1 ; =0, Display Page 1
2646 2216
2647 PLED_decoplan_gf_page1x: 2217 PLED_decoplan_gf_page1x:
2648 clrf temp8 ; Page 0-3 of deco list 2218 clrf temp8 ; Page 0-3 of deco list
2649 GETCUSTOM8 d'29' ; Last Deco in m 2219 GETCUSTOM8 d'29' ; Last Deco in m
2650 movwf temp7 ; Start with last stop 2220 movwf temp7 ; Start with last stop
2651 setf temp5 2221 clrf temp5
2652 movlw .231 2222 movlw .231
2653 movwf temp6 ; row 2223 movwf temp6 ; row
2654 2224
2655 ; Show last stop manually 2225 ; Show last stop manually
2656 movlw d'25' 2226 movlw d'25'
2685 2255
2686 2256
2687 PLED_decoplan_show_stop_gf: 2257 PLED_decoplan_show_stop_gf:
2688 bsf leftbind 2258 bsf leftbind
2689 WIN_LEFT .100 2259 WIN_LEFT .100
2260 call PLED_standard_color
2690 movff temp6,win_top 2261 movff temp6,win_top
2691 movff temp6,hi ; copy for PLED_decoplan_bargraph 2262 movff temp6,hi ; copy for PLED_decoplan_bargraph
2692 2263
2693 movff char_O_array_decodepth+0,WREG ; Ceiling 2264 movff char_O_array_decodepth+0,WREG ; Ceiling
2694 cpfslt temp7 ; Ceiling already displayed? 2265 cpfslt temp7 ; Ceiling already displayed?
2695 goto PLED_decoplan_delete_gf ; Yes, quit display and RETURN 2266 goto PLED_decoplan_delete_gf ; Yes, quit display and RETURN
2696 movff temp7,lo ; Decodepth 2267 movff temp7,lo ; Decodepth
2697 2268
2698 lfsr FSR2,letter 2269 lfsr FSR2,letter
2699 output_99x ; outputs into Postinc2! 2270 output_99x ; outputs into Postinc2!
2700 movlw 'm' 2271 STRCAT_PRINT "m"
2701 movwf POSTINC2 2272
2702 movlw ' ' 2273 PUTC ' '
2703 movwf POSTINC2
2704 call word_processor
2705 WIN_LEFT .140 2274 WIN_LEFT .140
2706 movff temp6,win_top 2275 movff temp6,win_top
2707 ; lfsr FSR1,0x251 2276 lfsr FSR1,0x0E0+1 ; Gf_decolist_copy
2708 lfsr FSR1,0x0E1 ; Gf_decolist_copy
2709 movf temp5,W ; number of entry 2277 movf temp5,W ; number of entry
2710 movff PLUSW1,lo ; Stop length 2278 movff PLUSW1,lo ; Stop length
2711 incf lo,F ; add one dummy minute 2279 incf lo,F ; add one dummy minute
2712 lfsr FSR2,letter 2280 lfsr FSR2,letter
2713 output_99x ; outputs into Postinc2! 2281 output_99x ; outputs into Postinc2!
2714 movlw d'39' ;"'" 2282 STRCAT_PRINT "'"
2715 movwf POSTINC2 2283
2716 call word_processor
2717 tstfsz lo ; 0 min "Stop"?
2718 rcall PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth 2284 rcall PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth
2719 return 2285 return
2720 2286
2721 2287
2722 PLED_decoplan: ; display the Decoplan 2288 PLED_decoplan: ; display the Decoplan
2724 2290
2725 movff char_O_array_decodepth+0,lo ; Get Depth 2291 movff char_O_array_decodepth+0,lo ; Get Depth
2726 tstfsz lo 2292 tstfsz lo
2727 bra PLED_decoplan1 2293 bra PLED_decoplan1
2728 ; No Deco, show "no Deco" 2294 ; No Deco, show "no Deco"
2729 ; call PLED_clear_divemode_menu ; Clear Deco area
2730 DISPLAYTEXT d'239' ;"No Deco" 2295 DISPLAYTEXT d'239' ;"No Deco"
2731 return 2296 return
2732 2297
2733 PLED_decoplan1: 2298 PLED_decoplan1:
2734 setf temp5 2299 setf temp5
2745 return 2310 return
2746 2311
2747 PLED_decoplan_show_stop: 2312 PLED_decoplan_show_stop:
2748 bsf leftbind 2313 bsf leftbind
2749 WIN_LEFT .100 2314 WIN_LEFT .100
2315 call PLED_standard_color
2750 movff temp6,win_top 2316 movff temp6,win_top
2751 movff temp6,hi ; copy for PLED_decoplan_bargraph 2317 movff temp6,hi ; copy for PLED_decoplan_bargraph
2752 2318
2753 lfsr FSR1,char_O_array_decodepth;+0 2319 lfsr FSR1,char_O_array_decodepth
2754 movf temp5,W ; number of entry 2320 movf temp5,W ; number of entry
2755 movff PLUSW1,lo 2321 movff PLUSW1,lo
2756 movf lo,w 2322 movf lo,w
2757 btfsc STATUS,Z ; =0 2323 btfsc STATUS,Z ; =0
2758 goto PLED_decoplan_delete ; Yes, quit display 2324 goto PLED_decoplan_delete ; Yes, quit display
2759 2325
2760 lfsr FSR2,letter 2326 lfsr FSR2,letter
2761 output_8 ; outputs into Postinc2! 2327 output_8 ; outputs into Postinc2!
2762 movlw 'm' 2328 STRCAT_PRINT "m "
2763 movwf POSTINC2
2764 call word_processor
2765 2329
2766 WIN_LEFT .140 2330 WIN_LEFT .140
2767 movff temp6,win_top 2331 movff temp6,win_top
2768 2332
2769 lfsr FSR1,char_O_array_decotime;+0 2333 lfsr FSR1,char_O_array_decotime;+0
2770 movf temp5,W ; number of entry 2334 movf temp5,W ; number of entry
2771 movff PLUSW1,lo 2335 movff PLUSW1,lo
2772 2336
2773 lfsr FSR2,letter 2337 lfsr FSR2,letter
2774 output_99x ; outputs into Postinc2! 2338 output_99x ; outputs into Postinc2!
2775 movlw d'39' ;"'" 2339 STRCAT_PRINT "'"
2776 movwf POSTINC2 2340
2777 call word_processor
2778 tstfsz lo ; 0 min "Stop"?
2779 rcall PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth 2341 rcall PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth
2780 return 2342 return
2781 2343
2782 2344
2783 PLED_gas_list: 2345 PLED_gas_list:
2800 movlw d'25' 2362 movlw d'25'
2801 addwf waitms_temp,F ; Increase row 2363 addwf waitms_temp,F ; Increase row
2802 WIN_LEFT .100 2364 WIN_LEFT .100
2803 movff waitms_temp,win_top ; Set Row 2365 movff waitms_temp,win_top ; Set Row
2804 2366
2805 lfsr FSR2,letter 2367 STRCPY "G"
2806 movlw 'G'
2807 movwf POSTINC2
2808 movff hi,lo ; copy gas number 2368 movff hi,lo ; copy gas number
2809 output_8 ; display gas number 2369 output_8 ; display gas number
2810 movlw ':' 2370 PUTC ':'
2811 movwf POSTINC2
2812 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM 2371 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM
2813 call read_eeprom ; get byte (stored in EEDATA) 2372 call read_eeprom ; get byte (stored in EEDATA)
2814 movff EEDATA,lo ; copy to lo 2373 movff EEDATA,lo ; copy to lo
2815 output_8 ; outputs into Postinc2! 2374 output_8 ; outputs into Postinc2!
2816 movlw '/' 2375 PUTC '/'
2817 movwf POSTINC2
2818 incf EEADR,F ; Gas #hi: %He - Set address in internal EEPROM 2376 incf EEADR,F ; Gas #hi: %He - Set address in internal EEPROM
2819 call read_eeprom ; get byte (stored in EEDATA) 2377 call read_eeprom ; get byte (stored in EEDATA)
2820 movff EEDATA,lo ; copy to lo 2378 movff EEDATA,lo ; copy to lo
2821 output_8 ; outputs into Postinc2! 2379 output_8 ; outputs into Postinc2!
2822 2380
2865 movlw d'25' 2423 movlw d'25'
2866 addwf waitms_temp,F ; Increase row 2424 addwf waitms_temp,F ; Increase row
2867 movff waitms_temp,win_top ; Set Row 2425 movff waitms_temp,win_top ; Set Row
2868 WIN_LEFT .100 2426 WIN_LEFT .100
2869 2427
2870 lfsr FSR2,letter 2428 STRCPY "SP"
2871 movlw 'S'
2872 movwf POSTINC2
2873 movlw 'P'
2874 movwf POSTINC2
2875 movff temp5,lo ; copy gas number 2429 movff temp5,lo ; copy gas number
2876 output_8 ; display gas number 2430 output_8 ; display gas number
2877 movlw ':' 2431 PUTC ':'
2878 movwf POSTINC2
2879 movff wait_temp, EEADR; SP #hi position 2432 movff wait_temp, EEADR; SP #hi position
2880 call read_eeprom ; get byte (stored in EEDATA) 2433 call read_eeprom ; get byte (stored in EEDATA)
2881 movff EEDATA,lo ; copy to lo 2434 movff EEDATA,lo ; copy to lo
2882 clrf hi 2435 clrf hi
2883 output_16dp d'3' ; outputs into Postinc2! 2436 output_16dp d'3' ; outputs into Postinc2!
2889 2442
2890 bcf leftbind 2443 bcf leftbind
2891 return ; no, return 2444 return ; no, return
2892 2445
2893 PLED_clear_divemode_menu: 2446 PLED_clear_divemode_menu:
2894 movlw .0 2447 WIN_BOX_BLACK .0, .169, .82, .160
2895 movff WREG,box_temp+0 ; Data
2896 movlw .0
2897 movff WREG,box_temp+1 ; row top (0-239)
2898 movlw .169
2899 movff WREG,box_temp+2 ; row bottom (0-239)
2900 movlw .082
2901 movff WREG,box_temp+3 ; column left (0-159)
2902 movlw .160
2903 movff WREG,box_temp+4 ; column right (0-159)
2904 call PLED_box
2905 return 2448 return
2906 2449
2907 PLED_divemenu_cursor: 2450 PLED_divemenu_cursor:
2908 ostc_debug 'l' ; Sends debug-information to screen if debugmode active 2451 ostc_debug 'l' ; Sends debug-information to screen if debugmode active
2909 2452
2910 movlw .0 2453 WIN_BOX_BLACK .0, .150, .85, .95
2911 movff WREG,box_temp+0 ; Data
2912 movlw .0
2913 movff WREG,box_temp+1 ; row top (0-239)
2914 movlw .150
2915 movff WREG,box_temp+2 ; row bottom (0-239)
2916 movlw .85
2917 movff WREG,box_temp+3 ; column left (0-159)
2918 movlw .95
2919 movff WREG,box_temp+4 ; column right (0-159)
2920 call PLED_box
2921 2454
2922 WIN_TOP .0 2455 WIN_TOP .0
2923 WIN_LEFT .85 2456 WIN_LEFT .85
2924 WIN_FONT FT_SMALL 2457 WIN_FONT FT_SMALL
2925 WIN_INVERT .0 ; Init new Wordprocessor 2458 WIN_INVERT .0 ; Init new Wordprocessor
2939 movlw d'100' 2472 movlw d'100'
2940 dcfsnz temp1,F 2473 dcfsnz temp1,F
2941 movlw d'125' 2474 movlw d'125'
2942 movff WREG,win_top 2475 movff WREG,win_top
2943 2476
2944 lfsr FSR2,letter 2477 STRCPY_PRINT "\xB7"
2945 movlw 0xB7 ; Arrow for menu
2946 movwf POSTINC2
2947 call word_processor
2948 return 2478 return
2949 2479
2950 ;PLED_profileview_menu: 2480 ;PLED_profileview_menu:
2951 ; DISPLAYTEXT .127 ;"Exit" 2481 ; DISPLAYTEXT .127 ;"Exit"
2952 ; DISPLAYTEXT .128 ;"Delete" 2482 ; DISPLAYTEXT .128 ;"Delete"
2953 ;; DISPLAYTEXT .132 ;"Format" 2483 ;; DISPLAYTEXT .132 ;"Format"
2954 ; return 2484 ; return
2955 2485
2956 custom_warn_surfmode: ; With CF in temp1
2957 movlw .0
2958 movff WREG,box_temp+0 ; Data
2959 movlw .56
2960 movff WREG,box_temp+1 ; row top (0-239)
2961 movlw .88
2962 movff WREG,box_temp+2 ; row bottom (0-239)
2963 movlw .69
2964 movff WREG,box_temp+3 ; column left (0-159)
2965 movlw .115
2966 movff WREG,box_temp+4 ; column right (0-159)
2967 call PLED_box
2968
2969 GETCUSTOM8 d'35' ; Standard output color
2970 movff WREG,box_temp+0 ; Data
2971 movlw .58
2972 movff WREG,box_temp+1 ; row top (0-239)
2973 movlw .86
2974 movff WREG,box_temp+2 ; row bottom (0-239)
2975 movlw .70
2976 movff WREG,box_temp+3 ; column left (0-159)
2977 movlw .114
2978 movff WREG,box_temp+4 ; column right (0-159)
2979 call PLED_frame
2980 ; warning text
2981
2982 WIN_TOP .60
2983 WIN_LEFT .71
2984 WIN_FONT FT_SMALL
2985 WIN_INVERT .1 ; Init new Wordprocessor
2986 call PLED_warnings_color ; Set Color for Warning
2987 lfsr FSR2,letter
2988 movlw 'C'
2989 movwf POSTINC2
2990 movlw 'F'
2991 movwf POSTINC2
2992 movff temp1,lo
2993 output_8
2994 movlw '!'
2995 movwf POSTINC2
2996 call word_processor
2997
2998 WIN_INVERT .0 ; Init new Wordprocessor
2999 call PLED_standard_color
3000 return
3001
3002 ;PLED_saturation_graph_divemode: 2486 ;PLED_saturation_graph_divemode:
3003 ; ostc_debug 'h' ; Sends debug-information to screen if debugmode active 2487 ; ostc_debug 'h' ; Sends debug-information to screen if debugmode active
3004 PLED_tissue_saturation_graph: 2488 PLED_tissue_saturation_graph:
3005 ostc_debug 'i' ; Sends debug-information to screen if debugmode active 2489 ostc_debug 'i' ; Sends debug-information to screen if debugmode active
3006 2490
3007 ;; Clear graph area... 2491 ;; Clear graph area...
3008 ; movlw .0 2492 ; WIN_BOX_BLACK .25, .120, .82, .159
3009 ; movff WREG,box_temp+0 ; Data
3010 ; movlw .25
3011 ; movff WREG,box_temp+1 ; row top (0-239)
3012 ; movlw .120
3013 ; movff WREG,box_temp+2 ; row bottom (0-239)
3014 ; movlw .82
3015 ; movff WREG,box_temp+3 ; column left (0-159)
3016 ; movlw .159
3017 ; movff WREG,box_temp+4 ; column right (0-159)
3018 ; call PLED_box
3019 2493
3020 ; Draw Frame 2494 ; Draw Frame
3021 GETCUSTOM8 d'35' ; Standard output color 2495 WIN_FRAME_STD .25, .120, .82, .159
3022 movff WREG,box_temp+0 ; Data
3023 movlw .25
3024 movff WREG,box_temp+1 ; row top (0-239)
3025 movlw .120
3026 movff WREG,box_temp+2 ; row bottom (0-239)
3027 movlw .82
3028 movff WREG,box_temp+3 ; column left (0-159)
3029 movlw .159
3030 movff WREG,box_temp+4 ; column right (0-159)
3031 call PLED_frame
3032 2496
3033 ; Draw N2 Tissues 2497 ; Draw N2 Tissues
3034 lfsr FSR2, char_O_tissue_saturation+.000 ; N2 2498 lfsr FSR2, char_O_tissue_saturation+.000 ; N2
3035 movlw d'16' 2499 movlw d'16'
3036 movwf wait_temp ; 16 tissues 2500 movwf wait_temp ; 16 tissues
3037 clrf waitms_temp ; Row offset 2501 clrf waitms_temp ; Row offset
2502
2503 movlw .1
2504 movff WREG,win_height ; row bottom (0-239)
2505 movlw .100
2506 movff WREG,win_leftx2 ; column left (0-159)
2507
3038 PLED_tissue_saturation_graph3: 2508 PLED_tissue_saturation_graph3:
3039 GETCUSTOM8 d'35' ; Standard output color 2509
3040 movff WREG,box_temp+0 ; Data
3041 movlw .28 2510 movlw .28
3042 addwf waitms_temp,W 2511 addwf waitms_temp,W
3043 movff WREG,box_temp+1 ; row top (0-239) 2512 movff WREG,win_top ; row top (0-239)
3044 movlw .28
3045 addwf waitms_temp,W
3046 movff WREG,box_temp+2 ; row bottom (0-239)
3047 2513
3048 incf waitms_temp,F 2514 incf waitms_temp,F
3049 incf waitms_temp,F 2515 incf waitms_temp,F
3050 2516
3051 movlw .100 2517 movf POSTINC2,W
3052 movff WREG,box_temp+3 ; column left (0-159) 2518 bcf STATUS,C ; Clear carry
3053 2519 rrcf WREG ; And divide by 4
3054 movff POSTINC2,box_temp+4
3055 bcf STATUS,C 2520 bcf STATUS,C
3056 rrcf box_temp+4,F 2521 rrcf WREG
3057 bcf STATUS,C 2522 movff WREG,win_width
3058 rrcf box_temp+4,F 2523 movlw d'57' ; limit display
3059 movlw .100 2524 cpfslt win_width ; skip if 157 (WREG) < box_temp+4
3060 addwf box_temp+4,F ; column right (0-159) 2525 movwf win_width
3061
3062 movlw d'157' ; limit display
3063 cpfslt box_temp+4 ; skip if 157 (WREG) < box_temp+4
3064 movwf box_temp+4
3065 2526
3066 call PLED_box 2527 call PLED_box
3067 2528
3068 decfsz wait_temp,F 2529 decfsz wait_temp,F
3069 bra PLED_tissue_saturation_graph3 2530 bra PLED_tissue_saturation_graph3
3071 ; Draw He Tissues 2532 ; Draw He Tissues
3072 lfsr FSR2, char_O_tissue_saturation+.016 ; He 2533 lfsr FSR2, char_O_tissue_saturation+.016 ; He
3073 movlw d'16' 2534 movlw d'16'
3074 movwf wait_temp ; 16 tissues 2535 movwf wait_temp ; 16 tissues
3075 clrf waitms_temp ; Row offset 2536 clrf waitms_temp ; Row offset
2537
2538 ; movlw .1
2539 ; movff WREG,win_height ; row bottom (0-239)
2540 ; movlw .100
2541 ; movff WREG,win_leftx2 ; column left (0-159)
2542 ; call PLED_standard_color
2543
3076 PLED_tissue_saturation_graph2: 2544 PLED_tissue_saturation_graph2:
3077 GETCUSTOM8 d'35' ; Standard output color 2545
3078 movff WREG,box_temp+0 ; Data
3079 movlw .86 2546 movlw .86
3080 addwf waitms_temp,W 2547 addwf waitms_temp,W
3081 movff WREG,box_temp+1 ; row top (0-239) 2548 movff WREG,win_top ; row top (0-239)
3082 movlw .86
3083 addwf waitms_temp,W
3084 movff WREG,box_temp+2 ; row bottom (0-239)
3085 2549
3086 incf waitms_temp,F 2550 incf waitms_temp,F
3087 incf waitms_temp,F 2551 incf waitms_temp,F
3088 2552
3089 movlw .100 2553 movf POSTINC2,W
3090 movff WREG,box_temp+3 ; column left (0-159) 2554 bcf STATUS,C ; Clear carry
3091 2555 rrcf WREG ; And divide by 4
3092 movff POSTINC2,box_temp+4
3093 bcf STATUS,C 2556 bcf STATUS,C
3094 rrcf box_temp+4,F 2557 rrcf WREG
3095 bcf STATUS,C 2558 movff WREG,win_width
3096 rrcf box_temp+4,F 2559 movlw d'57' ; limit display
3097 movlw .100 2560 cpfslt win_width ; skip if 157 (WREG) < box_temp+4
3098 addwf box_temp+4,F ; column right (0-159) 2561 movwf win_width
3099
3100 movlw d'157' ; limit display
3101 cpfslt box_temp+4 ; skip if 157 (WREG) < box_temp+4
3102 movwf box_temp+4
3103 2562
3104 call PLED_box 2563 call PLED_box
3105 2564
3106 decfsz wait_temp,F 2565 decfsz wait_temp,F
3107 bra PLED_tissue_saturation_graph2 2566 bra PLED_tissue_saturation_graph2
3108 2567
3109 ; Draw Text 2568 ; Draw Text
3110 WIN_LEFT .84 2569 WIN_LEFT .84
3111 WIN_TOP .32 2570 WIN_TOP .32
3112 call PLED_standard_color 2571 STRCPY_PRINT "N2"
3113 lfsr FSR2,letter 2572
3114 movlw 'N'
3115 movwf POSTINC2
3116 movlw '2'
3117 movwf POSTINC2
3118 call word_processor
3119 WIN_LEFT .84
3120 WIN_TOP .90 2573 WIN_TOP .90
3121 call PLED_standard_color 2574 STRCPY_PRINT "He"
3122 lfsr FSR2,letter
3123 movlw 'H'
3124 movwf POSTINC2
3125 movlw 'e'
3126 movwf POSTINC2
3127 call word_processor
3128 2575
3129 movff char_O_gtissue_no,wait_temp ; used as temp 2576 movff char_O_gtissue_no,wait_temp ; used as temp
3130 2577
3131 lfsr FSR2,letter
3132 lfsr FSR1,char_O_tissue_saturation+0 2578 lfsr FSR1,char_O_tissue_saturation+0
3133 incf wait_temp,F ; make 1-16 of 0-15 2579 incf wait_temp,F ; make 1-16 of 0-15
2580
3134 PLED_tissue_saturation_graph4: ; point to leading tissue... 2581 PLED_tissue_saturation_graph4: ; point to leading tissue...
3135 movff POSTINC1,lo ; copy/overwrite to lo register 2582 movff POSTINC1,lo ; copy/overwrite to lo register
3136 decfsz wait_temp,F ; count until zero 2583 decfsz wait_temp,F ; count until zero
3137 bra PLED_tissue_saturation_graph4 ;loop 2584 bra PLED_tissue_saturation_graph4 ;loop
2585
2586 lfsr FSR2,letter
3138 output_8 2587 output_8
3139 movlw '%' 2588 STRCAT "% "
3140 movwf POSTINC2 2589
3141 movlw ' '
3142 movwf POSTINC2
3143 WIN_LEFT .84
3144 WIN_TOP .62 2590 WIN_TOP .62
3145 WIN_FONT FT_SMALL 2591 WIN_FONT FT_SMALL
3146 call PLED_standard_color
3147 call word_processor 2592 call word_processor
3148 bcf leftbind 2593 bcf leftbind
3149 2594
3150 ; Draw Scale 2595 ; Draw Scale
3151 GETCUSTOM8 d'35' ; Standard output color 2596 WIN_BOX_STD .73, .74, .121, .157
3152 movff WREG,box_temp+0 ; Data 2597 WIN_BOX_STD .61, .84, .121, .122
3153 movlw .73 2598 WIN_BOX_STD .65, .80, .130, .131
3154 movff WREG,box_temp+1 ; row top (0-239) 2599 WIN_BOX_STD .65, .80, .139, .140
3155 movlw .74 2600 WIN_BOX_STD .65, .80, .148, .149
3156 movff WREG,box_temp+2 ; row bottom (0-239) 2601 WIN_BOX_STD .61, .84, .157, .158
3157 movlw .121 2602 return
3158 movff WREG,box_temp+3 ; column left (0-159)
3159 movlw .157
3160 movff WREG,box_temp+4 ; column right (0-159)
3161 call PLED_frame
3162
3163 GETCUSTOM8 d'35' ; Standard output color
3164 movff WREG,box_temp+0 ; Data
3165 movlw .61
3166 movff WREG,box_temp+1 ; row top (0-239)
3167 movlw .84
3168 movff WREG,box_temp+2 ; row bottom (0-239)
3169 movlw .121
3170 movff WREG,box_temp+3 ; column left (0-159)
3171 movlw .122
3172 movff WREG,box_temp+4 ; column right (0-159)
3173 call PLED_box
3174 GETCUSTOM8 d'35' ; Standard output color
3175 movff WREG,box_temp+0 ; Data
3176 movlw .65
3177 movff WREG,box_temp+1 ; row top (0-239)
3178 movlw .80
3179 movff WREG,box_temp+2 ; row bottom (0-239)
3180 movlw .121+.9
3181 movff WREG,box_temp+3 ; column left (0-159)
3182 movlw .122+.9
3183 movff WREG,box_temp+4 ; column right (0-159)
3184 call PLED_box
3185 GETCUSTOM8 d'35' ; Standard output color
3186 movff WREG,box_temp+0 ; Data
3187 movlw .65
3188 movff WREG,box_temp+1 ; row top (0-239)
3189 movlw .80
3190 movff WREG,box_temp+2 ; row bottom (0-239)
3191 movlw .121+.18
3192 movff WREG,box_temp+3 ; column left (0-159)
3193 movlw .122+.18
3194 movff WREG,box_temp+4 ; column right (0-159)
3195 call PLED_box
3196 GETCUSTOM8 d'35' ; Standard output color
3197 movff WREG,box_temp+0 ; Data
3198 movlw .65
3199 movff WREG,box_temp+1 ; row top (0-239)
3200 movlw .80
3201 movff WREG,box_temp+2 ; row bottom (0-239)
3202 movlw .121+.27
3203 movff WREG,box_temp+3 ; column left (0-159)
3204 movlw .122+.27
3205 movff WREG,box_temp+4 ; column right (0-159)
3206 call PLED_box
3207 GETCUSTOM8 d'35' ; Standard output color
3208 movff WREG,box_temp+0 ; Data
3209 movlw .61
3210 movff WREG,box_temp+1 ; row top (0-239)
3211 movlw .84
3212 movff WREG,box_temp+2 ; row bottom (0-239)
3213 movlw .121+.36
3214 movff WREG,box_temp+3 ; column left (0-159)
3215 movlw .122+.36
3216 movff WREG,box_temp+4 ; column right (0-159)
3217 call PLED_box
3218
3219 return
3220
3221 2603
3222 PLED_startupscreen1: 2604 PLED_startupscreen1:
3223 call PLED_topline_box 2605 call PLED_topline_box
3224 WIN_INVERT .1 ; Init new Wordprocessor 2606 WIN_INVERT .1 ; Init new Wordprocessor
3225 DISPLAYTEXT d'3' ; "HeinrichsWeikamp" 2607 DISPLAYTEXT d'3' ; "HeinrichsWeikamp"
3360 DISPLAYTEXTH .282 ; L. Tissue: 2742 DISPLAYTEXTH .282 ; L. Tissue:
3361 PLED_show_leading_tissue_2: 2743 PLED_show_leading_tissue_2:
3362 call deco_calc_desaturation_time ; calculate desaturation time 2744 call deco_calc_desaturation_time ; calculate desaturation time
3363 movlb b'00000001' ; select ram bank 1 2745 movlb b'00000001' ; select ram bank 1
3364 2746
3365 lfsr FSR2,letter 2747 STRCPY "#"
3366 movlw '#'
3367 movwf POSTINC2
3368 movff char_O_gtissue_no,lo 2748 movff char_O_gtissue_no,lo
3369 movff char_O_gtissue_no,wait_temp ; used as temp 2749 movff char_O_gtissue_no,wait_temp ; used as temp
3370 bsf leftbind 2750 bsf leftbind
3371 output_8 2751 output_8
3372 movlw ' ' 2752 STRCAT " ("
3373 movwf POSTINC2
3374 movlw '('
3375 movwf POSTINC2
3376 2753
3377 movlw d'16' 2754 movlw d'16'
3378 cpfslt wait_temp 2755 cpfslt wait_temp
3379 bra PLED_show_leading_tissue_he 2756 bra PLED_show_leading_tissue_he
3380 movlw 'N' 2757 STRCAT "N2"
3381 movwf POSTINC2
3382 movlw '2'
3383 movwf POSTINC2
3384 bra PLED_show_leading_tissue2 2758 bra PLED_show_leading_tissue2
2759
3385 PLED_show_leading_tissue_he: 2760 PLED_show_leading_tissue_he:
3386 movlw 'H' 2761 STRCAT "He"
3387 movwf POSTINC2 2762
3388 movlw 'e'
3389 movwf POSTINC2
3390 PLED_show_leading_tissue2: 2763 PLED_show_leading_tissue2:
3391 movlw ')'
3392 movwf POSTINC2
3393 movlw ' '
3394 movwf POSTINC2
3395 WIN_LEFT .95 2764 WIN_LEFT .95
3396 WIN_TOP .192 2765 WIN_TOP .192
3397 WIN_FONT FT_SMALL 2766 WIN_FONT FT_SMALL
3398 call PLED_standard_color 2767 call PLED_standard_color
3399 call word_processor 2768
3400 2769 STRCAT_PRINT ") "
3401 lfsr FSR2,letter 2770
3402 lfsr FSR1,char_O_tissue_saturation+0 2771 lfsr FSR1,char_O_tissue_saturation+0
3403 incf wait_temp,F ; make 1-16 of 0-15 2772 incf wait_temp,F ; make 1-16 of 0-15
3404 PLED_show_leading_tissue3: ; point to leading tissue... 2773 PLED_show_leading_tissue3: ; point to leading tissue...
3405 movff POSTINC1,lo ; copy/overwrite to lo register 2774 movff POSTINC1,lo ; copy/overwrite to lo register
3406 decfsz wait_temp,F ; count until zero 2775 decfsz wait_temp,F ; count until zero
3407 bra PLED_show_leading_tissue3 ;loop 2776 bra PLED_show_leading_tissue3 ;loop
3408 output_8 2777
3409 movlw '%'
3410 movwf POSTINC2
3411 movlw ' '
3412 movwf POSTINC2
3413 WIN_LEFT .95 2778 WIN_LEFT .95
3414 WIN_TOP .216 2779 WIN_TOP .216
3415 WIN_FONT FT_SMALL 2780 WIN_FONT FT_SMALL
3416 call word_processor 2781
2782 lfsr FSR2,letter
2783 output_8
2784 STRCAT_PRINT "% "
3417 bcf leftbind 2785 bcf leftbind
3418 return 2786 return
3419 2787
3420 PLED_topline_box_clear: ; Writes an empty box 2788 PLED_topline_box_clear: ; Writes an empty box
3421 movlw .0 2789 movlw .0
3422 bra PLED_topline_box2 2790 bra PLED_topline_box2
3423 PLED_topline_box: ; Writes a filled box... 2791 PLED_topline_box: ; Writes a filled box...
3424 GETCUSTOM8 d'35' ; ... with the standard color 2792 GETCUSTOM8 d'35' ; ... with the standard color
3425 PLED_topline_box2: 2793 PLED_topline_box2:
3426 movff WREG,box_temp+0 ; Data 2794 WIN_BOX_COLOR .0, .26, .0, .159
3427 movlw .000
3428 movff WREG,box_temp+1 ; row top (0-239)
3429 movlw .026
3430 movff WREG,box_temp+2 ; row bottom (0-239)
3431 movlw .000
3432 movff WREG,box_temp+3 ; column left (0-159)
3433 movlw .159
3434 movff WREG,box_temp+4 ; column right (0-159)
3435 call PLED_box
3436 return 2795 return
3437 2796
3438 PLED_display_cns: 2797 PLED_display_cns:
3439 btfsc multi_gf_display ; Is the Multi-GF Table displayed? 2798 btfsc multi_gf_display ; Is the Multi-GF Table displayed?
3440 return ; Yes, No update and return! 2799 return ; Yes, No update and return!
3453 WIN_TOP .090 2812 WIN_TOP .090
3454 WIN_LEFT .0 2813 WIN_LEFT .0
3455 WIN_FONT FT_SMALL 2814 WIN_FONT FT_SMALL
3456 PLED_color_code warn_cns ; Color-code CNS output 2815 PLED_color_code warn_cns ; Color-code CNS output
3457 2816
3458 lfsr FSR2,letter 2817 STRCPY "CNS:"
3459 movlw 'C'
3460 movwf POSTINC2
3461 movlw 'N'
3462 movwf POSTINC2
3463 movlw 'S'
3464 movwf POSTINC2
3465 movlw ':'
3466 movwf POSTINC2
3467 movff char_O_CNS_fraction,lo 2818 movff char_O_CNS_fraction,lo
3468 bsf leftbind 2819 bsf leftbind
3469 output_8 2820 output_8
3470 bcf leftbind 2821 bcf leftbind
3471 movlw '%' 2822 STRCAT_PRINT "%"
3472 movwf POSTINC2
3473 call word_processor
3474 return 2823 return
3475 2824
3476 PLED_display_cns_surface: 2825 PLED_display_cns_surface:
3477 ; Check if CNS should be displayed 2826 ; Check if CNS should be displayed
3478 movff char_O_CNS_fraction,lo ; copy into bank1 2827 movff char_O_CNS_fraction,lo ; copy into bank1
3488 WIN_LEFT .45 2837 WIN_LEFT .45
3489 WIN_FONT FT_SMALL 2838 WIN_FONT FT_SMALL
3490 WIN_INVERT .0 ; Init new Wordprocessor 2839 WIN_INVERT .0 ; Init new Wordprocessor
3491 PLED_color_code warn_cns ; Color-code CNS output 2840 PLED_color_code warn_cns ; Color-code CNS output
3492 2841
3493 lfsr FSR2,letter 2842 STRCPY "CNS:"
3494 movlw 'C'
3495 movwf POSTINC2
3496 movlw 'N'
3497 movwf POSTINC2
3498 movlw 'S'
3499 movwf POSTINC2
3500 movlw ':'
3501 movwf POSTINC2
3502 movff char_O_CNS_fraction,lo 2843 movff char_O_CNS_fraction,lo
3503 bsf leftbind 2844 bsf leftbind
3504 output_8 2845 output_8
3505 bcf leftbind 2846 bcf leftbind
3506 movlw '%' 2847 STRCAT_PRINT "%"
3507 movwf POSTINC2
3508 call word_processor
3509 return 2848 return
3510 2849
3511 2850
3512 PLED_custom_text: 2851 PLED_custom_text:
3513 read_int_eeprom d'64' 2852 read_int_eeprom d'64'
3578 PLED_simdata_screen2_loop: 2917 PLED_simdata_screen2_loop:
3579 incf hi,F ; Increase Gas 2918 incf hi,F ; Increase Gas
3580 movlw d'4' 2919 movlw d'4'
3581 addwf wait_temp,F ; Increase eeprom address for gas list 2920 addwf wait_temp,F ; Increase eeprom address for gas list
3582 2921
3583 lfsr FSR2,letter 2922 STRCPY "G"
3584 movlw 'G'
3585 movwf POSTINC2
3586 movff hi,lo ; copy gas number 2923 movff hi,lo ; copy gas number
3587 output_8 ; display gas number 2924 output_8 ; display gas number
3588 movlw ':' 2925 PUTC ':'
3589 movwf POSTINC2
3590 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM 2926 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM
3591 call read_eeprom ; get byte (stored in EEDATA) 2927 call read_eeprom ; get byte (stored in EEDATA)
3592 movff EEDATA,lo ; copy to lo 2928 movff EEDATA,lo ; copy to lo
3593 output_8 ; outputs into Postinc2! 2929 output_8 ; outputs into Postinc2!
3594 movlw '/' 2930 PUTC '/'
3595 movwf POSTINC2
3596 incf EEADR,F ; Gas #hi: %He - Set address in internal EEPROM 2931 incf EEADR,F ; Gas #hi: %He - Set address in internal EEPROM
3597 call read_eeprom ; get byte (stored in EEDATA) 2932 call read_eeprom ; get byte (stored in EEDATA)
3598 movff EEDATA,lo ; copy to lo 2933 movff EEDATA,lo ; copy to lo
3599 output_8 ; outputs into Postinc2! 2934 output_8 ; outputs into Postinc2!
3600 movlw ' ' 2935 PUTC ' '
3601 movwf POSTINC2
3602 movf hi,W ; Gas number 2936 movf hi,W ; Gas number
3603 addlw d'27' ; -> Adress of change depth register 2937 addlw d'27' ; -> Adress of change depth register
3604 call read_int_eeprom_1 2938 call read_int_eeprom_1
3605 movff EEDATA,lo ; Change depth in m 2939 movff EEDATA,lo ; Change depth in m
3606 output_99 ; outputs into Postinc2! 2940 output_99 ; outputs into Postinc2!
3607 movlw 'm' 2941 PUTC 'm'
3608 movwf POSTINC2
3609 read_int_eeprom d'27' ; read flag register 2942 read_int_eeprom d'27' ; read flag register
3610 movff hi,lo ; copy gas number 2943 movff hi,lo ; copy gas number
3611 PLED_simdata_screen2_loop1: 2944 PLED_simdata_screen2_loop1:
3612 rrcf EEDATA ; roll flags into carry 2945 rrcf EEDATA ; roll flags into carry
3613 decfsz lo,F ; max. 5 times... 2946 decfsz lo,F ; max. 5 times...
3658 movlw d'25' 2991 movlw d'25'
3659 addwf waitms_temp,F ; Increase row 2992 addwf waitms_temp,F ; Increase row
3660 WIN_LEFT .0 2993 WIN_LEFT .0
3661 movff waitms_temp,win_top ; Set Row 2994 movff waitms_temp,win_top ; Set Row
3662 2995
3663 lfsr FSR2,letter 2996 STRCPY "SP"
3664 movlw 'S'
3665 movwf POSTINC2
3666 movlw 'P'
3667 movwf POSTINC2
3668 movff temp6,lo ; copy gas number 2997 movff temp6,lo ; copy gas number
3669 output_8 ; display gas number 2998 output_8 ; display gas number
3670 movlw ':' 2999 STRCAT ": "
3671 movwf POSTINC2
3672 movlw ' '
3673 movwf POSTINC2
3674 movff wait_temp, EEADR; SP #hi position 3000 movff wait_temp, EEADR; SP #hi position
3675 call read_eeprom ; get byte (stored in EEDATA) 3001 call read_eeprom ; get byte (stored in EEDATA)
3676 movff EEDATA,lo ; copy to lo 3002 movff EEDATA,lo ; copy to lo
3677 clrf hi 3003 clrf hi
3678 output_16dp d'3' ; outputs into Postinc2! 3004 output_16dp d'3' ; outputs into Postinc2!
3699 call read_eeprom ; Read O2 ratio 3025 call read_eeprom ; Read O2 ratio
3700 movff EEDATA, lo ; O2 ratio 3026 movff EEDATA, lo ; O2 ratio
3701 3027
3702 WIN_LEFT .0 3028 WIN_LEFT .0
3703 WIN_TOP .110 3029 WIN_TOP .110
3704 lfsr FSR2,letter 3030
3705 movlw 'D' 3031 STRCPY "Dil:"
3706 movwf POSTINC2
3707 movlw 'i'
3708 movwf POSTINC2
3709 movlw 'l'
3710 movwf POSTINC2
3711 movlw ':'
3712 movwf POSTINC2
3713 output_8 ; O2 Ratio 3032 output_8 ; O2 Ratio
3714 movlw '/' 3033 STRCAT "/"
3715 movwf POSTINC2
3716 movff hi,lo 3034 movff hi,lo
3717 output_8 ; He Ratio 3035 output_8 ; He Ratio
3718 call word_processor 3036 call word_processor
3719 3037
3720 bcf leftbind 3038 bcf leftbind