Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
movfw tmr_u ;convert tmr_u to BCD
movwf nv ;nv is tenths of micro sec.
clrf tv ;tv represents micro sec tens
clrf uv ;uv represents micro sec units
movlw d'100' ;
tens subwf nv, f ;nv = nv - 100
btfss STATUS, C ;is nv < 0
goto ee ;yes, so restore nv
incf tv, f ;no, increment tv
goto tens ;
ee addwf nv, f ;nv = nv + 100
movlw d'10' ;
units subwf nv, f ;nv = nv - 10
btfss STATUS, C ;is nv < 0
goto ff ;yes, so restore nv
incf uv, f ;no, increment uv
goto units
ff addwf nv, f ;nv = nv + 10
Thanks for this hint. I guess many posters are like me and do not know that this option is available. I editied my post above to try this option, but I could not see the menu item for code in the "go advanced" so I inserted the [ code ] and [ /code ] manually.philba said:I sure wish people would use code tags. Put "[ code ]" (remove spaces) before source code and place "[ /code ]" (remove spaces) after the source code. It will be nicely indented. if you go advanced, there is a menu item for code.
ljcox said:Thanks for this hint. I guess many posters are like me and do not know that this option is available. I editied my post above to try this option, but I could not see the menu item for code in the "go advanced" so I inserted the [ code ] and [ /code ] manually.