Examples
1. You want to shift the contents of data word DW 52 four bits to the left
and write them to data word DW 53.
STEP 5 program: Contents of the data words:
:L DW 52 KH = 14AF
:SLW 4
:T DW 53 KH = 4AF0
2. You want to read the input double word ID 0, and shift the contents of
ACCU 1 so that the bit positions of the input double word shown in bold
face are retained and the remaining bit positions are set to defined
values (0H or 0FH).
STEP 5 program: Contents of ACCU 1 (hexadecimal)
ACCU-1-H: ACCU-1-L:
:L ID 0 2
348 ABCD
:SLW 4 2348 BCD0
:SRW 4 2348 0BCD
:SLD 4 3480 BCD0
:SSW 4 3480 FBCD
:SSD 4 0348 0FBC
:RLD 4 3480 FBC0
:RRD 4 0
348 0FBC
3. Application: Multiplication by the 3rd power, e.g. new value = old
value x 8
:L FW 10
:SLW 3
:T FW 10
Caution: do not exceed the
positive area limit!
4. Application: Division by the 2nd power, e.g. new value = old value : 4
:C DB 5
:L DW 0
:SRW 2
:T DW 0
Executive Operations
CPU 948 Programming Guide
3 - 62 C79000-G8576-C848-04