Mercurial > public > hwos_code
comparison src/divemode.asm @ 547:49be7b31b4db
2.25 stable RC2
author | heinrichsweikamp |
---|---|
date | Fri, 08 Sep 2017 13:36:04 +0200 |
parents | 7e6df19264b6 |
children | 7c408bfaf2e8 |
comparison
equal
deleted
inserted
replaced
546:40c5566edc30 | 547:49be7b31b4db |
---|---|
1456 ; Setup everything to enter divemode. | 1456 ; Setup everything to enter divemode. |
1457 ; | 1457 ; |
1458 dive_boot_oc: | 1458 dive_boot_oc: |
1459 extern get_first_gas_to_WREG | 1459 extern get_first_gas_to_WREG |
1460 call get_first_gas_to_WREG ; Gets first gas (0-4) into WREG | 1460 call get_first_gas_to_WREG ; Gets first gas (0-4) into WREG |
1461 addlw .1 | 1461 incf WREG |
1462 movff WREG,char_I_first_gas ; Copy for compatibility (1-5) | 1462 movff WREG,char_I_first_gas ; Copy for compatibility (1-5) |
1463 sublw .1 ; decrement WREG to old value again | 1463 decf WREG,W ; decrement WREG to old value again |
1464 rcall setup_gas_registers ; With WREG=Gas 0-4 | 1464 rcall setup_gas_registers ; With WREG=Gas 0-4 |
1465 movlw .0 | 1465 movlw .0 |
1466 movff WREG,char_I_const_ppO2 ; deactivate CCR-mode deco calc | 1466 movff WREG,char_I_const_ppO2 ; deactivate CCR-mode deco calc |
1467 return | 1467 return |
1468 | 1468 |
1491 bcf sp4_switched ; =1: This setpoint has been autoselected already | 1491 bcf sp4_switched ; =1: This setpoint has been autoselected already |
1492 bcf sp5_switched ; =1: This setpoint has been autoselected already | 1492 bcf sp5_switched ; =1: This setpoint has been autoselected already |
1493 | 1493 |
1494 extern get_first_dil_to_WREG | 1494 extern get_first_dil_to_WREG |
1495 call get_first_dil_to_WREG ; Gets first gas (0-4) into WREG | 1495 call get_first_dil_to_WREG ; Gets first gas (0-4) into WREG |
1496 addlw .1 | 1496 incf WREG |
1497 movff WREG,char_I_first_gas ; Copy for compatibility | 1497 movff WREG,char_I_first_gas ; Copy for compatibility |
1498 sublw .1 | 1498 decf WREG,W |
1499 rcall setup_dil_registers ; With WREG=Gas 0-4 | 1499 rcall setup_dil_registers ; With WREG=Gas 0-4 |
1500 goto calc_deko_divemode_sensor ; External sensor stuff (and return!) | 1500 goto calc_deko_divemode_sensor ; External sensor stuff (and return!) |
1501 | 1501 |
1502 diveloop_boot: | 1502 diveloop_boot: |
1503 call restart_set_modes_and_flags | 1503 call restart_set_modes_and_flags |