Hi,
Here's a couple of ideas:
Code:
Value VAR BYTE
A VAR Value.0
B VAR Value.1
C VAR Value.2
D VAR Value.3
A,B,C,D will then be treated as BIT variables which may or may not work for your intended purposes. If it doesn't then perhaps:
Code:
Value VAR BYTE
A VAR BYTE
B VAR BYTE
C VAR BYTE
D VAR BYTE

Convert:
  A = (Value & %00000001)                     ' A will be either 0 or 1
  B = (Value & %00000010) >> 1
  C = (Value & %00000100) >> 2
  D = (Value & %00001000) >> 3
RETURN
If you're writing to a display and what it's actually looking for is the ASCII representation of the numerical digit '1' (instead of the binary value 1) then just add 48 to the value:
Code:
Convert:
  A = (Value & %00000001) + 48              ' A will be either 48 ('0') or 49 ('1')
  B = ((Value & %00000010) >> 1) + 48
  C = ((Value & %00000100) >> 2) + 48
  D = ((Value & %00001000) >> 3) + 48
RETURN
/Henrik.