Hi Chris,
You actually posted while I was typing my reply - I didn't see your own response.
Anyway, if you can afford two new bytes, lets call them Ones and Tens then you could do something like this instead (it produces slightly smaller code:
Code:
Ones VAR BYTE
Tens VAR BYTE
Ones = CheckPanelDigit & 15
Tens = (CheckPanelDigit & 240) >> 4
If Ones < 10 AND Tens < 10 then
'....more code here
This will then allow you to do something like:
Code:
SwappedValue VAR BYTE
SwappedValue = Ones << 4 + Tens
Which swappes the order of the high and low nibble in the byte.
/Henrik.
Bookmarks