Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 221:448478ceccea
new sorted_gaslist_active flag register
author | heinrichsweikamp |
---|---|
date | Tue, 01 Mar 2011 11:48:11 +0100 |
parents | b6dd54b3567c |
children | 2a0a446fa6c0 |
comparison
equal
deleted
inserted
replaced
220:3cf6649e89ac | 221:448478ceccea |
---|---|
2496 | 2496 |
2497 WIN_LEFT .100 | 2497 WIN_LEFT .100 |
2498 WIN_FONT FT_SMALL | 2498 WIN_FONT FT_SMALL |
2499 bsf leftbind | 2499 bsf leftbind |
2500 | 2500 |
2501 movlw d'2' | 2501 movlw d'92' |
2502 movwf wait_temp ; here: stores eeprom address for gas list | 2502 movwf wait_temp ; here: stores eeprom address for gas list |
2503 movlw d'0' | 2503 movlw d'0' |
2504 movwf waitms_temp ; here: stores row for gas list | 2504 movwf waitms_temp ; here: stores row for gas list |
2505 clrf hi ; here: Gas counter | 2505 clrf hi ; here: Gas counter |
2506 | 2506 |
2511 movlw d'25' | 2511 movlw d'25' |
2512 addwf waitms_temp,F ; Increase row | 2512 addwf waitms_temp,F ; Increase row |
2513 WIN_LEFT .100 | 2513 WIN_LEFT .100 |
2514 movff waitms_temp,win_top ; Set Row | 2514 movff waitms_temp,win_top ; Set Row |
2515 | 2515 |
2516 STRCPY "G" | 2516 lfsr FSR2,letter |
2517 movff hi,lo ; copy gas number | |
2518 output_8 ; display gas number | |
2519 PUTC ':' | |
2520 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM | 2517 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM |
2521 call read_eeprom ; get byte (stored in EEDATA) | 2518 call read_eeprom ; get byte (stored in EEDATA) |
2522 movff EEDATA,lo ; copy to lo | 2519 movff EEDATA,lo ; copy to lo |
2523 output_8 ; outputs into Postinc2! | 2520 output_8 ; outputs into Postinc2! |
2524 PUTC '/' | 2521 PUTC '/' |
2525 incf EEADR,F ; Gas #hi: %He - Set address in internal EEPROM | 2522 incf EEADR,F ; Gas #hi: %He - Set address in internal EEPROM |
2526 call read_eeprom ; get byte (stored in EEDATA) | 2523 call read_eeprom ; get byte (stored in EEDATA) |
2527 movff EEDATA,lo ; copy to lo | 2524 movff EEDATA,lo ; copy to lo |
2528 output_8 ; outputs into Postinc2! | 2525 output_8 ; outputs into Postinc2! |
2529 | 2526 PUTC '@' |
2530 decf EEADR,F ; Gas #hi: %O2 - Set address in internal EEPROM | 2527 |
2528 movlw d'117' | |
2529 addwf hi,W | |
2530 movwf EEADR ; Point to Change depth | |
2531 | |
2531 call read_eeprom ; get byte (stored in EEDATA) | 2532 call read_eeprom ; get byte (stored in EEDATA) |
2532 PLED_color_code warn_gas_in_gaslist ; Color-code output (%O2 in "EEDATA") | 2533 movff EEDATA,lo ; copy to lo |
2534 output_8 ; outputs into Postinc2! | |
2535 | |
2536 ; call PLED_standard_color | |
2537 | |
2533 ; Check if gas needs to be greyed-out (inactive) | 2538 ; Check if gas needs to be greyed-out (inactive) |
2534 read_int_eeprom d'27' ; read flag register | 2539 movff sorted_gaslist_active,EEDATA ; Get flag register |
2535 movff hi,lo ; copy gas number | 2540 movff hi,lo ; copy gas number |
2536 PLED_de_activelist_loop1: | 2541 PLED_de_activelist_loop1: |
2537 rrcf EEDATA ; roll flags into carry | 2542 rrcf EEDATA ; roll flags into carry |
2538 decfsz lo,F ; max. 5 times... | 2543 decfsz lo,F ; max. 5 times... |
2539 bra PLED_de_activelist_loop1 | 2544 bra PLED_de_activelist_loop1 |
2540 | 2545 |
2541 movlw color_grey | 2546 movlw color_grey |
2542 btfss STATUS,C ; test carry | 2547 btfss STATUS,C ; test carry |
2543 call PLED_set_color ; grey out inactive gases! | 2548 call PLED_set_color ; grey out inactive gases! |
2544 | 2549 |
2550 dcfsnz hi,W ; First in List? | |
2551 call PLED_standard_color | |
2552 | |
2545 call word_processor | 2553 call word_processor |
2546 call PLED_standard_color | 2554 call PLED_standard_color |
2547 | 2555 |
2548 movlw d'5' ; list all five gases | 2556 movlw d'5' ; list all five gases |
2549 cpfseq hi ; All gases shown? | 2557 cpfseq hi ; All gases shown? |