3 INSTRUCTION SET

AND r,i

Logical AND immediate data i with r-register

Source Format:

AND r,i

 

Operation:

r

r

i3 to i0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OP-Code:

 

1

 

1

0

0

1

0

r1

r0

i3

i2

i1

i0

C80H to CBFH

 

MSB

 

 

 

 

 

 

 

 

 

 

LSB

 

Type:

II

 

 

 

 

 

 

 

 

 

 

 

 

Clock Cycles:

7

 

 

 

 

 

 

 

 

 

 

 

 

 

Flag:

 

C – Not affected

 

Z– Set if the result is zero; otherwise, reset. D – Not affected

I – Not affected

Description: Performs a logical AND operation between immediate data i and the contents of the r-register. The result is stored in the r-register.

Example:

 

AND A,5

 

 

AND MX,3

 

A register

0110

 

0100

 

0100

 

Memory (MX)

1000

 

1000

 

0000

 

C flag

1

 

1

 

1

 

Z flag

0

 

0

 

1

AND r,q

Logical AND q-register with r-register

Source Format:

AND r,q

Operation:

r

r

q

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OP-Code:

1

 

0

1

0

1

1

0

0

r1

r0

q1

q0

AC0H to ACFH

 

MSB

 

 

 

 

 

 

 

 

 

 

LSB

Type: IV

Clock Cycles: 7

Flag: C – Not affected

Z– Set if the result is zero; otherwise, reset. D – Not affected

I – Not affected

Description: Performs a logical AND operation between the contents of the q-register and the contents of the r-register. The result is stored in the r-register.

Example:

 

AND MX,A

 

 

AND B,MY

 

A register

0100

 

0100

 

0100

 

B register

1011

 

1011

 

0010

 

Memory (MX)

1010

 

0000

 

0000

 

Memory (MY)

0010

 

0010

 

0010

 

C flag

0

 

0

 

0

 

Z flag

0

 

1

 

0

S1C6200/6200A CORE CPU MANUAL

EPSON

33