,,,
4
58080
- 58080.
1
1. ,
1.1 (.1.1)
, . , .
1.1
Z | N | C | H | P | Z | N | C | H | P | ||||
ANAR | + | + | 0 | + | + | (A)^(R)→A | |||||||
ANAM | + | + | 0 | + | + | (A)^(M)→A | ANI Im | + | + | 0 | 0 | + | (A)^Im→A |
XRAR | + | + | 0 | 0 | + |
(A)(R)→A |
XRI Im | + | + | 0 | 0 | + |
(A)Im→A |
XRAM | + | + | 0 | 0 | + |
(A)(M)→A |
|||||||
ORAR | + | + | 0 | 0 | + |
(A)(R)→A |
ORI Im | + | + | 0 | 0 | + |
(A)Im→A |
ORAM | + | + | 0 | 0 | + |
(A)(M)→A |
|||||||
CMPR | + | + | + | + | + | (A)~(R) | CPI Im | + | + | + | + | + | (A)~Im |
CMPM | + | + | + | + | + | (A)~(M) |
: R () A, B, C, D, E, H, L; M , H L; SP ; YSP ; CzK ; Im ; Ag , . (R) , - , .
, .
ANA 軠 XRA . 軠 ORA
0 ^ 0→0 00→0 00→0
0 ^ 1→0 01→1 01→1
1 ^ 0→0 10→1 10→1
1 ^ 0→0 11→0 11→1 1 ^ 1→0
CMP ( ), .
1.2 (.1.2)
, INR () , DCR () . , .
1.2
Z | N | C | H | P | ||
INR R | + | + | - | + | + | (R)+1→R |
INR M | + | + | - | + | + | (M)+1→R |
DCR R | + | + | - | + | + | (R)-1→R |
DCR M | + | + | - | + | + | (M)-1→R |
1.3 (. 1.3)
, .
1.3
Z | N | C | H | P | ||
RLC | - | - | + | - | - | Am→Am+1, A7→Ao, A7→C |
RRC | - | - | + | - | - | Am+1→Am, Ao→A7, Ao→C |
RAL | - | - | + | - | - | Am→Am+1, C→Ao, A7→C |
RAR | - | - | + | - | - | Am+1→Am, Ao→C1, C→A7 |
CMA | - | - | + | - | - |
, |
, RLC , . .
1.4 ()
, : STS ; CMC 0.
1.5
, .
, , , .. ,
1.4
JMP Ag | Ag→C2K( Ag) |
JC Ag | (C)=1, Ag→C2K, (2)+3→ 2 |
JNC Ag | (C)=0, Ag→C2K, (2)+3→ 2 |
JZ Ag | (Z)=1, Ag→C2K, (2)+3→ 2 |
JNZ Ag | (Z)=0, Ag→C2K, (2)+3→ 2 |
JP Ag | (N)=0, Ag→C2K, (2)+3→ 2( +) |
JM Ag | (N)=1, Ag→C2K, (2)+3→ 2( -) |
JPE Ag | (P)=1, Ag→C2K, (2)+3→ 2( ) |
2
:
, 8500, I1=4, I2=8, I3=6, I4=3.
, , , .
8500 04
8501 08
8502 06
8503 03
2.1 .
8200 8201 |
06 04 |
PRG 1: | MVI B, 4 | |
8202 8203 8204 |
21 00 85 |
LXI H, 8500 | ||
8205 | 7E | M1: | MOV A, M | |
8206 | 05 | M2: | DCR B | |
8207 8208 8209 |
CA 12 82 |
JZ M3 | ||
820 | 23 | INR H | ||
820 | BE | CMP H | ||
820C 820D 820E |
DA 05 82 |
JC M1 | ||
820F 8210 8211 |
C3 06 82 |
JMP M2 | ||
8212 | 7E | M3: | MOV A, M | |
8213 | 5F | MOV E, A | ||
8214 8215 |
16 | MVI D, 03 | ||
03 | ||||
8216 | A7 | ANA A | ||
8217 8218 8219 |
21 00 08 |
LXI H, 0008 | ||
821A 821B |
DE 00 |
MVI C, 0 | ||
821C | 7B | MOV A, E | ||
821D | 17 | RAL | ||
821E | 5A | MOV E, D | ||
821F | 79 | MOV A, C | ||
8220 | 17 | RAL | ||
8221 | 92 | SUB D | ||
8222 8223 8224 |
D2 26 82 |
JNC M5 | ||
8225 | 82 | ADD D | ||
8226 | 4F | M5: | MOV C, A | |
8227 | 3F | CMC | ||
8228 | 7E | MOV A, M | ||
8229 | 17 | RAL | ||
822A | 67 | MOV H, A | ||
822B | 2D | DCR L | ||
822C 822D 822E |
C2 13 82 |
JNZ M4 | ||
822F | RST | |||
Copyright (c) 2024 Stud-Baza.ru , , , .