MerryMadDad
Programmer
Hello,
I am trying to test the state of bits in a byte, active low state I used the case of statement
case of
254: do something
253: do something else
251:
247: and so on
The problem is without working out every possible combination, how can I detect that two bits are active at the same time ?
in assembly language I could clear the carry bit and rotate all the bits left or right and branch on the state of the carry bit, can I do something similar in Delphi pascal ? I am using Delphi 4.00 at the moment.
any help much appreciated Thanks in advance.
MMD
I am trying to test the state of bits in a byte, active low state I used the case of statement
case of
254: do something
253: do something else
251:
247: and so on
The problem is without working out every possible combination, how can I detect that two bits are active at the same time ?
in assembly language I could clear the carry bit and rotate all the bits left or right and branch on the state of the carry bit, can I do something similar in Delphi pascal ? I am using Delphi 4.00 at the moment.
any help much appreciated Thanks in advance.
MMD