Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/divemode.asm @ 124:4f9f477bb452
Rewrite display of decoplan:
* Common stuff
- fix clearing bottom of list, for fleecker-free updates.
- fix "Wait..." topline_box while computing deco in planning
- fix 'No Deco" std color and mark last page.
- Allow stops up to 240'
* ZHL-16c model:
- 6 lines max (sim or dive)
- Print exceed stops as "add: ddd'"
* GF model
- 6 lines in divemode, 8 in planning.
- any suitable number of pages.
- "more..." when not the last page displayed.
- fix displaying special depth for last stop (CF#29).
- fix 0-time stops: just skip display.
- fix end of list when reached the deepest stop.
- fix no need to buffer decoplan twice.
author | JeanDo |
---|---|
date | Sat, 01 Jan 2011 01:57:50 +0100 |
parents | 14a074e1a375 |
children | 4c588c3d1f12 06c4899ddb4b |
comparison
equal
deleted
inserted
replaced
123:6a94f96e9cea | 124:4f9f477bb452 |
---|---|
431 | 431 |
432 call deco_calc_hauptroutine ; calc_tissue | 432 call deco_calc_hauptroutine ; calc_tissue |
433 movlb b'00000001' ; rambank 1 selected | 433 movlb b'00000001' ; rambank 1 selected |
434 ostc_debug 'C' ; Sends debug-information to screen if debugmode active | 434 ostc_debug 'C' ; Sends debug-information to screen if debugmode active |
435 | 435 |
436 movff char_O_deco_status,deco_status ; | 436 movff char_O_deco_status,WREG |
437 tstfsz deco_status ; deco_status=0 if decompression calculation done | 437 tstfsz WREG ; deco_status=0 if decompression calculation done |
438 return ; calculation not yet finished! | 438 return ; calculation not yet finished! |
439 | |
440 rcall divemode_copy_decolist ;copy gf_decolist (0x250:.32) to gf_decolist_copy (0x0E0:.32) | |
441 | 439 |
442 movff char_O_array_decodepth+0,wait_temp ; copy ceiling to temp register | 440 movff char_O_array_decodepth+0,wait_temp ; copy ceiling to temp register |
443 tstfsz wait_temp ; Ceiling<0m? | 441 tstfsz wait_temp ; Ceiling<0m? |
444 bra calc_deko_divemode3 ; Yes! | 442 bra calc_deko_divemode3 ; Yes! |
445 | 443 |
451 movff char_O_nullzeit,decodata+1 ; nostop time | 449 movff char_O_nullzeit,decodata+1 ; nostop time |
452 | 450 |
453 call PLED_display_ndl ; display no deco limit | 451 call PLED_display_ndl ; display no deco limit |
454 return | 452 return |
455 | 453 |
456 divemode_copy_decolist: | 454 ;----------------------------------------------------------------------------- |
457 ;copy gf_decolist (0x250:.32) to gf_decolist_copy (0x0E0:.32) | |
458 lfsr FSR0,0x250 ; Source | |
459 lfsr FSR1,0x0E0 ; Target | |
460 movlw d'24' ; Copy 24 stops | |
461 movwf wait_temp ; Counter | |
462 copy_gf_deco_list: | |
463 movff POSTINC0,POSTINC1 ; Copy Source to Target | |
464 decfsz wait_temp,F ; All done? | |
465 bra copy_gf_deco_list ; No, continue! | |
466 return | |
467 | 455 |
468 divemode_prepare_flags_for_deco: | 456 divemode_prepare_flags_for_deco: |
469 movff amb_pressure+0,int_I_pres_respiration+0 ; lo and copy result to deco routine | 457 movff amb_pressure+0,int_I_pres_respiration+0 ; lo and copy result to deco routine |
470 movff amb_pressure+1,int_I_pres_respiration+1 ; hi | 458 movff amb_pressure+1,int_I_pres_respiration+1 ; hi |
471 GETCUSTOM8 d'11' ; Saturation multiplier % | 459 GETCUSTOM8 d'11' ; Saturation multiplier % |