Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 286:5351d47ee28a
Active gas flags simplified
author | heinrichsweikamp |
---|---|
date | Wed, 20 Apr 2011 07:51:11 +0200 |
parents | 8874b6cd8f36 |
children | 5f2fe81fde9f |
comparison
equal
deleted
inserted
replaced
285:8874b6cd8f36 | 286:5351d47ee28a |
---|---|
2538 | 2538 |
2539 WIN_LEFT .100 | 2539 WIN_LEFT .100 |
2540 WIN_FONT FT_SMALL | 2540 WIN_FONT FT_SMALL |
2541 bsf leftbind | 2541 bsf leftbind |
2542 | 2542 |
2543 ; movlw d'92' ; old sorted list | |
2544 movlw d'2' | 2543 movlw d'2' |
2545 movwf wait_temp ; here: stores eeprom address for gas list | 2544 movwf wait_temp ; here: stores eeprom address for gas list |
2546 movlw d'0' | 2545 movlw d'0' |
2547 movwf waitms_temp ; here: stores row for gas list | 2546 movwf waitms_temp ; here: stores row for gas list |
2548 clrf hi ; here: Gas counter | 2547 clrf hi ; here: Gas counter |
2566 call read_eeprom ; get byte (stored in EEDATA) | 2565 call read_eeprom ; get byte (stored in EEDATA) |
2567 movff EEDATA,lo ; copy to lo | 2566 movff EEDATA,lo ; copy to lo |
2568 output_8 ; outputs into Postinc2! | 2567 output_8 ; outputs into Postinc2! |
2569 PUTC '@' | 2568 PUTC '@' |
2570 | 2569 |
2571 ; movlw d'117' ; old sorted list | |
2572 movlw d'27' | 2570 movlw d'27' |
2573 addwf hi,W | 2571 addwf hi,W |
2574 movwf EEADR ; Point to Change depth | 2572 movwf EEADR ; Point to Change depth |
2575 | 2573 |
2576 call read_eeprom ; get byte (stored in EEDATA) | 2574 call read_eeprom ; get byte (stored in EEDATA) |
2577 movff EEDATA,lo ; copy to lo | 2575 movff EEDATA,lo ; copy to lo |
2578 output_8 ; outputs into Postinc2! | 2576 output_8 ; outputs into Postinc2! |
2579 | 2577 |
2580 ; call PLED_standard_color | |
2581 | |
2582 ; Check if gas needs to be greyed-out (inactive) | 2578 ; Check if gas needs to be greyed-out (inactive) |
2583 movff sorted_gaslist_active,EEDATA ; Get flag register | 2579 movff sorted_gaslist_active,EEDATA ; Get flag register |
2584 movff hi,lo ; copy gas number | 2580 movff hi,lo ; copy gas number |
2585 PLED_de_activelist_loop1: | 2581 PLED_de_activelist_loop1: |
2586 rrcf EEDATA ; roll flags into carry | 2582 rrcf EEDATA ; roll flags into carry |
2588 bra PLED_de_activelist_loop1 | 2584 bra PLED_de_activelist_loop1 |
2589 | 2585 |
2590 movlw color_grey | 2586 movlw color_grey |
2591 btfss STATUS,C ; test carry | 2587 btfss STATUS,C ; test carry |
2592 call PLED_set_color ; grey out inactive gases! | 2588 call PLED_set_color ; grey out inactive gases! |
2593 | |
2594 dcfsnz hi,W ; First in List? | |
2595 call PLED_standard_color | |
2596 | 2589 |
2597 call word_processor | 2590 call word_processor |
2598 call PLED_standard_color | 2591 call PLED_standard_color |
2599 | 2592 |
2600 movlw d'5' ; list all five gases | 2593 movlw d'5' ; list all five gases |