3 INSTRUCTION SET

CALL s

Call subroutine

 

 

 

 

 

 

 

Source Format:

CALL s

 

 

 

 

 

 

 

Operation:

M(SP-1) PCP, M(SP-2)

PCSH, M(SP-3) PCSL + 1, SP SP - 3,

 

PCP NPP, PCS

s7 to s0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OP-Code:

0

 

1

0

0

s7

s6

s5

s4

s3

s2

s1

s0

400H to 4FFH

 

MSB

 

 

 

 

 

LSB

Type:

I

 

 

 

 

 

 

 

 

 

 

 

 

 

Clock Cycles:

7

 

 

 

 

 

 

 

 

 

 

 

 

 

Flag:

C – Not affected

 

 

 

 

 

 

 

 

Z – Not affected

 

 

 

 

 

 

 

 

D – Not affected

 

 

 

 

 

 

 

 

I

– Not affected

 

 

 

 

 

 

 

Description: Pushes the program counter (PCP, PCS) onto the stack as the return address,

 

then calls the subroutine addressed by NPP and the 8-bit operand.

 

 

 

 

 

 

 

 

 

Example:

 

PSET 06H

 

 

CALL 10H

 

PCP

0011

 

0011

 

0110

 

 

PCS

0010 1100

 

0010 1100

 

0001 0000

 

 

NPP

0001

 

0110

 

0110

 

 

SP

C0

 

C0

 

BD

 

 

Memory (SP-1)

xxxx

 

xxxx

 

0011

 

 

Memory (SP-2)

xxxx

 

xxxx

 

0010

 

 

Memory (SP-3)

xxxx

 

xxxx

 

1101

 

 

 

 

 

 

 

 

 

 

CALZ s

Call subroutine at page zero

Source Format:

CALZ s

 

 

 

 

 

 

 

 

Operation:

M(SP-1) PCP, M(SP-2)

PCSH, M(SP-3) PCSL + 1, SP SP - 3,

 

PCP 0, PCS

s7 to s0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OP-Code:

0

 

1

0

1

s7

s6

s5

s4

s3

s2

s1

s0

500H to 5FFH

 

MSB

 

 

 

 

 

 

LSB

Type:

I

 

 

 

 

 

 

 

 

 

 

 

 

 

Clock Cycles:

7

 

 

 

 

 

 

 

 

 

 

 

 

 

Flag:

C – Not affected

 

 

 

 

 

 

 

 

 

Z – Not affected

 

 

 

 

 

 

 

 

 

D – Not affected

 

 

 

 

 

 

 

 

 

I

– Not affected

 

 

 

 

 

 

 

 

Description: Pushes the program counter (PCP, PCS) onto the stack as the return address, then calls the subroutine addressed by the 8-bit operand. As NPP is reset to 0H, only a subroutine in page 0 can be called.

Example:

 

CALZ 10H

 

PCP

1010

0000

 

PCS

0010 1110

0001 0000

 

SP

CA

C7

 

Memory (SP-1)

xxxx

1010

 

Memory (SP-2)

xxxx

0010

 

Memory (SP-3)

xxxx

1111

34

EPSON

S1C6200/6200A CORE CPU MANUAL