SFR SFL

SFR, SFRP, SFL, SFLP

 

SFR(P) instruction shifts the specified bits(D) towards the right by (n) bits and loads Source bit into bit 0 of Array.

SFL(P) instruction shifts the specified bits(D) towards the left by (n) bits and loads Source bit into bit 0 of Array.

 

 

D

Source

n

Number of bits to move right(SFR) or left(SFL)

 

  • In case of T and C device, count value can be shifted. (Set value cannot be shifted.)

Instruction

Device address

No. of Steps

Flag

M

X

Y

K

L

F

T

C

S

Z

D

@D

Int.

 

Error

Zero

Carry

SFR(P)

SFL(P)

D

o

-

o

o

o

-

o

o

-

o

o

o

-

3

o

-

o

n

o

o

o

o

o

o

o

o

-

o

o

o

o

 

SFR(P)

Format : SFR D(Source) n(number of bit to move right)

Example)

If X01 is ON, the SFRP instruction shifts D2 (16bit) 5 position right side and loads 0 into b11~b15.

 

 

 

 

 

 

SFL(P)

Format : SFL D(Source) n(number of bit to move left)

 

Example)

If X01 is ON, the SFLP instruction shifts M00 (16bit) 2 position left side and loads 0 into M00~M01.