Title: Ch.6 ?????????
1Ch.6 ?????????
- ????
- ????
- I/O?????
- ???????????????????DMA
- ??
- ??????
- 8086/8088????
- 8259?????
- DMA
- DMA?????
- DMA????
- DMA???????
2 6.1 ??/????(I/O??)
- 6.1.1 ??
- ???I/O???
- ????????????????????????????
- ???????
- I/O????????
- ????(Buffer)
- ?????????(?????????)
- ??????(A/D?D/A)
- ????(???????????)
- ????(????)
- ????(???)
3 - I/O?????
- I/O?????????
- ?????????,?????????(???)
- ????????
- ?????CPU???????
- ?????????????,????
- ??????????
- ???????????????
4 - 6.1.2 I/O???????
- I/O??
- I/O??????????????????????????????????(I?O)????
?(O)?????(I)? - ??????????????,?????????????????????????(????)?
- ???????????????????
5 - 1. ????
- ??????????????????????????????
- ??
- ????,??
- ????????,????????/?????
- ??
- ??????????
????(?1MB)
0
???? (960KB)
EFFFFH F0000H
I/O?? (64KB)
FFFFFH
6 - 2. ????
- ??????????????????
- ??????????I/O?????
- ??I/O??????,???????????
??????
I/O????
00000H
0000H
I/O?? (64KB)
FFFFH
???? (1MB)
FFFFFH
7 8 - 8088/8086 CPU?I/O????
- ??I/O??????(??????????)
- ?????????? ???
- ??I/O??
- I/O?????20??????16? A15 A0
- ????I/O????64K(65536)?
- I/O?????0FFFFH
- IBM PC????1024?I/O??(03FFH)
9 - 6.1.3 I/O???????
- ? ? A15 A0
- OUT??????? ????
- IN??????? ????
- ??????????,16?????????????,?????????????????????,
?16???????????(????????),????????????????? - ?? ??????4???,???2F0H2F3H,??????2F0H,?A15A2?
???,?A1?A0????4?????????
10 - 6.1.4 I/O???????
- ??
- ??????(?????)???????
- ???????????
- ?PC??????(?????????)
- ??
- ????????
- ???????????
- ? PC??????(????????)
116.2 ??????
??????? (or ???)
?? ??
???
AB
??????? (???)
???
???
DB
???
????? (or ???)
?? ??
CB
???
?????
12 - ????/?????????/?????
- ???????????,???????????????????
- ?????????????,??CPU???
13??????
- ??????
- ??????????,???????
- ?????????????????
- ?????????????????????
- ??????
- ???????
14 - ??????????????
- ?????????8????
- ????74LS244(???6.3)
- ????????
- ???????
A0A15
????
IOR
????
D0D7
????
15?????????
???
83FCH 83FFH
16?????????
- ????D?????
- ????????8?D???
- ????(???6.5??6.6)
- 74LS273
- 74LS374(??????????,??????6.8)
- ???????????
5V
R
1
D0 D7
Q0
D0D7
. . .
. . .
. . .
. . .
? ? ?
A0A15
CP
R
1
Q7
IOW
74LS273
17??/??????????
- ???????7????????????
- ???7??????????6.10
- ?74LS273??????,?????7????
- 74LS273??????F0H
- ?74LS244?????,????K0K3???
- 74LS244??????F1H
- ?????????00001111?,?7?????????0F
- (7??????)
18 ?? ?? 7?? .gfedcba ?? ?? 7?? .gfedcba
0 00111111 8 01111111
1 00000110 9 01100111
2 01011011 A 01110111
3 01001111 B 01111100
4 01100110 C 00111001
5 01101101 D 01011110
6 01111101 E 01111001
7 00000111 F 01110001
19F0H 0000 0000 1111 0000 F1H 0000 0000
1111 0001
7406
74LS273
Rx8
D0 Q0 Q1 D7 Q2 Q3 Q4 CP
Q5 Q6 Q7
a b c d e f g DP
D0D7
8? ???
????
1
IOW
74LS138
A7A4
G G2A G2B C B A
Y0
1
5V
A15A8
K0K3
74LS244
O1 I1 O2 I2 O3 I3 O4 I4 E1
D0
A3
A2
D1
Y1
A1
D2
A0
D3
1
IOR
20- ???????
-
- Seg7 DB 3FH,06H,5BH,4FH,66H,6DH,7DH,07H
- DB 7FH,67H,77H,7CH,39H,5EH,79H,71H
-
- LEA BX, Seg7 ?7??????
- MOV AH, 0
- GO MOV DX, 0F1H ????????F1H
- IN AL, DX ??????
- AND AL, 0FH ???4?
- MOV SI, AX ??7?????????
- MOV AL, BXSI ?7??
- MOV DX, 0F0H 7??????????F0H
- OUT DX, AL
- JMP GO
216.3 ?????????
- ?????????????????????
- ?????
- ?????
- ??????
- ???????(DMA, Direct Memory Access)
226.3.1 ???????
- ???????????????
- ??????????????
- ??
- ????(???????7????????)
- ???
- ????
- ???????????
- ??????????,??????
236.3.2 ??????
- ????????????,????????????????????
- CPU????????????????????????
- ???????????????
- ??????????????
- ????????
- ??CPU???,?????????,
- ????
24????????
?????
???
Y
N
?????????
???
READY?
N
Y
???? ?????
??????,????????6.15
?????
????
N
Y
25??????????
- ?????????3FBH,?5?(bit5)?????(1?,0???)
- ?????????3F8H,???????????1 ????????????0?
- ????????(??????)
2674LS374
D7-D0
??
D7-D0
D7 D6 D5 D4 D3 D2 D1 D0
Q7 Q6 Q5 Q4 Q3 Q2 Q1 Q0
D5
IOW
1
74LS138
A9 A3
3F8H
G G2A G2B C B A
CP
Y0
OE
STROBE
1
A15 A10
3FBH
BUSY
S
A2 A1 A0
Q
Y3
D
1
CP
Q
????
IOR
????
276.3.3 ??????
- CPU??????????,???????????????????CPU???????,?CPU??
?????CPU??????????????????,??????????,???????CPU??
??? - ??CPU???,????,????
- ???????????
286.3.4 DMA??
- ????I/O?????CPU????
- ?? CPU ??
- ????
- 1)?????????????????CPU????????(PIO??)
- 2)??I/O?????????????????????CPU???(???CPU??)?
- ???????????????????(????KB/?)??DMA??
29 - DMA??
- ?? ??
- ?????????????? ,CPU????????????
- ???DMA???(DMAC)????(CPU????????),??/??????????????
DMAC??? - ???????DMA?????,??????????????,???????????(???MB/
?)
30??????
- ??????mater?slave
- DMAC????slave
- DMAC????????????master
- DMA???????
- ???MEMI/O
- ???MEMMEM
- I/O I/O
31DMA???????
?
?
?
CPU
DMAC
????
HOLD
DRQ
HLDA
DACK
?
?
?
IOW
IOW
IOR
IOR
AEN
MEMR
AEN
MEMR
MEMW
MEMW
IOW
IOR
AEN
????
?
MEMW
MEMR
? ????DMA?? ? DMAC?CPU???? ? CPU???????????,??????
?? ? DMAC???????,???DMA???? ? ?DMAC????????,??????
??? ?????? ? ??????,DMAC??HOLD?? ?
CPU??HLDA??,???????
???
32- DMA????????
- 1)??????,????DMA???,???DMA?????DMA??????(DRQ)
- 2)DMA????????,?CPU????????HOLD,????????
- 3)CPU??????????????HOLD?????????????????CPU??????
???????????????????,????????????????,CPU?DMA?????
??????(HLDA)? - 4)DMA?????HLDA???,???????,??????DMA????DACK
33- DMA????????(?)
- 5)DMA?????????????????,??????????????????????
- ??,?I/O???????,????????????????????????AEN??,?????
?????????? - 6)DMA???????????????,????????????????????????,DMA?
???????CPU?HOLD???CPU???HOLD???,?????HLDA??,??????
???????????
34 - DMA???????
- ????(???)
- DMAC??????,??????????????,?????DREQ?????
- ????(????????)
- ??DMA?????????????????
- ????(????)
- ??I/O?????????,??????
- (?I/O??????????FIFO??)
35??DMA
N
DMA???
Y
DMAC????
CPU??, DMAC??????
DMA??????
????,?????
Y
????
N
DMAC????
36??DMA
??I/O?DREQ DMA???
N
Y
DMAC????
CPU??, DMAC??????
DMA??????
????,?????
Y
????
N
????????????
DMAC????
37??DMA
N
DMA???
Y
DMAC????
CPU??, DMAC??????
DMA??????
????,?????
Y
????
N
??I/O?DREQ ???
Y
N
??,????
????,????
38DMA???????
DMAC????,???n???
CPU??????
CPU?????
DMA1
DMA2
DMAn
DMA3
T
????
DMA???n???
T
????
DMA1
DMA2
DMAn
DMA??k???
DMA??n-k???
T
????
FIFO??
FIFO?
FIFO??
FIFO?
??
??????
396.4 ????
- 6.4.1 ???????
- ??????
- ????????
????
???
????
????
???????
????
????
???
????
????
????
????
??????
40?????
- CPU?????,????????????(?????),??CPU???????????,????
?????????(???????????????),??????,????????????????
????,?????????
41???
- ??CPU???????????
- ??????????,?????
- ??????????????????????????
- ??????????????
- ????CPU??????????????
- ????CPU?????????????
- 8086/8088???????INTR?NMI
- INTR???????,?????,?IF??????IF1?,????????CPU????
??? - NMI???????,?????,????CPU????????????
42????????????
- ???????
- ???CPU???????????,???CPU?????
- ????????????????????????
- ????
- ????
- ????
- ???,????
43????
- ????
- ????
- ????(???????????)
- ????
- ????
- ????
- ?????????????????
441)????
- ????(???)????????,??CPU?INTR?NMI??
- ??????????,????
- ??,NMI?????,INTR?????
- ?????????????????
- CPU?????,????????????
- ?8086/8088???,????????8259A????????(PIC)???????CPU
?? - (I/O??) ? PIC ? CPU
452.1)?????
- ???????????,CPU?????????????????????????
- ?????????????????,???????,????6.18??6.19?
- ?????????????????,CPU??????????(8086/8088???????)
462.2)????
- ?????????,CPU???????
- ??????????
- ??????????????
- ?????????????????????????????,????????????
- ????????????????????????????????????????????
- ??????????
- ?????????????(?????)
- ????????????,???????(??????????)
- ???????????????????????
- x86???,?????PIC?CPU?????
47?????????(???6.20)
??1
??2
??3
????1
????2
????3
IREQ
IREQ
IREQ
????
????
????
??? ????
??? ????
??? ????
INTAin
INTAin
INTAin
?
48???????
????
???
? ? ? ? ?
DB
E
IREQ
????
??? ????
1
INTAin
INTAout
INTR
493)????
- ??????????????,CPU??INTR?NMI??????????,?CPU????
- ?????????INTR,????????
- ?????STI?IRET,???????????
- ??????LOCK?REP??????,??????????,????????
- ?INTR,CPU????????,?IF1
- ??????(RESET)???(HOLD)???
- ?NMI? INTR ????,?????NMI?
503)????(?)
- CPU?????,????????
- ??????INTA??????
- ????,??CS?IP?PSW(FLAGS)??????????????????????
- ???????????(??)?
- ???????????????
- ?????
- ???????
514)????(????)
- ?????????
- ????(???FAR)
- ??IRET????
- ????????????
- ????(PUSH regs)
- ???(STI)
- ??????
- ????(POP regs)
- ????(IRET)
525)????
- ????????IRET
- IRET????CPU??????????????IP?CS?FLAG?,?????????????
????????
IP
IPL
IPL
SP
IPH
IPH
CSL
CSL
CS
CSH
?????????
?????
CSH
FLAGL
FLAGL
FLAG
FLAGH
FLAGH
SP
536.4.2 8088?????
- ??????????NMI?INTR?INTA
- 8088??????
- ????
- ???????0,???????????????????
- ???????1,TF1???(????????)
- ???????3,????????,?INT 3???
- ???????4,????????,?INTO???
- ?????INT n??,???n(0-255)?
- ????
- ?????NMI???2,???????,CPU??????
- ?????INTR????PIC???IF1?CPU?????
548086/8088?????
??????
n
NMI
2
???????
????
4
????
3
? ? ? ? ? ? ?
???
0
INTR
1
????
8086/8088CPU????
55??????
- 8088??????????????????,???????????????????? ?
- ???????????????????????????
- ?????????????
- ??????????PIC??
- CPU??INTR???,?????????????(???6.24),??PIC??2??????
????????????????,?CPU???
56?????(IVT)
- ??????????????????(????)????
- ?????????00000H003FFH,???1KB,?256?????
- ????????4 Bytes,???????,??????
- ???????????????????? (n??????)
- ?????IVT??????4n
57?????????
- ????????????????????
- ???????48H????????????int48h,?????????????????
????????
58?????????
- CLI
- MOV AX,0
- MOV DS,AX
- MOV SI,48H4
- MOV AX,OFFSET int48h
- MOV SI,AX
- MOV AX,SEG int48h
- MOV SI2,AX
- STI
598086/8088 CPU???????
- ????????
- ?INTA??
- ?????????????
- ????????
- ? PUSH FLAG
- ? IF0
- ? PUSH CS
- ? PUSH IP
- ? ???????IP?CS
60??????(?)
- ????????
- ?????,???????????
- ?????(??????6.24)
- ? INTA(1),PIC???????????
- ? INTA(2),PIC????????DB?,CPU??
- ? PUSH FLAG
- ? IF0
- ? PUSH CS
- ? PUSH IP
- ? ???????IP?CS
???????
618088??????????
- ???????????
- ????
- NMI
- INTR
- ????
628086/8088???????
???
FLAG??
TEMP?TF
????
TFTF0
??? ??
CS?IP??
N
???????
Y
???CS ???IP
??? ??
Y
???0255
????????
N
NMI ?
Y
NMI?
Y
???2
N
N
TEMP 1?
INTR ?
Y
????, ?????
IF1?
Y
Y
N
N
N
???? ????
TF1 ?
Y
???1
??CS?IP
N
IRET?????
??FLAGS
????? ???
63NMI?INTR?????????????????????
TF1 IF1
DIV
INTR
NMI
???
PUSH FLAGS?CS?IP CLEAR IF TF,?????CSIP
NMI(IF?TF 0)
PUSH FLAGS?CS?IP CLEAR IF TF,?????CSIP
NMI??????
(IF?TF 0) ??
?????????
(IF?TF 1) ??
INTR????
??????
???INTR
INTR
PUSH FLAGS?CS?IP CLEAR IF TF,?????CSIP
?? (IF?TF 0)
PUSH FLAGS?CS?IP CLEAR IF TF,?????CSIP
????????
(IF?TF 0) ??
INTR??????
(IF?TF 1) ??
????????
646.5 ????????8259A
- PIC,Programmable Interrupt Controller
- ??8???????????
- ?????64???????????
- ???????????
- ??????x86?????????
- ???????????6.26
656.5.1.8259A?????
- 8259A?????(???6.27)
- ???????IRR
- ???IR0IR7????????,??1?????IRi?????
- ???????ISR
- ????????????,??1?????IRi???????
- ???????IMR
- ???????,??1?????IRi?????
- ?????????
- ?????CPU??????,???????ISR???????????????????????
666.5.2 8259A?????
- 8259A????????????
- ??IRi???,IRR????1
- ????IRi????,??CPU??????
- ????1?INTA???,?ISRi1,IRRi0
- ????2?INTA???,?ISRi1??????????????DB?
- ????AEOI??,??2?INTA???,?ISRi?????CPU??EOI???ISRi
??
676.5.3 8259A?????
- 8259A??????????
- ???????????
- ????????
- ????????
- ??????
- ??????
68???????????
- ??????
- ????????????????????
- ???????
- ??????IRi??????????
- ????????????
- ???8259A?????,????????????IR0IR7
?????
????????
IR7
IR6
IR5
IR4
IR3
IR2
IR1
IR0
IR7
IR6
IR5
IR4
IR3
IR2
IR1
IR0
7
6
5
4
3
2
1
0
3
2
1
0
7
6
5
4
???
???
???
???
???
69???????????(?)
- ???????
- ????????????,??????????
- ?????????????
- ?????IRi????,???????????,????????????????
IR7
IR6
IR5
IR4
IR3
IR2
IR1
IR0
IR7
IR6
IR5
IR4
IR3
IR2
IR1
IR0
0
1
0
1
0
0
0
0
0
1
0
0
0
0
0
0
ISR??
ISRi
7
6
5
4
3
2
1
0
2
1
0
7
6
5
4
3
???
???
???
???
IR4???????
IR4???????
70???????????(?)
- ??????
- ?????????????????????????????8259A?????????
- ???????(????)
- ????????,????????????????????????????
- ???????
- ????????,???????????????????????????????
- ? ??????????8259A?????8259A,???????8259A??8259A??
?
71B.
C.
?????? ???INT?????,??????IR0-IR2?????????
??????IR4???????,?????????
?8259A
?8259A
- IR0
- IR1
- IR2
- IR3
- IR4
- IR5
- IR6
- IR7
- IR0
- IR1
- IR2
- IR3
- IR4
- IR5
- IR6
- IR7
A.
??IR7????,?????
?CPU
INT
INT
?????? ?????????INT,?????IR0-IR2?????????(?IR3-IR
7???????)
E.
D.
??????IR4???????,???IR5-IR7?
72????????
- ???IRi??????,ISR?????ISRi1???????,??????ISRi???IS
Ri0????8259A????????(EOI??)???? - ??EOI??
- ??EOI(AEOI)(??EOI??)
- ???EOI(NSEOI)(??EOI??)
- ??EOI(SEOI)(??EOI??)
73 - AEOI??2?INTA???,?8259A?ISRi????
- ????????????????,?AEOI??????????
- SEOI?CPU????SEOI??,?EOI???????????ISR????
- ????????
- NSEOI?CPU????EOI??,?EOI???ISRi1???????????????
- ?????????
74- ?????????EOI??
- ????PIC?????????,????PIC?EOI??
??????
?
??PIC?EOI??
??PIC?ISR
N
?0?
Y
??PIC?EOI??
????
IRET
75????????
- IMR?????????????IRi??????IMi1 ??, IMi0 ???
- ??????
- ?????????????????????????
- ??????????IR6,?????????,????IM61???,?IR6????????
??????? - ??????????SEOI???????
76- ?????
- ? IR4??????
- CLI
- MOV AL,68H OCW30 1 1 0 1 0 0
0 - OUT 0C0H,AL ????????
- IN AL,0C2H
- OR AL,10H ??IR4
- OUT 0C2H,AL
- STI
- ?
IR7??,??,?? - ?
- CLI ?????
- IN AL,0C2H ?????
- AND AL,0EFH ??IMR4
- OUT 0C2H,AL
- MOV AL,48H OCW30 1 0 0 1 0 0
0 - OUT 0C0H,AL ??????
- STI
- ? ??IR4????
77??????
- ????
- IRi????????????
- ????
- IRi????????????
- ??1?INTA???,IRi???????
78??????
- ??8259A???8????
- ????8259A??,?????64?????n?8259A???7n1????
- ????????8259A???,????????
- ????8259A????
- CAS0-CAS2
- SP/EN
- IRi
- INT
79????????
806.5.4 8259A?????
- 8259A???????
- ??????ICW
- ICW1ICW4
- ?8259A??ICW??????????
- ?????OCW
- OCW1OCW3
- ?8259A??OCW???????????
818259A??????????
- ??CS?A0?RD?WR?D4?D3???
- ?????????????
CS RD WR A0 D4 D3 ????
0 1 0 0 0 0 ?OCW2 ?OCW3 ?ICW1 ?ICW2,ICW3,ICW4,OCW1(????)
0 1 0 0 0 1 ?OCW2 ?OCW3 ?ICW1 ?ICW2,ICW3,ICW4,OCW1(????)
0 1 0 0 1 x ?OCW2 ?OCW3 ?ICW1 ?ICW2,ICW3,ICW4,OCW1(????)
0 1 0 1 x x ?OCW2 ?OCW3 ?ICW1 ?ICW2,ICW3,ICW4,OCW1(????)
0 0 1 0 1 x x ??IRR?ISR ??IMR
828259A??????
?ICW1
?ICW2
N
???
Y
?ICW3
N
?ICW4?
Y
?ICW4
838259A??????
- ???8259A???ICW1??
- ?ICW1????????8259A
- ??ICW1?,8259A?????
- ??ISR?IMR(?0)
- ????????????IR0??,IR7??
- ?????????
- ???????????
- ??????????IRR?
84ICW1????
A0 D7 D6 D5 D4 D3 D2 D1
D0 0 x x x 1 LTIM x SNGL IC4
- LTIM ????
- 1 ?????
- 0 ?????
- SNGL ????
- 1 ??
- 0 ??
- IC4 ICW4??
- 1 ??ICW4
- 0 ??ICW4(??ICW4??0)
85ICW2?????
A0 D7 D6 D5 D4 D3 D2 D1
D0 1 T7 T6 T5 T4 T3 x x x
- T7T3 ???????5?
- T2T0 ??3????????IRn
- 000111????IR0IR7
- ?8259A????????????
- ??
- ?ICW2????48H,?IR0???????48H,IR7???????4FH,???
86ICW3?????
A0 D7 D6 D5 D4 D3 D2 D1
D0 1 S7 S6 S5 S4 S3 S2 S1 S0
- ????????
- Si1 ??IRi???????
A0 D7 D6 D5 D4 D3 D2 D1
D0 1 0 0 0 0 0 ID2 ID1 ID0
- ????????
- ID2ID0 ???,?????????????IR????
000111????IR0IR7?
87ICW3?????(?)
- ICW3?????????????
- ??,???IR4????INT???,????ICW310H,???ICW304H?
- ?????,???????CAS2-CAS0?????????????,???????ICW3?CA
S2-CAS0??,?????????????????
88ICW4???????
A0 D7 D6 D5 D4 D3 D2 D1 D0
1 0 0 0 SFNM BUF M/S AEOI 1
- SFNM ?????
- 1 ???????
- 0 ???????
- AEOI ??EOI
- 1 ??EOI??
- 0 ???EOI??
- BUF ????
- M/S ?/?????
- BUF M/S
- 1 1 ????/?PIC
- 1 0 ????/?PIC
- 0 x ?????/??
898259A??????OCW
- OCW????8259?????
- ???????
- OCW????????
- ??????
- OCW1?????????(A01)
- OCW2,OCW3?????????(A00)
90OCW1?????
A0 D7 D6 D5 D4 D3 D2 D1
D0 1 M7 M6 M5 M4 M3 M2 M1 M0
- Mi1 ?????IRi???(?????)
- 0 ???IRi??
- OCW1???IMR????
- A01??OCW1??????IMR???
91OCW2??????????
A0 D7 D6 D5 D4 D3 D2 D1
D0 0 R SL EOI 0 0 L2 L1 L0
- L2L0 ?????
- R ???????
- SL ?????
- EOI ??????
- R SL EOI
- 0 0 1 ???EOI ??(NSEOI),?????
- 0 1 1 ??EOI ??(SEOI),?????,?L2-L0????I
SR - 1 0 1 NSEOI ??,???????
- 1 0 0 ??EOI,?????????
- 0 0 0 ??EOI,?????????(?????)
- 1 1 1 SEOI ??,?L2-L0???????(L2-L0?????
??) - 1 1 0 ?L2-L0???????(L2-L0???????)
92OCW3??????????
A0 D7 D6 D5 D4 D3 D2 D1
D0 0 0 ESMM SMM 0 1 P RR RIS
- ESMM ??????????
- SMM ??????
- ESMM SMM
- 1 1 ????????
- 1 0 ????????
- 0 x ???????
- P(Polling) 1 ????
- 0 ?????
- RR ????
- RIS ISR/IRR??
- RR RIS
- 1 1 ?ISR
- 1 0 ?IRR
- 0 x ??
93OCW3(?)
- ??????8259A????????,??????????
- CPU????D21?OCW3,????????,??????????
- I x x x x R2 R1
R0 - I1???????,??????R2-R0
- ??????????,????????? ????
- ?IRR/ISR??????,?????????,????IRR?ISR????
948259A????
- ????????8259A
- ?????20H?21H
- ??????????8259A??ICW4
- ?IR0-IR3?????????08H-0BH
- IR4-IR7????
- ????,?????????????
- ICW1 00010010 12H
- ICW2 08H ?????
- OCW1 11110000 0F0H ?????
95 8259A????(?)
??????? INIT8259A MOV DX,20H A00,?ICW1 MOV
AL,12H ?????,??,??ICW4 OUT DX,AL MOV DX,21H A
01,?ICW2,OCW1 MOV AL,08H ICW2 OUT DX,AL MOV
AL,0F0H OCW1??IR4-IR7 OUT DX,AL
966.4.5 PC???????
- 1)???
- ???????
- ?????????
- ???????
- ??8259A??????(???????????)
- STI
- 2)??????
- ???????????
- ????????
- ?????????????
- ?EOI??(??????)
- STI(??????)
- IRET
97??????
- PC???8259A?I/O???20H?21H,??????08H
- ?????IR6??,???????0EH
- ?????
- ?????????
- mov ah,35h
- mov al,0eh ?????
- int 21h ??????(?esbx?)
- mov save_ip,bx ?????????
- mov save_cs,es
98 ????????? push ds mov dx,offset
my_int mov ax,seg my_int mov ds,ax DSDX????
my_int???? mov ah,25h mov al,0eh int 21h
????????? pop ds ??????? mov sp,my_stac
k_top ??8259A?????? in al,21h and al,1
0111111b ??IR6?? out 21h,al sti
lt????????gt
99- ?????
- my_int proc far
- pusha
-
- lt????????gt
-
- popa
- mov al,20h EOI??,00100000B
- out 20h,al ?OCW2
- sti
- iret
- my_int endp
- ?? p292 - 6.1, 6.2, 6.5, 6.7, 6.17(??)