Quote Originally Posted by skimask View Post
Read the book...again...search the forums. There's plenty of info out there, more than enough.
I have found out... Your code was perfect, i could also just have looked in the book

Then i used your code in the PIC and this code in Visual Basic
Code:
Function LOBYTE(ByVal w As Integer) As Byte
    LOBYTE = w And &HFF
End Function

Function HIBYTE(ByVal w As Integer) As Byte
    HIBYTE = (w And &HFF00&) \ 256
End Function
Just so others can see it, if they maybe need it!