. , , ,

,,,

, , , , , - . , , . , , . - , , , - , " ". , , Dj=0,1. .

.

, . , 5. , ( ) . , , . , , . .

. :

, 1 - , 2 - .

, . << - , , , .

. 1.

" 1" , ( 1 . .1). " 2" . " 1" , .

, - .

.

.2. Z-80. . . 1 1, . 2 2. 1, 1 2. , , , 1 1, 2 - 2.

. 2.

1 2 . / ( ) , , . , .

. 600 6000 /. .. 10 100. 60000. , ( .. ) 10 60000, 600 000. 500 , .

, , - . D==2, .. 1 . d=(/). 360, Dj=0,06.

7. , 1 D8 (5557). : 4 - , LC, 500 , , , LC . - D11. 1 INT Z-80. D4, 0000 4096 ( ), D3, 4096 - 5120. . MREQ A13, D10.1

. , . D5 , OUT 16. D7, , "1" . , D6, . OUT 8. 200 , 50 . NMI.

. 3. - -, .

"" . 1, .

.3.

1. , , , , . , 1:

, 2. , 1 2, , , . , , , .

Z-80.

:

; , .

LD A, 00111010 ; 0: 5; , ; - .

OUT 3,A

LD A, FFH

OUT 3,A

LD A, FFH

OUT 3,A

LD A,01111010 ; 1.

OUT 3,A

LD A, FFH

OUT 3,A

LD A, FFH

OUT 3,A

LD A, 10111010 ; 3.

OUT 3,A

LD A, C4

OUT 3,A ; 2500.

LD A,9

OUT 3,A

; - .

N: LD D,0

LD B, (R4) ; .

L: LD A,B

OUT 8,A ; .

LD HL, (R5)

LD E, B

ADD HL, DE

LD E, (HL) ; .

LD HL, (R6)

ADD HL, DE

LD A, (HL) ; .

LD (R8), A

INC (R9)

M: LD A, (R9) ; .

JR NZ, M;

DJNZ L;

JP N;

:

LD A, (R9)

OUT 16,A ; .

LD (R9),0

RETI

:

EXX ; .

LD A, (R7) ;

JR NZ N;

LD (R7),1 ;

EXX

RETI

N: LD (R7),0

IN A,0 ; 1 .

XOR FFH ; , .

LD L,A

IN A,0

XOR FFH

LD H,A

LD (R1), HL

IN A,4 ; .

CPS 1

JP NZ A; , .

LD BC, (R1) ; .

LD (A1), BC

LD (A2),10

CALL DEL ; .

LD BC, (A2)

LD (A2), BC

LD (A1), 50000

CALL DEL

LD (A2),6

CALL YMH ; .

LD BC, (A1)

LD (R3), BC

LD (R10),0

CALL DECT ; .

EXX

RETI

A: IN A, 1 ; 2 .

XOR FFH

LD L, A

IN A, 1

XOR FFH

LD H, A

LD (R2), HL ; .

LD (A1), 36 (10)

LD (A2), HL

CALL YMH

LD HL, (A1)

LD BC, (R1)

LD (A1), BC

LD (A2), 10

CALL DEL

LD BC, (A1)

LD (A2), BC

LD (A1), HL

CALL DEL

LD BC, (A1)

LD (R3), BC

LD BC, (A3)

LD (R10), BC

CALL DECT

EXX

RETI

DECT:

; ( ).

LD BC, (R3) ; , R3.

LD (A1), BC

C: LD (A2), 10

CALL DEL

LD B, (A3)

INC (R4) ; R4.

LD A, (R4)

ADD A, (R5)

LD (A), B

LD A, (A1)

CPS 10

JP NC C;

LD B, (A1)

INC (R4)

LD A, (R4)

ADD A, R5

LD (A), B ; , R5.

INC A

LD (A), 128 (10) ;

INC A

LD B, (R10)

LD (A), B

RET

DEL:

; ( 1) ( 2).

PUSH BC

PUSH DE

PUSH HL

LD HL, (A2)

LD DE, (A1)

LD BC, 0

M1: LD (A4), HL

SBC HL, DE

INC BC

JR NC, M1;

DEC BC

LD (A1), BC ; 1.

LD HL, (A4)

LD (A3), HL ; 3.

POP HL

POP DE

POP BC

RET

YMH:

; ( 1) ( 2).

PUSH DE

PUSH HL

LD DE, (A2)

DEC DE

LD HL, (A1)

M2: ADC HL, HL

DINZ M2;

LD (A1), HL ; 1.

POP HL

POP DE

RET

.

DECT: . , , R5. , ( R4), 10, , , R5+R4.

DEL YMH: . (). . - , Z-80 , 16- . - () , 1 ( 10-100 ) - ( 200 ), .

1 2, 1. 1+1 2 . , 1 2.

1 2, 1 3. 1 2 .

:

( ) "R6+" .

, . . .

.4, 1.

1.

A B C D E F G H
0 1 1 1 1 1 1 0 0 4111
1 0 1 1 0 0 0 0 0 4112
2 1 1 0 1 1 0 1 0 4113
3 1 1 1 1 0 0 1 0 4114
4 0 1 1 0 0 1 1 0 4115
5 1 0 1 1 0 1 1 0 4116
6 1 0 1 1 1 1 1 0 4117
7 1 1 1 0 0 0 0 0 4118
8 1 1 1 1 1 1 1 0 4119
9 1 1 1 1 0 1 1 0 4120

, .

2.

.
R1 1 4096 D 2
R2 2 4098 2
R3 DECT 4100 2
R4 4102 1
R5 (8 ) 4103 8
R6 (10) 4111 10
R7 4121 1
R8,R9,R10 4122 1,1,1
A1 1- DEL YMH 4125 2
A2 2- DEL YMH 4127 2
A3 4129 2

1 INT Z-80. , , RST . 0000 (. . 5). , , NMI. INT. 0066. . DECT, DEL, YMH, .

.. , .. . . - : "", 1990., 448.

.. . . - : " ", 1984., 160.

.. , .. . . - : "", 1986,264.

.. Z-80. - : , 1993.,124.

. / . ., .., .. -.:, 1995. - 184 .

.. , .. , . - : " " 1989.,176.



, , ,

 

 

 

! , , , .
. , :