3 INSTRUCTION SET

SCPX MX,r Subtract with carry r-register from M(X) and increment X by 1

Source Format:

SCPX MX,r

 

 

 

 

 

 

 

Operation:

M(X) M(X) - r - C, X

X + 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OP-Code:

1

1

1

1

0

0

1

1

1

0

r1

r0

 

F38H to F3BH

 

MSB

 

 

 

 

LSB

 

Type:

V

 

 

 

 

 

 

 

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 r-register from the data memory location addressed by IX. X is incremented by 1. Incrementing X does not affect the flags.

Example:

 

SCPX MX,B

 

X register

0101 0000

0101 0001

 

Memory (50H)

0110

0100

 

B register

0010

0010

 

C flag

0

0

 

Z flag

0

0

SCPY MY,r Subtract with carry r-register from M(Y) and increment Y by 1

Source Format:

SCPY MY,r

 

 

 

 

 

 

 

Operation:

M(Y) M(Y) - r - C, Y

Y + 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OP-Code:

1

1

1

1

0

0

1

1

1

1

r1

r0

 

F3CH to F3FH

 

MSB

 

 

 

 

LSB

 

Type:

V

 

 

 

 

 

 

 

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 r-register from the data memory location addressed by IY. Y is incremented by 1. Incrementing Y does not affect the flags.

Example:

 

SCPY MY,A

 

Y register

1111 1111

0000 0000

 

Memory (FFH)

0111

0100

 

A register

0010

0010

 

C flag

1

0

 

Z flag

1

0

78

EPSON

S1C6200/6200A CORE CPU MANUAL