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.

Examples<br />

Shift and Rotate Instructions<br />

Contents ACCU1-H ACCU1-L<br />

Bit 31 . . . . . . . . . . 16 15 . . . . . . . . . . 0<br />

before execution of SRD 7 0101 1111 0110 0100 0101 1101 0011 1011<br />

after execution of SRD 7 0000 0000 1011 1110 1100 1000 1011 1010<br />

Example 1<br />

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

L MD4 //Load value into ACCU 1.<br />

SRD 7 //Shift bits in ACCU 1 seven places to the right.<br />

T MD8 //Transfer result to MD8.<br />

Example 2<br />

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

L +3 //Load value +3 into ACCU 1.<br />

L MD20 //Load contents of ACCU 1 into ACCU 2. Load value of MD20 into ACCU 1.<br />

SRD //Shift number is value of ACCU 2- L- L => Shift bits in ACCU 1 three places<br />

to the right.<br />

JP NEXT //Jump to NEXT jump label if the bit shifted out last (CC 1) =1.<br />

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

A5E00706960-01 11-13

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

Saved successfully!

Ooh no, something went wrong!