comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 279:8514588eb6a2

Mark gas-switch stops for decoplans, displayed in yellow.
author JeanDo
date Tue, 19 Apr 2011 03:12:22 +0200
parents 46d1012d096a
children ce6f861d4e3e
comparison
equal deleted inserted replaced
278:17aab4ca0547 279:8514588eb6a2
2346 return 2346 return
2347 2347
2348 ;----------------------------------------------------------------------------- 2348 ;-----------------------------------------------------------------------------
2349 ; Draw a stop of the deco plan (simulator or dive). 2349 ; Draw a stop of the deco plan (simulator or dive).
2350 ; Inputs: lo = depth. Range 3m...93m 2350 ; Inputs: lo = depth. Range 3m...93m
2351 ; + 80 if this is a switch-gas stop.
2351 ; hi = minutes. range 1'..240'. 2352 ; hi = minutes. range 1'..240'.
2352 ; win_top = line to draw on screen. 2353 ; win_top = line to draw on screen.
2353 ; Trashed: hi, lo, win_height, win_leftx2, win_width, win_color*, 2354 ; Trashed: hi, lo, win_height, win_leftx2, win_width, win_color*,
2354 ; WREG, PROD, TBLPTR TABLAT. 2355 ; WREG, PROD, TBLPTR TABLAT.
2355 ; 2356 ;
2356 PLED_decoplan_show_stop: 2357 PLED_decoplan_show_stop:
2357 ;---- Print depth ---------------------------------------------------- 2358 ;---- Print depth ----------------------------------------------------
2358 WIN_LEFT .100 2359 WIN_LEFT .100
2360
2361 btfss lo,7 ; Bit set ?
2362 bra PLED_decoplan_std_stop ; No : Just an usual stop.
2363
2364 movlw b'11111101' ; Yellow.
2365 call PLED_set_color
2366 bcf lo,7 ; and cleanup depth.
2367 bra PLED_decoplan_nstd_stop
2368
2369 PLED_decoplan_std_stop:
2359 call PLED_standard_color 2370 call PLED_standard_color
2371
2372 PLED_decoplan_nstd_stop:
2360 lfsr FSR2,letter 2373 lfsr FSR2,letter
2361 bsf leftbind 2374 bsf leftbind
2362 output_8 ; outputs into Postinc2! 2375 output_8 ; outputs into Postinc2!
2363 STRCAT_PRINT "m " 2376 STRCAT_PRINT "m "
2364 2377
2388 movff WREG,win_leftx2 ; column left (0-159) 2401 movff WREG,win_leftx2 ; column left (0-159)
2389 movlw .16 2402 movlw .16
2390 movff WREG,win_width ; column max width. 2403 movff WREG,win_width ; column max width.
2391 2404
2392 ; Draw used area (hi = minutes): 2405 ; Draw used area (hi = minutes):
2393 call PLED_standard_color
2394 movlw d'16' ; Limit length (16min) 2406 movlw d'16' ; Limit length (16min)
2395 cpfslt hi 2407 cpfslt hi
2396 movwf hi 2408 movwf hi
2397 movff hi,win_bargraph ; Active width, the rest is cleared. 2409 movff hi,win_bargraph ; Active width, the rest is cleared.
2398 call PLED_box 2410 call PLED_box
2399 2411
2400 ; Restore win_top 2412 ; Restore win_top
2413 call PLED_standard_color
2401 movff win_top,WREG ; decf win_top (BANK SAFE) 2414 movff win_top,WREG ; decf win_top (BANK SAFE)
2402 decf WREG 2415 decf WREG
2403 movff WREG,win_top 2416 movff WREG,win_top
2404 return 2417 return
2405 2418