BOOLEAN OPERATORS
BOOLEAN ARITHMETIC
TESTBIT () |
SETBITON () |
SETBITOFF () |
| Download the TESTBIT here. | Download the SETBITON here. | Download the SETBITOFF here. |
|
TESTBIT (), SETBITON () and SETBITOFF () are free-form versions of opcodes TESTB, BITON and BITOFF. They are designed to be used in free form statements. Each takes two parameters. The first parameter is a one character field which is the target of the bit operation. The second parameter contains the bit numbers to be used - in SETBITON and SETBITOFF this can be up to 8 in length, while in TESTBIT is only one character in length; for all three, this can be a variable or a constant.
|
Each is presented as sources in .txt files. Each file contains the prototyped subprocedure and an example of use.
|
TestBit()
TestBit() is a function - subprocedure - designed to illustrate a free-form version of the fixed-form opcode TESTB opcode.
It takes a character field, length 1, and a bit reference, range 0 - 7, and returns a 0 or 1 for off or on. |
SetBitOn ()
SetBitOn () is a function - subprocedure - designed to illustrate a free-form version of the fixed-form opcode BITON opcode.
It takes a character field, length 1, and a bit reference, range 0 - 7, There is no return value. |
SetBitOff()
SetBitOff () is a function - subprocedure - designed to illustrate a free-form version of the fixed-form opcode BITOFF opcode.
It takes a character field, length 1, and a bit reference, range 0 - 7, There is no return value. |
Post any comments or suggestions you may have on the Contact Us tab.