comparison code_part1/OSTC_code_asm_part1/menu_gassetup.asm @ 105:64109f6fb3d1

added END to GasSetup, small fixes
author heinrichsweikamp
date Sun, 19 Dec 2010 14:27:30 +0100
parents 6f8e3a08011e
children 50a06adabc67
comparison
equal deleted inserted replaced
104:2a2606e9db5f 105:64109f6fb3d1
407 output_8 407 output_8
408 movlw '%' 408 movlw '%'
409 movwf POSTINC2 409 movwf POSTINC2
410 movlw ' ' 410 movlw ' '
411 movwf POSTINC2 411 movwf POSTINC2
412 movlw ' ' 412 movlw '('
413 movwf POSTINC2 413 movwf POSTINC2
414 movlw 'E'
415 movwf POSTINC2
416 movlw 'N'
417 movwf POSTINC2
418 movlw 'D'
419 movwf POSTINC2
420 movlw ':'
421 movwf POSTINC2
422
423 ; Show END in m
424 GETCUSTOM8 .18 ; ppO2 warnvalue in WREG
425 mullw d'10'
426 movff PRODL,xA+0
427 movff PRODH,xA+1 ; ppO2 in [0.01Bar] * 10
428 movf divemins+0,W
429 addlw 0x06
430 movwf EEADR
431 call read_eeprom ; O2 value
432 movff EEDATA,xB+0
433 clrf xB+1
434 call div16x16 ;xA/xB=xC with xA as remainder
435 movlw d'10'
436 subwf xC+0,F ; Subtract 10m...
437 movff xC+0,lo
438 movlw d'0'
439 subwfb xC+1,F
440 movff xC+1,hi ; lo:hi holding MOD in meters
441 movlw d'10'
442 addwf lo,F
443 movlw d'0'
444 addwfc hi,F ; lo:hi holding MOD+10m
445
446 movf divemins+0,W
447 addlw 0x07
448 movwf EEADR
449 call read_eeprom ; He value in % -> EEDATA
450 movlw d'100'
451 movwf xA+0
452 movf EEDATA,W ; He value in % -> EEDATA
453 subwf xA+0,F ; xA+0 = 100 - He Value in %
454 clrf xA+1
455 movff lo,xB+0
456 movff hi,xB+1 ; Copy MOD+10
457 call mult16x16 ;xA*xB=xC
458 movff xC+0,xA+0
459 movff xC+1,xA+1
460 movlw d'100'
461 movwf xB+0
462 clrf xB+1
463 call div16x16 ;xA/xB=xC with xA as remainder
464 ; xC:2 = ((MOD+10) * 100 - HE Value in %) / 100
465 movlw d'10'
466 subwf xC+0,F ; Subtract 10m...
467 movff xC+0,lo
468 movlw d'0'
469 subwfb xC+1,F
470 movff xC+1,hi
471 output_16
472 movlw 'm'
473 movwf POSTINC2
474 movlw ')'
475 movwf POSTINC2
476 movlw ' '
477 movwf POSTINC2
478 movlw ' '
479 movwf POSTINC2
480
414 call word_processor 481 call word_processor
415 482
416 WIN_TOP .125 483 WIN_TOP .125
417 lfsr FSR2,letter 484 lfsr FSR2,letter
418 movlw '+' 485 movlw '+'