SFR
- 167 -
Program example
Program that shifts the details of D8 5 bits to the right when M10 turns ON.
Coding
No. of
steps
Com-
mand
Device
10 LD M10
11 SFR D8 K5
D8SFR K5
M10
10
(Pulse coding)
14
B15 B14 B13 B12 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0
Carry flag
(SM12)
Before execution
After execution
0
000000
1
1
00000
11
1
0
0
1100000
1
1
1
00011
D8
Right shift of data with SFR command (word device)