Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/simulator.asm @ 32:a776039bda63
simulator-speed increased
author | heinrichsweikamp |
---|---|
date | Mon, 24 May 2010 17:48:21 +0200 |
parents | 2b52a4a7dce6 |
children | 6e5db85382a2 |
comparison
equal
deleted
inserted
replaced
31:2b52a4a7dce6 | 32:a776039bda63 |
---|---|
236 | 236 |
237 WIN_INVERT .1 | 237 WIN_INVERT .1 |
238 DISPLAYTEXT .12 ;" Wait.." | 238 DISPLAYTEXT .12 ;" Wait.." |
239 WIN_INVERT .0 | 239 WIN_INVERT .0 |
240 | 240 |
241 movlw d'255' | |
242 movff WREG,char_O_deco_status ; Reset Deco module | |
243 | |
241 simulator_calc_deco_loop1: | 244 simulator_calc_deco_loop1: |
242 call PLED_simulator_data | 245 |
243 | |
244 ; movlw .011 | 246 ; movlw .011 |
245 ; call PLED_SetColumn | 247 ; call PLED_SetColumn |
246 ; movlw .009 | 248 ; movlw .009 |
247 ; call PLED_SetRow | 249 ; call PLED_SetRow |
248 ; lfsr FSR2,letter | 250 ; lfsr FSR2,letter |
252 ; bcf leftbind | 254 ; bcf leftbind |
253 ; movlw ' ' | 255 ; movlw ' ' |
254 ; movwf POSTINC2 | 256 ; movwf POSTINC2 |
255 ;call word_processor | 257 ;call word_processor |
256 | 258 |
257 | 259 call divemode_check_decogases ; Checks for decogases and sets the gases |
258 simulator_calc_deco_loop2: | 260 call divemode_prepare_flags_for_deco |
259 btg LED_red | 261 |
262 call deco_main_calc_hauptroutine ; calc_tissue | |
263 movlb b'00000001' ; rambank 1 selected | |
264 | |
265 movff char_O_deco_status,deco_status ; | |
266 tstfsz deco_status ; deco_status=0 if decompression calculation done | |
267 bra simulator_calc_deco_loop1 ; Not finished | |
260 | 268 |
261 movlw d'1' | 269 movlw d'1' |
262 movff WREG,char_I_step_is_1min ; 1 minute mode | 270 movff WREG,char_I_step_is_1min ; 1 minute mode |
271 movff WREG,unused_x24B | |
272 | |
273 movlw d'255' | |
274 movff WREG,char_O_deco_status ; Reset Deco module | |
275 | |
276 | |
277 simulator_calc_deco_loop2: | |
278 call PLED_simulator_data | |
279 | |
280 btg LED_red | |
263 | 281 |
264 call divemode_check_decogases ; Checks for decogases and sets the gases | 282 call divemode_check_decogases ; Checks for decogases and sets the gases |
265 call divemode_prepare_flags_for_deco | 283 call divemode_prepare_flags_for_deco |
266 | 284 |
267 call deco_main_calc_hauptroutine ; calc_tissue | 285 call deco_main_calc_hauptroutine ; calc_tissue |
268 movlb b'00000001' ; rambank 1 selected | 286 movlb b'00000001' ; rambank 1 selected |
269 ostc_debug 'C' ; Sends debug-information to screen if debugmode active | 287 ostc_debug 'C' ; Sends debug-information to screen if debugmode active |
270 | 288 |
271 decfsz logbook_temp1,F | 289 decfsz logbook_temp1,F |
272 bra simulator_calc_deco_loop1 | 290 bra simulator_calc_deco_loop2 |
291 | |
292 movlw d'0' | |
293 movff WREG,char_I_step_is_1min ; 2 second deco mode | |
294 movff WREG,unused_x24B | |
295 | |
296 movlw d'255' | |
297 movff WREG,char_O_deco_status ; Reset Deco module | |
273 | 298 |
274 movff char_O_deco_status,deco_status ; | 299 movff char_O_deco_status,deco_status ; |
275 tstfsz deco_status ; deco_status=0 if decompression calculation done | 300 tstfsz deco_status ; deco_status=0 if decompression calculation done |
276 bra simulator_calc_deco2 ; Not finished | 301 bra simulator_calc_deco2 ; Not finished |
277 | 302 |
293 movwf logbook_temp1 ; Bottom time>0! | 318 movwf logbook_temp1 ; Bottom time>0! |
294 | 319 |
295 movlw d'5' ; Pre-Set Cursor to "Show Decoplan" | 320 movlw d'5' ; Pre-Set Cursor to "Show Decoplan" |
296 movwf menupos | 321 movwf menupos |
297 | 322 |
298 movlw d'0' | |
299 movff WREG,char_I_step_is_1min ; 2 second deco mode | |
300 | |
301 bra menu_simulator1 ; Done. | 323 bra menu_simulator1 ; Done. |
302 | 324 |
303 simulator_calc_deco2: | 325 simulator_calc_deco2: |
304 movlw d'0' | |
305 movff WREG,char_I_step_is_1min ; 2 second deco mode | |
306 | |
307 call divemode_check_decogases ; Checks for decogases and sets the gases | 326 call divemode_check_decogases ; Checks for decogases and sets the gases |
308 call divemode_prepare_flags_for_deco | 327 call divemode_prepare_flags_for_deco |
309 | 328 |
310 call deco_main_calc_hauptroutine ; calc_tissue | 329 call deco_main_calc_hauptroutine ; calc_tissue |
311 movlb b'00000001' ; rambank 1 selected | 330 movlb b'00000001' ; rambank 1 selected |