3 INSTRUCTION SET

SBC r,q

Subtract with carry q-register from r-register

Source Format:

SBC r,q

 

 

 

 

 

 

 

 

 

 

Operation:

r

 

r - q - C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OP-Code:

1

 

0

1

0

1

0

1

1

r1

r0

q1

q0

 

AB0H to ABFH

 

MSB

 

 

 

 

 

 

LSB

 

 

Type:

IV

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Clock Cycles:

7

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Flag:

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

 

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

 

 

 

D – Not affected

 

 

 

 

 

 

 

 

 

 

 

I

– Not affected

 

 

 

 

 

 

 

 

 

 

Description:

Subtracts the carry flag and the contents of the q-register from the r-register.

Example:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SBC A,B

 

 

SBC MY,MX

 

A register

 

1110

 

 

1011

 

 

1011

 

 

B register

 

0010

 

 

0010

 

 

0010

 

 

Memory (MX)

 

1001

 

 

1001

 

 

1001

 

 

Memory (MY)

 

0100

 

 

0100

 

 

1011

 

 

C flag

 

1

 

 

0

 

 

1

 

 

Z flag

 

0

 

 

0

 

 

0

 

SCF

Set carry flag

 

Source Format:

SCF

 

 

 

 

 

 

 

 

 

 

 

 

Operation:

C

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OP-Code:

 

1

 

1

1

1

0

1

0

0

0

0

0

1

F41H

 

MSB

 

 

 

 

 

 

 

 

 

 

LSB

 

Type:

VI

 

 

 

 

 

 

 

 

 

 

 

 

Clock Cycles:

7

 

 

 

 

 

 

 

 

 

 

 

 

 

Flag:

 

C – Set

 

Z– Not affected D – Not affected I – Not affected

Description: Sets the C (carry) flag.

Example:

 

 

SCF

 

C flag

0

 

1

S1C6200/6200A CORE CPU MANUAL

EPSON

77