NEG64 ACC:P
6-246
NEG64 ACC:P Negate Accumulator Register and Product Register
SYNTAX OPTIONS OPCODE OBJMODE RPT CYC
NEG64 ACC:P 0101 0110 0101 1000 1 − 1
Operands ACC:P Accumulator register (ACC) and product register (P)
Description Negate the 64-bit content of the combined ACC:P registers:
if(ACC:P = 0x8000 0000 0000 0000)
{
V = 1;
if(OVM = 1)
ACC:P = 0x7FFF FFFF FFFF FFFF;
else
ACC:P = 0x8000 0000 0000 0000;
}
else
ACC:P = −ACC:P;
if(ACC:P = 0x0000 0000 0000 0000)
C = 1;
else
C = 0;
Flags and
Mode
N After the shift, if bit 31 of the ACC register is 1 then ACC:P is negative and the
N bit is set; otherwise N is cleared.
Z After the operation, the Z flag is set if the combined 64-bit value of the ACC:P
is zero; otherwise, Z is cleared.
C If (ACC:P= = 0) then the C bit is set; otherwise C is cleared.
V if(ACC:P = 0x8000 0000 0000 0000) then the V flag is set; otherwise, V is not
modified.
OVM If at the start of the operation, ACC:P = 0x8000 0000 0000 0000, then this is
considered an overflow value and the ACC:P value after the operation
depends on OVM. If (OVM = 1) ACC:P is filled with its greatest positive
number (0x7FFF FFFF FFFF FFFF). If (OVM = 0) then ACC:P is not
modified.
Repeat This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.