Very quick example (Caveat Emptor) since it's two-thirty in the morning and time I was getting my beauty sleep... there's probably better ways of doing this, but with matchsticks propping up my eyelids this is the best you're going to get out of me tonight...

CounterA var Byte
ErrorFlag var Bit
MyData var Byte
ManchesterWord var Word

' Subroutine Encodes Manchester Word
' Enter subroutine with data in MyData
' Exit Subroutine with encoded ManchesterWord
' MyData contents are destroyed on exit
EncodeManchester:
ManchesterWord=0
For CounterA=0 to 7
If MyData.0=0 then
ManchesterWord.14=1
else
ManchesterWord.15=1
endif
If CounterA<7 then ManchesterWord=ManchesterWord>>2
MyData=MyData>>1
Next CounterA
Return

' Subroutine Decodes Manchester Word
' Enter subroutine with encoded data in ManchesterWord
' Exit subroutine with decoded data in MyData
' ManchesterWord contents are destroyed on exit
' Also on exit, ErrorFlag=0 then Data is good
' ErrorFlag=1 then Data is suspect/corrupt
DecodeManchester:
ErrorFlag=0
For CounterA=0 to 7
If ManchesterWord.1=0 then
MyData.7=0
If ManchesterWord.0=0 then ErrorFlag=1
else
MyData.7=1
If ManchesterWord.0=1 then ErrorFlag=1
endif
ManchesterWord=ManchesterWord>>2
If CounterA<7 then MyData=MyData>>1
Return

Melanie