̳êðîïðîöåñîðí³
çàñîáè ³ ñèñòåìè h2>
Êîíòðîëüíå
çàâäàííÿ, âàð³àíò ¹ 7 p>
Ãðóïà Å-41-Ç,
ñòóäåíò ********** p>
̳í³ñòåðñòâî
Îñâ³òè Óêðà¿íè p>
Êðåìåí÷óöüêèé
Äåðæàâíèé Ïîë³òåõí³÷íèé ²íñòèòóò p>
Êðåìåí÷óê 1998 p>
Ïåðåòâîðèòè
÷èñëà ç äåñÿòêîâî¿ ñèñòåìè ÷èñëåííÿ â äâ³éêîâó ³ ø³ñòíàäöÿòêîâó: 5, 38;
93; 175; 264. P>
Äåñÿòêîâà ñèñòåìà p>
Äâ³éêîâà ñèñòåìà p>
سñòíàäöÿòêîâà ñèñòåìà p>
5 p>
0 p>
0 p>
0 p>
0 p>
40 p>
0 p>
1 p>
0 p>
1 p>
5 p>
38 p>
0 p>
0 p>
0 p>
1 p>
0 p>
0 p>
1 p>
1 p>
0 p>
26 p>
93 p>
0 p>
0 p>
1 p>
0 p>
1 p>
1 p>
1 p>
0 p>
1 p>
5D p>
175 p>
0 p>
1 p>
0 p>
1 p>
0 p>
1 p>
1 p>
1 p>
1 p>
AF p>
264 p>
1 p>
0 p>
0 p>
0 p>
0 p>
1 p>
0 p>
0 p>
0 p>
108 p>
Çàâäàííÿ ¹ 2 p>
Ïåðåòâîðèòè
÷èñëà, çàïèñàí³ â ïðÿìîìó äâ³éêîâîìó êîä³ â äåñÿòêîâèé ³ ø³ñòíàäöÿòêîâèé êîä
: 0011; 1000010; 00011011000. P>
Ïðÿìèé äâ³éêîâèé êîä p>
Äåñÿòêîâèé êîä p>
سñòíàäöÿòêîâèé êîä p>
0 p>
0 p>
0 p>
0 p>
0 p>
0 p>
0 p>
0 p>
0 p>
1 p>
1 p>
3 p>
3 p>
0 p>
0 p>
0 p>
0 p>
1 p>
0 p>
0 p>
0 p>
0 p>
1 p>
0 p>
66 p>
42 p>
0 p>
0 p>
0 p>
1 p>
1 p>
0 p>
1 p>
1 p>
0 p>
0 p>
0 p>
216 p>
D8 p>
Çàâäàííÿ ¹ 3 p>
Âèêîíàòè
íàñòóïí³ àðèôìåòè÷í³ ä³¿ ç äâ³éêîâèìè ÷èñëàìè, çàäàíèìè ó ïðÿìîìó êîä³
: 0011 + 1000110; 10000001 - 1000110 p>
+ p>
0 p>
0 p>
1 p>
1 p>
+ p>
3 p>
- p>
1 p>
0 p>
0 p>
0 p>
0 p>
0 p>
0 p>
1 p>
- p>
1 p>
2 p>
9 p>
1 p>
0 p>
0 p>
0 p>
1 p>
1 p>
0 p>
7 p>
0 p>
1 p>
0 p>
0 p>
0 p>
1 p>
1 p>
0 p>
7 p>
0 p>
1 p>
0 p>
0 p>
1 p>
0 p>
0 p>
1 p>
7 p>
3 p>
0 p>
0 p>
1 p>
1 p>
1 p>
0 p>
1 p>
1 p>
5 p>
9 p>
Çàâäàííÿ ¹ 4 p>
Âèêîíàòè
íàñòóïíå àðèôìåòè÷íó ä³þ â 8-ìè ðîçðÿäíî¿ ñ³òö³ (ñòàðøèé á³ò ì³ñòèòü
çíàê ÷èñëà): 5 õ 25 p>
õ p>
0 p>
. p>
0 p>
0 p>
1 p>
1 p>
0 p>
0 p>
1 p>
õ p>
2 p>
5 p>
0 p>
. p>
0 p>
0 p>
0 p>
0 p>
1 p>
0 p>
1 p>
5 p>
0 p>
0 p>
1 p>
1 p>
0 p>
0 p>
1 p>
0 p>
0 p>
0 p>
0 p>
0 p>
0 p>
0 p>
0 p>
0 p>
1 p>
1 p>
0 p>
0 p>
1 p>
0 p>
. p>
1 p>
1 p>
1 p>
1 p>
1 p>
0 p>
1 p>
1 p>
2 p>
5 p>
Êîíòðîëüíà
ðîáîòà ¹ 2 p>
Çàâäàííÿ ¹ 1 p>
Âèçíà÷èòè
ðîçì³ð ïàì'ÿò³ â ê³ëîáàéòàõ (áàéòàõ), ÿêùî äàíà ïàì'ÿòü àäðåñóºòüñÿ ç àäðåñè A0EDH ïî àäðåñó EF34H.
Îäíà êîì³ðêà ïàì'ÿò³ çàéìຠ8 á³ò p>
Äëÿ âèð³øåííÿ
âèçíà÷èìî ñïî÷àòêó ê³ëüê³ñòü êîì³ðîê ïàì'ÿò³, ùî àäðåñóþòüñÿ îäíèì ðîçðÿäîì ïðè 16 --
òåð³÷íîé ñèñòåì³ àäðåñàö³¿. p>
4-é
ðîçðÿä p>
3-é
ðîçðÿä p>
2-é
ðîçðÿä p>
1-é
ðîçðÿä p>
H p>
4096 p>
256 p>
16 p>
1 p>
H p>
Òàêèì ÷èíîì,
ïî÷àòêîâèé ³ ê³íöåâèé àäðåñà â äåñÿòêîâ³é ñèñòåì³ áóäóòü: p>
A0EDH = 4096 * 10 + 256 * 0 + 16 * 14 + 1 * 13
+ 1 = 41198; p>
EF34H =
4096 * 14 + 256 * 15 + 16 * 3 + 1 * 4 +1 = 61237. P>
61237 - 41198 =
20039. P>
20039 = 19 *
1024 + 583. P>
Îòæå, ðîçì³ð
ïàì'ÿò³ áóäå 20039 áàéò àáî 19 êÁ. 583 áàéò p>
Çàâäàííÿ ¹ 2 p>
Ñèìâîëüíà
ðÿäîê ðîçòàøîâàíèé â ÎÇÓ ïî÷èíàþ÷è ç àäðåñè 0006H. ³äîìî, ùî ï³ä êîæåí ñèìâîë
â³äâîäèòüñÿ îäíà êîì³ðêà ïàì'ÿò³. ʳëüê³ñòü ñèìâîë³â â ðÿäêó = 731. Âèçíà÷èòè àäðåñà
äëÿ çâåðíåííÿ äî îñòàííüîãî ñèìâîëó ðÿäêà. p>
Ïîðÿäêîâèé
íîìåð îñòàííüî¿ êîì³ðêè ïàì'ÿò³ â äåñÿòêîâîãî ñèñòåì³ áóäå 731 + 6 = 737.
Ïåðåâåäåìî 738 ç äåñÿòêîâî¿ ñèñòåìè â äâ³éêîâó: p>
73710
= 0010111000012 p>
Òåïåð ïåðåâîäèìî â 16 - òåð³÷íóþ: 0010111000012
= 02E116 p>
³äïîâ³äü: àäðåñà
îñòàííüîãî ñèìâîëó 02E1H p>
Çàâäàííÿ ¹ 3 p>
Ñêëàñòè
ïðîãðàìó íà Àñåìáëåð³ ç êîìåíòàðÿìè: p>
ϳäðàõóâàòè
ê³ëüê³ñòü ñèìâîë³â ó ðÿäêó, ðîçòàøîâàíî¿ â îáëàñò³ ïî÷èíàþ÷è ç àäðåñè 1000H ³ çàê³í÷óþ÷è àäðåñîþ 2000H áåç âðàõóâàííÿ ïðîá³ë³â, ÿêùî â³äîìî, ùî
êîæåí ñèìâîë çàéìຠîäíó êîì³ðêó ïàì'ÿò³ ³ ïðîá³ë êîäóºòüñÿ ÿê 01H. p>
Ìàêñèìàëüíå
ê³ëüê³ñòü ñèìâîë³â ó ðÿäêó 2000h-1000h = 1000h = 409610 p>
ϳñëÿ
âèêîíàííÿ ïðîãðàìè ðåçóëüòàò áóäå ïîì³ùåíèé â HL. p>
LXI SP, 3000h; âêàç³âêó âåðøèíè ñòåêà p>
LXI H, 1000h; àäðåñó 1-ãî åëåìåíòà => ó HL p>
LXI D, 1000h; çàâàíòàæåííÿ ë³÷èëüíèêà â D, E p>
XRA A;
îáíóëåííÿ àêóìóëÿòîðà p>
STA
2001h; îáíóëåííÿ ë³÷èëüíèêà
ê³ëüêîñò³ ñèìâîë³â p>
STA
2002h; îáíóëåííÿ ë³÷èëüíèêà
ê³ëüêîñò³ ñèìâîë³â p>
MVI B, 01h; êîä ïðîá³ëó => ó  p>
LOOP: p>
MOV A, M; çàâàíòàæèòè ñèìâîë ç êîì³ðêè Ì â
àêóìóëÿòîð p>
CMP B;
ïåðåâ³ðêà íà êîä ïðîá³ëó p>
JNZ COUNT
; ßêùî íå ñï³âïàäàº, ïåðåõ³ä äî COUNT, ³íàêøå - äàë³ p>
INX H;
àäðåñà íàñòóïíîãî ñèìâîëó p>
DCX D;
çìåíøèòè ë³÷èëüíèê p>
JZ EXIT
; ßêùî ë³÷èëüíèê = 0, íà âèõ³ä p>
JMP LOOP
;  ïî÷àòîê öèêëó p>
COUNT: p>
PUSH H;
âèâàíòàæèòè âì³ñò HL â ñòåê p>
LHLD
2001h; çàâàíòàæèòè HL âì³ñòîì ë³÷èëüíèêà ê³ëüêîñò³ ñèìâîë³â p>
INX H;
çá³ëüøèòè ë³÷èëüíèê íà 1 p>
SHLD
2001h; çáåðåãòè ë³÷èëüíèê
ê³ëüêîñò³ ñèìâîë³â ó 2001h, 2002h p>
POP H;
â³äíîâèòè â HL
çáåðåæåíèé àäðåñà p>
RET; ïîâåðíåííÿ ç ï³äïðîãðàìè p>
EXIT: p>
LHLD
2001h; çàâàíòàæèòè HL âì³ñòîì ë³÷èëüíèêà ê³ëüêîñò³ ñèìâîë³â p>
END p>
Çàâäàííÿ ¹ 4 p>
Ñêëàñòè
ïðîãðàìó íà Àñåìáëåð³, ñïðÿìîâàíó íà âèð³øåííÿ ìàòåìàòè÷íî¿ ôóíêö³¿: p>
Z = lg (x +1) p>
Íàòóðàëüíèé ³
äåñÿòêîâèé ëîãàðèôìè îäíîãî ³ òîãî æ ÷èñëà (â äàíîìó âèïàäêó - âèðàæåííÿ) ïîâ'ÿçàí³ ïðîñòèì ñï³ââ³äíîøåííÿì,
äîçâîëÿº ïåðåõîäèòè â³ä îäíîãî äî ³íøîãî: p>
lg x = Mlnx, äå M = 1/ln10 = 0,434294481903252 ... p>
òîáòî,
äåñÿòêîâèé ëîãàðèôì ÷èñëà x = íàòóðàëüíîìó ëîãàðèôìó öüîãî æ ÷èñëà,
ïîìíîæåíîìó íà ïîñò³éíèé ìíîæíèê M = 0,434294481903252 ..., çâàíèé ìîäóëåì ïåðåõîäó â³ä
íàòóðàëüíèõ ëîãàðèôì³â äî äåñÿòêîâèì. p>
³äïîâ³äíî
ç âèùåñêàçàíèì, lg (x +1) = 0,434294481903252 ... * ln (x +1) p>
Äëÿ îá÷èñëåííÿ ln (x +1) âèêîðèñòîâóºìî ðîçêëàäàííÿ â ðÿä: p>
ln (x +1) = x-x2/2 + x3/3-x4/4 + x5/5-x6/6 + x7/7-x8/8 + ... p>
Ó ðåçóëüòàò³
àëãîðèòì âèð³øåííÿ çâîäèòüñÿ äî ÷îòèðüîõ àðèôìåòè÷íèõ ä³é: +; -; *; /. p>
Ïåðåä
âèêîíàííÿì àðèôìåòè÷íèõ ä³é íàä ÷èñëàìè ç ïëàâàþ÷îþ êîìîþ äîìîâèìîñÿ
ïåðøå ÷èñëî ðîçì³ùóâàòè â ðåã³ñòðàõ EHL, äðóãèé - ó ðåã³ñòðàõ DBC; ðåçóëüòàò îïåðàö³¿ çàëèøàòè â EHL. p>
Ôîðìàò
ïðåäñòàâëåííÿ ÷èñåë ç ïëàâàþ÷îþ êîìîþ: p>
S p>
P p>
P p>
P p>
P p>
P p>
P p>
P p>
P p>
M p>
M p>
M p>
M p>
M p>
M p>
M p>
M p>
M p>
M p>
M p>
M p>
M p>
M p>
M p>
7 p>
6 p>
5 p>
4 p>
3 p>
2 p>
1 p>
0 p>
1 p>
2 p>
3 p>
4 p>
5 p>
6 p>
7 p>
8 p>
9 p>
10 p>
11 p>
12 p>
13 p>
14 p>
15 p>
1-é
áàéò p>
2-é
áàéò p>
3-é
áàéò p>
Äå: S - çíàê ÷èñëà (1-íåãàòèâíèé,
0-ïîçèòèâíèé), P0 ... P7 - 8-á³òíèé çì³ùåíèé ïîðÿäîê, M1 ... M15 - ìàíòèñà. Ïðèõîâàíèé á³ò ö³ëî¿ ÷àñòèíè
ìàíòèñè â íîðìàë³çîâàíèõ ÷èñëàõ ì³ñòèòü 1 p>
1000h p>
X p>
1001h p>
1003h p>
1003h p>
X2 p>
1004h p>
1005h p>
1006h p>
X3 p>
1007h p>
1008h p>
1009h p>
X4 p>
100Ah p>
100Bh p>
100Ch p>
X5 p>
100Dh p>
100Eh p>
100Fh p>
X6 p>
1010h p>
1011h p>
1012h p>
X7 p>
1013h p>
1014h p>
1020h p>
Àäðåñà
êîì³ðêè ç ïîòî÷íèì XN p>
1021h p>
1022h p>
Ïîòî÷íèé
N p>
Äî ïî÷àòêó
îá÷èñëåíü ÷èñëî Õ ïîâèííî áóòè ðîçì³ùåíî â ïàì'ÿò³ çà àäðåñàìè 1000h-1002h.; ïî÷àòîê öèêëó îá÷èñëåíü p>
CALC1: p>
LXI H, 1003h;
çáåðåæåííÿ àäðåñè ïåðøîìó îñåðåäêó p>
SHLD 1020h;
äëÿ çáåð³ãàííÿ XN p>
CALL LOAD;
Çàâàíòàæåííÿ Õ â EHL p>
; öèêë
îá÷èñëåííÿ XN p>
CALC2: CALL
LOAD1; Çàâàíòàæåííÿ Õ â DBC CALL MULF; Ìíîæåííÿ ÷èñåë ç ïëàâàþ÷îþ òî÷êîþ p>
MOV B, H; HL => BC p>
MOV C, L p>
LHLD 1020h
; çàâàíòàæèòè àäðåñà êîì³ðêè ïàì'ÿò³ äëÿ çáåð³ãàííÿ Õn p>
MOV M, E; Õn
=> Ó ïàì'ÿòü p>
INX H p>
MOV M, B p>
INX H p>
MOV M, C p>
INX H p>
SHLD 1020h
; çàïàì'ÿòàòè àäðåñó êîì³ðêè ïàì'ÿò³ äëÿ íàñòóïíîãî Õn p>
MOV H, B; BC => HL p>
MOV L, C p>
LDA 1021h
; êîì³ðêó => â àêóìóëÿòîð p>
CPI 15h; ÿêùî
îòðèìàí³ âñ³ çíà÷åííÿ Õn, p>
JZ CALC3
; ïåðåõ³ä íà CALC3 p>
JMP CALC2
; ³íàêøå-â ïî÷àòîê p>
CALC3: p>
LXI H, 1022h; p>
MVI M, 01h
; çàâàíòàæèòè â êë³òèíêó 1022h ä³ëüíèê p>
LXI H, 1003h; p>
SHLD 1020h
; âì³ñò HL
=> Ó ïàì'ÿòü p>
; öèêë
îá÷èñëåííÿ XN/NCALC4:
MOV B, H; HL => BC MOV C, L LHLD 1020h
; çàâàíòàæèòè àäðåñà êîì³ðêè ïàì'ÿò³ äëÿ çáåð³ãàííÿ N MOV E, M; Õn => ó
ðåã³ñòðè INX H MOV B, M INX H MOV C, M SHLD 1020h; çàïàì'ÿòàòè àäðåñó êîì³ðêè ïàì'ÿò³ äëÿ íàñòóïíîãî Õn p>
MOV H, B; BC => HL p>
MOV L, C p>
PUSH H; p>
LXI H, 1022h; N
=> Ó êë³òèíêó Ñ p>
MOV C, M p>
POP H; p>
MVI D, 00h p>
MVI B, 00h p>
CALL DIVF;
ijëåííÿ ÷èñåë ç ïëàâàþ÷îþ òî÷êîþ p>
MOV B, H; HL => BC p>
MOV C, L p>
LHLD 1020h
; çàâàíòàæèòè àäðåñà êîì³ðêè ïàì'ÿò³ äëÿ çáåð³ãàííÿ Õn/N p>
DCX H; p>
DCX H; p>
MOV M, E; Õn/N
=> Ó ïàì'ÿòü p>
INX H p>
MOV M, B p>
INX H p>
MOV M, C p>
INX H p>
SHLD 1020h
; çàïàì'ÿòàòè àäðåñó êîì³ðêè ïàì'ÿò³ äëÿ íàñòóïíîãî Õn/N p>
MOV H, B; BC => HL p>
MOV L, C p>
PUSH H; p>
LXI H, 1022h; N
=> Ó êë³òèíêó Ñ p>
MOV C, M
; ³íêðåìåíò N p>
INR C p>
MOV M, C p>
POP H; p>
LDA 1021h
; êîì³ðêó => â àêóìóëÿòîð p>
CPI 15h; ÿêùî
îòðèìàí³ âñ³ çíà÷åííÿ Õn, p>
JZ CALC5
; ïåðåõ³ä íà CALC5 p>
JMP CALC4
; ³íàêøå-â ïî÷àòîê p>
CALC5: p>
LXI H, 1003h; p>
SHLD 1020h; p>
; p>
CALC6: p>
LHLD 1020h
; çàâàíòàæèòè àäðåñà êîì³ðêè ïàì'ÿò³ äëÿ çáåð³ãàííÿ N p>
MOV D, M; Õn/N
=> Ó ðåã³ñòðè D, B, C. p>
INX H p>
MOV B, M p>
INX H p>
MOV C, M p>
INX H p>
SHLD 1020h
; çàïàì'ÿòàòè àäðåñó êîì³ðêè ïàì'ÿò³ äëÿ íàñòóïíîãî Õn/N p>
; p>
; îá÷èñëåííÿ ln (x +1) p>
CALC7: CALL
LOAD; Çàâàíòàæåííÿ Õ â EHL CALL SUBF; ³äí³ìàííÿ ÷èñåë ç ïëàâàþ÷îþ òî÷êîþ CALL CALC8; çàãðóçêà Õn +1/N 1 â
ðåã³ñòðè D, B, C. CALL ADDF; Äîäàâàííÿ ÷èñåë ç ïëàâàþ÷îþ òî÷êîþ CALL CALC8; çàãðóçêà Õn +1/N 1 â
ðåã³ñòðè D, B, C. CALL SUBF; ³äí³ìàííÿ ÷èñåë ç ïëàâàþ÷îþ òî÷êîþ p>
CALL CALC8;
çàãðóçêà Õn +1/N 1 â ðåã³ñòðè D, B, C. p>
CALL ADDF;
Äîäàâàííÿ ÷èñåë ç ïëàâàþ÷îþ òî÷êîþ p>
CALL CALC8;
çàãðóçêà Õn +1/N 1 â ðåã³ñòðè D, B, C. p>
CALL SUBF;
³äí³ìàííÿ ÷èñåë ç ïëàâàþ÷îþ òî÷êîþ p>
CALL CALC8;
çàãðóçêà Õn +1/N 1 â ðåã³ñòðè D, B, C. p>
CALL ADDF;
Äîäàâàííÿ ÷èñåë ç ïëàâàþ÷îþ òî÷êîþ p>
CALL CALC8;
çàãðóçêà Õn +1/N 1 â ðåã³ñòðè D, B, C. p>
MVI D, 00h;
çàâàíòàæåííÿ ìîäóëÿ ïåðå- p>
MVI B, 2Bh;
õîäó â DBC p>
MVI C, 2Bh p>
CALL MULF;
Ìíîæåííÿ ln (x +1) íà ìîäóëü ïåðåõîäó äî lg p>
JMP EXIT; íà
âèõ³ä p>
;; çàãðóçêà Õn +1/N 1 â ðåã³ñòðè
D, B, C.CALC8: PUSH H LHLD 1020h; çàâàíòàæèòè àäðåñà êîì³ðêè ïàì'ÿò³ äëÿ çáåð³ãàííÿ N
MOV D, M; Õn/N => â ðåã³ñòðè D, B, C. INX H MOV B, M
INX H MOV C, M INX H SHLD 1020h; çàïàì'ÿòàòè àäðåñó êîì³ðêè ïàì'ÿò³ äëÿ
íàñòóïíîãî Õn/N p>
POP H; p>
RET; p>
; p>
EXIT: p>
HLT; Çóïèíêà p>
; p>
; p>
; p>
; Çàâàíòàæåííÿ Õ ñò
EHLLOAD: LXI H, 1000h; çàâàíòàæåííÿ â HL àäðåñè ïîðÿäêó Õ MOV E, M; çàâàíòàæåííÿ ïîðÿäêó
Õ â Å LHLD 1001h; çàâàíòàæåííÿ ìàíòèñè â HL p>
RET; p>
; Çàâàíòàæåííÿ Õ ñò
DBC p>
LOAD1: p>
PUSH H
; âèâàíòàæåííÿ â ñòåê HL p>
LXI H, 1000h
; çàâàíòàæåííÿ â HL àäðåñè ïîðÿäêó Õ p>
MOV D, M
; çàâàíòàæåííÿ ïîðÿäêó Õ â D p>
INX H; p>
MOV B, M; p>
INX H; p>
MOV C, M
; çàâàíòàæåííÿ ìàíòèñè â BC p>
POP H; çàâàíòàæåííÿ
ç ñòåêà HL p>
RET; p>
; Îñâ³òà
äîäàòêîâîãî êîäó ÷èñëà ó ðåã³ñòð³ HL p>
comp: p>
mov A, H; p>
CMA; p>
MOV H, A; p>
MOV A, L; p>
CMA; p>
MOV L, A; p>
INX H; p>
RET; p>
; Ïåðåâ³ðêà çíàêà
òà îñâ³òà äîäàòêîâîãî êîäó p>
NEG: p>
MOV A, E; p>
ORA E; p>
JP NOTDK; p>
CALL COMP;
Îñâ³òà äîäàòêîâîãî êîäó ÷èñëà ó ðåã³ñòð³ HL p>
NOTDK: RET; p>
p>
; Çðóøåííÿ
âì³ñòó HL âïðàâî íà 1 á³ò: p>
SHIFT: p>
MOV A, H; p>
RAR; p>
MOV H, A; p>
MOV A, L; p>
RAR; p>
MOV L, A; p>
RET; p>
; Îáì³í
âì³ñòó ðåã³ñòð³â EHL ³ DBC p>
SWAP: p>
PUSH B; p>
XTHL; p>
POP B; p>
MOV A, D; p>
MOV D, E; p>
MOV E, A; p>
RET; p>
p>
; ³äíîâëåííÿ
÷èñëà ç ïëàâàþ÷îþ òî÷êîþ p>
REC: p>
MOV A, H; p>
ADD A; p>
MOV A, E; p>
RAL; p>
MOV E, A; p>
MOV A, H; p>
ORI 80H; p>
MOV H, A; p>
RET; p>
; Ïåðåòâîðåííÿ
÷èñëà â ñòàíäàðòíèé ôîðìàò p>
PACK: p>
LDA SIGN; p>
ADD A; p>
MOV A, E; p>
MOV D, A; p>
RAR; p>
MOV E, A; p>
MOV A, H; p>
ANI 7FH; p>
MOV H, A; p>
MOV A, D; p>
RRC; p>
ANI 80H; p>
ORA H; p>
MOV H, A; p>
RET; p>
; Äîäàâàííÿ ÷èñåë
ç ïëàâàþ÷îþ òî÷êîþ p>
ADDF: p>
MOV A, D; p>
XRA E; p>
JP ADDF1; p>
MOV A, D; p>
XRI 80H; p>
MOV D, A; p>
JMP SUBF; p>
; p>
ADDF1: p>
MOV A, D; p>
ORA B; p>
ORA C; p>
JZ ADDF8; p>
MOV A, E; p>
ORA H; p>
ORA L; p>
JNZ ADDF2; p>
CALL SWAP;
Îáì³í âì³ñòó ðåã³ñòð³â EHL ³ DBC p>
JMP ADDF8; p>
; p>
ADDF2: p>
MOV A, D; p>
STA SIGN; p>
CALL REC; p>
CALL SWAP; Îáì³í âì³ñòó ðåã³ñòð³â EHL ³ DBC p>
CALL REC;
³äíîâëåííÿ ÷èñëà ç ïëàâàþ÷îþ òî÷êîþ p>
; p>
MOV A, E; p>
SUB D; p>
JNC ADDF3; p>
CALL SWAP;
Îáì³í âì³ñòó ðåã³ñòð³â EHL ³ DBC p>
MOV A, E; p>
SUB D; p>
; p>
; Ó EHL á³ëüøå ÷èñëî, â àêóìóëÿòîð³ ð³çíèöÿ
ïîòåíö³àë³â p>
ADDF3: p>
JZ ADDF6; p>
CPI 16; p>
JC ADDF4; p>
JMP ADDF7; p>
; p>
; Ìîæíà çðóøóâàòè
ìàíòèñà ìåíøîãî ÷èñëà p>
ADDF4: p>
MOV E, A; p>
CALL SWAP;
Îáì³í âì³ñòó ðåã³ñòð³â EHL ³ DBC p>
ADDF5: p>
ORA A; p>
CALL SHIFT;
Çñóâ âì³ñòó HL âïðàâî íà 1 á³ò: p>
INR E; p>
DCR D; p>
JNZ ADDF5; p>
; p>
; Ó ðåã³ñòð³ Å
çàãàëüíèé ïîðÿäîê. Ìîæíà ñêëàäàòè ìàíòèñè p>
ADDF6: p>
DAD B; p>
JNC ADDF7; p>
INR E; p>
JZ ADDF8; p>
ORA A; p>
CALL SHIFT;
Çñóâ âì³ñòó HL âïðàâî íà 1 á³ò: p>
; p>
ADDF7: p>
CALL PACK;
Ïåðåòâîðåííÿ ÷èñëà ó ñòàíäàðòíèé ôîðìàò p>
; p>
ADDF8: p>
RET; p>
; p>
p>
; ³äí³ìàííÿ
÷èñåë ç ïëàâàþ÷îþ òî÷êîþ p>
SUBF: p>
MOV A, D; p>
XRA E; p>
JP SUBF1; p>
MOV A, D; p>
XRI 80H; p>
MOV D, A; p>
JMP ADDF;
Äîäàâàííÿ ÷èñåë ç ïëàâàþ÷îþ òî÷êîþ p>
SUBF1: p>
MOV A, D; p>
ORA B; p>
ORA C; p>
JZ SUBFA; p>
MOV A, E; p>
ORA H; p>
ORA L; p>
JNZ SUBF2; p>
CALL SWAP;
Îáì³í âì³ñòó ðåã³ñòð³â EHL ³ DBC p>
MOV A, E; p>
XRI 80H; p>
MOV E, A; p>
JMP SUBFA; p>
SUBF2: p>
MOV A, E; p>
STA SIGN; p>
CALL REC;
³äíîâëåííÿ ÷èñëà ç ïëàâàþ÷îþ òî÷êîþ p>
CALL SWAP;
Îáì³í âì³ñòó ðåã³ñòð³â EHL ³ DBC p>
CALL REC;
³äíîâëåííÿ ÷èñëà ç ïëàâàþ÷îþ òî÷êîþ p>
MOV A, D; p>
SUB E; p>
JNZ SUBF3; p>
MOV A, B; p>
CMP H; p>
JNZ SUBF3; p>
MOV A, C; p>
CMP L; p>
JNZ SUBF3; p>
MVI E, 0; p>
LXI H, 0; p>
JMP SUBFA; p>
; p>
; îïåðàíäè ÍÅ
ð³âí³, íåîáõ³äíî â³äí³ìàòè p>
SUBF3: p>
JNC SUBF4; p>
CALL SWAP;
Îáì³í âì³ñòó ðåã³ñòð³â EHL ³ DBC p>
LDA SIGN; p>
XRI 80H; p>
STA SIGN; p>
; p>
SUBF4: p>
MOV A, D; p>
SUB E; p>
JZ SUBF7; p>
CPI 16; p>
JC SUBF5; p>
CALL SWAP;
Îáì³í âì³ñòó ðåã³ñòð³â EHL ³ DBC p>
JMP SUBF; p>
; p>
; Ó ðåã³ñòð³ À ð³çíèöÿ
ïîðÿäê³â, ó DBC
áÎëüøà îïåðàíä p>
SUBF5: p>
MOV E, A; p>
SUBF6: p>
ORA A; p>
CALL SHIFT;
Çñóâ âì³ñòó HL âïðàâî íà 1 á³ò: p>
DCR E; p>
JNZ SUBF6; p>
; p>
; â³äíÿòè
ìàíòèñè, ðåçóëüòàò â EHL p>
SUBF7: p>
MOV A, C; p>
SUB L; p>
MOV L, A; p>
MOV A, B; p>
SBB H; p>
MOV H, A; p>
MOV E, D; p>
; p>
; íîðìàë³çóâàòè
³ ïåðåâ³ðèòè àíò³ïåðåïîëíåí³å p>
SUBF8: p>
MOV A, H; p>
ORA H; p>
JM SUBF9; p>
DCR E; p>
MOV A, E; p>
CPI 0FFH; p>
STC; p>
JZ SUBFA; p>
DAD H; p>
JMP SUBF8; p>
; p>
SUBF9: p>
CALL PACK;
Ïåðåòâîðåííÿ ÷èñëà ó ñòàíäàðòíèé ôîðìàò p>
SUBFA: p>
RET; p>
; p>
; Ìíîæåííÿ
÷èñåë ç ïëàâàþ÷îþ òî÷êîþ p>
MULF: p>
MOV A, E; p>
ORA H; p>
ORA L; p>
JZ MULF8; p>
MOV A, D; p>
ORA B; p>
ORA C; p>
JNZ MULF1; p>
CALL SWAP;
Îáì³í âì³ñòó ðåã³ñòð³â EHL ³ DBC p>
JMP MULF8; p>
; p>
; îïåðàíäè
íåíóëüîâ³, ìîæíà ìíîæèòè p>
MULF1: p>
MOV A, D; p>
XRA E; p>
STA SIGN; p>
CALL REC;
³äíîâëåííÿ ÷èñëà ç ïëàâàþ÷îþ òî÷êîþ p>
CALL SWAP;
Îáì³í âì³ñòó ðåã³ñòð³â EHL ³ DBC p>
CALL REC;
³äíîâëåííÿ ÷èñëà ç ïëàâàþ÷îþ òî÷êîþ p>
MOV A, D; p>
JC MULF2; p>
SUI 127; p>
JNC MULF3; p>
JMP MULF8; p>
; p>
MULF2: p>
ADI 129; p>
JNC MULF3; p>
JMP MULF8; p>
; p>
; â àêóìóëÿòîð³
À çì³ùåíèé ïîðÿäîê òâîðè p>
MULF3: p>
MOV C, A; p>
MOV E, B; p>
MVI D, 0; p>
MOV A, H; p>
LXI H, 0; p>
XCHG; p>
DAD H; p>
XCHG; p>
; p>
; ïî÷àòîê öèêëó
ìíîæåííÿ p>
MULF4: p>
RAR; p>
JNC MULF5; p>
DAD D; p>
; p>
MULF5: p>
JZ MULF6; p>
XCHG; p>
DAD H; p>
XHG; p>
JMP MULF4; p>
; p>
; ïåðåâ³ðèòè
ïîðóøåííÿ íîðìàë³çàö³¿ p>
MULF6: p>
JNC MULF7; p>
CALL SHIFT;
Çñóâ âì³ñòó HL âïðàâî íà 1 á³ò: p>
INR C; p>
STC; p>
JZ MULF8; p>
; p>
MULF7: p>
MOV E, C; p>
CALL PACK;
Ïåðåòâîðåííÿ ÷èñëà ó ñòàíäàðòíèé ôîðìàò p>
; p>
MULF8: p>
RET; p>
; p>
; ijëåííÿ ÷èñåë
ç ïëàâàþ÷îþ òî÷êîþ p>
DIVF: p>
MOV A, E; p>
ORA H; p>
ORA L; p>
JZ DIVF7; p>
MOV A, D; p>
ORA B; p>
ORA C; p>
STC; p>
JZ DIVF7; p>
; îïåðàíäè ÍÅ
äîð³âíþþòü íóëþ p>
MOV A, D; p>
XRA E; p>
STA SIGN; p>
CALL REC;
³äíîâëåííÿ ÷èñëà ç ïëàâàþ÷îþ òî÷êîþ p>
CALL SWAP;
Îáì³í âì³ñòó ðåã³ñòð³â EHL ³ DBC p>
CALL REC; ³äíîâëåííÿ
÷èñëà ç ïëàâàþ÷îþ òî÷êîþ p>
CALL SWAP;
Îáì³í âì³ñòó ðåã³ñòð³â EHL ³ DBC p>
MOV A, E; p>
SUB D; p>
ADI 127; p>
CMC; p>
JC DIVF7;
âîç³êëî àíò³ïåðåïîëíåí³å p>
JMP DIVF2;
ïåðåéòè íà ïîä³ë ìàíòèñè p>
; p>
DIVF1: p>
ADI 127;
äîäàòè çñóâ p>
JC DIVF7;
âèíèêëî àíò³ïåðåïîëíåí³å p>
; p>
; ìîæíà ïî÷èíàòè
ïîä³ë ìàíòèñè p>
DIVF2: p>
STA EXP; p>
XCHG; p>
LXI H, 0; p>
MVI A, 16;
³í³ö³àë³çóâàòè ë³÷èëüíèê p>
PUSH PSW; p>
JMP DIVF4;
ââ³éòè â öèêë ä³ëåííÿ p>
; p>
DIVF3: p>
PUSH PSW; p>
DAD H;
çðóøèòè âë³âî p>
XCHG; ïðèâàòíå ³ çàëèøîê p>
DAD H; p>
XCHG; p>
; p>
DIVF4: p>
PUSH D;
çáåðåãòè îñòàîê â ñòåêó p>
MOV A, E;
â³äíÿòè ä³ëüíèê ³ç çàëèøêó p>
SUB C; p>
MOV E, A; p>
MOV A, D; p>
SBB B; p>
MOV D, A; p>
JC DIVF5; p>
POP PSW;
âèäàëèòè çàëèøîê ç ñòåêà p>
INR L; p>
PUSH D; p>
; p>
DIVF5: p>
POP D; âèòÿãòè
ïîïåðåäí³é çàëèøîê p>
POP PSW;
âèòÿãòè ë³÷èëüíèê p>
DCR A;
äåêðåìåíò ë³÷èëüíèêà p>
JNZ DIVF3; ïîâòîðèòè öèêë ä³ëåííÿ p>
; ïîä³ë ìàíòèñè çàê³í÷åíî p>
LDA EXP; p>
MOV E, A; p>
; íîðìàë³çóâàòè ïðèâàòíå p>
MOV A, H; p>
ORA A; p>
JM DIVF6; p>
DAD H; p>
DCR E; p>
CPI 0FFH;
ïåðåâ³ðèòè àíò³ïåðåïîëíåí³å p>
STC; p>
JZ DIVF7;
âèíèêëî àíò³ïåðåïîëíåí³å p>
; p>
DIVF6: p>
CALL PACK;
Ïåðåòâîðåííÿ ÷èñëà ó ñòàíäàðòíèé ôîðìàò p>
DIVF7: p>
RET; p>
; p>
Êîíòðîëüíà
ðîáîòà ¹ 3 p>
Çàâäàííÿ ¹ 1 p>
Ïîáóäóâàòè
ìîäåëü ðîçïîä³ëó àäðåñíîãî ïðîñòîðó ç çàçíà÷åííÿì ä³àïàçîí³â àäðåñ â
16-é ñèñòåì³ ÷èñëåííÿ. ßê äåøèôðàòîðà àäðåñ âèêîðèñòîâóºòüñÿ ñòàíäàðòíèé
äåøèôðàòîð, äî ³íôîðìàö³éíèõ âõîä³â ÿêîãî ï³äêëþ÷åí³ ë³í³¿ À15, À12, À9
16-ðîçðÿäíî¿ øèíè àäðåñè. P>
Âèõîäè äåø³ô-ðàòîðà p>
Ðîçðÿäè àäðåñè p>
ijàïàçîíè àäðåñ p>
15 p>
14 p>
13 p>
12 p>
11 p>
10 p>
9 p>
8 p>
7 p>
6 p>
5 p>
4 p>
3 p>
2 p>
1 p>
0 p>
Y0 p>
0 p>
X p>
X p>
0 p>
X p>
X p>
0 p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
0000h-01FFh,
0400h-05FFh, 0800h-0DFFh p>
2000h-21FFh,
2400h-25FFh, 2800h-2DFFh p>
4000h-41FFh,
4400h-45FFh, 4800h-4DFFh p>
6000h-61FFh,
6400h-65FFh, 6800h-6DFFh p>
Y1 p>
0 p>
X p>
X p>
0 p>
X p>
X p>
1 p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
0200h-03FFh,
0600h-07FFh, 0A00h-0FFFh p>
2200h-23FFh,
2600h-27FFh, 2A00h-2FFFh p>
4200h-43FFh,
4600h-47FFh, 4A00h-4FFFh p>
6200h-63FFh,
6600h-67FFh, 6A00h-6FFFh p>
Y2 p>
0 p>
X p>
X p>
1 p>
X p>
X p>
0 p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
1000h-11FFh,
1400h-15FFh, 1800h-1DFFh p>
3000h-31FFh,
3400h-35FFh, 3800h-3DFFh p>
5000h-51FFh,
5400h-55FFh, 5800h-5DFFh p>
7000h-71FFh,
7400h-75FFh, 7800h-7DFFh p>
Y3 p>
0 p>
X p>
X p>
1 p>
X p>
X p>
1 p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
1200h-13FFh,
1600h-17FFh, 1A00h-1FFFh p>
3200h-33FFh,
3600h-37FFh, 3A00h-3FFFh p>
5200h-53FFh,
5600h-57FFh, 5A00h-5FFFh p>
7200h-73FFh,
7600h-77FFh, 7A00h-7FFFh p>
Y4 p>
1 p>
X p>
X p>
0 p>
X p>
X p>
0 p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
8000h-81FFh,
8400h-85FFh, 8800h-8DFFh p>
A000h-A1FFh,
A400h-A5FFh, A800h-ADFFh p>
C000h-C1FFh,
C400h-C5FFh, C800h-CDFFh p>
E000h-E1FFh,
E400h-E5FFh, E800h-EDFFh p>
Y5 p>
1 p>
X p>
X p>
0 p>
X p>
X p>
1 p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
8200h-83FFh,
8600h-87FFh, 8A00h-8FFFh p>
A200h-A3FFh,
A600h-A7FFh, AA00h-AFFFh p>
C200h-C3FFh,
C600h-C7FFh, CA00h-CFFFh p>
E200h-E3FFh,
E600h-E7FFh, EA00h-EFFFh p>
Y6 p>
1 p>
X p>
X p>
1 p>
X p>
X p>
0 p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
9000h-91FFh,
9400h-95FFh, 9800h-9DFFh p>
B000h-B1FFh,
B400h-B5FFh, B800h-BDFFh p>
D000h-D1FFh,
D400h-D5FFh, D800h-DDFFh p>
F000h-F1FFh,
F400h-F5FFh, F800h-FDFFh p>
Y7 p>
1 p>
X p>
X p>
1 p>
X p>
X p>
1 p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
9200h-93FFh,
9600h-97FFh, 9A00h-9FFFh p>
B200h-B3FFh,
B600h-B7FFh, BA00h-BFFFh p>
D200h-D3FFh,
D600h-D7FFh, DA00h-DFFFh p>
F200h-F3FFh,
F600h-F7FFh, FA00h-FFFFh p>
Ó ï³äñóìêó
àäðåñíèé ïðîñò³ð ðîçì³ðîì â 64 Êáàéò ðîçáèòî íà ä³àïàçîíè äëÿ 8 ïðèñòðî¿â.
Ó êîæíîìó ä³àïàçîí³ âèä³ëåíî 8 ä³ëÿíîê ïî 512 áàéò ³ 4 ä³ëÿíêè ïî 1536 áàéò. P>
Çàâäàííÿ ¹ 2 p>
Ïîòð³áíî âèä³ëèòè
çîíè àäðåñíîãî ïðîñòîðó äëÿ ðîçì³ùåííÿ â íèõ àäðåñ äëÿ ïðèñòðî¿â,
âêàçàíèõ ó òàáëèö³. ßê àäðåñíîãî äåøèôðàòîðà âèêîðèñòîâóºòüñÿ ÏÇÓ.
Ïîáóäóâàòè ñõåìè âèä³ëåííÿ â³äïîâ³äíèõ áëîê³â àäðåñ ³ òàáëèöþ ä³àïàçîí³â
àäðåñ. p>
Íàéìåíóâàííÿ ïðèñòðîþ p>
ijàïàçîí àäðåñ p>
ªìí³ñòü (Êáàéò) p>
ÏÇÓ1 p>
0000h-03FFh p>
1 p>
ÎÇÓ1 p>
0400h-0BFFh p>
2 p>
ÓÂÂ1 p>
2000h-2FFFh p>
4 p>
ÏÇÓ2 p>
3000h-4FFFh p>
8 p>
ÎÇÓ2 p>
5000h-6FFFh p>
8 p>
ÓÂÂ2 p>
8000h-FFFFh p>
32 p>
Òàê ÿê
íàéìåíøèé áëîê ìຠðîçì³ð 1Ê êîì³ðîê, òî ðîçä³ëüíà çäàòí³ñòü äåøèôðàòîðà
ïîâèííà çàáåçïå÷óâàòè ðîçïîä³ë àäðåñíîãî ïðîñòîðó ç òî÷í³ñòþ äî çîí ðîçì³ðîì
1Ê êîì³ðîê. Àíàë³çóþ÷è ø³ñòü ñòàðøèõ ðîçðÿä³â àäðåñè, îòðèìóºìî íåîáõ³äíó
òî÷í³ñòü, îñê³ëüêè âîíè ä³ëÿòü âñ³ àäðåñíèé
ïðîñò³ð îá'ºìîì 64Ê îñåðåäê³â íà 26 = 64 ÷àñòèíè ïî 1Ê êîì³ðîê,
ùî ³ ïîòð³áíî. p>
Âèáèðàºìî
çà îñíîâó ÏÇÓ ç 10 àäðåñíèìè âõîäàìè 2716 (Ê573ÐÔ2), ùî ìຠñòðóêòóðó 2Ê * 8 á³ò. Âèõîäè 00 - 05 öüîãî
ÏÇÓ ï³äêëþ÷àºìî äî ³íâåðñíèé âõîä³â
âèáîðó êðèñòàëó â³äïîâ³äíèõ
ì³êðîñõåì. p>
Ðîçðîáëÿºìî
ïðîøèâêó ÏÇÓ. p>
Ïðèñòð³é p>
ijàïàçîí àäðåñ p>
Àäðåñí³ âõîäè p>
Âèõîäè p>
A5 p>
A4 p>
A3 p>
A2 p>
A1 p>
A0 p>
3 4 5 p>
ROM 1 p>
0000h-03FFh p>
0 p>
0 p>
0 p>
0 p>
0 p>
0 p>
0 1 1
1 1 1 p>
RAM 1 p>
0400h-07FFh p>
0 p>
0 p>
0 p>
0 p>
0 p>
1 p>
1 0 1
1 1 1 p>
0800h-0BFFh p>
0 p>
0 p>
0 p>
0 p>
1 p>
0 p>
1 0 1
1 1 1 p>
- p>
0C00h-0FFFh p>
0 p>
0 p>
0 p>
0 p>
1 p>
1 p>
1 1 1
1 1 1 p>
1000h-13FFh p>
0 p>
0 p>
0 p>
1 p>
0 p>
0 p>
1 1 1
1 1 1 p>
1400h-17FFh p>
0 p>
0 p>
0 p>
1 p>
0 p>
1 p>
1 1 1
1 1 1 p>
1800h-1BFFh p>
0 p>
0 p>
0 p>
1 p>
1 p>
0 p>
1 1 1
1 1 1 p>
1C00h-1FFFh p>
0 p>
0 p>
0 p>
1 p>
1 p>
1 p>
1 1 1
1 1 1 p>
IN-OUT
1 p>
2000h-23FFh p>
0 p>
0 p>
1 p>
0 p>
0 p>
0 p>
1 1 0
1 1 1 p>
2400h-27FFh p>
0 p>
0 p>
1 p>
0 p>
0 p>
1 p>
1 1 0
1 1 1 p>
2800h-2BFFh p>
0 p>
0 p>
1 p>
0 p>
1 p>
0 p>
1 1 0
1 1 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p>
1 p>
1 p>
1 p>
0 p>
1 1 1
1 1 1 p>
FC00h-FFFFh p>
1 p>
1 p>
1 p>
1 p>
1 p>
1 p>
1 1 1 1 1 1 p>
Ñõåìà
äåøèôðàòîðà: p>
p>
Êàðòà ïàì'ÿò³: p>
3FFh p>
7FFh p>
BFFh p>
FFFh p>
0000h p>
ROM 1 p>
RAM 1 p>
- p>
0FFFh p>
1000h p>
- p>
1FFFh p>
2000h p>
IN-OUT 1 p>
2FFFh p>
3000h p>
ROM 2 p>
4000h p>
4FFFh p>
5000h p>
RAM 2 p>
5FFFh p>
6000h p>
6FFFh p>
7000h p>
- p>
7FFFh p>
8000h p>
IN-OUT 2 p>
8FFFh p>
9000h p>
9FFFh p>
A000h p>
AFFFh p>
B000h p>
BFFFh p>
C000h p>
CFFFh p>
D000h p>
DFFFh p>
E000h p>
EFFFh p>
F000h p>
FFFFh p>
000h p>
400h p>
800h p>
C00h p>
Çàâäàííÿ ¹ 3 p>
Ðîçä³ëèòè
àäðåñíèé ïðîñò³ð 64 ê³ëîáàéò íà 18 ð³âíèõ ÷àñòèí. ßê äåøèôðàòîðà
àäðåñè âèêîðèñòîâóºòüñÿ ÏËÌ. Ðîçáèòòÿ àäðåñíîãî ïðîñòîðó ïîêàçàòè ó âèãëÿä³ ñõåìè
³ òàáëèö³. p>
Ðîçì³ð îäí³º¿
÷àñòèíè 65536/18 = 3640 áàéò. Îñê³ëüêè 3640 * 18 = 65520, îñòàíí³ 16 îñåðåäê³â íå
áóäóòü âèêîðèñòîâóâàòèñÿ. p>
Çðîáèìî
ðîçáèòòÿ 3640 áàéò íà ä³ëÿíêè 2N: p>
3640 = 2048 + 1024 + 512 + 32 + 16 + 8 p>
Ó ðåçóëüòàò³
îòðèìàºìî 6 îáëàñòåé ïàì'ÿò³ ïî 18 ä³ëÿíîê ó êîæí³é: p>
0000h-8FFFh (ä³ëÿíêè ðîçì³ðîì 2048) p>
9000h-D7FFh (ä³ëÿíêè ðîçì³ðîì 1024) p>
D800h-FBFFh
(ijëÿíêè ðîçì³ðîì 512) p>
FC00h-FE3Fh (ä³ëÿíêè ðîçì³ðîì 32) p>
FE40h-FF5Fh (ä³ëÿíêè ðîçì³ðîì 16) p>
FF60h-FFEFh
(ijëÿíêè ðîçì³ðîì 8) p>
Ïðîøèâêà ÏËÌ 1 p>
Îáëàñòü p>
ijàïàçîí àäðåñ p>
Ðîçðÿäè àäðåñè p>
1 p>
5 p>
1 p>
4 p>
1 p>
3 p>
1 p>
2 p>
1 p>
1 p>
1 p>
0 p>
9 p>
8 p>
7 p>
6 p>
5 p>
4 p>
3 p>
2 p>
1 p>
0 p>
1 p>
0000h-07FFh p>
0 p>
0 p>
0 p>
0 p>
0 p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
9000h-93FFh p>
1 p>
0 p>
0 p>
1 p>
0 p>
0 p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
D800h-D9FFh p>
1 p>
1 p>
0 p>
1 p>
1 p>
0 p>
0 p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
X p>
FC00h-FC1Fh p>
1 p>
1 p>
1 p>
1 p>
1 p>
1 p>
0 p>
0 p>
0 p>
0 p>
0 p>
X p>
X p>
X p>
X p>
X p>
FE40h-FE4Fh p>
1 p>
1 p>
1 p>
1 p>
1 p>
1 p>
1 p>
0 p>
0 p>
1 p>
0 p>
0 p>
X p>
X p>
X p>
X p>
FF60h-FF67h p>
1 p>
1 p>