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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

14.10 DEC Decrement ACCU 1-L-L<br />

Format<br />

Description<br />

Status word<br />

Example<br />

DEC <br />

Address Data Type Description<br />

8-bit integer<br />

constant<br />

Accumulator Instructions<br />

Constant subtracted from ACCU 1-L-L; range<br />

from 0 to 255<br />

DEC (decrement ACCU 1-L-L) subtracts the 8-bit integer from the<br />

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

1-H, and ACCU 2 remain unchanged. The instruction is executed without regard to,<br />

and without affecting, the status bits.<br />

Note<br />

These instructions are not suitable for 16-bit or 32-bit math because no carry is made<br />

from the low byte of the low word of accumulator 1 to the high byte of the low word of<br />

accumulator 1. For 16-bit or 32-bit math, use the +I or +D. instruction, respectively.<br />

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

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

<strong>STL</strong> Explanation<br />

L MB250 //Load the value of MB250<br />

DEC 1 //Instruction "Decrement ACCU 1-L-L by 1"; store result in ACCU 1-L-L.<br />

T MB250 //Transfer the contents of ACCU 1-L-L (result) back to MB250.<br />

<strong>Statement</strong> <strong>List</strong> (<strong>STL</strong>) for S7-300 and S7-400 Programming<br />

A5E00706960-01 14-9

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

Saved successfully!

Ooh no, something went wrong!