Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 30:943dc3336f48
1.62 in work...
author | heinrichsweikamp |
---|---|
date | Fri, 21 May 2010 21:29:13 +0200 |
parents | c6cab044a338 |
children | 6e5db85382a2 |
comparison
equal
deleted
inserted
replaced
29:c6cab044a338 | 30:943dc3336f48 |
---|---|
2380 return | 2380 return |
2381 | 2381 |
2382 PLED_decoplan_bargraph: | 2382 PLED_decoplan_bargraph: |
2383 GETCUSTOM8 d'35' ; Standard output color | 2383 GETCUSTOM8 d'35' ; Standard output color |
2384 movff WREG,box_temp+0 ; Data | 2384 movff WREG,box_temp+0 ; Data |
2385 incf win_top,F ; +1 | |
2385 movff win_top,box_temp+1 ; row top (0-239) | 2386 movff win_top,box_temp+1 ; row top (0-239) |
2386 movff win_top,box_temp+2 ; | 2387 movff win_top,box_temp+2 ; |
2387 movlw d'20' | 2388 movlw d'18' |
2388 addwf box_temp+2,F ; row bottom (0-239) | 2389 addwf box_temp+2,F ; row bottom (0-239) |
2389 movlw .122 | 2390 movlw .122 |
2390 movff WREG,box_temp+3 ; column left (0-159) | 2391 movff WREG,box_temp+3 ; column left (0-159) |
2391 addwf lo,F ; Add time offset | 2392 addwf lo,F ; Add time offset |
2392 decf lo,F ; minus one | 2393 decf lo,F ; minus one |
2398 | 2399 |
2399 movlw .0 | 2400 movlw .0 |
2400 movff WREG,box_temp+0 ; Data | 2401 movff WREG,box_temp+0 ; Data |
2401 movff win_top,box_temp+1 ; row top (0-239) | 2402 movff win_top,box_temp+1 ; row top (0-239) |
2402 movff win_top,box_temp+2 ; | 2403 movff win_top,box_temp+2 ; |
2403 movlw d'20' | 2404 movlw d'18' |
2404 addwf box_temp+2,F ; row bottom (0-239) | 2405 addwf box_temp+2,F ; row bottom (0-239) |
2405 movff lo,box_temp+3 ; | 2406 movff lo,box_temp+3 ; |
2406 incf box_temp+3,F ; column left (0-159) | 2407 incf box_temp+3,F ; column left (0-159) |
2407 movlw .139 | 2408 movlw .139 |
2408 movff WREG,box_temp+4 ; column right (0-159) | 2409 movff WREG,box_temp+4 ; column right (0-159) |
2433 call PLED_clear_divemode_menu ; Clear Deco area | 2434 call PLED_clear_divemode_menu ; Clear Deco area |
2434 DISPLAYTEXT d'239' ;"No Deco" | 2435 DISPLAYTEXT d'239' ;"No Deco" |
2435 return | 2436 return |
2436 | 2437 |
2437 PLED_decoplan1: | 2438 PLED_decoplan1: |
2439 setf temp5 | |
2440 movlw .231 | |
2441 movwf temp6 ; row | |
2442 PLED_decoplan2: | |
2443 movlw d'25' | |
2444 addwf temp6,F | |
2445 incf temp5,F | |
2446 call PLED_decoplan_show_stop | |
2447 movlw d'5' ; 6 Stops... | |
2448 cpfseq temp5 | |
2449 bra PLED_decoplan2 | |
2450 return | |
2451 | |
2452 PLED_decoplan_show_stop: | |
2438 bsf leftbind | 2453 bsf leftbind |
2439 WIN_LEFT .100 | 2454 WIN_LEFT .100 |
2440 movlw .000 | 2455 movff temp6,win_top |
2441 movff WREG,win_top | 2456 movff temp6,hi ; copy for PLED_decoplan_bargraph |
2442 movwf hi ; copy for PLED_decoplan_bargraph | 2457 |
2443 call PLED_SetRow ; Set Row | 2458 lfsr FSR1,char_O_array_decodepth;+0 |
2444 lfsr FSR2,letter | 2459 movf temp5,W ; number of entry |
2445 movff char_O_array_decodepth+0,lo ; Get Depth | 2460 movff PLUSW1,lo |
2446 movf lo,w | 2461 movf lo,w |
2447 btfsc STATUS,Z ; =0 | 2462 btfsc STATUS,Z ; =0 |
2448 goto PLED_decoplan_delete ; Yes, quit display | 2463 goto PLED_decoplan_delete ; Yes, quit display |
2464 | |
2465 lfsr FSR2,letter | |
2449 output_8 ; outputs into Postinc2! | 2466 output_8 ; outputs into Postinc2! |
2450 movlw 'm' | 2467 movlw 'm' |
2451 movwf POSTINC2 | 2468 movwf POSTINC2 |
2452 call word_processor | 2469 call word_processor |
2470 | |
2453 WIN_LEFT .140 | 2471 WIN_LEFT .140 |
2454 movlw .000 | 2472 movff temp6,win_top |
2455 movff WREG,win_top | 2473 |
2456 lfsr FSR2,letter | 2474 lfsr FSR1,char_O_array_decotime;+0 |
2457 movff char_O_array_decotime+0,lo ; Get length for this stop | 2475 movf temp5,W ; number of entry |
2476 movff PLUSW1,lo | |
2477 | |
2478 lfsr FSR2,letter | |
2458 output_99x ; outputs into Postinc2! | 2479 output_99x ; outputs into Postinc2! |
2459 movlw d'39' ;"'" | 2480 movlw d'39' ;"'" |
2460 movwf POSTINC2 | 2481 movwf POSTINC2 |
2461 call word_processor | 2482 call word_processor |
2462 call PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth | 2483 call PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth |
2463 | 2484 return |
2464 WIN_LEFT .100 | 2485 |
2465 movlw .025 | 2486 ; WIN_LEFT .100 |
2466 movff WREG,win_top | 2487 ; movlw .025 |
2467 movwf hi ; copy for PLED_decoplan_bargraph | 2488 ; movff WREG,win_top |
2468 call PLED_SetRow ; Set Row | 2489 ; movwf hi ; copy for PLED_decoplan_bargraph |
2469 lfsr FSR2,letter | 2490 ; call PLED_SetRow ; Set Row |
2470 movff char_O_array_decodepth+1,lo ; Get Depth | 2491 ; lfsr FSR2,letter |
2471 movf lo,w | 2492 ; movff char_O_array_decodepth+1,lo ; Get Depth |
2472 btfsc STATUS,Z ; =0 | 2493 ; movf lo,w |
2473 goto PLED_decoplan_delete ; Yes, quit display | 2494 ; btfsc STATUS,Z ; =0 |
2474 output_8 ; outputs into Postinc2! | 2495 ; goto PLED_decoplan_delete ; Yes, quit display |
2475 movlw 'm' | 2496 ; output_8 ; outputs into Postinc2! |
2476 movwf POSTINC2 | 2497 ; movlw 'm' |
2477 call word_processor | 2498 ; movwf POSTINC2 |
2478 WIN_LEFT .140 | 2499 ; call word_processor |
2479 movlw .025 | 2500 ; WIN_LEFT .140 |
2480 movff WREG,win_top | 2501 ; movlw .025 |
2481 lfsr FSR2,letter | 2502 ; movff WREG,win_top |
2482 movff char_O_array_decotime+1,lo ; Get length for this stop | 2503 ; lfsr FSR2,letter |
2483 output_99x ; outputs into Postinc2! | 2504 ; movff char_O_array_decotime+1,lo ; Get length for this stop |
2484 movlw d'39' ;"'" | 2505 ; output_99x ; outputs into Postinc2! |
2485 movwf POSTINC2 | 2506 ; movlw d'39' ;"'" |
2486 call word_processor | 2507 ; movwf POSTINC2 |
2487 call PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth | 2508 ; call word_processor |
2488 | 2509 ; call PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth |
2489 WIN_LEFT .100 | 2510 ; |
2490 movlw .050 | 2511 ; WIN_LEFT .100 |
2491 movff WREG,win_top | 2512 ; movlw .050 |
2492 movwf hi ; copy for PLED_decoplan_bargraph | 2513 ; movff WREG,win_top |
2493 call PLED_SetRow ; Set Row | 2514 ; movwf hi ; copy for PLED_decoplan_bargraph |
2494 lfsr FSR2,letter | 2515 ; call PLED_SetRow ; Set Row |
2495 movff char_O_array_decodepth+2,lo ; Get Depth | 2516 ; lfsr FSR2,letter |
2496 movf lo,w | 2517 ; movff char_O_array_decodepth+2,lo ; Get Depth |
2497 btfsc STATUS,Z ; =0 | 2518 ; movf lo,w |
2498 goto PLED_decoplan_delete ; Yes, quit display | 2519 ; btfsc STATUS,Z ; =0 |
2499 output_8 ; outputs into Postinc2! | 2520 ; goto PLED_decoplan_delete ; Yes, quit display |
2500 movlw 'm' | 2521 ; output_8 ; outputs into Postinc2! |
2501 movwf POSTINC2 | 2522 ; movlw 'm' |
2502 call word_processor | 2523 ; movwf POSTINC2 |
2503 WIN_LEFT .140 | 2524 ; call word_processor |
2504 movlw .050 | 2525 ; WIN_LEFT .140 |
2505 movff WREG,win_top | 2526 ; movlw .050 |
2506 lfsr FSR2,letter | 2527 ; movff WREG,win_top |
2507 movff char_O_array_decotime+2,lo ; Get length for this stop | 2528 ; lfsr FSR2,letter |
2508 output_99x ; outputs into Postinc2! | 2529 ; movff char_O_array_decotime+2,lo ; Get length for this stop |
2509 movlw d'39' ;"'" | 2530 ; output_99x ; outputs into Postinc2! |
2510 movwf POSTINC2 | 2531 ; movlw d'39' ;"'" |
2511 call word_processor | 2532 ; movwf POSTINC2 |
2512 call PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth | 2533 ; call word_processor |
2513 | 2534 ; call PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth |
2514 WIN_LEFT .100 | 2535 ; |
2515 movlw .075 | 2536 ; WIN_LEFT .100 |
2516 movff WREG,win_top | 2537 ; movlw .075 |
2517 movwf hi ; copy for PLED_decoplan_bargraph | 2538 ; movff WREG,win_top |
2518 call PLED_SetRow ; Set Row | 2539 ; movwf hi ; copy for PLED_decoplan_bargraph |
2519 lfsr FSR2,letter | 2540 ; call PLED_SetRow ; Set Row |
2520 movff char_O_array_decodepth+3,lo ; Get Depth | 2541 ; lfsr FSR2,letter |
2521 movf lo,w | 2542 ; movff char_O_array_decodepth+3,lo ; Get Depth |
2522 btfsc STATUS,Z ; =0 | 2543 ; movf lo,w |
2523 goto PLED_decoplan_delete ; Yes, quit display | 2544 ; btfsc STATUS,Z ; =0 |
2524 output_8 ; outputs into Postinc2! | 2545 ; goto PLED_decoplan_delete ; Yes, quit display |
2525 movlw 'm' | 2546 ; output_8 ; outputs into Postinc2! |
2526 movwf POSTINC2 | 2547 ; movlw 'm' |
2527 call word_processor | 2548 ; movwf POSTINC2 |
2528 WIN_LEFT .140 | 2549 ; call word_processor |
2529 movlw .075 | 2550 ; WIN_LEFT .140 |
2530 movff WREG,win_top | 2551 ; movlw .075 |
2531 lfsr FSR2,letter | 2552 ; movff WREG,win_top |
2532 movff char_O_array_decotime+3,lo ; Get length for this stop | 2553 ; lfsr FSR2,letter |
2533 output_99x ; outputs into Postinc2! | 2554 ; movff char_O_array_decotime+3,lo ; Get length for this stop |
2534 movlw d'39' ;"'" | 2555 ; output_99x ; outputs into Postinc2! |
2535 movwf POSTINC2 | 2556 ; movlw d'39' ;"'" |
2536 call word_processor | 2557 ; movwf POSTINC2 |
2537 call PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth | 2558 ; call word_processor |
2538 | 2559 ; call PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth |
2539 WIN_LEFT .100 | 2560 ; |
2540 movlw .100 | 2561 ; WIN_LEFT .100 |
2541 movff WREG,win_top | 2562 ; movlw .100 |
2542 movwf hi ; copy for PLED_decoplan_bargraph | 2563 ; movff WREG,win_top |
2543 call PLED_SetRow ; Set Row | 2564 ; movwf hi ; copy for PLED_decoplan_bargraph |
2544 lfsr FSR2,letter | 2565 ; call PLED_SetRow ; Set Row |
2545 movff char_O_array_decodepth+4,lo ; Get Depth | 2566 ; lfsr FSR2,letter |
2546 movf lo,w | 2567 ; movff char_O_array_decodepth+4,lo ; Get Depth |
2547 btfsc STATUS,Z ; =0 | 2568 ; movf lo,w |
2548 goto PLED_decoplan_delete ; Yes, quit display | 2569 ; btfsc STATUS,Z ; =0 |
2549 output_8 ; outputs into Postinc2! | 2570 ; goto PLED_decoplan_delete ; Yes, quit display |
2550 movlw 'm' | 2571 ; output_8 ; outputs into Postinc2! |
2551 movwf POSTINC2 | 2572 ; movlw 'm' |
2552 call word_processor | 2573 ; movwf POSTINC2 |
2553 WIN_LEFT .140 | 2574 ; call word_processor |
2554 movlw .100 | 2575 ; WIN_LEFT .140 |
2555 movff WREG,win_top | 2576 ; movlw .100 |
2556 lfsr FSR2,letter | 2577 ; movff WREG,win_top |
2557 movff char_O_array_decotime+4,lo ; Get length for this stop | 2578 ; lfsr FSR2,letter |
2558 output_99x ; outputs into Postinc2! | 2579 ; movff char_O_array_decotime+4,lo ; Get length for this stop |
2559 movlw d'39' ;"'" | 2580 ; output_99x ; outputs into Postinc2! |
2560 movwf POSTINC2 | 2581 ; movlw d'39' ;"'" |
2561 call word_processor | 2582 ; movwf POSTINC2 |
2562 call PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth | 2583 ; call word_processor |
2563 return | 2584 ; call PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth |
2564 | 2585 ; return |
2586 ; | |
2565 PLED_gas_list: | 2587 PLED_gas_list: |
2566 ostc_debug 'm' ; Sends debug-information to screen if debugmode active | 2588 ostc_debug 'm' ; Sends debug-information to screen if debugmode active |
2567 | 2589 |
2568 WIN_LEFT .100 | 2590 WIN_LEFT .100 |
2569 WIN_FONT FT_SMALL | 2591 WIN_FONT FT_SMALL |
2670 PLED_clear_divemode_menu: | 2692 PLED_clear_divemode_menu: |
2671 movlw .0 | 2693 movlw .0 |
2672 movff WREG,box_temp+0 ; Data | 2694 movff WREG,box_temp+0 ; Data |
2673 movlw .0 | 2695 movlw .0 |
2674 movff WREG,box_temp+1 ; row top (0-239) | 2696 movff WREG,box_temp+1 ; row top (0-239) |
2675 movlw .125 | 2697 ; movlw .125 |
2698 movlw .185 | |
2676 movff WREG,box_temp+2 ; row bottom (0-239) | 2699 movff WREG,box_temp+2 ; row bottom (0-239) |
2677 movlw .082 | 2700 movlw .082 |
2678 movff WREG,box_temp+3 ; column left (0-159) | 2701 movff WREG,box_temp+3 ; column left (0-159) |
2679 movlw .159 | 2702 movlw .159 |
2680 movff WREG,box_temp+4 ; column right (0-159) | 2703 movff WREG,box_temp+4 ; column right (0-159) |
3392 call word_processor | 3415 call word_processor |
3393 return | 3416 return |
3394 | 3417 |
3395 | 3418 |
3396 PLED_MultiGF_deco_mask: | 3419 PLED_MultiGF_deco_mask: |
3397 ; movlw 0x30 | 3420 movlw .0 |
3398 ; movwf wait_temp | 3421 movff WREG,box_temp+0 ; Data |
3399 ; movff wait_temp,box_temp+1 ; row | 3422 movlw .0 |
3400 ; movlw 0xAA | 3423 movff WREG,box_temp+1 ; row top (0-239) |
3401 ; movwf wait_temp | 3424 movlw .239 |
3402 ; movff wait_temp,box_temp+0 ; color | 3425 movff WREG,box_temp+2 ; row bottom (0-239) |
3403 ; goto DD_hline ; returns | 3426 movlw .082 |
3404 return | 3427 movff WREG,box_temp+3 ; column left (0-159) |
3428 movlw .159 | |
3429 movff WREG,box_temp+4 ; column right (0-159) | |
3430 call PLED_box | |
3431 return | |
3405 | 3432 |
3406 PLED_MultiGF_deco_all: | 3433 PLED_MultiGF_deco_all: |
3407 return | 3434 movff char_O_actual_pointer,wait_temp |
3408 ; movff char_O_actual_pointer,wait_temp | 3435 movff char_O_GF_low_pointer,waitms_temp |
3409 ; movff char_O_GF_low_pointer,waitms_temp | 3436 movf waitms_temp,F |
3410 ; movf waitms_temp,F | 3437 bz PLED_MultiGF_no_deco |
3411 ; bz PLED_MultiGF_no_deco | 3438 call PLED_MultiGF_table ; input wait_temp |
3412 ; movf waitms_temp,W | 3439 return |
3413 ; cpfsgt wait_temp | 3440 |
3414 ; bra PLED_MultiGF_actual_in_deco | 3441 PLED_MultiGF_no_deco: |
3415 ; call PLED_MultiGF_clear_behind_depth | 3442 DISPLAYTEXT d'242' ;"no deco" |
3416 ; movff char_O_GF_low_pointer,wait_temp | 3443 return |
3417 ; incf wait_temp,F | 3444 |
3418 ; bra PLED_MultiGF_complete_list_only ; input wait_temp | 3445 PLED_MultiGF_table: |
3419 ;PLED_MultiGF_actual_in_deco: | 3446 movlw d'9' |
3420 ; call PLED_MultiGF_gradient | 3447 movwf temp5 ; number of stops |
3421 ; call PLED_MultiGF_time_at_deco | 3448 movlw .231 |
3422 ; call PLED_MultiGF_deco_depth_actual | 3449 movwf temp6 ; row |
3423 ; movff char_O_actual_pointer,wait_temp | 3450 lfsr FSR1,char_IO_deco_table+0 |
3424 ;PLED_MultiGF_complete_list_only: | 3451 |
3425 ; call PLED_MultiGF_table ; input wait_temp | 3452 PLED_MultiGF_table2: |
3426 ; return | 3453 movlw d'25' |
3427 | 3454 addwf temp6,F |
3428 ;PLED_MultiGF_table: | 3455 call PLED_MultiGF_show_stop |
3456 decfsz temp5,F | |
3457 bra PLED_MultiGF_table2 | |
3458 return | |
3459 | |
3460 PLED_MultiGF_show_stop: | |
3461 bsf leftbind | |
3462 WIN_LEFT .100 | |
3463 movff temp6,win_top | |
3464 movff temp6,hi ; copy for PLED_decoplan_bargraph | |
3465 ; call PLED_SetRow ; Set Row | |
3466 | |
3467 | |
3468 movff POSTINC1,lo ; Get Depth | |
3469 movf lo,w | |
3470 | |
3471 lfsr FSR2,letter | |
3472 ; btfsc STATUS,Z ; =0 | |
3473 ; goto PLED_decoplan_delete ; Yes, quit display | |
3474 output_8 ; outputs into Postinc2! | |
3475 movlw 'm' | |
3476 movwf POSTINC2 | |
3477 call word_processor | |
3478 WIN_LEFT .140 | |
3479 movff temp6,win_top | |
3480 | |
3481 movff POSTINC1,lo ; Get length for this stop | |
3482 | |
3483 lfsr FSR2,letter | |
3484 output_99x ; outputs into Postinc2! | |
3485 movlw d'39' ;"'" | |
3486 movwf POSTINC2 | |
3487 call word_processor | |
3488 ; call PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth | |
3489 return | |
3490 | |
3491 | |
3492 | |
3429 ; movlw .043 | 3493 ; movlw .043 |
3430 ; movwf temp5 | 3494 ; movwf temp5 |
3431 ; movlw .48 + .8 | 3495 ; movlw .48 + .8 |
3432 ; movwf temp6 | 3496 ; movwf temp6 |
3433 ; movff char_O_GF_low_pointer,wait_temp | 3497 ; movff char_O_GF_low_pointer,wait_temp |
3498 ; | |
3434 ;PLED_MultiGF_loop: | 3499 ;PLED_MultiGF_loop: |
3435 ; decfsz wait_temp,F | 3500 ; decfsz wait_temp,F |
3436 ; bra PLED_MulitGF_nextentry | 3501 ; bra PLED_MulitGF_nextentry |
3437 ; | 3502 ; |
3438 ;; bra PLED_MultiGF_calc_tissue_counter | 3503 ; bra PLED_MultiGF_calc_tissue_counter |
3439 ;;PLED_MGF_lp_calc_tis_counter: | 3504 ;PLED_MGF_lp_calc_tis_counter: |
3440 ; | 3505 ; |
3441 ;PLED_MGF_lp_clear_rem_space: | 3506 ;PLED_MGF_lp_clear_rem_space: |
3442 ; lfsr FSR2,letter | 3507 ; lfsr FSR2,letter |
3443 ; movlw ' ' | 3508 ; movlw ' ' |
3444 ; movwf POSTINC2 | 3509 ; movwf POSTINC2 |
3519 ; call word_processor | 3584 ; call word_processor |
3520 ; movlw b'00001111' ; gray code | 3585 ; movlw b'00001111' ; gray code |
3521 ; movwf grayvalue | 3586 ; movwf grayvalue |
3522 ; bra PLED_MultiGF_loop | 3587 ; bra PLED_MultiGF_loop |
3523 ; | 3588 ; |
3524 ;PLED_MultiGF_no_deco: | |
3525 ; DISPLAYTEXT d'242' ;"no deco" | |
3526 ; return | |
3527 ; | 3589 ; |
3528 ;PLED_MultiGF_depth: | 3590 ;PLED_MultiGF_depth: |
3529 ; lfsr FSR2,letter | 3591 ; lfsr FSR2,letter |
3530 ; movff rel_pressure+0,lo | 3592 ; movff rel_pressure+0,lo |
3531 ; movff rel_pressure+1,hi | 3593 ; movff rel_pressure+1,hi |