Mitsubishi Electronics C64 Home Safety Product User Manual


 
8. Function Commands
NEG, NEGP
- 194 -
{ NEG, NEGP ... Complement of 2 (BIN 16-bit data)
Usable device
Bit device Word device
Con-
stant
Pointer
X Y M L F BSB T SM VTCDRWSWZSDKH P
Digit
desig-
nation
Index
No. of
steps
D
{ { { { { {
{
{ { { { { { { {
{
2
Complement of 2 execution command
NEG D
Setting data
D
No. of device where data to
be complemented by 2 is
stored.
NEGP D
NEG
NEGP
Function
(1) The 16-bit data of the device designated with D is reversed and incremented by one, and then
stored in the device designated with D.
Before execution D
01 0 0010101011101
10 1 1101010100010
16 bit
After execution D
10 1 1101100100010
+1
Reversal
(2) This is used to use a negative BIN value as an absolute value.
Execution conditions
The execution conditions for NEG, NEGD commands are as follow.
Complement of 2
execution command OFF
NEG
ON
Executed per scan
Executed per scan
NEGP