Ìèêðîïðîöåññîð Z80 -îñíîâíûå õàðàêòåðèñòèêè

         

 êîäàõ îïåðàöèé ðåãèñòðàì ñîîòâåòñòâóþò


 òàáëèöå èñïîëüçóþòñÿ ñëåäóþùèå îáîçíà÷åíèÿ:

r, r1, r2 – ðåãèñòðû îáùåãî íàçíà÷åíèÿ.  êîäàõ îïåðàöèé ðåãèñòðàì ñîîòâåòñòâóþò ñëåäóþùèå áèòîâûå çíà÷åíèÿ: 000 – B, 001 – C, 010 – D, 011 – E, 100 – H, 101 – L, 111 – A. Çíà÷åíèå 110 ïðèìåíÿåòñÿ äëÿ îáîçíà÷åíèÿ îïåðàíäà â ïàìÿòè, àäðåñ êîòîðîãî ñîäåðæèòñÿ â ðåãèñòðîâîé ïàðå HL (ñì. íèæå).  ÿçûêå àññåìáëåðà ìèêðîïðîöåññîðà 8080 äëÿ ýòîò ñëó÷àé îáîçíà÷àëñÿ “ïñåâäîðåãèñòðîì” M (íàïðèìåð, èíñòðóêöèÿ ïðîöåññîðà Z80 LD A,(HL) ñîîòâåòñòâóåò èíñòðóêöèè ïðîöåññîðà 8080 MOV A,M);

(IX), (IY), (BC), (DE), (HL) – îïåðàíä â ïàìÿòè, àäðåñ êîòîðîãî ñîäåðæèòñÿ â ñîîòâåòñòâóþùåì 16-ðàçðÿäíîì ðåãèñòðå èëè ðåãèñòðîâîé ïàðå;

(IX+d), (IY+d) – îïåðàíä â ïàìÿòè; åãî àäðåñ ðàâåí ñóììå ñîäåðæèìîãî óêàçàííîãî èíäåêñíîãî ðåãèñòðà è 8-ðàçðÿäíîé êîíñòàíòû d, ÿâëÿþùåéñÿ ÷àñòüþ êîäà êîìàíäû;

n – 8-ðàçðÿäíàÿ êîíñòàíòà, ÿâëÿþùàÿñÿ ÷àñòüþ êîäà êîìàíäû;

nn – 16-ðàçðÿäíàÿ êîíñòàíòà, ÿâëÿþùàÿñÿ ÷àñòüþ êîäà êîìàíäû (â ïàìÿòè ìëàäøèé áàéò ïðåäøåñòâóåò ñòàðøåìó);

e – 8-ðàçðÿäíîå ñìåùåíèå îòíîñèòåëüíî àäðåñà ñëåäóþùåé êîìàíäû;

(aa) – îïåðàíä â ïàìÿòè ïî àäðåñó aa, ÿâëÿþùåìóñÿ ÷àñòüþ êîäà êîìàíäû;

dd – 16-ðàçðÿäíûé ðåãèñòð SP èëè îäíà èç ðåãèñòðîâûõ ïàð. Èì ñîîòâåòñòâóþò ñëåäóþùèå êîäû: 00 – BC, 01 – DE, 10 – HL, 11 – SP;

pp – îäíà èç 16-ðàçðÿäíûõ ïàð èëè ðåãèñòðîâ: 00 – BC, 01 – DE, 10 – IX, 11 – SP;

qq – îäíà èç 16-ðàçðÿäíûõ ðåãèñòðîâûõ ïàð: 00 – BC, 01 – DE, 10 – HL, 11 – AF;

ss – îäíà èç 16-ðàçðÿäíûõ ïàð èëè ðåãèñòðîâ: 00 – BC, 01 – DE, 10 – IY, 11 – SP;



x – íîìåð îäíîé èç âîñüìè ïîäïðîãðàìì, ïåðåõîä ê êîòîðûì îñóùåñòâëÿåòñÿ ñ ïîìîùüþ èíñòðóêöèè RST;

(p) – ïîðò ââîäà-âûâîäà ñ àäðåñîì p;

b – íîìåð ðàçðÿäà â äèàïàçîíå 0–7;

rb – ðàçðÿä b ðåãèñòðà r;

(HL)b, (IX+d)b, (IY+d)b – ðàçðÿä b ÿ÷åéêè ïàìÿòè ñ ñîîòâåòñòâóþùèì àäðåñîì;

cc – óñëîâèå ïåðåõîäà, êîäèðóåìîå ñëåäóþùèì îáðàçîì: NZ (000) – íå íóëü, íå ðàâíî, Z=0; Z (001) – íóëü, ðàâíî, Z=1; NC (010) – îòñóòñòâèå ïåðåíîñà èëè çà¸ìà, C=0; C (011) – íàëè÷èå ïåðåíîñà èëè çà¸ìà, C=1; PO (100) – íå÷¸òíûé ðåçóëüòàò, P/V=0; PE (101) – ÷¸òíûé ðåçóëüòàò, P/V=1; P (110) – çíàê “ïëþñ”, S=0; M (111) – çíàê “ìèíóñ”, S=1.



* – ôëàã óñòàíàâëèâàåòñÿ ïî ðåçóëüòàòàì âûïîëíåííîé îïåðàöèè;

? – çíà÷åíèå ôëàãà ïîñëå âûïîëíåíèÿ îïåðàöèè íå îïðåäåëåíî;

& – îïåðàöèÿ “ëîãè÷åñêîå È”;

| – îïåðàöèÿ “ëîãè÷åñêîå ÈËÈ”;

Å – îïåðàöèÿ “èñêëþ÷àþùåå ÈËÈ”.

Ìíåìîíèêà

Îïåðàöèÿ

Ôëàãè

Êîä îïåðàöèè

Êîë-âî áàéòîâ

Êîë-âî öèêëîâ

Êîë-âî òàêòîâ

S

Z

H

P/V

N

C

76

543

210

øåñòí.

Îäíîáàéòîâûå îïåðàöèè ïåðåñûëêè

LD r1,r2

r1












01

r1

r2

1

1

4

LD r,n

r












00

r

110

2

2

7

n

LD r,(HL)

r<(HL)













01

r

110

1

2

7

LD r,(IX+d)

r<(IX+d)













11

011

101

DD

3

5

19

01

r

110

d

LD r,(IY+d)

r<(IY+d)













11

111

101

FD

3

5

19

01

r

110

d

LD (HL),n

(HL)












00

110

110

36

2

3

10

n

LD (IX+d),n

(IX+d)












11

011

101

DD

4

5

19

00

110

110

36

d

n

LD (IY+d),n

(IY+d)












11

111

101

FD

4

5

19

00

110

110

36

d

n

LD A,(BC)

A<(BC)













00

001

010

0A

1

2

7

LD A,(DE)

A<(DE)













00

011

010

1A

1

2

7

LD A,(aa)

A<(aa)













00

111

010

3A

3

4

13

a

a

LD (BC),A

(BC)












00

000

010

02

1

2

7

LD (DE),A

(DE)












00

010

010

12

1

2

7

LD (aa),A

(nn)












00

110

010

32

3

4

13

a

a

LD A,I

A
*

*

0

IFF2

0



11

101

101

ED

2

2

9

01

010

111

57

LD A,R

A
*

*

0

IFF2

0



11

101

101

ED

2

2

9

01

011

111

5F

LD I,A

I












11

101

101

ED

2

2

9

01

000

111

47

LD R,A

R












11

101

101

ED

2

2

9

01

001

111

4F

Äâóõáàéòîâûå îïåðàöèè ïåðåñûëêè

LD dd,nn

dd












00

dd0

001

3

3

10

n

n

LD IX,nn

IX












11

011

101

DD

4

4

14

00

100

001

21

n

n

LD IY,nn

IY












11

111

1-1

FD

4

4

14

00

100

001

21

n

n

LD HL,(aa)

H<(nn+1)













00

101

010

2A

3

5

16

L<(nn)

a

a

LD dd,(aa)

dd[15:8]<(nn+1)













11

101

101

ED

4

6

20

dd[7:0]<(nn)













01

dd1

011

a

a

LD IX,(aa)

IX[15:8]<(nn+1)













11

011

101

DD

4

6

20

IX[7:0]<(nn)













00

101

010

2A

a

a

LD IY,(aa)

IY[15:8]<(nn+1)













11

111

101

FD

4

6

20

IY[7:0]<(nn)













00

101

010

2A

a

a

LD (aa),HL

(nn+1)












00

100

010

22

3

5

16

(nn)












a

a

LD (aa),dd

(nn+1)












11

101

101

ED

4

6

20

(nn)












01

dd0

011

a

a

LD (aa),IX

(nn+1)












11

011

101

DD

4

6

20

(nn)












00

100

010

22

a

a

LD (aa),IY

(nn+1)












11

111

101

FD

4

6

20

(nn)












00

100

010

22

a

a

LD SP,HL

SP












11

111

001

F9

1

1

6

LD SP,IX

SP












11

011

101

DD

2

2

10

11

111

001

F9

LD SP,IY

SP












11

111

101

FD

2

2

10

11

111

001

F9

PUSH qq

(SP-2)












11

qq0

101

1

3

11

(SP-1)
SP
PUSH IX

(SP-2)












11

011

101

DD

2

4

15

(SP-1)
11

100

101

E5

SP
PUSH IY

(SP-2)












11

111

101

FD

2

4

15

(SP-1)
11

100

101

E5

SP
POP qq

qq[15:8]<(SP+1)













11

qq0

001

1

3

10

qq[7:0]<(SP)

SP
POP IX

IX[15:8]<(SP+1)













11

011

101

DD

2

4

14

IX[7:0]<(SP)

11

100

001

E1

SP
POP IY

IY[15:8]<(SP+1)













11

111

101

FD

2

4

14

IY[7:0]<(SP)

11

100

001

E1

SP
Îïåðàöèè îáìåíà

EX DE,HL

DE-HL













11

101

011

EB

1

1

4

EX AF,AF'

AF-AF'

*

*

*

*

*

*

00

001

000

08

1

1

4

EXX

BC-BC'













11

011

001

D9

1

1

4

DE-DE'

HL-HL'

EX (SP),HL

H-(SP+1)













11

100

011

E3

1

5

19

L-(SP)

EX (SP),IX

IX[15:8]-(SP+1)













11

011

101

DD

2

6

23

IX[7:0]-(SP)

11

100

011

E3

EX (SP),IY

IY[15:8]-(SP+1)













11

111

101

FD

2

6

23

IY[7:0]-(SP)

11

100

011

E3

Îïåðàöèè ïîèñêà è ãðóïïîâîé ïåðåäà÷è

LDI

(DE)<(HL)





0

*[1]

0



11

101

101

ED

2

4

16

DE
10

100

000

A0

HL
BC
LDIR

(DE)<(HL)





0

0

0



11

101

101

ED

2

5

21[2]

DE
10

110

000

B0

2

4

16

HL
BC
Ïîâòîð, ïîêà BC?0

LDD

(DE)<(HL)





0

*

0



11

101

101

ED

2

4

16

DE
10

101

000

A8

HL
BC
LDDR

(DE)<(HL)





0

0

0



11

101

101

ED

2

5

21

DE
10

111

000

B8

2

4

16

HL
BC
Ïîâòîð, ïîêà BC?0

CPI

Ñðàâíåíèå A ñ (HL)[3]

*

*

*

*

1



11

101

101

ED

2

4

16

HL
10

100

001

A1

BC
CPIR

Ñðàâíåíèå A ñ (HL)

*

*

*

*

1



11

101

101

ED

2

5

21

HL
10

110

001

B1

2

4

16

BC
Ïîâòîð, ïîêà A?(HL) è BC?0

CPD

Ñðàâíåíèå A ñ (HL)

*

*

*

*

1



11

101

101

ED

2

4

16

HL
10

101

001

A9

BC
CPDR

Ñðàâíåíèå A ñ (HL)

*

*

*

*

1



11

101

101

ED

2

5

21

HL
10

111

001

B9

2

4

16

BC
Ïîâòîð, ïîêà A?(HL) è BC?0

Îäíîáàéòîâûå àðèôìåòèêî-ëîãè÷åñêèå îïåðàöèè

ADD A,r

A
*

*

*

*

0

*

10

000

r

1

1

4

ADD A,n

A
*

*

*

*

0

*

11

000

110

C6

2

2

7

n

ADD A,(HL)

A
*

*

*

*

0

*

10

000

110

86

1

2

7

ADD A,(IX+d)

A
*

*

*

*

0

*

11

011

101

DD

3

5

19

10

000

110

86

d

ADD A,(IY+d)

A
*

*

*

*

0

*

11

111

101

FD

3

5

19

10

000

110

86

d

ADC A,r

A
*

*

*

*

0

*

10

001

r

1

1

4

ADC A,n

A
*

*

*

*

0

*

11

001

110

CE

2

2

7

n

ADC A,(HL)

A
*

*

*

*

0

*

10

001

110

8E

1

2

7

ADC A,(IX+d)

A
*

*

*

*

0

*

11

011

101

DD

3

5

19

10

001

110

8E

d

ADC A,(IY+d)

A
*

*

*

*

0

*

11

111

101

FD

3

5

19

10

001

110

8E

d

SUB r

A
*

*

*

*

1

*

10

010

r

1

1

4

SUB n

A
*

*

*

*

1

*

11

010

110

D6

2

2

7

n

SUB (HL)

A
*

*

*

*

1

*

10

010

110

96

1

2

7

SUB (IX+d)

A
*

*

*

*

1

*

11

011

101

DD

3

5

19

10

010

110

96

d

SUB (IY+d)

A
*

*

*

*

1

*

11

111

101

FD

3

5

19

10

010

110

96

d

SBC A,r

A
*

*

*

*

1

*

10

011

r

1

1

4

SBC A,n

A
*

*

*

*

1

*

11

011

110

DE

2

2

7

n

SBC A,(HL)

A
*

*

*

*

1

*

10

011

110

9E

1

2

7

SBC A,(IX+d)

A
*

*

*

*

1

*

11

011

101

DD

3

5

19

10

011

110

9E

d

SBC A,(IY+d)

A
*

*

*

*

1

*

11

111

101

FD

3

5

19

10

011

110

9E

d

AND r

A
*

*

1

*

0

0

10

100

r

1

1

4

AND n

A
*

*

1

*

0

0

11

100

110

E6

2

2

7

n

AND (HL)

A
*

*

1

*

0

0

10

100

110

A6

1

2

7

AND (IX+d)

A
*

*

1

*

0

0

11

011

101

DD

3

5

19

10

100

110

A6

d

AND (IY+d)

A
*

*

1

*

0

0

11

111

101

FD

3

5

19

10

100

110

A6

d

OR r

A
*

*

1

*

0

0

10

110

r

1

1

4

OR n

A
*

*

1

*

0

0

11

110

110

F6

2

2

7

n

OR (HL)

A
*

*

1

*

0

0

10

110

110

B6

1

2

7

OR (IX+d)

A
*

*

1

*

0

0

11

011

101

DD

3

5

19

10

110

110

B6

d

OR (IY+d)

A
*

*

1

*

0

0

11

111

101

FD

3

5

19

10

110

110

B6

d

XOR r

A
*

*

1

*

0

0

10

101

r

1

1

4

XOR n

A
*

*

1

*

0

0

11

101

110

EE

2

2

7

n

XOR (HL)

A
*

*

1

*

0

0

10

101

110

AE

1

2

7

XOR (IX+d)

A
*

*

1

*

0

0

11

011

101

DD

3

5

19

10

101

110

AE

d

XOR (IY+d)

A
*

*

1

*

0

0

11

111

101

FD

3

5

19

10

101

110

AE

d

CP r

Ñðàâíåíèå A è r

*

*

*

*

1

*

10

111

r

1

1

4

CP n

Ñðàâíåíèå A è n

*

*

*

*

1

*

11

111

110

FE

2

2

7

n

CP (HL)

Ñðàâíåíèå A è (HL)

*

*

*

*

1

*

10

111

110

BE

1

2

7

CP (IX+d)

Ñðàâíåíèå A è (IX+d)

*

*

*

*

1

*

11

011

101

DD

3

5

19

10

111

110

BE

d

CP (IY+d)

Ñðàâíåíèå A è (IX+d)

*

*

*

*

1

*

11

111

101

FD

3

5

19

10

111

110

BE

d

INC r

r
*

*

*

*

0



00

r

100

1

1

4

INC (HL)

(HL)<(HL)+1

*

*

*

*

0



00

110

100

34

1

3

11

INC (IX+d)

(IX+d)<(IX+d)+1

*

*

*

*

0



11

011

101

DD

3

6

23

00

110

100

34

d

INC (IY+d)

(IY+d)<(IY+d)+1

*

*

*

*

0



11

111

101

FD

3

6

23

00

110

100

34

d

DEC r

r
*

*

*

*

0



00

r

101

1

1

4

DEC (HL)

(HL)<(HL)-1

*

*

*

*

0



00

110

101

35

1

3

11

DEC (IX+d)

(IX+d)<(IX+d)-1

*

*

*

*

0



11

011

101

DD

3

6

23

00

110

101

35

d

DEC (IY+d)

(IY+d)<(IY+d)-1

*

*

*

*

0



11

111

101

FD

3

6

23

00

110

101

35

d

DAA

Äåñÿòè÷íàÿ êîððåêöèÿ

*

*

*

*



*

00

100

111

27

1

1

4

CPL

A< not A





1



1



00

101

111

2F

1

1

4

NEG

A< -A

*

*

*

*

1

*

11

101

101

ED

2

2

8

01

000

100

44

Äâóõáàéòîâûå àðèôìåòè÷åñêèå îïåðàöèè

ADD HL,dd

HL




?



0

*

00

dd1

001

1

3

11

ADC HL,dd

HL
*

*

?

*

0

*

11

101

101

ED

2

4

15

01

dd1

010

SBC HL,dd

HL
*

*

?

*

1

*

11

101

101

ED

2

4

15

01

dd0

010

ADD IX,pp

IX




?



0

*

11

011

101

DD

2

4

15

01

pp1

001

ADD IY,ss

IY




?



0

*

11

111

101

FD

2

4

15

00

ss1

001

INC dd

dd












00

ss0

011

1

1

6

INC IX

IX












11

011

101

DD

2

2

10

00

100

011

23

INX IY

IY












11

111

101

FD

2

2

10

00

100

011

23

DEC dd

dd












00

ss1

011

1

1

6

DEC IX

IX












11

011

101

DD

2

2

10

00

101

011

2B

DEX IY

IY












11

111

101

FD

2

2

10

00

101

011

2B

Îïåðàöèè ñäâèãîâ

RLCA

öèêëè÷åñêèé ñäâèã A âëåâî





0



0

*

00

000

111

07

1

1

4

RLA

öèêëè÷åñêèé ñäâèã A âëåâî ÷åðåç ïåðåíîñ





0



0

*

00

010

111

17

1

1

4

RRCA

öèêëè÷åñêèé ñäâèã A âïðàâî





0



0

*

00

001

111

0F

1

1

4

RRA

öèêëè÷åñêèé ñäâèã A âïðàâî ÷åðåç ïåðåíîñ





0



0

*

00

011

111

1F

1

1

4

RLC r

öèêëè÷åñêèé ñäâèã r âëåâî

*

*

0

*

0

*

11

001

011

CB

2

2

8

00

000

r

RLC (HL)

öèêëè÷åñêèé ñäâèã (HL) âëåâî

*

*

0

*

0

*

11

001

011

CB

2

4

15

00

000

110

06

RLC (IX+d)

öèêëè÷åñêèé ñäâèã (IX+d) âëåâî

*

*

0

*

0

*

11

011

101

DD

4

6

23

11

001

011

CB

d

00

000

110

06

RLC (IY+d)

öèêëè÷åñêèé ñäâèã (IY+d) âëåâî

*

*

0

*

0

*

11

111

101

FD

4

6

23

11

001

011

CB

d

00

000

110

06

RL r

öèêëè÷åñêèé ñäâèã r âëåâî ÷åðåç ïåðåíîñ

*

*

0

*

0

*

11

001

011

CB

2

2

8

00

010

r

RL (HL)

öèêëè÷åñêèé ñäâèã (HL) âëåâî ÷åðåç ïåðåíîñ

*

*

0

*

0

*

11

001

011

CB

2

4

15

00

010

110

16

RL (IX+d)

öèêëè÷åñêèé ñäâèã (IX+d) âëåâî ÷åðåç ïåðåíîñ

*

*

0

*

0

*

11

011

101

DD

4

6

23

11

001

011

CB

d

00

010

110

16

RL (IY+d)

öèêëè÷åñêèé ñäâèã (IY+d) âëåâî ÷åðåç ïåðåíîñ

*

*

0

*

0

*

11

111

101

FD

4

6

23

11

001

011

CB

d

00

010

110

16

RRC r

öèêëè÷åñêèé ñäâèã r âïðàâî

*

*

0

*

0

*

11

001

011

CB

2

2

8

00

001

r

RRC (HL)

öèêëè÷åñêèé ñäâèã (HL) âïðàâî

*

*

0

*

0

*

11

001

011

CB

2

4

15

00

001

110

0E

RRC (IX+d)

öèêëè÷åñêèé ñäâèã (IX+d) âïðàâî

*

*

0

*

0

*

11

011

101

DD

4

6

23

11

001

011

CB

d

00

001

110

0E

RRC (IY+d)

öèêëè÷åñêèé ñäâèã (IY+d) âïðàâî

*

*

0

*

0

*

11

111

101

FD

4

6

23

11

001

011

CB

d

00

001

110

0E

RR r

öèêëè÷åñêèé ñäâèã r âïðàâî ÷åðåç ïåðåíîñ

*

*

0

*

0

*

11

001

011

CB

2

2

8

00

011

r

RR (HL)

öèêëè÷åñêèé ñäâèã (HL) âïðàâî ÷åðåç ïåðåíîñ

*

*

0

*

0

*

11

001

011

CB

2

4

15

00

011

110

1E

RR (IX+d)

öèêëè÷åñêèé ñäâèã (IX+d) âïðàâî ÷åðåç ïåðåíîñ

*

*

0

*

0

*

11

011

101

DD

4

6

23

11

001

011

CB

d

00

011

110

1E

RR (IY+d)

öèêëè÷åñêèé ñäâèã (IY+d) âïðàâî ÷åðåç ïåðåíîñ

*

*

0

*

0

*

11

111

101

FD

4

6

23

11

001

011

CB

d

00

011

110

1E

SLA r

àðèôìåòè÷åñêèé ñäâèã r âëåâî

*

*

0

*

0

*

11

001

011

CB

2

2

8

00

100

r

SLA (HL)

àðèôìåòè÷åñêèé ñäâèã (HL) âëåâî

*

*

0

*

0

*

11

001

011

2B

2

4

15

00

100

110

26

SLA (IX+d)

àðèôìåòè÷åñêèé ñäâèã (IX+d) âëåâî

*

*

0

*

0

*

11

011

101

DD

4

6

23

11

001

011

CB

d

00

100

110

26

SLA (IY+d)

àðèôìåòè÷åñêèé ñäâèã (IY+d) âëåâî

*

*

0

*

0

*

11

111

101

FD

4

6

23

11

001

011

CB

d

00

100

110

26

SRA r

àðèôìåòè÷åñêèé ñäâèã r âïðàâî

*

*

0

*

0

*

11

001

011

CB

2

2

8

00

101

r

SRA (HL)

àðèôìåòè÷åñêèé ñäâèã (HL) âïðàâî

*

*

0

*

0

*

11

001

011

2B

2

4

15

00

101

110

2E

SRA (IX+d)

àðèôìåòè÷åñêèé ñäâèã (IX+d) âïðàâî

*

*

0

*

0

*

11

011

101

DD

4

6

23

11

001

011

CB

d

00

101

110

2E

SRA (IY+d)

àðèôìåòè÷åñêèé ñäâèã (IY+d) âïðàâî

*

*

0

*

0

*

11

111

101

FD

4

6

23

11

001

011

CB

d

00

101

110

2E

SRL r

ëîãè÷åñêèé ñäâèã r âïðàâî

*

*

0

*

0

*

11

001

011

CB

2

2

8

00

111

r

SRL (HL)

ëîãè÷åñêèé ñäâèã (HL) âïðàâî

*

*

0

*

0

*

11

001

011

2B

2

4

15

00

111

110

3E

SRL (IX+d)

ëîãè÷åñêèé ñäâèã (IX+d) âïðàâî

*

*

0

*

0

*

11

011

101

DD

4

6

23

11

001

011

CB

d

00

111

110

3E

SRL (IY+d)

ëîãè÷åñêèé ñäâèã (IY+d) âïðàâî

*

*

0

*

0

*

11

111

101

FD

4

6

23

11

001

011

CB

d

00

111

110

3E

RLD

äåñÿòè÷íûé ñäâèã âëåâî

*

*

0

*

0



11

101

101

ED

2

5

18

01

101

111

6F

RRD

äåñÿòè÷íûé ñäâèã âïðàâî

*

*

0

*

0



11

101

101

ED

2

5

18

01

100

111

67

Áèòîâûå îïåðàöèè

BIT b,r

Z< not rb

?

*

1

?

0



11

001

011

CB

2

2

8

01

b

r

BIT b,(HL)

Z< not (HL)b

?

*

1

?

0



11

001

011

CB

2

3

12

01

b

110

BIT b, (IX+d)

Z< not (IX+d)b

?

*

1

?

0



11

011

101

DD

4

5

20

11

001

011

CB

d

01

b

110

BIT b, (IY+d)

Z< not (IY+d)b

?

*

1

?

0



11

111

101

FD

4

5

20

11

001

011

CB

d

01

b

110

SET b,r

rb < 1













11

001

011

CB

2

2

8

11

b

r

SET b,(HL)

(HL)b < 1













11

001

011

CB

2

4

15

11

b

110

SET b, (IX+d)

(IX+d)b < 1













11

011

101

DD

4

6

23

11

001

011

CB

d

11

b

110

SET b, (IY+d)

(IY+d)b < 1













11

111

101

FD

4

6

23

11

001

011

CB

d

11

b

110

RES b,r

rb < 1













11

001

011

CB

2

2

8

10

b

r

RES b,(HL)

(HL)b < 1













11

001

011

CB

2

4

15

10

b

110

RES b, (IX+d)

(IX+d)b < 1













11

011

101

DD

4

6

23

11

001

011

CB

d

10

b

110

RES b, (IY+d)

(IY+d)b < 1













11

111

101

FD

4

6

23

11

001

011

CB

d

10

b

110

Îïåðàöèè ïåðåõîäîâ

JP nn

PC












11

000

011

C3

3

3

10

n

n

JP cc,nn

Åñëè âûïîëíåíî óñëîâèå cc, òî PC












11

ññ

010

3

3

10

n

n

JR e

PC












00

011

000

18

2

3

12

e-2

JR C,e

Åñëè C=1, òî PC












00

111

000

38

2

2

7[4]

e-2

2

3

12

JR NC,e

Åñëè C=0, òî PC












00

110

000

30

2

2

7

e-2

2

3

12

JR Z,e

Åñëè Z=1, òî PC












00

101

000

28

2

2

7

e-2

2

3

12

JR NZ,e

Åñëè Z=0, òî PC












00

100

000

20

2

2

7

e-2

2

3

12

JP (HL)

PC












11

101

001

E9

1

1

4

JP (IX)

PC












11

011

101

DD

2

2

8

11

101

001

E9

JP (IY)

PC












11

111

101

FD

2

2

8

11

101

001

E9

DJNZ e

B












00

010

000

10

2

2

8[5]

e-2

2

3

13

CALL nn

(SP-1)












11

001

101

CD

3

5

17

(SP-2)
n

SP
n

PC
CALL cc,nn

Åñëè óñëîâèå cc âûïîëíåíî, òî:













11

ññ

100

CD

3

3

10[6]

n

3

5

17

(SP-1)
n

(SP-2)
SP
PC
RET

PC[7:0]<(SP)













11

001

001

C9

1

3

10

PC[15:8]<(SP+1)

SP
RET cc

Åñëè óñëîâèå cc âûïîëíåíî, òî:













11

ññ

000

1

1

5

1

3

11

PC[7:0]<(SP)

PC[15:8]<(SP+1)

SP
RETI

Âîçâðàò èç ïðåðûâàíèÿ













11

101

101

ED

2

4

14

01

001

101

4D

RETN

Âîçâðàò èç íåìàñêèðóåìîãî ïðåðûâàíèÿ













11

101

101

ED

2

4

14

01

000

101

45

IFF1
RST x

(SP-1)












11

x

111

1

3

11

(SP-2)
SP
PC<àäðåñ ïîäïðîãðàììû

Îïåðàöèè ââîäà-âûâîäà[7]

IN A,(p)

A<ïîðò (A; p)













11

011

011

DB

2

3

11

p

IN r,(C)

r<ïîðò (BC)

*

*

0

P

0



11

101

101

ED

2

3

12

01

r

000

INI

(HL)<ïîðò (BC)

?

*

?

?

1



11

101

101

ED

2

4

16

B
10

100

010

A2

HL
INIR

(HL)<ïîðò (BC)

?

1

?

?

1



11

101

101

ED

2

5

21

B
10

110

010

B2

2

4

16

HL
Ïîâòîð, ïîêà B?0

IND

(HL)<ïîðò (BC)

?

*

?

?

1



11

101

101

ED

2

4

16

B
10

101

010

AA

HL
INDR

(HL)<ïîðò (BC)

?

1

?

?

1



11

101

101

ED

2

5

21

B
10

111

010

BA

2

4

16

HL
Ïîâòîð, ïîêà B?0

OUT (p),A

ïîðò (A; p)












11

010

011

D3

2

3

11

p

OUT (C),r

ïîðò (BC)












11

101

101

ED

2

3

12

01

r

001

OUTI

ïîðò (BC)<(HL)

?

*

?

?

1



11

101

101

ED

2

4

16

B
10

100

011

A3

HL
OTIR

ïîðò (BC)<(HL)

?

1

?

?

1



11

101

101

ED

2

5

21

B
10

110

011

B3

2

4

16

HL
Ïîâòîð, ïîêà B?0

OUTD

ïîðò (BC)<(HL)

?

*

?

?

1



11

101

101

ED

2

4

16

B
10

101

011

AB

HL
OTDR

ïîðò (BC)<(HL)

?

1

?

?

1



11

101

101

ED

2

5

21

B
10

111

011

BB

2

4

16

HL
Ïîâòîð, ïîêà B?0

Ïðî÷èå îïåðàöèè

CCF

èíâåðñèÿ ôëàãà C











*

00

111

111

3F

1

1

4

SCF

óñòàíîâêà ôëàãà C











1

00

110

111

37

1

1

4

NOP

íåò îïåðàöèè













00

000

000

00

1

1

4

HALT

îñòàíîâ ÖÏ













01

110

110

76

1

1

4

DI

IFF<0













11

110

011

F3

1

1

4

EI

IFF<1













11

111

011

FB

1

1

4

IM 0

óñòàíîâêà ðåæèìà













11

101

101

ED

2

2

8

ïðåðûâàíèé 0

01

000

110

46

IM 1

óñòàíîâêà ðåæèìà













11

101

101

ED

2

2

8

ïðåðûâàíèé 1

01

010

110

56

IM 2

óñòàíîâêà ðåæèìà













11

101

101

ED

2

2

8

ïðåðûâàíèé 2

01

011

110

5E



Ñîäåðæàíèå ðàçäåëà