comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 64:e8756eba54ee

1.71beta - more deco
author heinrichsweikamp
date Sat, 02 Oct 2010 23:34:08 +0200
parents fee7c62b4de1
children 5ad68065e4e6
comparison
equal deleted inserted replaced
63:fee7c62b4de1 64:e8756eba54ee
695 movlw 0xB8 695 movlw 0xB8
696 movwf POSTINC2 696 movwf POSTINC2
697 call word_processor 697 call word_processor
698 698
699 WIN_TOP .65 699 WIN_TOP .65
700 WIN_LEFT .0
701 WIN_FONT FT_SMALL
702 WIN_INVERT .0 ; Init new Wordprocessor
703
704 lfsr FSR2,letter 700 lfsr FSR2,letter
705 movlw 0xB8 701 movlw 0xB8
706 movwf POSTINC2 702 movwf POSTINC2
707 call word_processor 703 call word_processor
708 704
709 WIN_TOP .95 705 WIN_TOP .95
710 WIN_LEFT .0
711 WIN_FONT FT_SMALL
712 WIN_INVERT .0 ; Init new Wordprocessor
713
714 lfsr FSR2,letter 706 lfsr FSR2,letter
715 movlw 0xB8 707 movlw 0xB8
716 movwf POSTINC2 708 movwf POSTINC2
717 call word_processor 709 call word_processor
718 710
719 WIN_TOP .125 711 WIN_TOP .125
720 WIN_LEFT .0
721 WIN_FONT FT_SMALL
722 WIN_INVERT .0 ; Init new Wordprocessor
723
724 lfsr FSR2,letter 712 lfsr FSR2,letter
725 movlw 0xB8 713 movlw 0xB8
726 movwf POSTINC2 714 movwf POSTINC2
727 call word_processor 715 call word_processor
728 716
729 WIN_TOP .155 717 WIN_TOP .155
730 WIN_LEFT .0 718 call PLED_standard_color
731 WIN_FONT FT_SMALL
732 WIN_INVERT .0 ; Init new Wordprocessor
733 call PLED_standard_color
734
735 lfsr FSR2,letter 719 lfsr FSR2,letter
736 movlw 0xB8 720 movlw 0xB8
737 movwf POSTINC2 721 movwf POSTINC2
738 call word_processor 722 call word_processor
739 723
740 WIN_TOP .185 724 WIN_TOP .185
741 WIN_LEFT .0
742 WIN_FONT FT_SMALL
743 WIN_INVERT .0 ; Init new Wordprocessor
744
745 lfsr FSR2,letter 725 lfsr FSR2,letter
746 movlw 0xB8 726 movlw 0xB8
747 movwf POSTINC2 727 movwf POSTINC2
748 call word_processor 728 call word_processor
749 729
760 movlw d'155' 740 movlw d'155'
761 dcfsnz temp1,F 741 dcfsnz temp1,F
762 movlw d'185' 742 movlw d'185'
763 743
764 movff WREG,win_top 744 movff WREG,win_top
765 WIN_LEFT .0
766 WIN_FONT FT_SMALL
767 WIN_INVERT .0 ; Init new Wordprocessor
768
769 lfsr FSR2,letter 745 lfsr FSR2,letter
770 movlw 0xB7 746 movlw 0xB7
771 movwf POSTINC2 747 movwf POSTINC2
772 call word_processor 748 call word_processor
773 return 749 return
1274 ; list three SP in Gaslist 1250 ; list three SP in Gaslist
1275 movlw d'35' ; 36 = current SP position in EEPROM 1251 movlw d'35' ; 36 = current SP position in EEPROM
1276 movwf wait_temp ; here: stores eeprom address for gas list 1252 movwf wait_temp ; here: stores eeprom address for gas list
1277 movlw d'0' 1253 movlw d'0'
1278 movwf waitms_temp ; here: stores row for gas list 1254 movwf waitms_temp ; here: stores row for gas list
1279 clrf temp5 ; here: SP counter 1255 clrf temp6 ; here: SP counter
1280 1256
1281 PLED_pre_dive_screen3_loop: 1257 PLED_pre_dive_screen3_loop:
1282 incf wait_temp,F ; EEPROM address 1258 incf wait_temp,F ; EEPROM address
1283 incf temp5,F ; Increase SP 1259 incf temp6,F ; Increase SP
1284 1260
1285 movlw d'25' 1261 movlw d'25'
1286 addwf waitms_temp,F ; Increase row 1262 addwf waitms_temp,F ; Increase row
1287 WIN_LEFT .90 1263 WIN_LEFT .90
1288 movff waitms_temp,win_top ; Set Row 1264 movff waitms_temp,win_top ; Set Row
1290 lfsr FSR2,letter 1266 lfsr FSR2,letter
1291 movlw 'S' 1267 movlw 'S'
1292 movwf POSTINC2 1268 movwf POSTINC2
1293 movlw 'P' 1269 movlw 'P'
1294 movwf POSTINC2 1270 movwf POSTINC2
1295 movff temp5,lo ; copy gas number 1271 movff temp6,lo ; copy gas number
1296 output_8 ; display gas number 1272 output_8 ; display gas number
1297 movlw ':' 1273 movlw ':'
1298 movwf POSTINC2 1274 movwf POSTINC2
1299 movlw ' ' 1275 movlw ' '
1300 movwf POSTINC2 1276 movwf POSTINC2
1304 clrf hi 1280 clrf hi
1305 output_16dp d'3' ; outputs into Postinc2! 1281 output_16dp d'3' ; outputs into Postinc2!
1306 call word_processor 1282 call word_processor
1307 1283
1308 movlw d'3' ; list all three SP 1284 movlw d'3' ; list all three SP
1309 cpfseq temp5 ; All gases shown? 1285 cpfseq temp6 ; All gases shown?
1310 bra PLED_pre_dive_screen3_loop ;no 1286 bra PLED_pre_dive_screen3_loop ;no
1311 1287
1312 read_int_eeprom d'33' ; Read byte (stored in EEDATA) 1288 read_int_eeprom d'33' ; Read byte (stored in EEDATA)
1313 movff EEDATA,active_gas ; Read start gas (1-5) 1289 movff EEDATA,active_gas ; Read start gas (1-5)
1314 decf active_gas,W ; Gas 0-4 1290 decf active_gas,W ; Gas 0-4
2406 DISPLAYTEXT .252 ; +10m 2382 DISPLAYTEXT .252 ; +10m
2407 DISPLAYTEXT .253 ; -10m 2383 DISPLAYTEXT .253 ; -10m
2408 return 2384 return
2409 2385
2410 PLED_decoplan_bargraph: 2386 PLED_decoplan_bargraph:
2411 GETCUSTOM8 d'35' ; Standard output color 2387 GETCUSTOM8 d'35' ; Standard output color
2412 movff WREG,box_temp+0 ; Data 2388 movff WREG,box_temp+0 ; Data
2413 incf win_top,F ; +1 2389 incf win_top,F ; +1
2414 movff win_top,box_temp+1 ; row top (0-239) 2390 movff win_top,box_temp+1 ; row top (0-239)
2415 movff win_top,box_temp+2 ; 2391 movff win_top,box_temp+2 ;
2416 movlw d'18' 2392 movlw d'18'
2417 addwf box_temp+2,F ; row bottom (0-239) 2393 addwf box_temp+2,F ; row bottom (0-239)
2418 movlw .122 2394 movlw .122
2419 movff WREG,box_temp+3 ; column left (0-159) 2395 movff WREG,box_temp+3 ; column left (0-159)
2420 addwf lo,F ; Add time offset 2396 addwf lo,F ; Add time offset
2421 decf lo,F ; minus one 2397 btfsc STATUS,C ; >255?
2398 setf lo ; limit to 255
2399 decf lo,F ; No, minus one
2422 movlw d'138' ; Limit length (16min) 2400 movlw d'138' ; Limit length (16min)
2423 cpfslt lo 2401 cpfslt lo
2424 movwf lo 2402 movwf lo
2425 movff lo,box_temp+4 ; column right (0-159) 2403 movff lo,box_temp+4 ; column right (0-159)
2426 call PLED_box 2404 call PLED_box
2439 return 2417 return
2440 2418
2441 PLED_decoplan_delete: ; Delete unused rows 2419 PLED_decoplan_delete: ; Delete unused rows
2442 movlw .0 2420 movlw .0
2443 movff WREG,box_temp+0 ; data 00, x0, 0y, xy clear, links, rechts, beide 2421 movff WREG,box_temp+0 ; data 00, x0, 0y, xy clear, links, rechts, beide
2444 2422 movff hi,box_temp+1 ; row top (0-239)
2445 movff hi,box_temp+1 ; row top (0-63) 2423 movlw .183
2446 movlw .125 2424 movff WREG,box_temp+2 ; row bottom (0-239)
2447 movff WREG,box_temp+2 ; row bottom (0-63)
2448 movlw .100 2425 movlw .100
2449 movff WREG,box_temp+3 ; column left (0-159) 2426 movff WREG,box_temp+3 ; column left (0-159)
2450 movlw .159 2427 movlw .159
2451 movff WREG,box_temp+4 ; column right (0-159) 2428 movff WREG,box_temp+4 ; column right (0-159)
2452 call PLED_box 2429 call PLED_box
2453 return 2430 bsf last_ceiling_gf_shown ; Set flag
2431 return
2432
2433 PLED_decoplan_gf_page_current:
2434 movlw d'0'
2435 cpfseq temp8
2436 bra PLED_decoplan_gf_page_current0 ;
2437 bra PLED_decoplan_gf_page1 ; =0, Display Page 1
2438 PLED_decoplan_gf_page_current0:
2439 movlw d'1'
2440 cpfseq temp8
2441 bra PLED_decoplan_gf_page_current1
2442 bra PLED_decoplan_gf_page2 ; =1: Dispplay Page 2
2443 PLED_decoplan_gf_page_current1:
2444 movlw d'2'
2445 cpfseq temp8
2446 bra PLED_decoplan_gf_page4 ; >2: Display Page 4
2447 bra PLED_decoplan_gf_page3 ; =1: Dispplay Page 3
2448
2449 PLED_decoplan_gf_page1:
2450 ostc_debug 'n' ; Sends debug-information to screen if debugmode active
2451
2452 movff char_O_array_decodepth+0,lo ; Get Depth
2453 tstfsz lo
2454 bra PLED_decoplan_gf_page1x
2455 ; No Deco, show "no Deco"
2456 DISPLAYTEXT d'239' ;"No Deco"
2457 return
2458
2459 PLED_decoplan_gf_page4:
2460 ; temp7 holds last displayed depth
2461 ; temp5 list entry
2462 movlw .231
2463 movwf temp6 ; row
2464 movff temp5,temp9 ; save
2465 movff temp7,temp10 ; save
2466 PLED_decoplan_gf_page4y:
2467 movlw d'3'
2468 addwf temp7,F ; Add 3m for next stop
2469 movlw d'25'
2470 addwf temp6,F
2471 incf temp5,F
2472 call PLED_decoplan_show_stop_gf
2473 movlw d'23' ; Stops 18-23
2474 cpfseq temp5
2475 bra PLED_decoplan_gf_page4y
2476 movff temp9,temp5 ; restore
2477 movff temp10,temp7 ; restore
2478 bsf last_ceiling_gf_shown ; Set flag
2479 return
2480
2481 PLED_decoplan_gf_page3:
2482 ; temp7 holds last displayed depth
2483 ; temp5 list entry
2484 movff temp5,temp9 ; save
2485 movff temp7,temp10 ; save
2486 movlw .231
2487 movwf temp6 ; row
2488 PLED_decoplan_gf_page3y:
2489 movlw d'3'
2490 addwf temp7,F ; Add 3m for next stop
2491 movlw d'25'
2492 addwf temp6,F
2493 incf temp5,F
2494 call PLED_decoplan_show_stop_gf
2495 movlw d'17' ; Stops 12-17
2496 cpfseq temp5
2497 bra PLED_decoplan_gf_page3y
2498 movff temp9,temp5 ; restore
2499 movff temp10,temp7 ; restore
2500 return
2501
2502 PLED_decoplan_gf_page2:
2503 ; temp7 holds last displayed depth
2504 ; temp5 list entry
2505 movff temp5,temp9 ; save
2506 movff temp7,temp10 ; save
2507 movlw .231
2508 movwf temp6 ; row
2509 PLED_decoplan_gf_page2y:
2510 movlw d'3'
2511 addwf temp7,F ; Add 3m for next stop
2512 movlw d'25'
2513 addwf temp6,F
2514 incf temp5,F
2515 call PLED_decoplan_show_stop_gf
2516 movlw d'11' ; Stops 6-11
2517 cpfseq temp5
2518 bra PLED_decoplan_gf_page2y
2519 movff temp9,temp5 ; restore
2520 movff temp10,temp7 ; restore
2521 return
2522
2523 PLED_decoplan_gf_page1x:
2524 clrf temp8 ; Page 0-3 of deco list
2525 GETCUSTOM8 d'29' ; Last Deco in m
2526 movwf temp7 ; Start with last stop
2527 setf temp5
2528 movlw .231
2529 movwf temp6 ; row
2530
2531 ; Show last stop manually
2532 movlw d'25'
2533 addwf temp6,F
2534 incf temp5,F
2535 call PLED_decoplan_show_stop_gf
2536 GETCUSTOM8 d'29' ; Last Deco in m
2537 movwf temp7 ; Last deco
2538 movlw d'3'
2539 cpfsgt temp3 ; >3m?
2540 bra PLED_decoplan_gf_page1x_next_6m
2541 movwf temp7
2542 bra PLED_decoplan_gf_page1y
2543
2544 PLED_decoplan_gf_page1x_next_6m:
2545 movlw d'6'
2546 movwf temp7
2547 PLED_decoplan_gf_page1y:
2548 movlw d'3'
2549 addwf temp7,F ; Add 3m for next stop
2550 movlw d'25'
2551 addwf temp6,F
2552 incf temp5,F
2553 call PLED_decoplan_show_stop_gf
2554 movlw d'5' ; 6 Stops...
2555 cpfseq temp5
2556 bra PLED_decoplan_gf_page1y
2557 return
2558
2559 PLED_decoplan_show_stop_gf:
2560 bsf leftbind
2561 WIN_LEFT .100
2562 movff temp6,win_top
2563 movff temp6,hi ; copy for PLED_decoplan_bargraph
2564
2565 movff char_O_array_decodepth+0,WREG ; Ceiling
2566 cpfslt temp7 ; Ceiling already displayed?
2567 goto PLED_decoplan_delete ; Yes, quit display and RETURN
2568 movff temp7,lo ; Decodepth
2569
2570 lfsr FSR2,letter
2571 output_8 ; outputs into Postinc2!
2572 movlw 'm'
2573 movwf POSTINC2
2574 call word_processor
2575 WIN_LEFT .140
2576 movff temp6,win_top
2577 lfsr FSR1,0x251
2578 movf temp5,W ; number of entry
2579 movff PLUSW1,lo
2580 lfsr FSR2,letter
2581 output_99x ; outputs into Postinc2!
2582 movlw d'39' ;"'"
2583 movwf POSTINC2
2584 call word_processor
2585 tstfsz lo ; 0 min "Stop"?
2586 rcall PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth
2587 return
2588
2454 2589
2455 PLED_decoplan: ; display the Decoplan 2590 PLED_decoplan: ; display the Decoplan
2456 ostc_debug 'n' ; Sends debug-information to screen if debugmode active 2591 ostc_debug 'n' ; Sends debug-information to screen if debugmode active
2457 2592
2458 movff char_O_array_decodepth+0,lo ; Get Depth 2593 movff char_O_array_decodepth+0,lo ; Get Depth
2459 tstfsz lo 2594 tstfsz lo
2460 bra PLED_decoplan1 2595 bra PLED_decoplan1
2461 ; No Deco, show "no Deco" 2596 ; No Deco, show "no Deco"
2462 call PLED_clear_divemode_menu ; Clear Deco area 2597 ; call PLED_clear_divemode_menu ; Clear Deco area
2463 DISPLAYTEXT d'239' ;"No Deco" 2598 DISPLAYTEXT d'239' ;"No Deco"
2464 return 2599 return
2465 2600
2466 PLED_decoplan1: 2601 PLED_decoplan1:
2467 setf temp5 2602 setf temp5
2506 lfsr FSR2,letter 2641 lfsr FSR2,letter
2507 output_99x ; outputs into Postinc2! 2642 output_99x ; outputs into Postinc2!
2508 movlw d'39' ;"'" 2643 movlw d'39' ;"'"
2509 movwf POSTINC2 2644 movwf POSTINC2
2510 call word_processor 2645 call word_processor
2511 call PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth 2646 tstfsz lo ; 0 min "Stop"?
2512 return 2647 rcall PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth
2513 2648 return
2514 ; WIN_LEFT .100 2649
2515 ; movlw .025 2650
2516 ; movff WREG,win_top
2517 ; movwf hi ; copy for PLED_decoplan_bargraph
2518 ; call PLED_SetRow ; Set Row
2519 ; lfsr FSR2,letter
2520 ; movff char_O_array_decodepth+1,lo ; Get Depth
2521 ; movf lo,w
2522 ; btfsc STATUS,Z ; =0
2523 ; goto PLED_decoplan_delete ; Yes, quit display
2524 ; output_8 ; outputs into Postinc2!
2525 ; movlw 'm'
2526 ; movwf POSTINC2
2527 ; call word_processor
2528 ; WIN_LEFT .140
2529 ; movlw .025
2530 ; movff WREG,win_top
2531 ; lfsr FSR2,letter
2532 ; movff char_O_array_decotime+1,lo ; Get length for this stop
2533 ; output_99x ; outputs into Postinc2!
2534 ; movlw d'39' ;"'"
2535 ; movwf POSTINC2
2536 ; call word_processor
2537 ; call PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth
2538 ;
2539 ; WIN_LEFT .100
2540 ; movlw .050
2541 ; movff WREG,win_top
2542 ; movwf hi ; copy for PLED_decoplan_bargraph
2543 ; call PLED_SetRow ; Set Row
2544 ; lfsr FSR2,letter
2545 ; movff char_O_array_decodepth+2,lo ; Get Depth
2546 ; movf lo,w
2547 ; btfsc STATUS,Z ; =0
2548 ; goto PLED_decoplan_delete ; Yes, quit display
2549 ; output_8 ; outputs into Postinc2!
2550 ; movlw 'm'
2551 ; movwf POSTINC2
2552 ; call word_processor
2553 ; WIN_LEFT .140
2554 ; movlw .050
2555 ; movff WREG,win_top
2556 ; lfsr FSR2,letter
2557 ; movff char_O_array_decotime+2,lo ; Get length for this stop
2558 ; output_99x ; outputs into Postinc2!
2559 ; movlw d'39' ;"'"
2560 ; movwf POSTINC2
2561 ; call word_processor
2562 ; call PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth
2563 ;
2564 ; WIN_LEFT .100
2565 ; movlw .075
2566 ; movff WREG,win_top
2567 ; movwf hi ; copy for PLED_decoplan_bargraph
2568 ; call PLED_SetRow ; Set Row
2569 ; lfsr FSR2,letter
2570 ; movff char_O_array_decodepth+3,lo ; Get Depth
2571 ; movf lo,w
2572 ; btfsc STATUS,Z ; =0
2573 ; goto PLED_decoplan_delete ; Yes, quit display
2574 ; output_8 ; outputs into Postinc2!
2575 ; movlw 'm'
2576 ; movwf POSTINC2
2577 ; call word_processor
2578 ; WIN_LEFT .140
2579 ; movlw .075
2580 ; movff WREG,win_top
2581 ; lfsr FSR2,letter
2582 ; movff char_O_array_decotime+3,lo ; Get length for this stop
2583 ; output_99x ; outputs into Postinc2!
2584 ; movlw d'39' ;"'"
2585 ; movwf POSTINC2
2586 ; call word_processor
2587 ; call PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth
2588 ;
2589 ; WIN_LEFT .100
2590 ; movlw .100
2591 ; movff WREG,win_top
2592 ; movwf hi ; copy for PLED_decoplan_bargraph
2593 ; call PLED_SetRow ; Set Row
2594 ; lfsr FSR2,letter
2595 ; movff char_O_array_decodepth+4,lo ; Get Depth
2596 ; movf lo,w
2597 ; btfsc STATUS,Z ; =0
2598 ; goto PLED_decoplan_delete ; Yes, quit display
2599 ; output_8 ; outputs into Postinc2!
2600 ; movlw 'm'
2601 ; movwf POSTINC2
2602 ; call word_processor
2603 ; WIN_LEFT .140
2604 ; movlw .100
2605 ; movff WREG,win_top
2606 ; lfsr FSR2,letter
2607 ; movff char_O_array_decotime+4,lo ; Get length for this stop
2608 ; output_99x ; outputs into Postinc2!
2609 ; movlw d'39' ;"'"
2610 ; movwf POSTINC2
2611 ; call word_processor
2612 ; call PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth
2613 ; return
2614 ;
2615 PLED_gas_list: 2651 PLED_gas_list:
2616 ostc_debug 'm' ; Sends debug-information to screen if debugmode active 2652 ostc_debug 'm' ; Sends debug-information to screen if debugmode active
2617 2653
2618 WIN_LEFT .100 2654 WIN_LEFT .100
2619 WIN_FONT FT_SMALL 2655 WIN_FONT FT_SMALL
3477 ; movff hi,lo 3513 ; movff hi,lo
3478 ; output_8 3514 ; output_8
3479 ; call word_processor 3515 ; call word_processor
3480 ; return 3516 ; return
3481 3517
3482
3483 PLED_MultiGF_deco_mask:
3484 movlw .0
3485 movff WREG,box_temp+0 ; Data
3486 movlw .0
3487 movff WREG,box_temp+1 ; row top (0-239)
3488 movlw .239
3489 movff WREG,box_temp+2 ; row bottom (0-239)
3490 movlw .082
3491 movff WREG,box_temp+3 ; column left (0-159)
3492 movlw .159
3493 movff WREG,box_temp+4 ; column right (0-159)
3494 call PLED_box
3495 return
3496
3497 PLED_MultiGF_deco_all:
3498 movff char_O_actual_pointer,wait_temp
3499 movff char_O_GF_low_pointer,waitms_temp
3500 movf waitms_temp,F
3501 bz PLED_MultiGF_no_deco
3502 call PLED_MultiGF_table ; input wait_temp
3503 return
3504
3505 PLED_MultiGF_no_deco:
3506 DISPLAYTEXT d'242' ;"no deco"
3507 return
3508
3509 PLED_MultiGF_table:
3510 movlw d'9'
3511 movwf temp5 ; number of stops
3512 movlw .231
3513 movwf temp6 ; row
3514 lfsr FSR1,char_IO_deco_table+0
3515
3516 PLED_MultiGF_table2:
3517 movlw d'25'
3518 addwf temp6,F
3519 call PLED_MultiGF_show_stop
3520 decfsz temp5,F
3521 bra PLED_MultiGF_table2
3522 return
3523
3524 PLED_MultiGF_show_stop:
3525 bsf leftbind
3526 WIN_LEFT .100
3527 movff temp6,win_top
3528 movff temp6,hi ; copy for PLED_decoplan_bargraph
3529 ; call PLED_SetRow ; Set Row
3530
3531
3532 movff POSTINC1,lo ; Get Depth
3533 movf lo,w
3534
3535 lfsr FSR2,letter
3536 ; btfsc STATUS,Z ; =0
3537 ; goto PLED_decoplan_delete ; Yes, quit display
3538 output_8 ; outputs into Postinc2!
3539 movlw 'm'
3540 movwf POSTINC2
3541 call word_processor
3542 WIN_LEFT .140
3543 movff temp6,win_top
3544
3545 movff POSTINC1,lo ; Get length for this stop
3546
3547 lfsr FSR2,letter
3548 output_99x ; outputs into Postinc2!
3549 movlw d'39' ;"'"
3550 movwf POSTINC2
3551 call word_processor
3552 ; call PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth
3553 return
3554
3555
3556
3557 ; movlw .043
3558 ; movwf temp5
3559 ; movlw .48 + .8
3560 ; movwf temp6
3561 ; movff char_O_GF_low_pointer,wait_temp
3562 ; 3518 ;
3563 ;PLED_MultiGF_loop: 3519 ;PLED_MultiGF_deco_all:
3564 ; decfsz wait_temp,F 3520 ; movff char_O_actual_pointer,wait_temp
3565 ; bra PLED_MulitGF_nextentry 3521 ; movff char_O_GF_low_pointer,waitms_temp
3522 ; movf waitms_temp,F
3523 ; bz PLED_MultiGF_no_deco
3524 ; call PLED_MultiGF_table ; input wait_temp
3525 ; return
3566 ; 3526 ;
3567 ; bra PLED_MultiGF_calc_tissue_counter 3527 ;PLED_MultiGF_no_deco:
3568 ;PLED_MGF_lp_calc_tis_counter: 3528 ; DISPLAYTEXT d'242' ;"no deco"
3529 ; return
3569 ; 3530 ;
3570 ;PLED_MGF_lp_clear_rem_space: 3531 ;PLED_MultiGF_table:
3571 ; lfsr FSR2,letter 3532 ; movlw d'9'
3572 ; movlw ' ' 3533 ; movwf temp5 ; number of stops
3573 ; movwf POSTINC2 3534 ; movlw .231
3574 ; movlw ' ' 3535 ; movwf temp6 ; row
3575 ; movwf POSTINC2 3536 ; lfsr FSR1,char_IO_deco_table+0
3576 ; movlw ' '
3577 ; movwf POSTINC2
3578 ; movlw ' '
3579 ; movwf POSTINC2
3580 ; movlw ' '
3581 ; movwf POSTINC2
3582 ; movlw ' '
3583 ; movwf POSTINC2
3584 ; movlw .8
3585 ; subwf temp6,F
3586 ; bnz PLED_MultiGF_column_ok_space
3587 ; movlw .21
3588 ; subwf temp5,F
3589 ; bc PLED_MultiGF_new_row_space
3590 ; return
3591 ;PLED_MultiGF_new_row_space:
3592 ; movlw .48
3593 ; movwf temp6
3594 ;PLED_MultiGF_column_ok_space:
3595 ; movf temp5,W
3596 ; call PLED_SetColumn
3597 ; movlw .8
3598 ; subwf temp6,W
3599 ; call PLED_SetRow
3600 ; call word_processor
3601 ; bra PLED_MGF_lp_clear_rem_space
3602 ; 3537 ;
3603 ;PLED_MulitGF_nextentry: 3538 ;PLED_MultiGF_table2:
3604 ; lfsr FSR2,letter 3539 ; movlw d'25'
3605 ; movff wait_temp,lo ; pointer to meter 3540 ; addwf temp6,F
3606 ; movf lo,W 3541 ; call PLED_MultiGF_show_stop
3607 ; rlncf lo,F 3542 ; decfsz temp5,F
3608 ; addwf lo,F 3543 ; bra PLED_MultiGF_table2
3609 ; decfsz wait_temp,W 3544 ; return
3610 ; bra PLED_MGF_skip_last_deco2 3545 ;
3611 ; movff char_I_depth_last_deco,lo 3546 ;PLED_MultiGF_show_stop:
3612 ;PLED_MGF_skip_last_deco2:
3613 ; output_99
3614 ; movlw 0x02
3615 ; movwf POSTINC2
3616 ; movlw ':'
3617 ; movwf POSTINC2
3618 ; movlw 0x02
3619 ; movwf POSTINC2
3620 ; lfsr FSR0,0x250
3621 ; movf wait_temp,W
3622 ; movff PLUSW0,lo
3623 ; movlw d'10' ; gray code
3624 ; tstfsz lo
3625 ; movlw b'00001111' ; gray code
3626 ; movwf grayvalue
3627 ; bsf leftbind 3547 ; bsf leftbind
3628 ; output_99 3548 ; WIN_LEFT .100
3629 ; bcf leftbind 3549 ; movff temp6,win_top
3630 ; movlw ' ' 3550 ; movff temp6,hi ; copy for PLED_decoplan_bargraph
3631 ; movwf POSTINC2 3551 ;; call PLED_SetRow ; Set Row
3632 ; movlw .8
3633 ; subwf temp6,F
3634 ; bnz PLED_MultiGF_column_ok
3635 ; movlw .21
3636 ; subwf temp5,F
3637 ; bc PLED_MultiGF_new_row
3638 ; return
3639 ;PLED_MultiGF_new_row:
3640 ; movlw .48
3641 ; movwf temp6
3642 ;PLED_MultiGF_column_ok:
3643 ; movf temp5,W
3644 ; call PLED_SetColumn
3645 ; movlw .8
3646 ; subwf temp6,W
3647 ; call PLED_SetRow
3648 ; call word_processor
3649 ; movlw b'00001111' ; gray code
3650 ; movwf grayvalue
3651 ; bra PLED_MultiGF_loop
3652 ; 3552 ;
3653 ; 3553 ;
3654 ;PLED_MultiGF_depth: 3554 ; movff POSTINC1,lo ; Get Depth
3655 ; lfsr FSR2,letter 3555 ; movf lo,w
3656 ; movff rel_pressure+0,lo 3556 ;
3657 ; movff rel_pressure+1,hi 3557 ; lfsr FSR2,letter
3658 ; call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mBar] 3558 ;; btfsc STATUS,Z ; =0
3659 ; bsf leftbind 3559 ;; goto PLED_decoplan_delete ; Yes, quit display
3660 ; bsf ignore_digit5 ; do not display 1cm depth 3560 ; output_8 ; outputs into Postinc2!
3661 ; output_16dp d'3' 3561 ; movlw 'm'
3662 ; bcf leftbind 3562 ; movwf POSTINC2
3663 ; movlw .004 3563 ; call word_processor
3664 ; movwf wait_temp 3564 ; WIN_LEFT .140
3665 ; movff wait_temp,0x086 ; left 3565 ; movff temp6,win_top
3666 ; movlw .049 3566 ;
3667 ; movwf wait_temp 3567 ; movff POSTINC1,lo ; Get length for this stop
3668 ; movff wait_temp,0x087 ; top 3568 ;
3669 ; movlw .015 3569 ; lfsr FSR2,letter
3670 ; movwf wait_temp 3570 ; output_99x ; outputs into Postinc2!
3671 ; movff wait_temp,0x088 ; heightmax 3571 ; movlw d'39' ;"'"
3672 ; movff dd_oled_brightness_offset,wait_temp 3572 ; movwf POSTINC2
3673 ; movff wait_temp,0x089 ; oled_brightness_offset_const 3573 ; call word_processor
3674 ; call main_DD2_write_incon24 3574 ;; call PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth
3675 ; movlb b'00000001' ; Back to Bank1
3676 ; return 3575 ; return
3677 ; 3576 ;
3678 ;PLED_MultiGF_deco_depth_actual:
3679 ; lfsr FSR2,letter
3680 ; movff char_O_actual_pointer,lo ; pointer to meter
3681 ; movf lo,W
3682 ; rlncf lo,F
3683 ; addwf lo,F
3684 ; movff char_O_actual_pointer,wait_temp ; test last_deco
3685 ; decfsz wait_temp,F
3686 ; bra PLED_MGF_skip_last_deco_depth
3687 ; movff char_I_depth_last_deco,lo
3688 ;PLED_MGF_skip_last_deco_depth:
3689 ; output_99
3690 ; movlw 'm'
3691 ; movwf POSTINC2
3692 ; movlw ' '
3693 ; movwf POSTINC2
3694 ; movlw .23
3695 ; call PLED_SetColumn
3696 ; movlw .57
3697 ; call PLED_SetRow
3698 ; goto word_processor
3699 ;
3700 ;PLED_MultiGF_gradient:
3701 ; lfsr FSR2,letter
3702 ; movff char_O_gradient_factor,lo
3703 ; bsf leftbind
3704 ; output_99
3705 ; bcf leftbind
3706 ; movlw '%'
3707 ; movwf POSTINC2
3708 ; movlw ' '
3709 ; movwf POSTINC2
3710 ; movlw .23
3711 ; call PLED_SetColumn
3712 ; movlw .49
3713 ; call PLED_SetRow
3714 ; goto word_processor
3715 ; 3577 ;
3716 ;PLED_MultiGF_time_at_deco:
3717 ; movlw .045
3718 ; movwf wait_temp
3719 ; movff wait_temp,0x086 ; left
3720 ; movlw .050
3721 ; movwf wait_temp
3722 ; movff wait_temp,0x087 ; top
3723 ; movlw .015
3724 ; movwf wait_temp
3725 ; movff wait_temp,0x088 ; heightmax
3726 ; movff dd_oled_brightness_offset,wait_temp
3727 ; movff wait_temp,0x089 ; oled_brightness_offset_const
3728 ; lfsr FSR2,letter
3729 ; lfsr FSR0,0x250
3730 ; movff char_O_actual_pointer,lo
3731 ; movf lo,W
3732 ; movff PLUSW0,lo
3733 ; bsf leftbind
3734 ; output_99
3735 ; movlw '<' ; Textmapping to "'"!
3736 ; movwf POSTINC2
3737 ; call main_DD2_write_incon24
3738 ; movlb b'00000001' ; Back to Bank1
3739 ; return
3740 ; 3578 ;
3741 ;PLED_MultiGF_clear_behind_depth: 3579 ;; movlw .043
3742 ; movlw 0x01 3580 ;; movwf temp5
3743 ; movwf wait_temp 3581 ;; movlw .48 + .8
3744 ; movff wait_temp,width ; font select left side before decpoint 3582 ;; movwf temp6
3745 ; movff wait_temp,box_temp+5 ; font select right side decpoint and after 3583 ;; movff char_O_GF_low_pointer,wait_temp
3746 ; movlw .063 3584 ;;
3747 ; movwf wait_temp 3585 ;;PLED_MultiGF_loop:
3748 ; movff wait_temp,box_temp+1 ; bottom row 3586 ;; decfsz wait_temp,F
3749 ; movlw .020 3587 ;; bra PLED_MulitGF_nextentry
3750 ; movwf wait_temp 3588 ;;
3751 ; movff wait_temp,box_temp+2 ; start column 3589 ;; bra PLED_MultiGF_calc_tissue_counter
3752 ; movlw .063 3590 ;;PLED_MGF_lp_calc_tis_counter:
3753 ; movwf wait_temp 3591 ;;
3754 ; movff wait_temp,box_temp+3 ; end column 3592 ;;PLED_MGF_lp_clear_rem_space:
3755 ; movlw .051 3593 ;; lfsr FSR2,letter
3756 ; movwf wait_temp 3594 ;; movlw ' '
3757 ; movff wait_temp,box_temp+4 ; start column dec point 3595 ;; movwf POSTINC2
3758 ; lfsr FSR2,letter 3596 ;; movlw ' '
3759 ;; call DD_Main 3597 ;; movwf POSTINC2
3760 ; return 3598 ;; movlw ' '
3761 ;; movlw 0x31 3599 ;; movwf POSTINC2
3762 ; movwf wait_temp 3600 ;; movlw ' '
3763 ; movff wait_temp,box_temp+1 ; row 3601 ;; movwf POSTINC2
3764 ; movlw 0x00 3602 ;; movlw ' '
3765 ; movwf wait_temp 3603 ;; movwf POSTINC2
3766 ; movff wait_temp,box_temp+0 ; color 3604 ;; movlw ' '
3767 ; call DD_hline 3605 ;; movwf POSTINC2
3768 ; return 3606 ;; movlw .8
3607 ;; subwf temp6,F
3608 ;; bnz PLED_MultiGF_column_ok_space
3609 ;; movlw .21
3610 ;; subwf temp5,F
3611 ;; bc PLED_MultiGF_new_row_space
3612 ;; return
3613 ;;PLED_MultiGF_new_row_space:
3614 ;; movlw .48
3615 ;; movwf temp6
3616 ;;PLED_MultiGF_column_ok_space:
3617 ;; movf temp5,W
3618 ;; call PLED_SetColumn
3619 ;; movlw .8
3620 ;; subwf temp6,W
3621 ;; call PLED_SetRow
3622 ;; call word_processor
3623 ;; bra PLED_MGF_lp_clear_rem_space
3624 ;;
3625 ;;PLED_MulitGF_nextentry:
3626 ;; lfsr FSR2,letter
3627 ;; movff wait_temp,lo ; pointer to meter
3628 ;; movf lo,W
3629 ;; rlncf lo,F
3630 ;; addwf lo,F
3631 ;; decfsz wait_temp,W
3632 ;; bra PLED_MGF_skip_last_deco2
3633 ;; movff char_I_depth_last_deco,lo
3634 ;;PLED_MGF_skip_last_deco2:
3635 ;; output_99
3636 ;; movlw 0x02
3637 ;; movwf POSTINC2
3638 ;; movlw ':'
3639 ;; movwf POSTINC2
3640 ;; movlw 0x02
3641 ;; movwf POSTINC2
3642 ;; lfsr FSR0,0x250
3643 ;; movf wait_temp,W
3644 ;; movff PLUSW0,lo
3645 ;; movlw d'10' ; gray code
3646 ;; tstfsz lo
3647 ;; movlw b'00001111' ; gray code
3648 ;; movwf grayvalue
3649 ;; bsf leftbind
3650 ;; output_99
3651 ;; bcf leftbind
3652 ;; movlw ' '
3653 ;; movwf POSTINC2
3654 ;; movlw .8
3655 ;; subwf temp6,F
3656 ;; bnz PLED_MultiGF_column_ok
3657 ;; movlw .21
3658 ;; subwf temp5,F
3659 ;; bc PLED_MultiGF_new_row
3660 ;; return
3661 ;;PLED_MultiGF_new_row:
3662 ;; movlw .48
3663 ;; movwf temp6
3664 ;;PLED_MultiGF_column_ok:
3665 ;; movf temp5,W
3666 ;; call PLED_SetColumn
3667 ;; movlw .8
3668 ;; subwf temp6,W
3669 ;; call PLED_SetRow
3670 ;; call word_processor
3671 ;; movlw b'00001111' ; gray code
3672 ;; movwf grayvalue
3673 ;; bra PLED_MultiGF_loop
3674 ;;
3675 ;;
3676 ;;PLED_MultiGF_depth:
3677 ;; lfsr FSR2,letter
3678 ;; movff rel_pressure+0,lo
3679 ;; movff rel_pressure+1,hi
3680 ;; call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mBar]
3681 ;; bsf leftbind
3682 ;; bsf ignore_digit5 ; do not display 1cm depth
3683 ;; output_16dp d'3'
3684 ;; bcf leftbind
3685 ;; movlw .004
3686 ;; movwf wait_temp
3687 ;; movff wait_temp,0x086 ; left
3688 ;; movlw .049
3689 ;; movwf wait_temp
3690 ;; movff wait_temp,0x087 ; top
3691 ;; movlw .015
3692 ;; movwf wait_temp
3693 ;; movff wait_temp,0x088 ; heightmax
3694 ;; movff dd_oled_brightness_offset,wait_temp
3695 ;; movff wait_temp,0x089 ; oled_brightness_offset_const
3696 ;; call main_DD2_write_incon24
3697 ;; movlb b'00000001' ; Back to Bank1
3698 ;; return
3699 ;;
3700 ;;PLED_MultiGF_deco_depth_actual:
3701 ;; lfsr FSR2,letter
3702 ;; movff char_O_actual_pointer,lo ; pointer to meter
3703 ;; movf lo,W
3704 ;; rlncf lo,F
3705 ;; addwf lo,F
3706 ;; movff char_O_actual_pointer,wait_temp ; test last_deco
3707 ;; decfsz wait_temp,F
3708 ;; bra PLED_MGF_skip_last_deco_depth
3709 ;; movff char_I_depth_last_deco,lo
3710 ;;PLED_MGF_skip_last_deco_depth:
3711 ;; output_99
3712 ;; movlw 'm'
3713 ;; movwf POSTINC2
3714 ;; movlw ' '
3715 ;; movwf POSTINC2
3716 ;; movlw .23
3717 ;; call PLED_SetColumn
3718 ;; movlw .57
3719 ;; call PLED_SetRow
3720 ;; goto word_processor
3721 ;;
3722 ;;PLED_MultiGF_gradient:
3723 ;; lfsr FSR2,letter
3724 ;; movff char_O_gradient_factor,lo
3725 ;; bsf leftbind
3726 ;; output_99
3727 ;; bcf leftbind
3728 ;; movlw '%'
3729 ;; movwf POSTINC2
3730 ;; movlw ' '
3731 ;; movwf POSTINC2
3732 ;; movlw .23
3733 ;; call PLED_SetColumn
3734 ;; movlw .49
3735 ;; call PLED_SetRow
3736 ;; goto word_processor
3737 ;;
3738 ;;PLED_MultiGF_time_at_deco:
3739 ;; movlw .045
3740 ;; movwf wait_temp
3741 ;; movff wait_temp,0x086 ; left
3742 ;; movlw .050
3743 ;; movwf wait_temp
3744 ;; movff wait_temp,0x087 ; top
3745 ;; movlw .015
3746 ;; movwf wait_temp
3747 ;; movff wait_temp,0x088 ; heightmax
3748 ;; movff dd_oled_brightness_offset,wait_temp
3749 ;; movff wait_temp,0x089 ; oled_brightness_offset_const
3750 ;; lfsr FSR2,letter
3751 ;; lfsr FSR0,0x250
3752 ;; movff char_O_actual_pointer,lo
3753 ;; movf lo,W
3754 ;; movff PLUSW0,lo
3755 ;; bsf leftbind
3756 ;; output_99
3757 ;; movlw '<' ; Textmapping to "'"!
3758 ;; movwf POSTINC2
3759 ;; call main_DD2_write_incon24
3760 ;; movlb b'00000001' ; Back to Bank1
3761 ;; return
3762 ;;
3763 ;;PLED_MultiGF_clear_behind_depth:
3764 ;; movlw 0x01
3765 ;; movwf wait_temp
3766 ;; movff wait_temp,width ; font select left side before decpoint
3767 ;; movff wait_temp,box_temp+5 ; font select right side decpoint and after
3768 ;; movlw .063
3769 ;; movwf wait_temp
3770 ;; movff wait_temp,box_temp+1 ; bottom row
3771 ;; movlw .020
3772 ;; movwf wait_temp
3773 ;; movff wait_temp,box_temp+2 ; start column
3774 ;; movlw .063
3775 ;; movwf wait_temp
3776 ;; movff wait_temp,box_temp+3 ; end column
3777 ;; movlw .051
3778 ;; movwf wait_temp
3779 ;; movff wait_temp,box_temp+4 ; start column dec point
3780 ;; lfsr FSR2,letter
3781 ;;; call DD_Main
3782 ;; return
3783 ;;; movlw 0x31
3784 ;; movwf wait_temp
3785 ;; movff wait_temp,box_temp+1 ; row
3786 ;; movlw 0x00
3787 ;; movwf wait_temp
3788 ;; movff wait_temp,box_temp+0 ; color
3789 ;; call DD_hline
3790 ;; return
3791 ;;
3769 ; 3792 ;
3770 3793 ;;PLED_MulitGF_nextentry_tissues:
3771 ;PLED_MulitGF_nextentry_tissues: 3794 ;; lfsr FSR2,letter
3772 ; lfsr FSR2,letter 3795 ;; lfsr FSR0,0x200
3773 ; lfsr FSR0,0x200 3796 ;; rlncf wait_temp,W
3774 ; rlncf wait_temp,W 3797 ;; movff PLUSW0,lo
3775 ; movff PLUSW0,lo 3798 ;; addlw .001
3776 ; addlw .001 3799 ;; movff PLUSW0,hi
3777 ; movff PLUSW0,hi 3800 ;; output_16
3778 ; output_16 3801 ;; movlw ' '
3779 ; movlw ' ' 3802 ;; movwf POSTINC2
3780 ; movwf POSTINC2 3803 ;; movlw .8
3781 ; movlw .8 3804 ;; subwf temp6,F
3782 ; subwf temp6,F 3805 ;; bnz PLED_MultiGF_column_ok_tissues
3783 ; bnz PLED_MultiGF_column_ok_tissues 3806 ;; movlw b'00001111' ; gray code
3784 ; movlw b'00001111' ; gray code 3807 ;; movwf grayvalue
3785 ; movwf grayvalue 3808 ;; movlw .21
3786 ; movlw .21 3809 ;; subwf temp5,F
3787 ; subwf temp5,F 3810 ;; bc PLED_MultiGF_new_row_tissues
3788 ; bc PLED_MultiGF_new_row_tissues 3811 ;; return
3789 ; return 3812 ;;PLED_MultiGF_new_row_tissues:
3790 ;PLED_MultiGF_new_row_tissues: 3813 ;; movlw .48
3791 ; movlw .48 3814 ;; movwf temp6
3792 ; movwf temp6 3815 ;;PLED_MultiGF_column_ok_tissues:
3793 ;PLED_MultiGF_column_ok_tissues: 3816 ;; movf temp5,W
3794 ; movf temp5,W 3817 ;; call PLED_SetColumn
3795 ; call PLED_SetColumn 3818 ;; movlw .8
3796 ; movlw .8 3819 ;; subwf temp6,W
3797 ; subwf temp6,W 3820 ;; call PLED_SetRow
3798 ; call PLED_SetRow 3821 ;; call word_processor
3799 ; call word_processor 3822 ;; bra PLED_MultiGF_loop_tissues
3800 ; bra PLED_MultiGF_loop_tissues 3823 ;;
3801 ; 3824 ;
3802 3825 ;;PLED_MultiGF_uart_out:
3803 ;PLED_MultiGF_uart_out: 3826 ;; call rs232_wait_tx
3804 ; call rs232_wait_tx 3827 ;;; header ff ff
3805 ;; header ff ff 3828 ;; movlw 0xff
3806 ; movlw 0xff 3829 ;; movwf wait_temp
3807 ; movwf wait_temp 3830 ;; movff wait_temp,TXREG
3808 ; movff wait_temp,TXREG 3831 ;; call rs232_wait_tx
3809 ; call rs232_wait_tx 3832 ;; movff wait_temp,TXREG
3810 ; movff wait_temp,TXREG 3833 ;; call rs232_wait_tx
3811 ; call rs232_wait_tx 3834 ;;; 2sec counter
3812 ;; 2sec counter 3835 ;; movff 0x290,TXREG
3813 ; movff 0x290,TXREG 3836 ;; call rs232_wait_tx
3814 ; call rs232_wait_tx 3837 ;; movff 0x291,TXREG
3815 ; movff 0x291,TXREG 3838 ;; call rs232_wait_tx
3816 ; call rs232_wait_tx 3839 ;;; movff ,TXREG
3817 ;; movff ,TXREG 3840 ;;; pres_respiration
3818 ;; pres_respiration 3841 ;; movff amb_pressure,TXREG
3819 ; movff amb_pressure,TXREG 3842 ;; call rs232_wait_tx
3820 ; call rs232_wait_tx 3843 ;; movff amb_pressure+1,TXREG
3821 ; movff amb_pressure+1,TXREG 3844 ;; call rs232_wait_tx
3822 ; call rs232_wait_tx 3845 ;;; pres_surface
3823 ;; pres_surface 3846 ;; movff last_surfpressure,TXREG
3824 ; movff last_surfpressure,TXREG 3847 ;; call rs232_wait_tx
3825 ; call rs232_wait_tx 3848 ;; movff last_surfpressure+1,TXREG
3826 ; movff last_surfpressure+1,TXREG 3849 ;; call rs232_wait_tx
3827 ; call rs232_wait_tx 3850 ;;; tissue pres
3828 ;; tissue pres 3851 ;; lfsr FSR0,0x200
3829 ; lfsr FSR0,0x200 3852 ;; movlw .64
3830 ; movlw .64 3853 ;; movwf wait_temp
3831 ; movwf wait_temp 3854 ;;pled_multigraf_tissue_uart_loop:
3832 ;pled_multigraf_tissue_uart_loop: 3855 ;; movff POSTINC0,TXREG
3833 ; movff POSTINC0,TXREG 3856 ;; call rs232_wait_tx
3834 ; call rs232_wait_tx 3857 ;; decfsz wait_temp
3835 ; decfsz wait_temp 3858 ;; bra pled_multigraf_tissue_uart_loop
3836 ; bra pled_multigraf_tissue_uart_loop 3859 ;;; movff ,TXREG
3837 ;; movff ,TXREG 3860 ;;; call rs232_wait_tx
3838 ;; call rs232_wait_tx 3861 ;; return
3839 ; return
3840
3841 ;PLED_MulitGF_nextentry_debug:
3842 ; lfsr FSR2,letter
3843 ; movff wait_temp,lo
3844 ; output_99
3845 ; movlw 0x02
3846 ; movwf POSTINC2
3847 ; movlw ':'
3848 ; movwf POSTINC2
3849 ; movlw 0x02
3850 ; movwf POSTINC2
3851 ; lfsr FSR0,0x300
3852 ; movf wait_temp,W
3853 ; movff PLUSW0,lo
3854 ; output_99
3855 ; movlw ' '
3856 ; movwf POSTINC2
3857 ; movlw .8
3858 ; subwf temp6,F
3859 ; bnz PLED_MultiGF_column_ok_debug
3860 ; movlw b'00001111' ; gray code
3861 ; movwf grayvalue
3862 ; movlw .21
3863 ; subwf temp5,F
3864 ; bc PLED_MultiGF_new_row_debug
3865 ; return
3866 ;PLED_MultiGF_new_row_debug:
3867 ; movlw .48
3868 ; movwf temp6
3869 ;PLED_MultiGF_column_ok_debug:
3870 ; movf temp5,W
3871 ; call PLED_SetColumn
3872 ; movlw .8
3873 ; subwf temp6,W
3874 ; call PLED_SetRow
3875 ; call word_processor
3876 ; bra PLED_MultiGF_loop_debug
3877
3878 ;PLED_MultiGF_calc_tissue_counter:
3879 ; movlw d'8' ; gray code
3880 ; movwf grayvalue
3881 ; movff 0x290,lo
3882 ; movff 0x291,hi
3883 ; movlw '('
3884 ; movwf POSTINC2
3885 ; output_16
3886 ; movlw ')'
3887 ; movwf POSTINC2
3888 ; movlw .8
3889 ; subwf temp6,F
3890 ; bnz PLED_MGF_ok_col_calc_tis_cter
3891 ; movlw b'00001111' ; gray code
3892 ; movwf grayvalue
3893 ; movlw .21
3894 ; subwf temp5,F
3895 ; bc PLED_MGF_n_row_calc_tis_cter
3896 ; return
3897 ;PLED_MGF_n_row_calc_tis_cter:
3898 ; movlw .48
3899 ; movwf temp6
3900 ;PLED_MGF_ok_col_calc_tis_cter:
3901 ; movf temp5,W
3902 ; call PLED_SetColumn
3903 ; movlw .8
3904 ; subwf temp6,W
3905 ; call PLED_SetRow
3906 ; call word_processor
3907 ; bra PLED_MGF_lp_calc_tis_counter
3908 ; 3862 ;
3909 3863 ;;PLED_MulitGF_nextentry_debug:
3910 ;PLED_debug_deko: 3864 ;; lfsr FSR2,letter
3911 ; movlw .009 3865 ;; movff wait_temp,lo
3912 ; call PLED_SetColumn 3866 ;; output_99
3913 ; movlw .008 3867 ;; movlw 0x02
3914 ; call PLED_SetRow 3868 ;; movwf POSTINC2
3915 ; lfsr FSR2,letter 3869 ;; movlw ':'
3916 ; movff char_O_deco_status,lo 3870 ;; movwf POSTINC2
3917 ; output_8 3871 ;; movlw 0x02
3918 ; call word_processor 3872 ;; movwf POSTINC2
3873 ;; lfsr FSR0,0x300
3874 ;; movf wait_temp,W
3875 ;; movff PLUSW0,lo
3876 ;; output_99
3877 ;; movlw ' '
3878 ;; movwf POSTINC2
3879 ;; movlw .8
3880 ;; subwf temp6,F
3881 ;; bnz PLED_MultiGF_column_ok_debug
3882 ;; movlw b'00001111' ; gray code
3883 ;; movwf grayvalue
3884 ;; movlw .21
3885 ;; subwf temp5,F
3886 ;; bc PLED_MultiGF_new_row_debug
3887 ;; return
3888 ;;PLED_MultiGF_new_row_debug:
3889 ;; movlw .48
3890 ;; movwf temp6
3891 ;;PLED_MultiGF_column_ok_debug:
3892 ;; movf temp5,W
3893 ;; call PLED_SetColumn
3894 ;; movlw .8
3895 ;; subwf temp6,W
3896 ;; call PLED_SetRow
3897 ;; call word_processor
3898 ;; bra PLED_MultiGF_loop_debug
3919 ; 3899 ;
3920 ; movlw .009 3900 ;;PLED_MultiGF_calc_tissue_counter:
3921 ; call PLED_SetColumn 3901 ;; movlw d'8' ; gray code
3922 ; movlw .016 3902 ;; movwf grayvalue
3923 ; call PLED_SetRow 3903 ;; movff 0x290,lo
3924 ; lfsr FSR2,letter 3904 ;; movff 0x291,hi
3925 ; movff char_O_array_decodepth+0,lo 3905 ;; movlw '('
3926 ; output_8 3906 ;; movwf POSTINC2
3927 ; call word_processor 3907 ;; output_16
3928 ; return 3908 ;; movlw ')'
3909 ;; movwf POSTINC2
3910 ;; movlw .8
3911 ;; subwf temp6,F
3912 ;; bnz PLED_MGF_ok_col_calc_tis_cter
3913 ;; movlw b'00001111' ; gray code
3914 ;; movwf grayvalue
3915 ;; movlw .21
3916 ;; subwf temp5,F
3917 ;; bc PLED_MGF_n_row_calc_tis_cter
3918 ;; return
3919 ;;PLED_MGF_n_row_calc_tis_cter:
3920 ;; movlw .48
3921 ;; movwf temp6
3922 ;;PLED_MGF_ok_col_calc_tis_cter:
3923 ;; movf temp5,W
3924 ;; call PLED_SetColumn
3925 ;; movlw .8
3926 ;; subwf temp6,W
3927 ;; call PLED_SetRow
3928 ;; call word_processor
3929 ;; bra PLED_MGF_lp_calc_tis_counter
3930 ;;
3929 ; 3931 ;
3930 3932 ;;PLED_debug_deko:
3933 ;; movlw .009
3934 ;; call PLED_SetColumn
3935 ;; movlw .008
3936 ;; call PLED_SetRow
3937 ;; lfsr FSR2,letter
3938 ;; movff char_O_deco_status,lo
3939 ;; output_8
3940 ;; call word_processor
3941 ;;
3942 ;; movlw .009
3943 ;; call PLED_SetColumn
3944 ;; movlw .016
3945 ;; call PLED_SetRow
3946 ;; lfsr FSR2,letter
3947 ;; movff char_O_array_decodepth+0,lo
3948 ;; output_8
3949 ;; call word_processor
3950 ;; return
3951 ;;
3952 ;
3931 PLED_simdata_screen: ;Display Pre-Dive Screen 3953 PLED_simdata_screen: ;Display Pre-Dive Screen
3932 ; List active gases/Setpoints 3954 ; List active gases/Setpoints
3933 btfsc FLAG_const_ppO2_mode ; in ppO2 mode? 3955 btfsc FLAG_const_ppO2_mode ; in ppO2 mode?
3934 bra PLED_simdata_screen3 ; Yes, display SetPoint/Sensor result list 3956 bra PLED_simdata_screen3 ; Yes, display SetPoint/Sensor result list
3935 3957
4018 ; list three SP in Gaslist 4040 ; list three SP in Gaslist
4019 movlw d'35' ; 36 = current SP position in EEPROM 4041 movlw d'35' ; 36 = current SP position in EEPROM
4020 movwf wait_temp ; here: stores eeprom address for gas list 4042 movwf wait_temp ; here: stores eeprom address for gas list
4021 movlw d'10' 4043 movlw d'10'
4022 movwf waitms_temp ; here: stores row for gas list 4044 movwf waitms_temp ; here: stores row for gas list
4023 clrf temp5 ; here: SP counter 4045 clrf temp6 ; here: SP counter
4024 4046
4025 PLED_simdata_screen3_loop: 4047 PLED_simdata_screen3_loop:
4026 incf wait_temp,F ; EEPROM address 4048 incf wait_temp,F ; EEPROM address
4027 incf temp5,F ; Increase SP 4049 incf temp6,F ; Increase SP
4028 4050
4029 movlw d'25' 4051 movlw d'25'
4030 addwf waitms_temp,F ; Increase row 4052 addwf waitms_temp,F ; Increase row
4031 WIN_LEFT .0 4053 WIN_LEFT .0
4032 movff waitms_temp,win_top ; Set Row 4054 movff waitms_temp,win_top ; Set Row
4034 lfsr FSR2,letter 4056 lfsr FSR2,letter
4035 movlw 'S' 4057 movlw 'S'
4036 movwf POSTINC2 4058 movwf POSTINC2
4037 movlw 'P' 4059 movlw 'P'
4038 movwf POSTINC2 4060 movwf POSTINC2
4039 movff temp5,lo ; copy gas number 4061 movff temp6,lo ; copy gas number
4040 output_8 ; display gas number 4062 output_8 ; display gas number
4041 movlw ':' 4063 movlw ':'
4042 movwf POSTINC2 4064 movwf POSTINC2
4043 movlw ' ' 4065 movlw ' '
4044 movwf POSTINC2 4066 movwf POSTINC2
4048 clrf hi 4070 clrf hi
4049 output_16dp d'3' ; outputs into Postinc2! 4071 output_16dp d'3' ; outputs into Postinc2!
4050 call word_processor 4072 call word_processor
4051 4073
4052 movlw d'3' ; list all three SP 4074 movlw d'3' ; list all three SP
4053 cpfseq temp5 ; All gases shown? 4075 cpfseq temp6 ; All gases shown?
4054 bra PLED_simdata_screen3_loop ;no 4076 bra PLED_simdata_screen3_loop ;no
4055 4077
4056 read_int_eeprom d'33' ; Read byte (stored in EEDATA) 4078 read_int_eeprom d'33' ; Read byte (stored in EEDATA)
4057 movff EEDATA,active_gas ; Read start gas (1-5) 4079 movff EEDATA,active_gas ; Read start gas (1-5)
4058 decf active_gas,W ; Gas 0-4 4080 decf active_gas,W ; Gas 0-4