26.10.2012 Views

Statement List (STL) - DCE FEL ČVUT v Praze

Statement List (STL) - DCE FEL ČVUT v Praze

Statement List (STL) - DCE FEL ČVUT v Praze

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Integer Math Instructions<br />

7.4 -I Subtract ACCU 1 from ACCU 2 as Integer (16-Bit)<br />

Format<br />

-I<br />

Description<br />

Status word<br />

Example<br />

-I (subtract 16-bit integer numbers) subtracts the contents of ACCU 1-L from the<br />

contents of ACCU 2-L and stores the result in ACCU 1-L. The contents of ACCU 1-L<br />

and ACCU 2-L are interpreted as 16-bit integer numbers. The instruction is executed<br />

without regard to, and without affecting, the RLO. The status word bits CC 1, CC 0,<br />

OS, and OV are set as a function of the result of the instruction. The instruction<br />

produces a 16-bit integer number instead of an 32-bit integer number in the event of<br />

an overflow/underflow.<br />

The contents of accumulator 2 remain unchanged for CPUs with two ACCUs.<br />

The contents of accumulator 3 are copied into accumulator 2, and the contents of<br />

accumulator 4 are copied into accumulator 3 for CPUs with four ACCUs. The<br />

contents of accumulator 4 remain unchanged.<br />

See also Evaluating the Bits of the Status Word with Integer Math Instructions.<br />

BR CC 1 CC 0 OV OS OR STA RLO /FC<br />

writes: - x x x x - - - -<br />

Status bit generation CC 1 CC 0 OV OS<br />

Difference = 0 0 0 0 -<br />

-32768 = Difference > 0 1 0 0 -<br />

65535 >= Difference > 32767 0 1 1 1<br />

-65535

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!