📄 chap.4.io.ps
字号:
2663 0 Dl3186 2891 MXY0 -432 Dl432 0 Dl0 432 Dl-432 0 Dl1312 2001 MXY2664 0 Dl3278 2900 MXY0 237 Dl3264 3081 MXY14 57 Dl3293 3081 MXY-14 57 Dl3537 MX0 -244 Dl3552 2951 MXY-14 -57 Dl3523 2951 MXY14 -57 Dl3163 3392 MXY0 -236 Dl3155 MY449 0 Dl0 236 Dl3392 MY-449 0 Dl1262 1857 MXY2736 0 Dl1539 2902 MXY0 -432 Dl432 0 Dl0 432 Dl-432 0 Dl1558 2411 MXY64 65 Dl72 -72 Dl1709 MX65 65 Dl72 -72 Dl1860 2404 MXY64 65 Dl1925 MX72 -72 Dl1593 2418 MXY0 -561 Dl1665 2411 MXY0 -546 Dl1702 2080 MXY72 -71 Dl2008 MY64 64 Dl1737 2058 MXY0 360 Dl1816 2051 MXY0 360 Dl2224 2902 MXY0 -432 Dl432 0 Dl0 432 Dl-432 0 Dl2313 2900 MXY0 237 Dl2299 3081 MXY14 57 Dl2328 3081 MXY-14 57 Dl2587 3145 MXY0 -244 Dl2601 2958 MXY-14 -57 Dl2573 2958 MXY14 -57 Dl2218 3374 MXY0 -236 Dl449 0 Dl2668 MX0 236 Dl-449 0 Dl2248 2411 MXY65 65 Dl72 -72 Dl2400 MX64 65 Dl72 -72 Dl2551 2404 MXY65 65 Dl72 -72 Dl2285 2418 MXY0 -561 Dl2357 2411 MXY0 -546 Dl2551 2231 MXY72 -72 Dl65 64 Dl2392 2080 MXY72 -71 Dl2008 MY65 64 Dl2429 2058 MXY0 360 Dl2580 2209 MXY0 223 Dl2508 2051 MXY0 360 Dl2659 2209 MXY0 223 Dl1888 2418 MXY0 -281 Dl1968 2411 MXY0 -273 Dl14 s3264 2579(Device)N3214 2713(Interface)N3293 2828(n)N3377(-)X3443(1)X3314 3368(n)N3398(-)X3464(1)X3257 3246(Device)N10 s2767 2136(Control)N3031(Bus)X2767 1994(Data)N2939(Bus)X2760 1856(Address)N3043(Bus)X14 s2313 2578(Device)N2422 2843(0)N2429 3339(0)N2299 3239(Device)N1579 2713(M)N1679(emory)X18 s2198 1670(M)N(EM)S2578(BU)X(S)S16 s939 2018(CPU)N20 s2710 2721(-)N2804(-)X2898(-)X2992(-)X14 s2248 2730(Interface)N3 f12 s1449 3619(Figure)N1746(4.3.)X1914(Memory)X2291(Mapped)X2656(I/O)X2819(Con\256guration.)X1 f576 3779(The)N750(function)X1095(of)X1199(the)X1341(memory)X1686(busses)X1960(in)X2059(Figures)X2371(4.2)X2515(and)X2678(4.3)X2823(are)X2966(the)X3109(same,)X3356(but)X3504(the)X3647(way)X3832(that)X4002(devices)X576 3891(are)N722(addressed)X1129(is)X1221(slightly)X1538(different.)X1922(As)X2056(we)X2196(will)X2374(see)X2524(in)X2626(the)X2771(example)X3125(of)X3232(the)X3377(next)X3570(section,)X3894(the)X4039(device)X576 4003(interface)N942(consists)X1274(of)X1382(a)X1453(set)X1588(of)X1696(registers,)X2074(and)X2241(these)X2467(registers)X2821(are)X2967(usually)X3273(8,)X3373(16,)X3521(or)X3629(32)X3754(bits)X3922(in)X4026(length.)X576 4115(Therefore,)N1011(if)X1100(the)X1248(registers)X1604(of)X1714(the)X1862(device)X2144(interface)X2512(were)X2729(to)X2834(be)X2955(assigned)X3316(memory)X3667(locations)X4045(within)X576 4227(the)N729(address)X1052(space)X1301(of)X1416(the)X1569(CPU,)X1814(then)X2015(the)X2168(usual)X7 f2440(MOVE)X1 f2707(instructions)X3191(of)X3306(the)X3460(68000)X3736(instruction)X4184(set)X576 4339(might)N827(be)X944(able)X1131(to)X1232(be)X1349(used)X1551(to)X1652(transfer)X1972(data)X2159(or)X2265(commands)X2708(to)X2809(or)X2915(from)X3128(the)X3271(device)X3548(interface.)X3935(This)X4131(way)X576 4451(of)N2 f699(mapping)X1 f1078(device)X1373(registers)X1742(onto)X1956(portions)X2314(of)X2437(the)X2598(addressable)X3090(memory)X3454(space)X3711(of)X3835(the)X3997(CPU)X4227(is)X576 4563(referred)N909(to)X1012(as)X3 f1120(memory)X1490(mapped)X1848(I/O)X1 f2014(and)X2180(is)X2271(the)X2416(dominant)X2807(method)X3123(of)X3230(interfacing)X3675(devices)X3991(to)X4093(com-)X576 4675(puter)N799(systems)X1128(today.)X1391(It)X1475(is)X1564(critical)X1858(to)X1958(point)X2181(out,)X2353(however,)X2733(that)X2903(just)X3068(because)X3399(the)X3543(device)X3821(registers)X4173(are)X576 4787(addressed)N989(by)X1119(the)X1271(CPU)X1491(in)X1600(the)X1752(same)X1983(manner)X2305(as)X2418(memory,)X2796(it)X2883(does)X3092(not)X3248(mean)X3490(that)X3668(they)X3867(behave)X4173(the)X576 4899(same)N799(as)X904(memory.)X1274(Principally,)X1747(device)X2025(registers)X2377(do)X2499(not)X2648(obey)X2861(the)X3005(simple)X3288(rules)X3501(that)X3672(memory)X4019(\(RWM)X576 5011(that)N746(is\))X867(obeys)X1116(\320)X1237(i.e.,)X1404(a)X1472(value)X1706(written)X2004(to)X2104(a)X2172(device)X2449(register)X2763(address)X3076(may)X3266(not)X3413(be)X3528(the)X3670(same)X3892(value)X4125(read)X576 5123(back)N782(from)X993(that)X1162(same)X1384(address)X1696(later.)X776 5263(Now)N1003(that)X1189(we)X1342(have)X1565(brie\257y)X1857(introduced)X2310(the)X2469(concept)X2811(of)X2933(a)X3018(device)X3312(register,)X3667(and)X3848(the)X4008(idea)X4211(of)X576 5375(memory)N931(mapping,)X1326(we)X1472(look)X1677(a)X1754(little)X1966(closer)X2230(at)X2334(the)X2486(effect)X2740(of)X2854(this)X3027(on)X3156(the)X3307(programmer.)X3840(To)X3980(the)X4131(pro-)X576 5487(grammer,)N972(the)X1114(memory)X1459(space)X1697(is)X1785(now)X1974(viewed)X2276(something)X2701(like)X2870(as)X2974(is)X3062(shown)X3336(in)X3435(Figure)X3710(4.4.)X42 p%%Page: 42 712 s 0 xH 0 xS 1 f3 f576 400(57:017)N872(CIE)X1 f2329(-)X2385(42)X2505(-)X3 f3717(Lecture)X4062(Notes)X1 f14 s3496 1968(Disk)N3736(Device)X3496 2125(Interface)N3496 1362(Interrupt)N3496 1512(Vector)N3496 1664(Table)N1083 1434(M)N1183(emory)X1155 1578(\(ROM)N1448(\))X760 1938(Device)N1106(Interface)X1048 2053(Registers)N832 2168(\(Not)N1066(M)X1166(emory\))X1120 3234(M)N1220(emory)X1155 3378(\(RW)N1373(M)X1473(\))X3496 3125(Program)N3496 3277(Code,)N3496 3428(Data,)N3496 3579(and)N3686(Stack)X2021 3739 MXY0 -2592 Dl1152 0 Dl0 2592 Dl-1152 0 Dl2019 1290 MXY1152 0 Dl2019 1434 MXY1152 0 Dl2019 1722 MXY1152 0 Dl2019 1866 MXY1152 0 Dl2019 2010 MXY1152 0 Dl2019 2153 MXY1152 0 Dl2019 2297 MXY1152 0 Dl2019 2838 MXY1152 0 Dl2019 3017 MXY1152 0 Dl2019 3161 MXY1152 0 Dl2019 3593 MXY1152 0 Dl1587 1722 MXY288 0 Dl3208 MX107 0 Dl796 1110 MXY683 0 Dl3459 MX648 0 Dl2128 1038 MXY971 0 Dl1587 2297 MXY288 0 Dl1587 2873 MXY288 0 Dl1696 1722 MXYD~ -72 144 107 107 -144 36 144 35 -107 107 72 144 D~~2873 MYD~ -72 144 35 144 72 72 -107 72 107 72 -72 72 -35 144 72 144 D~~1146 MYD~ -72 144 107 107 -144 36 144 35 -107 108 72 144 D~~3236 1729 MXYD~ 72 144 -108 108 108 35 -108 35 108 108 -72 144 D~~3243 1146 MXYD~ 72 144 -107 107 107 36 -107 35 107 108 -72 144 D~~3208 2873 MXYD~ 72 144 72 144 -108 108 72 35 -72 36 108 107 -72 144 -72 144 D~~1696 2297 MXYD~ -72 144 107 108 -144 35 144 36 -107 107 72 144 D~~2163 858(CPU)N2408(Address)X2805(Space)X1768 1829(1000)N1768 2261(1003)N1768 2117(1002)N1768 1973(1001)N1768 3125(5001)N1768 3701(9999)N1768 2981(5000)N1731 1109(Address)N3496 1074(Typical)N3866(Usage)X832(General)X1216(Usage)X2163 973(\(Not)N2397(Simply)X2748(memory\))X2344 1829(Data)N2584(Read)X2344 1981(Data)N2584(W)X2690(rite)X2416 2283(Status)N2379 2132(Control)N940 2629(Devices)N1330(nor)X1083 2744(M)N1183(emory)X1120 2514(Neither)N1768 2802(4999)N1768 2405(1004)N1768 1650(0999)N1768 1397(0001)N1768 1253(0000)N3 f12 s1252 3966(Figure)N1549(4.4.)X1717(Programmer's)X2345(View)X2577(of)X2681(a)X2753(Memory)X3130(Space)X3394(That)X1501 4078(Contains)N1892(Memory)X2269(Mapped)X2634(Device)X2931(Interfaces.)X1 f576 4238(By)N3 f717(memory)X1088(space)X1 f(,)S1365(we)X1506(do)X1631(not)X1783(mean)X2021(only)X2222(the)X2370(device)X2652(we)X2794(call)X2964(memory.)X3339(``Memory)X3764(space'')X4072(refers)X576 4350(to)N680(all)X806(the)X953(addresses)X1350(that)X1524(the)X1671(programmer)X2176(may)X2371(specify,)X2701(and)X2868(these)X3094(addresses)X3490(correspond)X3945(to)X4048(all)X4173(the)X576 4462(possible)N918(valid)X1138(addresses)X1533(that)X1705(the)X1851(CPU)X2065(may)X2259(place)X2491(on)X2615(its)X2734(memory)X3083(bus)X3244(address)X3560(lines.)X3818(Some)X4065(of)X4173(the)X576 4574(addresses)N969(will)X1144(correspond)X1596(to)X1696(memory,)X2066(and)X2230(some)X2457(to)X2556(device)X2832(registers.)X3206(In)X3310(Figure)X3585(4.4,)X3753(the)X3895(hypotheti-)X576 4686(cal)N714(example)X1066(of)X1171(a)X1239(10000)X1504(byte)X1695(memory)X2041(space)X2280(is)X2369(used)X2570(to)X2670(show)X2898(the)X3042(principal)X3411(regions)X3720(of)X3826(the)X3970(memory)X576 4798(space)N824(of)X938(a)X1015(computer)X1413(system.)X1762(In)X1876(the)X2028(lower)X2281(address)X2603(region)X2883(\(0)X2997(through)X3330(999\),)X3564(an)X3689(area)X3884(of)X3997(random)X576 4910(access)N848(\(RAM\),)X1180(read-only)X1575(\(ROM\))X1883(memory)X2230(is)X2321(shown)X9 s2587 4872(1)N12 s2631 4910(.)N2706(In)X2813(the)X2958(higher)X3231(address)X3546(range)X3787(\(5000-9999\),)X576 5022(an)N693(area)X880(of)X986(random)X1306(access)X1578(\(RAM\))X1886(read-write)X2308(\(RWM\))X2638(memory)X2985(is)X3075(shown.)X3375(The)X3551(address)X3865(range)X4104(from)X576 5134(1004)N796(through)X1123(4999)X1343(is)X1435(not)X1586(being)X1828(used)X2032(in)X2135(this)X2302(system.)X2621(If)X2713(the)X2859(CPU)X3073(were)X3289(to)X3393(try)X3529(to)X3633(access)X3908(a)X3980(location)X576 5246(in)N678(this)X844(range,)X1109(it)X1190(would)X1457(cause)X1698(a)X1768(hardware)X2153(error,)X2391(and)X2556(the)X2700(program)X3052(would)X3318(either)X3564(terminate)X3955(or)X4061(return)X576 5358(to)N685(the)X837(monitor)X1176(to)X1285(handle)X1576(the)X1728(exceptional)X2207(error)X2428(condition.)X2851(The)X3036(remaining)X3462(addressable)X3946(region)X4227(is)X576 5470(that)N761(from)X988(1000)X1220(through)X1559(1003,)X1815(and)X1994(is)X2098(assigned)X2469(to)X2584(the)X2742(device)X3034(registers)X3400(of)X3520(a)X3603(hypothetical)X4120(\(and)X10 s10 f576 5566(h)N592(hhhhhhhhhhhhhh)X1 f576 5662(1.)N656(Recall)X881(that)X1021(both)X1183(ROM)X1385(and)X1521(RWM)X1741(are)X1860(RAM.)X43 p%%Page: 43 810 s 0 xH 0 xS 1 f12 s3 f576 400(57:017)N872(CIE)X1 f2329(-)X2385(43)X2505(-)X3 f3717(Lecture)X4062(Notes)X1 f576 803(greatly)N871(simpli\256ed\))X1315(disk)X1502(drive.)X1751(The)X1928(four)X2116(registers)X2470(shown)X2748(physically)X3172(exist)X3382(within)X3656(the)X3802(device)X4082(inter-)X576 915(face)N761(chips)X988(of)X1092(the)X1234(disk)X1418(device.)X1718(They)X1940(might)X2189(have)X2395(the)X2537(following)X2935(functions)X3317(\(roughly)X3672(speaking\):)X776 1055(1.)N2 f920(Data)X1136(Read)X1 f776 1195(2.)N2 f920(Data)X1136(Write)X1 f776 1335(3.)N2 f920(Control)X1 f776 1475(4.)N2 f920(Status)X1 f576 1615(The)N2 f752(Data)X970(Read)X1 f1194(and)X2 f1360(Data)X1579(Write)X1 f1820(registers)X2173(are)X2318(used)X2521(to)X2623(hold)X2821(bytes)X3051(of)X3158(data)X3346(to)X3448(be)X3566(read)X3759(from,)X3997(or)X4104(writ-)X576 1727(ten)N727(to,)X859(the)X1010(disk.)X1251(The)X2 f1434(Control)X1 f1766(register)X2088(is)X2185(written)X2491(to)X2599(by)X2728(the)X2879(CPU.)X3146(Various)X3483(values)X3761(written)X4066(to)X4173(the)X576 1839(control)N877(register)X1194(may)X1388("tell")X1618(the)X1764(disk)X1952(what)X2167(to)X2270(do)X2394(-)X2454(such)X2658(as)X2766("Read",)X3094("Seek",)X3411(or)X3519("Write".)X3893(The)X4072(status)X576 1951(register)N892(is)X983(read)X1176(by)X1298(the)X1442(CPU)X1654(so)X1765(that)X1936(the)X2080(CPU)X2292(can)X2452("\256nd)X2666(out")X
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -