Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 131:03df42de03e1
Merge 129 with 130
author | Heinrichsweikamp |
---|---|
date | Wed, 05 Jan 2011 07:46:20 +0100 |
parents | 06c4899ddb4b 4c588c3d1f12 |
children | 35567a646fe5 |
comparison
equal
deleted
inserted
replaced
130:d721b49b8934 | 131:03df42de03e1 |
---|---|
21 ; written: 15/01/05 | 21 ; written: 15/01/05 |
22 ; | 22 ; |
23 ; History: | 23 ; History: |
24 ; 2008-06-06 [MH] last updated | 24 ; 2008-06-06 [MH] last updated |
25 ; 2010-12-31 [jDG] Multi-page display for GF decoplan | 25 ; 2010-12-31 [jDG] Multi-page display for GF decoplan |
26 ; 2011-01-04 [jDG] Saturation graphs in customview divemode | |
26 ; | 27 ; |
27 ; known bugs: | 28 ; known bugs: |
28 ; ToDo: More comments | 29 ; ToDo: More comments |
29 | 30 |
30 PLED_divemask_color: | 31 PLED_divemask_color: |
2529 | 2530 |
2530 bcf leftbind | 2531 bcf leftbind |
2531 return ; no, return | 2532 return ; no, return |
2532 | 2533 |
2533 PLED_clear_divemode_menu: | 2534 PLED_clear_divemode_menu: |
2534 WIN_BOX_BLACK .0, .169, .82, .160 | 2535 WIN_BOX_BLACK .0, .168, .82, .160 |
2535 return | 2536 return |
2536 | 2537 |
2537 PLED_divemenu_cursor: | 2538 PLED_divemenu_cursor: |
2538 ostc_debug 'l' ; Sends debug-information to screen if debugmode active | 2539 ostc_debug 'l' ; Sends debug-information to screen if debugmode active |
2539 | 2540 |
2562 movff WREG,win_top | 2563 movff WREG,win_top |
2563 | 2564 |
2564 STRCPY_PRINT "\xB7" ; Cursor | 2565 STRCPY_PRINT "\xB7" ; Cursor |
2565 return | 2566 return |
2566 | 2567 |
2567 ;PLED_saturation_graph_divemode: | 2568 |
2568 ; ostc_debug 'h' ; Sends debug-information to screen if debugmode active | 2569 ;============================================================================= |
2570 ; Draw saturation graph, is surface mode or in dive mode. | |
2571 ; | |
2569 PLED_tissue_saturation_graph: | 2572 PLED_tissue_saturation_graph: |
2570 ostc_debug 'i' ; Sends debug-information to screen if debugmode active | 2573 ostc_debug 'i' ; Sends debug-information to screen if debugmode active |
2571 | 2574 |
2572 ;; Clear graph area... | 2575 ;---- Draw Frame --------------------------------------------------------- |
2573 ; WIN_BOX_BLACK .25, .120, .82, .159 | 2576 btfsc divemode |
2574 | 2577 bra PLED_tsg_1 |
2575 ; Draw Frame | 2578 |
2576 WIN_FRAME_STD .25, .120, .82, .159 | 2579 WIN_FRAME_STD .25, .120, .82, .159 ; Surfmode |
2577 | 2580 bra PLED_tsg_2 |
2578 ; Draw N2 Tissues | 2581 PLED_tsg_1: |
2582 WIN_FRAME_STD .169, .239, .90, .159 ; Divemode | |
2583 PLED_tsg_2: | |
2584 | |
2585 ;---- Draw grid ---------------------------------------------------------- | |
2586 movlw color_grey | |
2587 call PLED_set_color | |
2588 | |
2589 movlw .25+.1 ; surfmode | |
2590 btfsc divemode | |
2591 movlw .169+.1 ; divemode | |
2592 movff WREG,win_top | |
2593 | |
2594 movlw .120-.25-.1 ; surfmode | |
2595 btfsc divemode | |
2596 movlw .239-.169-.1 ; divemode | |
2597 movff WREG,win_height | |
2598 | |
2599 movlw 1 | |
2600 movff WREG,win_width | |
2601 | |
2602 movlw .122 | |
2603 movff WREG,win_leftx2 | |
2604 call PLED_box | |
2605 movlw .131 | |
2606 movff WREG,win_leftx2 | |
2607 call PLED_box | |
2608 movlw .140 | |
2609 movff WREG,win_leftx2 | |
2610 call PLED_box | |
2611 movlw .149 | |
2612 movff WREG,win_leftx2 | |
2613 call PLED_box | |
2614 | |
2615 ;---- Draw N2 Tissues ---------------------------------------------------- | |
2579 lfsr FSR2, char_O_tissue_saturation+.000 ; N2 | 2616 lfsr FSR2, char_O_tissue_saturation+.000 ; N2 |
2580 movlw d'16' | 2617 movlw d'16' |
2581 movwf wait_temp ; 16 tissues | 2618 movwf wait_temp ; 16 tissues |
2582 clrf waitms_temp ; Row offset | 2619 clrf waitms_temp ; Row offset |
2583 | 2620 |
2621 call PLED_standard_color | |
2584 movlw .1 | 2622 movlw .1 |
2585 movff WREG,win_height ; row bottom (0-239) | 2623 movff WREG,win_height ; row bottom (0-239) |
2586 movlw .100 | 2624 movlw .82+.18 ; surfmode |
2625 btfsc divemode | |
2626 movlw .90+.10 ; divemode | |
2587 movff WREG,win_leftx2 ; column left (0-159) | 2627 movff WREG,win_leftx2 ; column left (0-159) |
2588 | 2628 |
2589 PLED_tissue_saturation_graph3: | 2629 PLED_tissue_saturation_graph3: |
2590 | 2630 movlw .25+3 ; surfmode: 3pix below top border |
2591 movlw .28 | 2631 btfsc divemode |
2632 movlw .169+3 ; divemode | |
2592 addwf waitms_temp,W | 2633 addwf waitms_temp,W |
2593 movff WREG,win_top ; row top (0-239) | 2634 movff WREG,win_top ; row top (0-239) |
2594 | 2635 |
2595 incf waitms_temp,F | 2636 incf waitms_temp,F |
2596 incf waitms_temp,F | 2637 incf waitms_temp,F |
2608 call PLED_box | 2649 call PLED_box |
2609 | 2650 |
2610 decfsz wait_temp,F | 2651 decfsz wait_temp,F |
2611 bra PLED_tissue_saturation_graph3 | 2652 bra PLED_tissue_saturation_graph3 |
2612 | 2653 |
2613 ; Draw He Tissues | 2654 ;---- Draw He Tissues ---------------------------------------------------- |
2614 lfsr FSR2, char_O_tissue_saturation+.016 ; He | 2655 lfsr FSR2, char_O_tissue_saturation+.016 ; He |
2615 movlw d'16' | 2656 movlw d'16' |
2616 movwf wait_temp ; 16 tissues | 2657 movwf wait_temp ; 16 tissues |
2617 clrf waitms_temp ; Row offset | 2658 clrf waitms_temp ; Row offset |
2618 | |
2619 ; movlw .1 | |
2620 ; movff WREG,win_height ; row bottom (0-239) | |
2621 ; movlw .100 | |
2622 ; movff WREG,win_leftx2 ; column left (0-159) | |
2623 ; call PLED_standard_color | |
2624 | 2659 |
2625 PLED_tissue_saturation_graph2: | 2660 PLED_tissue_saturation_graph2: |
2626 | 2661 |
2627 movlw .86 | 2662 movlw .120-.33 ; surfmode : 33pix above bottom border |
2663 btfsc divemode | |
2664 movlw .239-.33 ; divemode | |
2628 addwf waitms_temp,W | 2665 addwf waitms_temp,W |
2629 movff WREG,win_top ; row top (0-239) | 2666 movff WREG,win_top ; row top (0-239) |
2630 | 2667 |
2631 incf waitms_temp,F | 2668 incf waitms_temp,F |
2632 incf waitms_temp,F | 2669 incf waitms_temp,F |
2644 call PLED_box | 2681 call PLED_box |
2645 | 2682 |
2646 decfsz wait_temp,F | 2683 decfsz wait_temp,F |
2647 bra PLED_tissue_saturation_graph2 | 2684 bra PLED_tissue_saturation_graph2 |
2648 | 2685 |
2649 ; Draw Text | 2686 ;---- Draw N2/He Text ---------------------------------------------------- |
2650 WIN_LEFT .84 | 2687 movlw .82+2 ; surfmode: 2pix right of left border |
2651 WIN_TOP .32 | 2688 btfsc divemode |
2689 movlw .90+2 ; divemode | |
2690 movff WREG,win_leftx2 | |
2691 | |
2692 movlw .25+7 ; surfmode: 7pix below top border | |
2693 btfsc divemode | |
2694 movlw .169+7 ; divemode | |
2695 movff WREG,win_top | |
2652 STRCPY_PRINT "N2" | 2696 STRCPY_PRINT "N2" |
2653 | 2697 |
2654 WIN_TOP .90 | 2698 movlw .120-.30 ; surfmode: 30pix above bottom border |
2699 btfsc divemode | |
2700 movlw .239-.30 ; divemode | |
2701 movff WREG,win_top | |
2655 STRCPY_PRINT "He" | 2702 STRCPY_PRINT "He" |
2703 | |
2704 ;---- Draw scale and O2[16]% --------------------------------------------- | |
2705 btfsc divemode | |
2706 return | |
2656 | 2707 |
2657 movff char_O_gtissue_no,wait_temp ; used as temp | 2708 movff char_O_gtissue_no,wait_temp ; used as temp |
2658 | 2709 |
2659 lfsr FSR1,char_O_tissue_saturation+0 | 2710 lfsr FSR1,char_O_tissue_saturation+0 |
2660 incf wait_temp,F ; make 1-16 of 0-15 | 2711 incf wait_temp,F ; make 1-16 of 0-15 |
2662 PLED_tissue_saturation_graph4: ; point to leading tissue... | 2713 PLED_tissue_saturation_graph4: ; point to leading tissue... |
2663 movff POSTINC1,lo ; copy/overwrite to lo register | 2714 movff POSTINC1,lo ; copy/overwrite to lo register |
2664 decfsz wait_temp,F ; count until zero | 2715 decfsz wait_temp,F ; count until zero |
2665 bra PLED_tissue_saturation_graph4 ;loop | 2716 bra PLED_tissue_saturation_graph4 ;loop |
2666 | 2717 |
2667 lfsr FSR2,letter | |
2668 output_8 | |
2669 STRCAT "% " | |
2670 | |
2671 WIN_TOP .62 | 2718 WIN_TOP .62 |
2672 WIN_FONT FT_SMALL | 2719 WIN_FONT FT_SMALL |
2673 call word_processor | 2720 lfsr FSR2,letter |
2674 bcf leftbind | 2721 bsf leftbind |
2675 | 2722 output_8 |
2676 ; Draw Scale | 2723 bcf leftbind |
2724 | |
2725 STRCAT_PRINT "% " | |
2726 | |
2727 ;---- Draw Scale --------------------------------------------------------- | |
2677 WIN_BOX_STD .73, .74, .121, .157 | 2728 WIN_BOX_STD .73, .74, .121, .157 |
2678 WIN_BOX_STD .61, .84, .121, .122 | 2729 WIN_BOX_STD .61, .84, .121, .122 |
2679 WIN_BOX_STD .65, .80, .130, .131 | 2730 WIN_BOX_STD .65, .80, .130, .131 |
2680 WIN_BOX_STD .65, .80, .139, .140 | 2731 WIN_BOX_STD .65, .80, .139, .140 |
2681 WIN_BOX_STD .65, .80, .148, .149 | 2732 WIN_BOX_STD .65, .80, .148, .149 |
2682 WIN_BOX_STD .61, .84, .157, .158 | 2733 WIN_BOX_STD .61, .84, .157, .158 |
2683 return | 2734 return |
2735 | |
2736 ;============================================================================= | |
2684 | 2737 |
2685 PLED_startupscreen1: | 2738 PLED_startupscreen1: |
2686 call PLED_topline_box | 2739 call PLED_topline_box |
2687 WIN_INVERT .1 ; Init new Wordprocessor | 2740 WIN_INVERT .1 ; Init new Wordprocessor |
2688 DISPLAYTEXT d'3' ; "HeinrichsWeikamp" | 2741 DISPLAYTEXT d'3' ; "HeinrichsWeikamp" |