Êîñìîíàâòèêà  Àðõèòåêòóðà 3-õ øèííûõ ñèñòåì 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 [ 40 ] 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57

1 0000

2 0000

3 0000 4J0OOO

5 0000

6 0000

7 0000

8 0000,

9 0000

10 îîîî

11 0000 12 0000

13 0003

14 0004

15 0005

16 0007

17 0009

18 ÎÎÎÂ

19 ÎÎÎÅ

20 0011

21 00U

22 0017

ãã 0018

24 OOIB

25 OOIB

26 001Â

27 001Â

28 001Â

29 001Â

30 001Â

31 001Â

3 2 001Â

33 001Â

34 001Â

35 001Â

36 001Â

37 001Â

38 OOIB

39 OOIB

40 OOIB

41 OOIE

42 ÎÝ21

43 0024 .44 002 6

45 0029

46 002C

47 002C

48 0J3C

49 002C

50 002C

51 002C

52 002Ñ

53 002C

54 îîãñ

55 002C

56 002F

57 002F

58 002F

59 002F

60 002F

♦ ÏÐÎÃÐÀÌÌÀ ÂÂÎÄÀ ÄÀØÍ1 Ñ ÏÓËÜÒÀ È ÂÛÂÎÄÀ ÍÀ ÄÈÑÏËÅÉ

* ÏÐÎÃÐÀÌÌÈÑÒ ÄßÈÌ ÊÎÔÔÐÎÍ 8-28-79 * .. *♦

AI FB

D3 Fo D3 Fl D3 F2 32 00 32 01 32 02 32 03 ÝÑ

32 04

ORG 00 ÓÑÒÀÍÎÂÈÒÜ ÍÀ×.ÀÄÐÅÑ ÏÐÎÃÐÀÌØ

ÂÎ-ÏÅÐÂÛÕ,ÍÅÎÁÕÎÄÈÌÎ ÈÍÈÖÈÀËÈÇÈÐÎÂÀÒÜ ÂÑÅ ÏÅÐÅÌÅÍØÅ

SP,13FFH

ÈÍÈÖÈÀËÈÇÈÐÎÂÀÒÜ ÓÊÀÇÀÒÅËÜ ÑÒÅÊÀ

ÍÀ×.ÇÍÀ×ÅÍÈß ÔËÀÆÊÎÂ,ÎÁÍÓËÅÍÈÅ ÀÊÊÓÌ

ÐÀÝÐÅØÈÒÜ ÏÐÅÐÛÂÀÍÈß

OiOH

ÎÁÍÓËÈÒÜ ÄÈÑÏËÅÉ

OFlH

Oi2H

ÂÛÄÀÒÜ ÍÀ ÄÈÑÏËÅÉ 000000

KTIME

ÊÒ1ÌÅ=0

CFLAG

CFT,AG=0

KWGHT

KwaHT=o

KCOMP

ÊÑÎÌÐ=0

ÀÊ({ÓÌÓËßÒ0Ð=1

KEOW

KK0VV=00000001

* ÓÑÒÀÍÎÂÈÒÜ ÀÄÐÅÑÀ ÏÅÐÅÌÅÍÍÛÕ

ÊÒ1Ìé EQU ÞÎÎÍ

CFLAG EQU KTIME+1,

KWGHT EQU CFLAG+1

KCOMP EQU KWGHT+1

KROW EQU KCOMP+1

NROW EQU KbOW+1

innt )t )t -)t ÍÀ×ÀËÎ ÏÐÎÃÐÀÌÌÛ ** * )t* nnnnt> )H(-* * * ÍÀ×ÀËÎ ÐÈÑ.4.20

CD ÅÂ 00 CD DB 00 ÇÀ 01 Þ FE 00 CA IB 00 CD B1 00

SROW CALL OroW

CALL Ñ01È

LDA CiLAG

CPI ÎÎÍ

. JZ sraw

CALL KEYW

âûâåñòè àêòèâíûé íàáîð

âûçâàòü ïîäïðîãðàøó COLM

íåîáõîäèìî ïðîâåðèòü ôëàÿîê ñòîëáöà

ïðîâåðèòü àêòèâíîñòü öèêëà

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

àêòèâíûé ñòîëáåö,êàêîé èìåííî???

ÇÀ 00 10

FE 00

ÊÎÍÅÖ ÐÈÑ.4.20 ÍÀ×ÀËÎ ÐÈÑ.4.21

** ÁÛËÈ.ÍÀÆÀØ ÊËÀÂÈØÈ * .* (111ÀÃ 1 )

LDA KTIME ÏÅÐÅÇÀÃÐÓÇÈÒÜ KTIME ÈÇ ÏÀÌßÒÈ

(ØÀÃ 2)

CPI ÎÎÍ ÊÒ1ÌÅ=0??

61 0031 ÑÀ

62 0034

63 0034

64 0034

65 0034

66 0034

67 0034 ÇÀ

68 0037 4F

69 0038 ÇÀ

70 0038 Â9

71 ÎÎÇÑ ÑÀ

72 003F

73 003F

74 003F

75 003F AF

76 0040 32

77 0043 ÑÇ

78 0046

79 0046

80 0046

81 0046 ÇÀ

82 0049 ÇÑ

83 004À 32

84 004D

85 004D 8 6 004D

87 004D FE

88 004F Ñ2

89 0052 CD

90 0055 CD

91 0058 ÑÇ

92 005Â

93 005Â

94 005Â

95 005Â ÇÀ

96 005Å 32

97 0061

98 0061

99 0061

100 0061 .

101 0063 32

102 0066 ÞÇ 0066

104 0066

105 0066 ÇÅ

106 0068 32

107 00©

108 006Â

109 ÎÎá ÏÎ 00© ÑÇ

111 006Å

112 ÎÎáÁ

113 ÎÎáÅ

114 ÎÎáÅ

115 ÎÎáÂ

116 ÎÎáÅ

117 ÎÎáÅ

118 006Â

119 ÎÎáÅ

120 ÎÎáÅ

5Â 00 JZ KCL01

******** ÍÅ ÏÅÐÂÛÉ

(ØÀÃ 7)

02 10 LDA KWGHT

MOV Ñ,À

03 10 LDA ÊÑÎÌÐ

ÑÌÐ Ñ

46 00 JZ KCL02

00 10 66 00

XRA À STA KTIME JMP KCL03

00 10 00 10

* (ØÀÃ 9) KCL02

LDA KTIMB INR A STA KTIME

** *(ØÀÃ 10)

32 CPI 50

66 00 JNZ KCL03

6Á 00 CALL KOPN

A7 00 CALL KOUT

IB 00 jmi srow

* (ØÀÃ 3) *

02 10 KCLOl LDA XWGHT

03 10 STA KCOMP

* *(ØÀÃ 4)

01 MVI A.OI

00 10 STA KTIME

** (ØÀÃ 5)

01 KCL03 MVI A,01

04 10 STA KROW

* * (ØÀÃ 6) IB 00 JMP SROW

ÄÀ,ÝÒÎ ÏÅÐàÍÉ ÐÀÇ ÐÀÇ *********

ÊÀÊÀß ÖÈÔÐÀ ÁÛËÀ ÍÀÂÐÀÍÀ??? ÐÅÃÈÑÒÐ C=KWGHT ÐÅÃÈÑÒÐ ÊÑÎÌÐ KC0MP=KWGHT7?? ÄÀ;0ÍÈ ÐÀÂÍÛ!! !

ÎÍÈ ÍÅ ÐÀÂÍÛ ÏÅÐÅÇÀÏÈÑÀÒÜ KTIME

ÈÄÒÈ ÍÀ ÏÅÐÅÇÀÃÐÓÇÊÓ ÀÊÒÈÂÍÎÃÎ ÍÀÁÎÐÆ

ÂÛÇÂÀÒÜ KTIME ÈÇ ÏÀÌßÒÈ

ÊÒ1ÈÅ=ÊÒ1ÌÅ+1

ÊÒ1ØÇ=ÊÃ1ÌÅ+1

ÊÒ1ÌÅ=5077? ÅÙÅ ÍÅ 50

ÏÐÎÂÅÐÈÒÜ ÃÎÒÎÂÍÎÑÒÜ ÏÓËÜÒÀ ØÄÀÒÜ ÍÀ ÏÓËÜÒ ÍÀÇÀÄ ê ÍÀ×ÀËÓ

KcoMp=KwaHT

ÓÑÒÀÍÎÂÈÒÜ KTlMi2=1

ÓÑÒÀÍÇÂÈÒÜ ÀÊÒÈÂÍÛÉ ÍÀÁ0Ð=00000001

ÈÄÒÈ ê ÍÀ×ÀËÓ ÏÐÎÃÐÀÌÌÛ

♦ * **

ÍÀ×ÀËÎ ÏÎÄÏÐÎÃÐÀÌÌÛ * * ♦♦ I*************.....**************************************

* ÐÈÑ.4.22

Ðèñ. 9.4. Ïðîãðàììà ââîäà êëþ÷à è âûâîäà èíôîðìàöèè íà òàáëî äëÿ ìèêðîïðîöåññîðà 8080.



121 006Â

122 ÎÎáÁ

123 006å

124 ÎÎáÅ

125 006Â

126 006Â

127 006Â

128 0070

129 007

130 0074

131 0077

132 0077

133 0077

134 0077

135 007À

136 007À 13ò 007À

138 007À

139 007D

140 00711

141 007D

142 00711

143 0080

144 0080

145 0080

146 0080

147 0083

148 0085

149 0088

150 0088

151 0088

152 0088

153 008Â

154 008Ñ

155 008F

156 008F

157 008F

158 008F

159 0091

160 0094

161 0094

162 0094 1 63 0094

164 0097

165 0098

166 009B

167 009Ñ

168 009Ñ

169 009Ñ

170 009Ñ

171 009D

172 ÎÎÀÎ

173 ÎÎÀÎ

174 ÎÎÀÎ

175 ÎÎÀÎ

176 00À2

177 îîàç

178 00À 6

179 ÎÎÀá

180 ÎÎÀá

ÇÅ 01 KOPN 32 04 10 3d

32 05 10

mvi sta dsr sta

a,01 a

neow

.. .. (øàã 2)

32 00 10 sta ktime

(imr 3)

cd eb oq kopni call orow

cd db 00 call colm

(øàã 5) *

çà 01 10 lda cflag

Fe 00 cpi 00

c2 6e 00 jnz kopn

(øàã 9)

çà 05 10 lda nhow

3c inr a

32 05 10 sta nbow

(øàã 10)

fe 05 cpi 05

c2 7a 00 jnz k0pn1

çà 00 10 lda ktime

3c 1ø a

32 00 10 sta ktime

47 mov b,a

* (øàã 6a)

32 05 10

xra sta

(ØÀÃ 7)

çå 32 â8

C2 7A 00

MVI a, 50

CMP â

JNZ KOPNI

KB0W=0000000l NE0W300OO00OO

KTIME=0

ØÂÅÑÒÈ ÍÀÁÎÐ

ÂÍÅÑÒÈ ÄÀÍÍÛÅ ÑÒÎËÁÖÀ

ââåñòè cflaq cflag=0777

ïóëüò åùå íå ñâîâîäåí

ââåñòè àêòèâøé íàáîð çàïèñàòü àêòèâíûé íàáîð

ñêàíèðîâàíèå íå ýàêîí÷åþ

ðåãèñòð â=>êò1ìà

ÝÍÀ×ÅÍÈÅ ÍÀÁÎÐÀ=0

ÊÒ1ÌÅ=50777

ÍÅÒ,ÑÊÀÍÈÐÎÂÀÍÈÅ ÏÎÂÒÎÐÈÒÜ

181 ÎÎÀá

182 0ÎÀ7

183 00À7

184 00À7

185 00À7

186 00À7

187 00À7

188 00À7 18 9 0ÑÀ7

190 00À7

191 00À7

192 00À7

193 ÎÎÀÀ

194 ÎÎÀÑ

195 ÎÎÀÅ

196 ÎÎÂÎ

197 GOBI

1 98 00Â1

199 00Â1

200 OOBI

201 0ÎÂ1

202 OOBl

203 OOBl

204 OOBl

205 OOBl 20 6 OOBl

207 OOBl

208 OOBl

209 OOBl

210 OOBl

211 00B2

212 00B5

213 dOB5

214 0OB5

215 00B5

216 0037

217 00B7

218 0OB7

219 00B7

2 20 00B8

221 OOBA-

222 OOBA 2 23 OOBA

224 OOBA

225 OOBD 2 26 OOBD

22 7 OOBD

228 OOBD

229 OOBE

230 00C1

231 OOCl

232 OOCl

233 OOCl

23 4 00C2 235 00C5 23 6 00C5

237 0OC5

238 00C5

239 0OC7 2 40 00C7

çà 02 d3 FO d3 Fl d3 iZ c9

* ÏÎÄÏÐÎÃÐÀÌÌÀ KOUT

ýòà ÏîäàÐÎÃÐÀØÀ ÂÛÂÅÄÅÒ ÄÀÍØÅ ñ ÏÓËÜÒÀ ÍÀ ÄÈÑÏËÅÉ * * , ♦ , , ,

Þ ÊîèÒ lda KWGHT äàíøå ñ ÏÓËÜÒÀ â ÀÊÊÓÌÓËßÒÎÐÅ OUT OFOH OUT OFlH OUT 0f2h RET

* ØÄÏÐÎÃÐËØÀ KETtf

* ÝÒÀ ÏÎÄÏÐÎÃÐÀÌÌÀ ÓÑÒÀÍÎÂÈÒ ÝÍÀ×ÅÍËÅ ÍÀÆÀÒÎÉ ÊËÀÂÈØ

♦ áëîê-ñõåìà ýòîé ïðîãðàìø Íê ðèñ.4.18 * (øàã 1)

ÇÀ 01

06 00

fe 00

KBIW XRA À ÎÁÍÓËÈÒÜ ÔËÀÍÊÈ È ÀÊÊÓÌÓËßÒÎÐ

LDA CFLAG ÏÐÈÍßÒÜ ÔËÀÆÎÊ ÑÒÎËÁÖÀ ÈÝ ÏÀÌßÒÈ

MVI â,00 ÎÁÍÓËÈÒÜ Ñ×ÅÒ×ÈÊ

(]]ÄÃ 3)

KiS-iWi RAR

CPI 00

ÑÄÂÈÍÓÒÜ ÂÏÐÀÂÎ ÍÀ 1 ÁÈÒ,Î Â Â?

ÑÀ Ñ1 00 jz kexw2 ÐÅÃÈÑÒÐ 8=0,1,2,3,4 (ØÀÃ áÓ

ñç â7

ÇÀ 04

* (øàã 5)

1nh â

00 jmp keywi óâåëè÷èòü ýíà÷.ñ÷åò÷èêà è èäòè íà ïîâ,

♦ (ØÀÃ 7)

KfflfW2 xra à îáíóëèòü ôëàíêè

10 lda krow âûçâàòü àêòèâøé íàáîð

* (ØÀÃ 8>

6å 00 MVI ñ,00 îáíóëèòü Ñ×ÅÒ×ÈÊ ò2

* (øàã 9)



2*1 Î0Ñ7

242 ÎÎÑÒ IF

243 00G8 FE 00 2 44 ÎÎÑÀ

245 ÎÎÑÀ

246 ÎÎÑÀ

2 47 ÎÎÑÀ ÑÀ D1

248 OOCD

249 OOCD

250 OOCD

251 OOCD ÎÑ

252 ÎÎÑÅ ÑÇ Ñ7 2 53 00D1

254 O0D1

255 0OD1

256 O0D1 ÀÐ

257 00D2 78 2 58 00D3 17 2 59 00D4 17 260 00D5 80 2 61 00D6 8-1 2 62 O0D7

2 63 O0D7

2 64 00D7

265 O0D7 32 02

2 66 OODA

2 67 OODA

2 68 OODA

269 OODA C9

270 OODB

271 OODB

272 OODB 2 73 OODB 274 OODB 2 75 OODB 2 76 OODB 2 77 OODB

278 OODB

279 OODB

280 OODB

281 OODB

282 OODB

283 OODB

284 OODB 28 5 OODB

28 6 OODB AF

287 OODC 32 01

288 OODF

289 OODF

290 OODF

291 OODF DB FE

292 OOEl

293 OOEl

294 OOEl

295 OOEl F6 EO

296 ÎÎÅÇ

297 ÎÎÅÇ

298 ÎÎÅÇ

299 ÎÎÅÇ FE FF

300 00E5 C8

KEW3 - RAR

CPI 00

ÑÄÂÈÃ ÂÏÐÀÂÎ ÍÀ 1 ÁÈÒ,Î BD7

♦ * (ØÀÃ 10)

00 JZ KS1W4 ÅÑËÈ î,òî ÂÛÏÎËÍÅÍÎ

* **(Ï1ÀÃ U)

INR Ñ ÓÂÅËÈ×ÈÒÜ ÇÍÀ×ÅÍÈÅÑ×ÅÒ×ÈÊÀ

00 JMP ÊÇÈÇ ÈÄÒÈ ÍÀ ÏÎÂÒÎÐ

> (ØÀÃ 11)

ÊÜ Ø4 XRA À ÎÁÍÓËÈÒÜ ÔËÀÆÊÈ

ò× À,â ÀÊÊÓØÓËßÒÎÐ=Ñ×ÅÒ×ÈÊ ÑÒÎËÁÖΠ(ÒÎ

RAL Â 2

BAL Â*4

ADD Â Â 5

ADD Ñ (Â 5)+Ñ=0-24

* * *(ØÀÐ 12)

10 ÑÒÀ KvVGHT

(ØÀÃ 13) RET

ÂÛÉÒÈ ÈÇ ÝÒÎÉ ÏÎÄÏÐÎÃÐÀÌÌÛ .

* Ï0ÄÏÐÎÃÐÀØ4À ÑÎØ *

* ÝÒÀ ÏÎÄÏÐÎÃÐÀÌÌÀ ÎÏÐÅÄÅËÈÒ ÀÊÒÈÂÍÛÉ ÑÎÎËÁÅÖ,

* ÅÑËÈ ÎÍ ÑÓÙÅÑÒÂÓÅÒ

*

* ÝÒÀ ÏÎÄÏÐÎÃÐÀÛÌÀ-ÐÉÑ.4.15

** )( * * * * *♦ ê-

*** (ØÀÃ 1) *

COLM XRA À 10 STA CFLAG ÓÑÒÀÍÎÂÈÒÜ ÔËÀÆÎÊ ÑÒÎËÁÖÀ=0

(ØÀÃ 2)

IN OFEH ÂÕÎäàÛÅ flAHHiE ÈÇ ÏÎÐÒÀ FE * (ØÀÃ Ç)

ORI ÎÅÎÍ ÓÑÒÀÍÎÂÈÒÜ ÁÈØ D5,D6,D7=t

* (øé1 ) *

CPI OFEH

RZ ØÀÃ (4À)

301 ÎÎÅá

302 00Å6

303 ÎÎÅá

304 ÎÎÅá 2F

305 00Å7

306 00Å7

307 ÎÎÅ7 .

308 00Å7 32 01 10 )09 ÎÎÅÀ Ñ9

310 ÎÎÅÂ

311 ÎÎÅÂ ;12 ÎÎÅÂ ÈÇ ÎÎÅÂ )Ì ÎÎÅÂ )15 OOiiB

116 ÎÎÅÂ

117 ÎÎÅÂ

Ì8 îîÜâ

319 ÎÎÅÂ

(;î ÎÎÅÂ

321 ÎÎÅÂ 1.2 ÎÎÅÂ <Ï ÎÎÅÂ 14 ÎÎÅÂ 15 ÎÎÅÂ ÎÎÅÂ

127 ÎÎÅÂ ÇÀ 04 10 1.8 ÎÎÅÅ 19 ÎÎÅÅ

130 ÎÎÅÅ

131 ÎÎÅÅ FE 10

132 00F0 Ñ2 F8 00

133 00F3

134 OOF3

135 00F3

13 6 00F3 ÇÅ 01

137 00F5 ÑÇ F9 00

138 00F8 >39 00FB

140 00F8

141 00F8 07 U2 00F9

143 OOF9

144 OOF9

145 0OF9 32 04 Þ

146 OOFC

147 OOFC

148 OOFC

149 OOFC 2F

150 OOFD ))1 OOFD

152 OOFD

153 OOFD D3 FE

154 OOFF (55 OOFF )56 OOFF )57 OOFF C9 158 0100 I6O 0100

* (ØÀÃ 5) ÑÌÀ

* * (ØÀÃ 6)

ÈÍÍÅÐÒÈÐ(]àÀÒÜ ËÀÍØÅ

STA CFLAG ÓÑÒÀÍÎÂÈÒÜ ÔËÀÍÎÊ ÑÒÎËÂÖÀ RET ÂÛÉÒÈ ÈÇ ÝÞÉ ÏÎÄÏÐÎÃÐÀÌØ

* * , * ,hhhh h, j

* ÏÎÄÏÐÎÃÐÀÌÌÀ ØÂÎÄÀ ÀÊÒÈÂÍÎÃÎ ÍÀÁÎÐÀ ÍÀ ÏÓËÜÒ

ÈÌß ýòîé ÏÎÄÏÐÎÃÐÀÌÌÛ-OROW

♦ ** ♦ * ♦♦ * ♦♦ * * * * ♦ * * ** *

ÏÎÄÏÐÎÃÐÀÌÌÀ Ê ÐÈÑ.4.10 Â ÌÍÅÌÎÍÈÊÅ 8080

** ♦ * ♦ ♦ ♦

OHOW LDA KroW *** **(ØÀÃ 2)

ÏÎÂÒÎÐÍÛÉ ÂÛÇÎÂ ÀÊÒÈÂÍÎÃÎ ÍÀÁÎÐÀ

ÑÈ ÞÍ ÑÊÀÍÈÐÎÂÀÍÈÅ ÍÀÁÎÐÀ ÇÀÊÎÍ×ÅÍÎ???

JNZ 0R0W1 ÅÑËÈ ÍÅÒ,ÒÎ ØÀÃ 2Â

**♦ (ØÀÃ -2À)-

MVI À,01Í ÏÅÐÅÌÅÑÒÈÒÜ ÀÊÒÈÂÍÛÉ ÍÀÁÎÐ JjiJP ST3 ÈÄÒÈ ÍÀ ØÀÃ 3

.* . (Â1ÀÃ 2Â)

0RQW1 òñ

* *(ØÀÃ 3)

ST3 STA KROW *

**** *(ØÀÃ 4) ÑÌÀ

* (ØÀÃ 5)

OUT OFEH

ÑÄÂÈÍÓÒÜ ÄÀÍÍÛÅ ÂËÅÂÎ.Î Â DO ÑÎÕÐÀÍÈÒÜ ÀÊÒÈÂØÉ ÍÀÁÎÐ ÈÍÂÅÐÒÈÐÎÂÀÒÜ ÑËÎÂÎ ÍÀÁÎÐÀ ÂÛÂÅÑÒÈ ÀÊÒÈÂÍÛÉ ÍÀÁÎÐ Â ÏÎÐÒ FE

♦ (Øäð 6)

* * * * * * *** *** **********~



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 [ 40 ] 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57