comparison code_part1/OSTC_code_asm_part1/divemode.asm @ 116:14a074e1a375

Split C code, and use direct linking.
author JeanDo
date Sun, 26 Dec 2010 14:30:13 +0100
parents 50a06adabc67
children 4f9f477bb452
comparison
equal deleted inserted replaced
115:50a06adabc67 116:14a074e1a375
287 movff xC+0, char_I_actual_ppO2 ; copy last ppO2 to buffer register 287 movff xC+0, char_I_actual_ppO2 ; copy last ppO2 to buffer register
288 btfsc FLAG_const_ppO2_mode ; do in const_ppO2_mode 288 btfsc FLAG_const_ppO2_mode ; do in const_ppO2_mode
289 movff char_I_const_ppO2, char_I_actual_ppO2 ; copy last ppO2 to buffer register 289 movff char_I_const_ppO2, char_I_actual_ppO2 ; copy last ppO2 to buffer register
290 290
291 ; Calculate CNS 291 ; Calculate CNS
292 call main_calc_CNS_fraction ; calculate CNS 292 call deco_calc_CNS_fraction ; calculate CNS
293 movlb b'00000001' ; rambank 1 selected 293 movlb b'00000001' ; rambank 1 selected
294 294
295 ; Check if CNS should be displayed 295 ; Check if CNS should be displayed
296 movff char_O_CNS_fraction,lo ; copy into bank1 296 movff char_O_CNS_fraction,lo ; copy into bank1
297 GETCUSTOM8 d'27' ; cns_display_high 297 GETCUSTOM8 d'27' ; cns_display_high
427 call divemode_prepare_flags_for_deco 427 call divemode_prepare_flags_for_deco
428 428
429 movlw d'0' 429 movlw d'0'
430 movff WREG,char_I_step_is_1min ; 2 second deco mode 430 movff WREG,char_I_step_is_1min ; 2 second deco mode
431 431
432 call deco_main_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,deco_status ;
437 tstfsz deco_status ; deco_status=0 if decompression calculation done 437 tstfsz deco_status ; deco_status=0 if decompression calculation done
1008 movff xA+1,int_I_temp+1 1008 movff xA+1,int_I_temp+1
1009 GETCUSTOM8 .13 ; nofly_time_ratio 1009 GETCUSTOM8 .13 ; nofly_time_ratio
1010 movwf xB+0 1010 movwf xB+0
1011 movff xB,char_I_temp 1011 movff xB,char_I_temp
1012 ostc_debug 'K' ; Sends debug-information to screen if debugmode active 1012 ostc_debug 'K' ; Sends debug-information to screen if debugmode active
1013 call main_calc_percentage 1013 call deco_calc_percentage
1014 movlb b'00000001' ; select ram bank 1 1014 movlb b'00000001' ; select ram bank 1
1015 ostc_debug 'L' ; Sends debug-information to screen if debugmode active 1015 ostc_debug 'L' ; Sends debug-information to screen if debugmode active
1016 movff int_I_temp+0,xA+0 1016 movff int_I_temp+0,xA+0
1017 movff int_I_temp+1,xA+1 1017 movff int_I_temp+1,xA+1
1018 tstfsz xA+0 ; Desat=0? 1018 tstfsz xA+0 ; Desat=0?
1050 GETCUSTOM8 d'12' ; Desaturation multiplier % 1050 GETCUSTOM8 d'12' ; Desaturation multiplier %
1051 movwf wait_temp 1051 movwf wait_temp
1052 movff wait_temp,char_I_desaturation_multiplier 1052 movff wait_temp,char_I_desaturation_multiplier
1053 1053
1054 ostc_debug 'G' ; Sends debug-information to screen if debugmode active 1054 ostc_debug 'G' ; Sends debug-information to screen if debugmode active
1055 call deco_main_calc_desaturation_time ; calculate desaturation time 1055 call deco_calc_desaturation_time ; calculate desaturation time
1056 movlb b'00000001' ; select ram bank 1 1056 movlb b'00000001' ; select ram bank 1
1057 rcall calculate_noflytime ; Calc NoFly time 1057 rcall calculate_noflytime ; Calc NoFly time
1058 ostc_debug 'H' ; Sends debug-information to screen if debugmode active 1058 ostc_debug 'H' ; Sends debug-information to screen if debugmode active
1059 ; store header and ... 1059 ; store header and ...
1060 movlw 0xFD ; .... End-of-Profile Bytes 1060 movlw 0xFD ; .... End-of-Profile Bytes
1291 bcf simulatormode_active ; if we were in simulator mode 1291 bcf simulatormode_active ; if we were in simulator mode
1292 1292
1293 btfsc restore_deco_data ; Restore decodata? 1293 btfsc restore_deco_data ; Restore decodata?
1294 call simulator_restore_tissue_data ; Yes! 1294 call simulator_restore_tissue_data ; Yes!
1295 1295
1296 call deco_main_gradient_array 1296 call deco_gradient_array
1297 movlb b'00000001' ; select ram bank 1 1297 movlb b'00000001' ; select ram bank 1
1298 1298
1299 btfss restore_deco_data ; Restore decodata? 1299 btfss restore_deco_data ; Restore decodata?
1300 goto surfloop ; and return to surfaceloop 1300 goto surfloop ; and return to surfaceloop
1301 ;new 1.71beta: 1301 ;new 1.71beta: