BSFR BSFL

BSFR, BSFRP, BSFL, BSFLP

 

BSFR(P) instruction shifts the specified bits(D) towards the 1 bit right side and loads Source bit into bit 0 of Array.

BSFL(P) instruction shifts the specified bits(D) towards the 1 bit left side and loads Source bit into bit 0 of Array.

 

 

D

Source

n

Number of bits to move right(BSFR) or left(BSFL)

 

Instruction

Device address

No. of Steps

Flag

M

X

Y

K

L

F

T

C

S

Z

D

@D

Int.

 

Error

Zero

Carry

BSFR(P)

BSFL(P)

D

o

-

o

o

o

-

-

-

-

-

-

-

-

3

o

-

o

n

o

o

o

o

o

o

o

o

-

o

o

o

o

 

BSFR(P)

Format : BSFRP D(starting device address to move right) n(number of source device to move right)

Example)

If X8F is ON, the BSFRP instruction shifts M462~M470 (9 device value) 1 bit right side and loads 0 into M470.

 

 

 

 

BSFL(P)

Format : BSFL D(starting device address to move left) n(number of source device to move left)

Example)

If X0C is ON, the BSFLP instruction shifts Y50~Y5F (16 device value) 1 bit left side and loads 0 into Y50.