Your Code works as designed:

with test being a word variable holding the decimal value of 1234 it reads binary: 0000010011010010

the lowbyte of test equals binary 11010010 (decimal 210)
the highbyte of test equals binary 00000100 (decimal 4)