Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/divemode_menu.asm @ 516:b498245da3f1
imperial units patch from Vlad
author | heinrichsweikamp |
---|---|
date | Mon, 05 Dec 2011 20:40:10 +0100 |
parents | 9fc8feff27a5 |
children | a73a452ca155 |
comparison
equal
deleted
inserted
replaced
515:cc09222a204f | 516:b498245da3f1 |
---|---|
349 return | 349 return |
350 | 350 |
351 divemode_menu_simulator2: | 351 divemode_menu_simulator2: |
352 dcfsnz menupos,F | 352 dcfsnz menupos,F |
353 bra timeout_divemenu2 ; close underwater menu! | 353 bra timeout_divemenu2 ; close underwater menu! |
354 GETCUSTOM8 d'63' ; Check CF#63 Conversion to imperial units | |
355 btfss WREG,0 ; Enabled ? | |
356 bra divemode_menu_simulator3 ; NO | |
357 dcfsnz menupos,F | |
358 bra divemode_menu_simulator_p1ft ; Adjust +1ft | |
359 dcfsnz menupos,F | |
360 bra divemode_menu_simulator_m1ft ; Adjust -1ft | |
361 dcfsnz menupos,F | |
362 bra divemode_menu_simulator_p10ft ; Adjust +10ft | |
363 dcfsnz menupos,F | |
364 bra divemode_menu_simulator_m10ft ; Adjust -10ft | |
365 bra divemode_menu_simulator4 | |
366 | |
367 divemode_menu_simulator3: | |
354 dcfsnz menupos,F | 368 dcfsnz menupos,F |
355 bra divemode_menu_simulator_p1 ; Adjust +1m | 369 bra divemode_menu_simulator_p1 ; Adjust +1m |
356 dcfsnz menupos,F | 370 dcfsnz menupos,F |
357 bra divemode_menu_simulator_m1 ; Adjust -1m | 371 bra divemode_menu_simulator_m1 ; Adjust -1m |
358 dcfsnz menupos,F | 372 dcfsnz menupos,F |
359 bra divemode_menu_simulator_p10 ; Adjust +10m | 373 bra divemode_menu_simulator_p10 ; Adjust +10m |
360 dcfsnz menupos,F | 374 dcfsnz menupos,F |
361 bra divemode_menu_simulator_m10 ; Adjust -10m | 375 bra divemode_menu_simulator_m10 ; Adjust -10m |
376 | |
377 divemode_menu_simulator4: | |
362 dcfsnz menupos,F | 378 dcfsnz menupos,F |
363 bra divemode_menu_simulator_quit; Adjust to zero m | 379 bra divemode_menu_simulator_quit; Adjust to zero m |
364 bra timeout_divemenu2 ; quit underwater menu! | 380 bra timeout_divemenu2 ; quit underwater menu! |
365 | 381 |
366 divemode_menu_simulator_common: | 382 divemode_menu_simulator_common: |
411 | 427 |
412 movlw d'4' | 428 movlw d'4' |
413 movwf menupos ; reset cursor | 429 movwf menupos ; reset cursor |
414 bra divemode_menu_simulator_common | 430 bra divemode_menu_simulator_common |
415 | 431 |
432 divemode_menu_simulator_m10ft: | |
433 movlw LOW d'305' | |
434 subwf sim_pressure+0,F | |
435 movlw HIGH d'305' | |
436 subwfb sim_pressure+1,F | |
437 movlw d'5' | |
438 movwf menupos ; reset cursor | |
439 bra divemode_menu_simulator_common | |
440 | |
441 divemode_menu_simulator_p10ft: | |
442 movlw LOW d'305' | |
443 addwf sim_pressure+0,F | |
444 movlw HIGH d'305' | |
445 addwfc sim_pressure+1,F | |
446 | |
447 movlw d'4' | |
448 movwf menupos ; reset cursor | |
449 bra divemode_menu_simulator_common | |
450 | |
416 divemode_menu_simulator_quit: | 451 divemode_menu_simulator_quit: |
417 movlw LOW d'1000' | 452 movlw LOW d'1000' |
418 movwf sim_pressure+0 | 453 movwf sim_pressure+0 |
419 movlw HIGH d'1000' | 454 movlw HIGH d'1000' |
420 movwf sim_pressure+1 | 455 movwf sim_pressure+1 |
429 movwf menupos ; reset cursor | 464 movwf menupos ; reset cursor |
430 bra divemode_menu_simulator_common | 465 bra divemode_menu_simulator_common |
431 | 466 |
432 divemode_menu_simulator_m1: | 467 divemode_menu_simulator_m1: |
433 movlw d'100' | 468 movlw d'100' |
469 subwf sim_pressure+0,F | |
470 movlw d'0' | |
471 subwfb sim_pressure+1,F | |
472 movlw d'3' | |
473 movwf menupos ; reset cursor | |
474 bra divemode_menu_simulator_common | |
475 | |
476 divemode_menu_simulator_p1ft: | |
477 movlw d'30' | |
478 addwf sim_pressure+0,F | |
479 movlw d'0' | |
480 addwfc sim_pressure+1,F | |
481 movlw d'2' | |
482 movwf menupos ; reset cursor | |
483 bra divemode_menu_simulator_common | |
484 | |
485 divemode_menu_simulator_m1ft: | |
486 movlw d'30' | |
434 subwf sim_pressure+0,F | 487 subwf sim_pressure+0,F |
435 movlw d'0' | 488 movlw d'0' |
436 subwfb sim_pressure+1,F | 489 subwfb sim_pressure+1,F |
437 movlw d'3' | 490 movlw d'3' |
438 movwf menupos ; reset cursor | 491 movwf menupos ; reset cursor |