Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 98:6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
author | heinrichsweikamp |
---|---|
date | Sun, 12 Dec 2010 15:01:05 +0100 |
parents | 3bcccb697bce |
children | 2a2606e9db5f |
comparison
equal
deleted
inserted
replaced
97:dc349e4264bb | 98:6f8e3a08011e |
---|---|
631 bra PLED_display_clear_common2 | 631 bra PLED_display_clear_common2 |
632 call word_processor | 632 call word_processor |
633 WIN_FONT FT_SMALL | 633 WIN_FONT FT_SMALL |
634 return | 634 return |
635 | 635 |
636 | |
636 PLED_diveclock: | 637 PLED_diveclock: |
637 GETCUSTOM8 d'39' ; =1: Show clock in Divemode | 638 call PLED_divemask_color ; Set Color for Divemode mask |
638 movwf lo | 639 DISPLAYTEXT d'255' ; Clock |
639 movlw d'1' | 640 call PLED_standard_color |
640 cpfseq lo ; =1? | 641 |
641 return ; No, Done. | 642 PLED_diveclock2: |
642 | 643 ; GETCUSTOM8 d'39' ; =1: Show clock in Divemode |
643 btfsc menubit ; is the Dive mode menu displayed? | 644 ; movwf lo |
644 return ; Yes | 645 ; movlw d'1' |
645 | 646 ; cpfseq lo ; =1? |
646 WIN_TOP .2 | 647 ; return ; No, Done. |
647 WIN_LEFT .64 | 648 |
649 ; btfsc menubit ; is the Dive mode menu displayed? | |
650 ; return ; Yes | |
651 | |
652 WIN_TOP .192 | |
653 WIN_LEFT .123 | |
648 WIN_FONT FT_SMALL | 654 WIN_FONT FT_SMALL |
649 WIN_INVERT .0 ; Init new Wordprocessor | 655 WIN_INVERT .0 ; Init new Wordprocessor |
650 call PLED_standard_color | 656 call PLED_standard_color |
651 lfsr FSR2,letter | 657 lfsr FSR2,letter |
652 movff hours,lo | 658 movff hours,lo |
759 return | 765 return |
760 | 766 |
761 PLED_logbook_cursor: | 767 PLED_logbook_cursor: |
762 | 768 |
763 PLED_menu_cursor: | 769 PLED_menu_cursor: |
764 WIN_TOP .35 | 770 movlw .0 |
771 movff WREG,box_temp+0 ; Data | |
772 movlw .35 | |
773 movff WREG,box_temp+1 ; row top (0-239) | |
774 movlw .239 | |
775 movff WREG,box_temp+2 ; row bottom (0-239) | |
776 movlw .0 | |
777 movff WREG,box_temp+3 ; column left (0-159) | |
778 movlw .16 | |
779 movff WREG,box_temp+4 ; column right (0-159) | |
780 call PLED_box | |
781 | |
765 WIN_LEFT .0 | 782 WIN_LEFT .0 |
766 WIN_FONT FT_SMALL | 783 WIN_FONT FT_SMALL |
767 WIN_INVERT .0 ; Init new Wordprocessor | 784 WIN_INVERT .0 ; Init new Wordprocessor |
768 call PLED_standard_color | 785 call PLED_standard_color |
769 | |
770 lfsr FSR2,letter | |
771 movlw 0xB8 | |
772 movwf POSTINC2 | |
773 call word_processor | |
774 | |
775 WIN_TOP .65 | |
776 lfsr FSR2,letter | |
777 movlw 0xB8 | |
778 movwf POSTINC2 | |
779 call word_processor | |
780 | |
781 WIN_TOP .95 | |
782 lfsr FSR2,letter | |
783 movlw 0xB8 | |
784 movwf POSTINC2 | |
785 call word_processor | |
786 | |
787 WIN_TOP .125 | |
788 lfsr FSR2,letter | |
789 movlw 0xB8 | |
790 movwf POSTINC2 | |
791 call word_processor | |
792 | |
793 WIN_TOP .155 | |
794 call PLED_standard_color | |
795 lfsr FSR2,letter | |
796 movlw 0xB8 | |
797 movwf POSTINC2 | |
798 call word_processor | |
799 | |
800 WIN_TOP .185 | |
801 lfsr FSR2,letter | |
802 movlw 0xB8 | |
803 movwf POSTINC2 | |
804 call word_processor | |
805 | 786 |
806 movff menupos,temp1 | 787 movff menupos,temp1 |
807 dcfsnz temp1,F | 788 dcfsnz temp1,F |
808 movlw d'35' | 789 movlw d'35' |
809 dcfsnz temp1,F | 790 dcfsnz temp1,F |
2305 call word_processor | 2286 call word_processor |
2306 bcf show_last3 | 2287 bcf show_last3 |
2307 WIN_FONT FT_SMALL | 2288 WIN_FONT FT_SMALL |
2308 return | 2289 return |
2309 | 2290 |
2310 ;PLED_stopwatch_remove: | |
2311 ; movlw .0 | |
2312 ; movff WREG,box_temp+0 ; Data | |
2313 ; movlw .54 | |
2314 ; movff WREG,box_temp+1 ; row top (0-239) | |
2315 ; movlw .102 | |
2316 ; movff WREG,box_temp+2 ; row bottom (0-239) | |
2317 ; movlw .062 | |
2318 ; movff WREG,box_temp+3 ; column left (0-159) | |
2319 ; movlw .159 | |
2320 ; movff WREG,box_temp+4 ; column right (0-159) | |
2321 ; call PLED_box | |
2322 ; return | |
2323 | |
2324 | |
2325 PLED_stopwatch_show: | 2291 PLED_stopwatch_show: |
2326 ostc_debug 'V' ; Sends debug-information to screen if debugmode active | |
2327 ; Stopwatch | 2292 ; Stopwatch |
2328 | |
2329 call PLED_divemask_color ; Set Color for Divemode mask | 2293 call PLED_divemask_color ; Set Color for Divemode mask |
2330 DISPLAYTEXTH d'283' ; Stopwatch | 2294 DISPLAYTEXTH d'283' ; Stopwatch |
2331 call PLED_standard_color | 2295 |
2332 | 2296 PLED_stopwatch_show2: |
2297 call PLED_standard_color | |
2298 ostc_debug 'V' ; Sends debug-information to screen if debugmode active | |
2333 WIN_TOP .192 | 2299 WIN_TOP .192 |
2334 WIN_LEFT .110 | 2300 WIN_LEFT .110 |
2335 WIN_FONT FT_SMALL | 2301 WIN_FONT FT_SMALL |
2336 call PLED_standard_color | 2302 call PLED_standard_color |
2337 | 2303 |
2437 bra PLED_divemode_menu_mask_first2 | 2403 bra PLED_divemode_menu_mask_first2 |
2438 | 2404 |
2439 ; in OC Mode | 2405 ; in OC Mode |
2440 DISPLAYTEXT .32 ;"Gaslist" | 2406 DISPLAYTEXT .32 ;"Gaslist" |
2441 DISPLAYTEXT .31 ;"Decoplan" | 2407 DISPLAYTEXT .31 ;"Decoplan" |
2442 DISPLAYTEXT .122 ;"Set Gas" | |
2443 bra PLED_divemode_menu_mask_first3 | 2408 bra PLED_divemode_menu_mask_first3 |
2444 | 2409 |
2445 PLED_divemode_menu_mask_first2: | 2410 PLED_divemode_menu_mask_first2: |
2446 ; in CC Mode | 2411 ; in CC Mode |
2447 DISPLAYTEXT .238 ;"SetPoint" | 2412 DISPLAYTEXT .238 ;"SetPoint" |
2448 DISPLAYTEXT .31 ;"Decoplan" | 2413 DISPLAYTEXT .31 ;"Decoplan" |
2449 DISPLAYTEXT .137 ;"Bailout" | |
2450 | 2414 |
2451 PLED_divemode_menu_mask_first3: | 2415 PLED_divemode_menu_mask_first3: |
2452 ; In all modes | 2416 ; In all modes |
2453 DISPLAYTEXT .33 ;"More" | 2417 call customview_menu_entry3 ; Show customview-dependent menu entry |
2418 DISPLAYTEXT .241 ;"Display" | |
2454 DISPLAYTEXT .34 ;"Exit" | 2419 DISPLAYTEXT .34 ;"Exit" |
2455 return | 2420 return |
2456 | |
2457 PLED_divemode_menu_mask_second: ; Write Divemode menu1 mask | |
2458 ostc_debug 'o' ; Sends debug-information to screen if debugmode active | |
2459 DISPLAYTEXT .240 ;"Graphs" | |
2460 DISPLAYTEXT .241 ;"Display" | |
2461 DISPLAYTEXTH .281 ;"L. Tissue" | |
2462 DISPLAYTEXT .147 ;"Stopwat." | |
2463 DISPLAYTEXT .244 ;"Exit" | |
2464 return | |
2465 | 2421 |
2466 PLED_divemode_set_xgas: ; Displayes the "Set Gas" menu | 2422 PLED_divemode_set_xgas: ; Displayes the "Set Gas" menu |
2467 WIN_LEFT .100 | 2423 WIN_LEFT .100 |
2468 WIN_TOP .0 | 2424 WIN_TOP .0 |
2469 WIN_FONT FT_SMALL | 2425 WIN_FONT FT_SMALL |
2786 call PLED_standard_color | 2742 call PLED_standard_color |
2787 | 2743 |
2788 movlw d'5' ; list all five gases | 2744 movlw d'5' ; list all five gases |
2789 cpfseq hi ; All gases shown? | 2745 cpfseq hi ; All gases shown? |
2790 bra PLED_gas_list_loop ; No | 2746 bra PLED_gas_list_loop ; No |
2791 | 2747 |
2792 return ; No, return (OC mode) | 2748 DISPLAYTEXT d'122' ; Gas 6.. |
2749 | |
2750 return ; return (OC mode) | |
2793 | 2751 |
2794 PLED_splist_start: | 2752 PLED_splist_start: |
2795 WIN_LEFT .100 | 2753 WIN_LEFT .100 |
2796 WIN_FONT FT_SMALL | 2754 WIN_FONT FT_SMALL |
2797 bsf leftbind | 2755 bsf leftbind |
2838 PLED_clear_divemode_menu: | 2796 PLED_clear_divemode_menu: |
2839 movlw .0 | 2797 movlw .0 |
2840 movff WREG,box_temp+0 ; Data | 2798 movff WREG,box_temp+0 ; Data |
2841 movlw .0 | 2799 movlw .0 |
2842 movff WREG,box_temp+1 ; row top (0-239) | 2800 movff WREG,box_temp+1 ; row top (0-239) |
2843 ; movlw .125 | 2801 movlw .169 |
2844 movlw .185 | |
2845 movff WREG,box_temp+2 ; row bottom (0-239) | 2802 movff WREG,box_temp+2 ; row bottom (0-239) |
2846 movlw .082 | 2803 movlw .082 |
2847 movff WREG,box_temp+3 ; column left (0-159) | 2804 movff WREG,box_temp+3 ; column left (0-159) |
2848 movlw .159 | 2805 movlw .159 |
2849 movff WREG,box_temp+4 ; column right (0-159) | 2806 movff WREG,box_temp+4 ; column right (0-159) |
2850 call PLED_box | 2807 call PLED_box |
2851 return | 2808 return |
2852 | 2809 |
2853 PLED_divemenu_cursor: | 2810 PLED_divemenu_cursor: |
2854 ostc_debug 'l' ; Sends debug-information to screen if debugmode active | 2811 ostc_debug 'l' ; Sends debug-information to screen if debugmode active |
2812 | |
2813 movlw .0 | |
2814 movff WREG,box_temp+0 ; Data | |
2815 movlw .0 | |
2816 movff WREG,box_temp+1 ; row top (0-239) | |
2817 movlw .150 | |
2818 movff WREG,box_temp+2 ; row bottom (0-239) | |
2819 movlw .85 | |
2820 movff WREG,box_temp+3 ; column left (0-159) | |
2821 movlw .95 | |
2822 movff WREG,box_temp+4 ; column right (0-159) | |
2823 call PLED_box | |
2824 | |
2855 WIN_TOP .0 | 2825 WIN_TOP .0 |
2856 WIN_LEFT .85 | 2826 WIN_LEFT .85 |
2857 WIN_FONT FT_SMALL | 2827 WIN_FONT FT_SMALL |
2858 WIN_INVERT .0 ; Init new Wordprocessor | 2828 WIN_INVERT .0 ; Init new Wordprocessor |
2859 call PLED_standard_color | 2829 call PLED_standard_color |
2860 | |
2861 lfsr FSR2,letter | |
2862 movlw 0xB8 | |
2863 movwf POSTINC2 | |
2864 call word_processor | |
2865 | |
2866 WIN_TOP .25 | |
2867 lfsr FSR2,letter | |
2868 movlw 0xB8 | |
2869 movwf POSTINC2 | |
2870 call word_processor | |
2871 | |
2872 WIN_TOP .50 | |
2873 lfsr FSR2,letter | |
2874 movlw 0xB8 | |
2875 movwf POSTINC2 | |
2876 call word_processor | |
2877 | |
2878 WIN_TOP .75 | |
2879 lfsr FSR2,letter | |
2880 movlw 0xB8 | |
2881 movwf POSTINC2 | |
2882 call word_processor | |
2883 | |
2884 WIN_TOP .100 | |
2885 lfsr FSR2,letter | |
2886 movlw 0xB8 | |
2887 movwf POSTINC2 | |
2888 call word_processor | |
2889 | 2830 |
2890 movff menupos,temp1 | 2831 movff menupos,temp1 |
2891 movlw d'0' | 2832 movlw d'0' |
2892 dcfsnz temp1,F | 2833 dcfsnz temp1,F |
2893 movlw d'0' | 2834 movlw d'0' |
2897 movlw d'50' | 2838 movlw d'50' |
2898 dcfsnz temp1,F | 2839 dcfsnz temp1,F |
2899 movlw d'75' | 2840 movlw d'75' |
2900 dcfsnz temp1,F | 2841 dcfsnz temp1,F |
2901 movlw d'100' | 2842 movlw d'100' |
2843 dcfsnz temp1,F | |
2844 movlw d'125' | |
2902 movff WREG,win_top | 2845 movff WREG,win_top |
2903 | 2846 |
2904 lfsr FSR2,letter | 2847 lfsr FSR2,letter |
2905 movlw 0xB7 ; Arrow for menu | 2848 movlw 0xB7 ; Arrow for menu |
2906 movwf POSTINC2 | 2849 movwf POSTINC2 |
3314 call word_processor | 3257 call word_processor |
3315 call PLED_standard_color | 3258 call PLED_standard_color |
3316 return | 3259 return |
3317 | 3260 |
3318 PLED_show_leading_tissue: | 3261 PLED_show_leading_tissue: |
3262 call PLED_divemask_color ; Set Color for Divemode mask | |
3263 DISPLAYTEXTH .282 ; L. Tissue: | |
3264 PLED_show_leading_tissue_2: | |
3319 call deco_main_calc_desaturation_time ; calculate desaturation time | 3265 call deco_main_calc_desaturation_time ; calculate desaturation time |
3320 movlb b'00000001' ; select ram bank 1 | 3266 movlb b'00000001' ; select ram bank 1 |
3321 | 3267 |
3322 DISPLAYTEXTH .282 ; L. Tissue: | |
3323 lfsr FSR2,letter | 3268 lfsr FSR2,letter |
3324 movlw '#' | 3269 movlw '#' |
3325 movwf POSTINC2 | 3270 movwf POSTINC2 |
3326 movff char_O_gtissue_no,lo | 3271 movff char_O_gtissue_no,lo |
3327 movff char_O_gtissue_no,wait_temp ; used as temp | 3272 movff char_O_gtissue_no,wait_temp ; used as temp |
3348 PLED_show_leading_tissue2: | 3293 PLED_show_leading_tissue2: |
3349 movlw ')' | 3294 movlw ')' |
3350 movwf POSTINC2 | 3295 movwf POSTINC2 |
3351 movlw ' ' | 3296 movlw ' ' |
3352 movwf POSTINC2 | 3297 movwf POSTINC2 |
3353 WIN_LEFT .100 | 3298 WIN_LEFT .95 |
3354 WIN_TOP .25 | 3299 WIN_TOP .192 |
3355 WIN_FONT FT_SMALL | 3300 WIN_FONT FT_SMALL |
3356 call PLED_standard_color | 3301 call PLED_standard_color |
3357 call word_processor | 3302 call word_processor |
3358 | 3303 |
3359 lfsr FSR2,letter | 3304 lfsr FSR2,letter |
3366 output_8 | 3311 output_8 |
3367 movlw '%' | 3312 movlw '%' |
3368 movwf POSTINC2 | 3313 movwf POSTINC2 |
3369 movlw ' ' | 3314 movlw ' ' |
3370 movwf POSTINC2 | 3315 movwf POSTINC2 |
3371 WIN_LEFT .100 | 3316 WIN_LEFT .95 |
3372 WIN_TOP .50 | 3317 WIN_TOP .216 |
3373 WIN_FONT FT_SMALL | 3318 WIN_FONT FT_SMALL |
3374 call PLED_standard_color | |
3375 call word_processor | 3319 call word_processor |
3376 bcf leftbind | 3320 bcf leftbind |
3377 return | 3321 return |
3378 | 3322 |
3379 PLED_topline_box_clear: ; Writes an empty box | 3323 PLED_topline_box_clear: ; Writes an empty box |
3380 movlw .0 | 3324 movlw .0 |
3381 bra PLED_topline_box2 | 3325 bra PLED_topline_box2 |
3382 PLED_topline_box: ; Writes a filled box | 3326 PLED_topline_box: ; Writes a filled box... |
3383 GETCUSTOM8 d'35' | 3327 GETCUSTOM8 d'35' ; ... with the standard color |
3384 PLED_topline_box2: | 3328 PLED_topline_box2: |
3385 movff WREG,box_temp+0 ; Data | 3329 movff WREG,box_temp+0 ; Data |
3386 movlw .000 | 3330 movlw .000 |
3387 movff WREG,box_temp+1 ; row top (0-239) | 3331 movff WREG,box_temp+1 ; row top (0-239) |
3388 movlw .026 | 3332 movlw .026 |