19.7 Exchange Instructions

Instruction

clk

A

I S Z V C

Operation

EX (SP),HL

15

r

- - - -

H <-> (SP+1); L <-> (SP)

EX (SP),IX

15

 

- - - - IXH <-> (SP+1); IXL <-> (SP)

EX (SP),IY

15

 

- - - -

IYH

<-> (SP+1); IYL <-> (SP)

EX AF,AF’

2

 

- - - - AF

<-> AF’

EX DE’,HL

2

s

- - - -

if

(!ALTD) then DE’ <-> HL

 

 

 

 

else DE’ <-> HL’

EX DE’,HL’

4

s

- - - -

DE’ <-> HL’

EX DE,HL

2

s

- - - -

if

(!ALTD) then DE <-> HL

 

 

 

 

else DE <-> HL’

EX DE,HL’

4

s

- - - -

DE

<-> HL’

EXX

2

 

- - - - BC

<-> BC’; DE <-> DE’;

 

 

 

 

HL

<-> HL’

 

 

 

 

 

 

 

EX DE,HL

 

 

 

 

 

 

 

 

 

 

 

A

F

 

 

H

L

 

D

E

 

 

 

 

 

 

 

 

 

 

 

 

 

EX AF,AF’

 

 

 

 

 

 

 

 

 

 

 

EX DE,HL’

 

EX DE’,HL

 

 

 

 

 

B

C

A’

F’

H’

L’

 

D’

E’

 

B’

C’

 

 

 

 

 

 

 

 

EXX - exchange HL,HL’,DE,DE’,BC,BC’ EX DE’,HL’

19.8 Stack Manipulation Instructions

Instruction

clk

A

I S Z V C

Operation

ADD SP,d

4

f

- - - *

SP = SP + d -- d=0 to 255

POP IP

7

 

- - - -

IP = (SP); SP = SP+1

POP IX

9

 

- - - -

IXL = (SP); IXH = (SP+1);

 

 

 

 

SP = SP+2

POP IY

9

 

- - - -

IYL = (SP); IYH = (SP+1);

 

 

 

 

SP = SP+2

POP zz

7

r

- - - -

zzl = (SP); zzh = (SP+1);

 

 

 

 

SP=SP+2 -- zz= BC,DE,HL,AF

PUSH IP

9

 

- - - -

(SP-1)

= IP; SP = SP-1

PUSH IX

12

 

- - - -

(SP-1)

= IXH; (SP-2) = IXL;

 

 

 

 

SP = SP-2

PUSH IY

12

 

- - - -

(SP-1)

= IYH; (SP-2) = IYL;

 

 

 

 

SP = SP-2

PUSH zz

10

 

- - - -

(SP-1)

= zzh; (SP-2) = zzl;

 

 

 

 

SP=SP-2 --zz= BC,DE,HL,AF

19.9 16-bit Arithmetic and Logical Ops

Instruction

clk

A

I S Z V C

Operation

ADC HL,ss

4

fr

* * V *

HL = HL + ss + CF -- ss=BC,

 

 

 

 

DE, HL, SP

ADD HL,ss

2

fr

- - - *

HL = HL + ss

ADD IX,xx

4

f

- - - *

IX = IX + xx -- xx=BC,

 

 

 

 

DE, IX, SP

 

 

 

 

 

252

 

 

 

Rabbit 3000 Microprocessor

Page 261
Image 261
Jameco Electronics 2000 Exchange Instructions, Stack Manipulation Instructions, 19.9 16-bit Arithmetic and Logical Ops