Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/divemode_menu.asm @ 517:a73a452ca155
Backed out changeset: b498245da3f1
author | heinrichsweikamp |
---|---|
date | Mon, 05 Dec 2011 20:58:10 +0100 |
parents | b498245da3f1 |
children | f9a03808dfe2 |
comparison
equal
deleted
inserted
replaced
516:b498245da3f1 | 517:a73a452ca155 |
---|---|
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: | |
368 dcfsnz menupos,F | 354 dcfsnz menupos,F |
369 bra divemode_menu_simulator_p1 ; Adjust +1m | 355 bra divemode_menu_simulator_p1 ; Adjust +1m |
370 dcfsnz menupos,F | 356 dcfsnz menupos,F |
371 bra divemode_menu_simulator_m1 ; Adjust -1m | 357 bra divemode_menu_simulator_m1 ; Adjust -1m |
372 dcfsnz menupos,F | 358 dcfsnz menupos,F |
373 bra divemode_menu_simulator_p10 ; Adjust +10m | 359 bra divemode_menu_simulator_p10 ; Adjust +10m |
374 dcfsnz menupos,F | 360 dcfsnz menupos,F |
375 bra divemode_menu_simulator_m10 ; Adjust -10m | 361 bra divemode_menu_simulator_m10 ; Adjust -10m |
376 | |
377 divemode_menu_simulator4: | |
378 dcfsnz menupos,F | 362 dcfsnz menupos,F |
379 bra divemode_menu_simulator_quit; Adjust to zero m | 363 bra divemode_menu_simulator_quit; Adjust to zero m |
380 bra timeout_divemenu2 ; quit underwater menu! | 364 bra timeout_divemenu2 ; quit underwater menu! |
381 | 365 |
382 divemode_menu_simulator_common: | 366 divemode_menu_simulator_common: |
427 | 411 |
428 movlw d'4' | 412 movlw d'4' |
429 movwf menupos ; reset cursor | 413 movwf menupos ; reset cursor |
430 bra divemode_menu_simulator_common | 414 bra divemode_menu_simulator_common |
431 | 415 |
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 | |
451 divemode_menu_simulator_quit: | 416 divemode_menu_simulator_quit: |
452 movlw LOW d'1000' | 417 movlw LOW d'1000' |
453 movwf sim_pressure+0 | 418 movwf sim_pressure+0 |
454 movlw HIGH d'1000' | 419 movlw HIGH d'1000' |
455 movwf sim_pressure+1 | 420 movwf sim_pressure+1 |
464 movwf menupos ; reset cursor | 429 movwf menupos ; reset cursor |
465 bra divemode_menu_simulator_common | 430 bra divemode_menu_simulator_common |
466 | 431 |
467 divemode_menu_simulator_m1: | 432 divemode_menu_simulator_m1: |
468 movlw d'100' | 433 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' | |
487 subwf sim_pressure+0,F | 434 subwf sim_pressure+0,F |
488 movlw d'0' | 435 movlw d'0' |
489 subwfb sim_pressure+1,F | 436 subwfb sim_pressure+1,F |
490 movlw d'3' | 437 movlw d'3' |
491 movwf menupos ; reset cursor | 438 movwf menupos ; reset cursor |