comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 65:5ad68065e4e6

displays 16stops in gf mode
author heinrichsweikamp
date Wed, 06 Oct 2010 22:50:58 +0200
parents e8756eba54ee
children 6aee3a07f370
comparison
equal deleted inserted replaced
64:e8756eba54ee 65:5ad68065e4e6
2384 return 2384 return
2385 2385
2386 PLED_decoplan_bargraph: 2386 PLED_decoplan_bargraph:
2387 GETCUSTOM8 d'35' ; Standard output color 2387 GETCUSTOM8 d'35' ; Standard output color
2388 movff WREG,box_temp+0 ; Data 2388 movff WREG,box_temp+0 ; Data
2389 movff hi,win_top
2389 incf win_top,F ; +1 2390 incf win_top,F ; +1
2390 movff win_top,box_temp+1 ; row top (0-239) 2391 movff win_top,box_temp+1 ; row top (0-239)
2391 movff win_top,box_temp+2 ; 2392 movff win_top,box_temp+2 ;
2392 movlw d'18' 2393 movlw d'18'
2393 addwf box_temp+2,F ; row bottom (0-239) 2394 addwf box_temp+2,F ; row bottom (0-239)
2418 2419
2419 PLED_decoplan_delete: ; Delete unused rows 2420 PLED_decoplan_delete: ; Delete unused rows
2420 movlw .0 2421 movlw .0
2421 movff WREG,box_temp+0 ; data 00, x0, 0y, xy clear, links, rechts, beide 2422 movff WREG,box_temp+0 ; data 00, x0, 0y, xy clear, links, rechts, beide
2422 movff hi,box_temp+1 ; row top (0-239) 2423 movff hi,box_temp+1 ; row top (0-239)
2423 movlw .183 2424 movlw .238
2424 movff WREG,box_temp+2 ; row bottom (0-239) 2425 movff WREG,box_temp+2 ; row bottom (0-239)
2425 movlw .100 2426 movlw .100
2426 movff WREG,box_temp+3 ; column left (0-159) 2427 movff WREG,box_temp+3 ; column left (0-159)
2427 movlw .159 2428 movlw .159
2428 movff WREG,box_temp+4 ; column right (0-159) 2429 movff WREG,box_temp+4 ; column right (0-159)
2431 return 2432 return
2432 2433
2433 PLED_decoplan_gf_page_current: 2434 PLED_decoplan_gf_page_current:
2434 movlw d'0' 2435 movlw d'0'
2435 cpfseq temp8 2436 cpfseq temp8
2436 bra PLED_decoplan_gf_page_current0 ; 2437 bra PLED_decoplan_gf_page2 ; =1: Dispplay Page 2
2437 bra PLED_decoplan_gf_page1 ; =0, Display Page 1 2438 bra PLED_decoplan_gf_page1 ; =0, Display Page 1
2438 PLED_decoplan_gf_page_current0: 2439 ;PLED_decoplan_gf_page_current0:
2439 movlw d'1' 2440 ; movlw d'1'
2440 cpfseq temp8 2441 ; cpfseq temp8
2441 bra PLED_decoplan_gf_page_current1 2442 ; bra PLED_decoplan_gf_page_current1
2442 bra PLED_decoplan_gf_page2 ; =1: Dispplay Page 2 2443 ; bra PLED_decoplan_gf_page2 ; =1: Dispplay Page 2
2443 PLED_decoplan_gf_page_current1: 2444 ;PLED_decoplan_gf_page_current1:
2444 movlw d'2' 2445 ; movlw d'2'
2445 cpfseq temp8 2446 ; cpfseq temp8
2446 bra PLED_decoplan_gf_page4 ; >2: Display Page 4 2447 ; bra PLED_decoplan_gf_page4 ; >2: Display Page 4
2447 bra PLED_decoplan_gf_page3 ; =1: Dispplay Page 3 2448 ; bra PLED_decoplan_gf_page3 ; =1: Dispplay Page 3
2448 2449 ;
2449 PLED_decoplan_gf_page1: 2450 PLED_decoplan_gf_page1:
2450 ostc_debug 'n' ; Sends debug-information to screen if debugmode active 2451 ostc_debug 'n' ; Sends debug-information to screen if debugmode active
2451 2452
2452 movff char_O_array_decodepth+0,lo ; Get Depth 2453 movff char_O_array_decodepth+0,lo ; Get Depth
2453 tstfsz lo 2454 tstfsz lo
2454 bra PLED_decoplan_gf_page1x 2455 bra PLED_decoplan_gf_page1x
2455 ; No Deco, show "no Deco" 2456 ; No Deco, show "no Deco"
2456 DISPLAYTEXT d'239' ;"No Deco" 2457 DISPLAYTEXT d'239' ;"No Deco"
2457 return 2458 return
2458 2459
2459 PLED_decoplan_gf_page4: 2460 ;PLED_decoplan_gf_page4:
2460 ; temp7 holds last displayed depth 2461 ; ; temp7 holds last displayed depth
2461 ; temp5 list entry 2462 ; ; temp5 list entry
2462 movlw .231 2463 ; movlw .231
2463 movwf temp6 ; row 2464 ; movwf temp6 ; row
2464 movff temp5,temp9 ; save 2465 ; movff temp5,temp9 ; save
2465 movff temp7,temp10 ; save 2466 ; movff temp7,temp10 ; save
2466 PLED_decoplan_gf_page4y: 2467 ;PLED_decoplan_gf_page4y:
2467 movlw d'3' 2468 ; movlw d'3'
2468 addwf temp7,F ; Add 3m for next stop 2469 ; addwf temp7,F ; Add 3m for next stop
2469 movlw d'25' 2470 ; movlw d'25'
2470 addwf temp6,F 2471 ; addwf temp6,F
2471 incf temp5,F 2472 ; incf temp5,F
2472 call PLED_decoplan_show_stop_gf 2473 ; call PLED_decoplan_show_stop_gf
2473 movlw d'23' ; Stops 18-23 2474 ; movlw d'23' ; Stops 18-23
2474 cpfseq temp5 2475 ; cpfseq temp5
2475 bra PLED_decoplan_gf_page4y 2476 ; bra PLED_decoplan_gf_page4y
2476 movff temp9,temp5 ; restore 2477 ; movff temp9,temp5 ; restore
2477 movff temp10,temp7 ; restore 2478 ; movff temp10,temp7 ; restore
2478 bsf last_ceiling_gf_shown ; Set flag 2479 ; bsf last_ceiling_gf_shown ; Set flag
2479 return 2480 ; return
2480 2481 ;
2481 PLED_decoplan_gf_page3: 2482 ;PLED_decoplan_gf_page3:
2482 ; temp7 holds last displayed depth 2483 ; ; temp7 holds last displayed depth
2483 ; temp5 list entry 2484 ; ; temp5 list entry
2484 movff temp5,temp9 ; save 2485 ; movff temp5,temp9 ; save
2485 movff temp7,temp10 ; save 2486 ; movff temp7,temp10 ; save
2486 movlw .231 2487 ; movlw .231
2487 movwf temp6 ; row 2488 ; movwf temp6 ; row
2488 PLED_decoplan_gf_page3y: 2489 ;PLED_decoplan_gf_page3y:
2489 movlw d'3' 2490 ; movlw d'3'
2490 addwf temp7,F ; Add 3m for next stop 2491 ; addwf temp7,F ; Add 3m for next stop
2491 movlw d'25' 2492 ; movlw d'25'
2492 addwf temp6,F 2493 ; addwf temp6,F
2493 incf temp5,F 2494 ; incf temp5,F
2494 call PLED_decoplan_show_stop_gf 2495 ; call PLED_decoplan_show_stop_gf
2495 movlw d'17' ; Stops 12-17 2496 ; movlw d'17' ; Stops 12-17
2496 cpfseq temp5 2497 ; cpfseq temp5
2497 bra PLED_decoplan_gf_page3y 2498 ; bra PLED_decoplan_gf_page3y
2498 movff temp9,temp5 ; restore 2499 ; movff temp9,temp5 ; restore
2499 movff temp10,temp7 ; restore 2500 ; movff temp10,temp7 ; restore
2500 return 2501 ; return
2501 2502
2502 PLED_decoplan_gf_page2: 2503 PLED_decoplan_gf_page2:
2503 ; temp7 holds last displayed depth 2504 ; temp7 holds last displayed depth
2504 ; temp5 list entry 2505 ; temp5 list entry
2505 movff temp5,temp9 ; save 2506 ; movff temp5,temp9 ; save
2506 movff temp7,temp10 ; save 2507 ; movff temp7,temp10 ; save
2507 movlw .231 2508 movlw .231
2508 movwf temp6 ; row 2509 movwf temp6 ; row
2509 PLED_decoplan_gf_page2y: 2510 PLED_decoplan_gf_page2y:
2510 movlw d'3' 2511 movlw d'3'
2511 addwf temp7,F ; Add 3m for next stop 2512 addwf temp7,F ; Add 3m for next stop
2512 movlw d'25' 2513 movlw d'25'
2513 addwf temp6,F 2514 addwf temp6,F
2514 incf temp5,F 2515 incf temp5,F
2515 call PLED_decoplan_show_stop_gf 2516 call PLED_decoplan_show_stop_gf
2516 movlw d'11' ; Stops 6-11 2517 movlw d'15' ; the next 8 Stops...
2517 cpfseq temp5 2518 cpfseq temp5
2518 bra PLED_decoplan_gf_page2y 2519 bra PLED_decoplan_gf_page2y
2519 movff temp9,temp5 ; restore 2520 ; movff temp9,temp5 ; restore
2520 movff temp10,temp7 ; restore 2521 ; movff temp10,temp7 ; restore
2522 bsf last_ceiling_gf_shown ; Set flag
2521 return 2523 return
2522 2524
2523 PLED_decoplan_gf_page1x: 2525 PLED_decoplan_gf_page1x:
2524 clrf temp8 ; Page 0-3 of deco list 2526 clrf temp8 ; Page 0-3 of deco list
2525 GETCUSTOM8 d'29' ; Last Deco in m 2527 GETCUSTOM8 d'29' ; Last Deco in m
2532 movlw d'25' 2534 movlw d'25'
2533 addwf temp6,F 2535 addwf temp6,F
2534 incf temp5,F 2536 incf temp5,F
2535 call PLED_decoplan_show_stop_gf 2537 call PLED_decoplan_show_stop_gf
2536 GETCUSTOM8 d'29' ; Last Deco in m 2538 GETCUSTOM8 d'29' ; Last Deco in m
2539 movlb .1
2537 movwf temp7 ; Last deco 2540 movwf temp7 ; Last deco
2541 movlw d'4'
2542 cpfslt temp7 ; >=3m?
2543 ; cpfslt temp7 ; >=3m?
2544 bra PLED_decoplan_gf_page1x_next_6m
2545
2538 movlw d'3' 2546 movlw d'3'
2539 cpfsgt temp3 ; >3m?
2540 bra PLED_decoplan_gf_page1x_next_6m
2541 movwf temp7 2547 movwf temp7
2542 bra PLED_decoplan_gf_page1y 2548 bra PLED_decoplan_gf_page1y
2543 2549
2544 PLED_decoplan_gf_page1x_next_6m: 2550 PLED_decoplan_gf_page1x_next_6m:
2545 movlw d'6' 2551 movlw d'6'
2549 addwf temp7,F ; Add 3m for next stop 2555 addwf temp7,F ; Add 3m for next stop
2550 movlw d'25' 2556 movlw d'25'
2551 addwf temp6,F 2557 addwf temp6,F
2552 incf temp5,F 2558 incf temp5,F
2553 call PLED_decoplan_show_stop_gf 2559 call PLED_decoplan_show_stop_gf
2554 movlw d'5' ; 6 Stops... 2560 movlw d'7' ; the next 7 Stops...
2555 cpfseq temp5 2561 cpfseq temp5
2556 bra PLED_decoplan_gf_page1y 2562 bra PLED_decoplan_gf_page1y
2557 return 2563 return
2558 2564
2559 PLED_decoplan_show_stop_gf: 2565 PLED_decoplan_show_stop_gf: