Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 219:b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
author | heinrichsweikamp |
---|---|
date | Tue, 01 Mar 2011 10:01:17 +0100 |
parents | cdba979821ee |
children | 448478ceccea |
comparison
equal
deleted
inserted
replaced
218:f4b79292e31f | 219:b6dd54b3567c |
---|---|
2302 call word_processor | 2302 call word_processor |
2303 DISPLAYTEXT .123 ; O2 + | 2303 DISPLAYTEXT .123 ; O2 + |
2304 DISPLAYTEXT .124 ; O2 - | 2304 DISPLAYTEXT .124 ; O2 - |
2305 DISPLAYTEXT .125 ; He + | 2305 DISPLAYTEXT .125 ; He + |
2306 DISPLAYTEXT .126 ; He - | 2306 DISPLAYTEXT .126 ; He - |
2307 DISPLAYTEXTH d'300' ; Active? (Enable/Disable Gas underwater) | |
2307 return | 2308 return |
2308 | 2309 |
2309 PLED_divemode_simulator_mask: | 2310 PLED_divemode_simulator_mask: |
2310 call PLED_standard_color | 2311 call PLED_standard_color |
2311 DISPLAYTEXT .254 ; Close | 2312 DISPLAYTEXT .254 ; Close |
2486 PLED_decoplan_99: | 2487 PLED_decoplan_99: |
2487 bsf last_ceiling_gf_shown ; Nothing more in table to display. | 2488 bsf last_ceiling_gf_shown ; Nothing more in table to display. |
2488 rcall PLED_decoplan_clear_bottom ; Clear from next line | 2489 rcall PLED_decoplan_clear_bottom ; Clear from next line |
2489 return | 2490 return |
2490 ;----------------------------------------------------------------------------- | 2491 ;----------------------------------------------------------------------------- |
2491 PLED_gas_list: | 2492 |
2492 ostc_debug 'm' ; Sends debug-information to screen if debugmode active | 2493 PLED_de_activelist: ; show (de)active gaslist |
2494 call PLED_standard_color | |
2495 DISPLAYTEXT .254 ; Close | |
2493 | 2496 |
2494 WIN_LEFT .100 | 2497 WIN_LEFT .100 |
2495 WIN_FONT FT_SMALL | 2498 WIN_FONT FT_SMALL |
2496 bsf leftbind | 2499 bsf leftbind |
2497 | 2500 |
2498 movlw d'2' | 2501 movlw d'2' |
2499 movwf wait_temp ; here: stores eeprom address for gas list | 2502 movwf wait_temp ; here: stores eeprom address for gas list |
2500 movlw d'231' | 2503 movlw d'0' |
2501 movwf waitms_temp ; here: stores row for gas list | 2504 movwf waitms_temp ; here: stores row for gas list |
2502 clrf hi ; here: Gas counter | 2505 clrf hi ; here: Gas counter |
2503 | 2506 |
2504 PLED_gas_list_loop: | 2507 PLED_de_activelist_loop: |
2505 incf hi,F ; Increase Gas | 2508 incf hi,F ; Increase Gas |
2506 movlw d'4' | 2509 movlw d'4' |
2507 addwf wait_temp,F ; Increase eeprom address for gas list | 2510 addwf wait_temp,F ; Increase eeprom address for gas list |
2508 movlw d'25' | 2511 movlw d'25' |
2509 addwf waitms_temp,F ; Increase row | 2512 addwf waitms_temp,F ; Increase row |
2528 call read_eeprom ; get byte (stored in EEDATA) | 2531 call read_eeprom ; get byte (stored in EEDATA) |
2529 PLED_color_code warn_gas_in_gaslist ; Color-code output (%O2 in "EEDATA") | 2532 PLED_color_code warn_gas_in_gaslist ; Color-code output (%O2 in "EEDATA") |
2530 ; Check if gas needs to be greyed-out (inactive) | 2533 ; Check if gas needs to be greyed-out (inactive) |
2531 read_int_eeprom d'27' ; read flag register | 2534 read_int_eeprom d'27' ; read flag register |
2532 movff hi,lo ; copy gas number | 2535 movff hi,lo ; copy gas number |
2536 PLED_de_activelist_loop1: | |
2537 rrcf EEDATA ; roll flags into carry | |
2538 decfsz lo,F ; max. 5 times... | |
2539 bra PLED_de_activelist_loop1 | |
2540 | |
2541 movlw color_grey | |
2542 btfss STATUS,C ; test carry | |
2543 call PLED_set_color ; grey out inactive gases! | |
2544 | |
2545 call word_processor | |
2546 call PLED_standard_color | |
2547 | |
2548 movlw d'5' ; list all five gases | |
2549 cpfseq hi ; All gases shown? | |
2550 bra PLED_de_activelist_loop ; No | |
2551 | |
2552 return ; return | |
2553 | |
2554 | |
2555 PLED_gas_list: | |
2556 ostc_debug 'm' ; Sends debug-information to screen if debugmode active | |
2557 | |
2558 WIN_LEFT .100 | |
2559 WIN_FONT FT_SMALL | |
2560 bsf leftbind | |
2561 | |
2562 movlw d'2' | |
2563 movwf wait_temp ; here: stores eeprom address for gas list | |
2564 movlw d'231' | |
2565 movwf waitms_temp ; here: stores row for gas list | |
2566 clrf hi ; here: Gas counter | |
2567 | |
2568 PLED_gas_list_loop: | |
2569 incf hi,F ; Increase Gas | |
2570 movlw d'4' | |
2571 addwf wait_temp,F ; Increase eeprom address for gas list | |
2572 movlw d'25' | |
2573 addwf waitms_temp,F ; Increase row | |
2574 WIN_LEFT .100 | |
2575 movff waitms_temp,win_top ; Set Row | |
2576 | |
2577 STRCPY "G" | |
2578 movff hi,lo ; copy gas number | |
2579 output_8 ; display gas number | |
2580 PUTC ':' | |
2581 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM | |
2582 call read_eeprom ; get byte (stored in EEDATA) | |
2583 movff EEDATA,lo ; copy to lo | |
2584 output_8 ; outputs into Postinc2! | |
2585 PUTC '/' | |
2586 incf EEADR,F ; Gas #hi: %He - Set address in internal EEPROM | |
2587 call read_eeprom ; get byte (stored in EEDATA) | |
2588 movff EEDATA,lo ; copy to lo | |
2589 output_8 ; outputs into Postinc2! | |
2590 | |
2591 decf EEADR,F ; Gas #hi: %O2 - Set address in internal EEPROM | |
2592 call read_eeprom ; get byte (stored in EEDATA) | |
2593 PLED_color_code warn_gas_in_gaslist ; Color-code output (%O2 in "EEDATA") | |
2594 ; Check if gas needs to be greyed-out (inactive) | |
2595 read_int_eeprom d'27' ; read flag register | |
2596 movff hi,lo ; copy gas number | |
2533 PLED_gas_list_loop1: | 2597 PLED_gas_list_loop1: |
2534 rrcf EEDATA ; roll flags into carry | 2598 rrcf EEDATA ; roll flags into carry |
2535 decfsz lo,F ; max. 5 times... | 2599 decfsz lo,F ; max. 5 times... |
2536 bra PLED_gas_list_loop1 | 2600 bra PLED_gas_list_loop1 |
2537 | 2601 |
2544 | 2608 |
2545 movlw d'5' ; list all five gases | 2609 movlw d'5' ; list all five gases |
2546 cpfseq hi ; All gases shown? | 2610 cpfseq hi ; All gases shown? |
2547 bra PLED_gas_list_loop ; No | 2611 bra PLED_gas_list_loop ; No |
2548 | 2612 |
2549 DISPLAYTEXT d'122' ; Gas 6.. | 2613 DISPLAYTEXT d'122' ; Gas 6.. |
2550 | |
2551 return ; return (OC mode) | 2614 return ; return (OC mode) |
2552 | 2615 |
2553 PLED_splist_start: | 2616 PLED_splist_start: |
2554 WIN_LEFT .100 | 2617 WIN_LEFT .100 |
2555 WIN_FONT FT_SMALL | 2618 WIN_FONT FT_SMALL |
2617 movlw d'75' | 2680 movlw d'75' |
2618 dcfsnz temp1,F | 2681 dcfsnz temp1,F |
2619 movlw d'100' | 2682 movlw d'100' |
2620 dcfsnz temp1,F | 2683 dcfsnz temp1,F |
2621 movlw d'125' | 2684 movlw d'125' |
2685 | |
2622 movff WREG,win_top | 2686 movff WREG,win_top |
2623 | |
2624 STRCPY_PRINT "\xB7" ; Cursor | 2687 STRCPY_PRINT "\xB7" ; Cursor |
2625 return | 2688 return |
2626 | 2689 |
2627 | 2690 |
2628 ;============================================================================= | 2691 ;============================================================================= |