Download Print this page

HEIDENHAIN MANUALplus 620 Technical Manual page 1712

Hide thumbs Also See for MANUALplus 620:

Advertisement

8.15.58 BIT TEST (BT)
1712
Syntax:
BT (BIT TEST)
Operands:
B, W, D, K, X
Action:
With the BIT TEST command, you can interrogate the status of each bit in the
accumulator. With the BT command there is a direct transition from word to
logic processing, i.e. the control checks the state of a bit in the word
accumulator and then sets the logic accumulator. If the interrogated bit = 1,
the control sets the logic accumulator to 1; otherwise it sets it to 0. The
corresponding bits are selected (addressed) by the content of the specified
operand or by a constant. As to the bit numbering, bit 0 = LSB and bit 31 =
MSB. For operand contents greater than 32, the control uses the operand
value modulo 32, i.e. the integral remainder of the result of the operand value
divided by 32.
Example:
Load the double word D8 into the accumulator and assign the logical state of
bit 0 to output O12.
Initial state:
Double word D8
= 3E 81 (hex)
Output
O12
= ?
Function
Load the double word D8
into the word accumulator
Check the state of the bit
specified in the operand.
Assign the result to
output O12.
STL
Accumulator
content
L D8
3E81
BT K+0
1
= O12
1
HEIDENHAIN Technical Manual MANUALplus 620
Operand content
3E81
1

Advertisement

loading