Documentation Comments
Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.
RealityV15.1Online Documentation (MoTW) Revision 7
BITRESET Function (DataBasic) (m618703+bitreset_f.htm)
Resets the value of the specified bit in the bit table to 0 and returns the value of the bit before it was changed.
BITRESET(bitNumber)
bitNumber Specifies the bit to be reset.
If bitNumber evaluates to zero, all elements in the table are cleared and the returned value is zero.
BITRESET operates on a table of 128 bits, numbered 1 to 128, unique to each process. Each bit is available as a two-state flag, that is, the value returned by the function is either zero or one.
Because BITRESET returns the value of the bit before it was changed, the function of checking-and-setting (or resetting) a flag can be accomplished in one step.
Special functions can be performed by setting bitNumber to the following values:
0 Resets the entire table.
-1 Allows access to the system INHIBIT bit (which controls inhibiting of the Break key).
-2 Allows access to the system TRSTRFLG bit (which controls TCL restart).
-3 Allows access to the system RSTRTFLG bit (which controls BREAK-END restart).
If bitNumber is less than -3, or greater than 128, the bit table remains unchanged and BITRESET returns 0.
BITCHANGE function, BITCHECK function, BITLOAD function, BITSET function.
If bit 126 = 0
A = BITRESET(126)
PRINT A
Returns a value of 0 and resets bit 126 to 0. Prints 0.
If bit 113 = 1
VALUE = BITRESET(113)
PRINT VALUE
Returns a value of 1 and resets bit 113 to 0. Prints 1.