3 INSTRUCTION SET

ADC r,i

Add with carry immediate data i to r-register

Source Format:

ADC r,i

 

 

 

 

Operation:

r r + i3 to i0 + C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OP-Code:

 

1

1

0

0

0

1

r1

r0

i3

i2

i1

i0

C40H to C7FH

 

MSB

 

 

LSB

 

Type:

II

 

 

 

 

Clock Cycles:

7

 

 

 

 

 

 

 

 

 

 

 

 

Flag:

 

C – Set if a carry is generated; otherwise, reset.

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

I – Not affected

Description: Adds the carry bit and immediate data i to the r-register.

Example:

 

ADC MX,3

 

 

ADC B,7

 

Memory (MX)

0100

 

1000

 

1000

 

B register

1001

 

1001

 

0000

 

C flag

1

 

0

 

1

 

Z flag

1

 

0

 

1

ADC r,q Add with carry q-register to r-register

Source Format:

ADC r,q

 

 

 

 

 

 

 

Operation:

r r + q + C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OP-Code:

 

1

0

1

0

1

0

0

1

r1

r0

q1

q0

A90H to A9FH

 

MSB

 

 

 

 

 

LSB

 

Type:

IV

 

 

 

 

 

 

 

Clock Cycles:

7

 

 

 

 

 

 

 

 

 

 

 

 

Flag:

 

C – Set if a carry is generated; otherwise, reset.

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

I – Not affected

Description: Adds the carry bit and the contents of the q-register to the r-register.

Example:

 

ADC MY,A

 

 

ADC MX,B

 

A register

0101

 

0101

 

0101

 

B register

0001

 

0001

 

0001

 

Memory (MX)

0111

 

0111

 

1001

 

Memory (MY)

1011

 

0001

 

0001

 

C flag

1

 

1

 

0

 

Z flag

0

 

0

 

0

S1C6200/6200A CORE CPU MANUAL

EPSON

29