📄 chap.3.assemblylang.ps
字号:
1244(saw:)X7 f2304 3155(......)N1728 3267(1100)N2304(ADD)X2880(D1,D0)X2304 3379(......)N2304 3491(BLE)N2880(1100)X1 f576 3651(which)N842(indicated)X1227(that)X1404(if)X1495(the)X1645(`LE')X1859(condition)X2255(held,)X2477(then)X2675(a)X2750(branch)X3044(was)X3225(to)X3332(occur)X3578(to)X3685(the)X3835(line)X4012(labeled)X576 3763(`1100'.)N912(Later,)X1172(we)X1316(will)X1498(see)X1653(that)X1830(address)X2150(labels)X2407(like)X2584(`1100')X2871(cannot)X3159(be)X3281(selected)X3623(at)X3724(random.)X4073(How-)X576 3875(ever,)N790(if)X873(we)X1009(simply)X1295(think)X1517(of)X1621(them)X1838(as)X1942(symbolic)X2319(labels,)X2592(we)X2728(will)X2902(be)X3017(\256ne)X3185(for)X3321(now.)X3 f576 4099(3.5.)N768(Some)X1016(Notation)X1 f776 4239(When)N1031(writing)X1335(programs)X1724(at)X1820(the)X1964(level)X2178(we)X2316(are,)X2484(it)X2564(is)X2654(necessary)X3054(to)X3155(make)X3390(very)X3587(clear)X3801(what)X4014(base)X4211(of)X576 4351(arithmetic)N995(we)X1134(are)X1279(using.)X1538(Therefore)X1945(the)X2090(following)X2491(conventions)X2983(will)X3160(be)X3278(observed.)X3675(Normally,)X4094(if)X4179(we)X576 4463(simply)N867(write)X1094(a)X1166(number,)X1513(such)X1718(as)X1827(`9472',)X2136(it)X2219(will)X2398(be)X2518(assumed)X2878(to)X2982(be)X3102(a)X3174(decimal)X3509(quantity.)X3902(If)X3995(we)X4136(pre-)X576 4575(cede)N787(the)X939(number)X1267(with)X1472(the)X1624(`)X2 f1656($)X1 f(')S1770(symbol,)X2111(such)X2321(as)X2435(`)X2 f2467($)X1 f(2500',)S2797(it)X2885(implies)X3203(the)X3355(number)X3682(is)X3779(hexadecimal.)X576 4687(Finally,)N906(if)X998(we)X1143(precede)X1476(a)X1552(number)X1879(with)X2083(the)X2234(`%')X2411(sign,)X2628(such)X2837(as)X2950(`%0010010100000000',)X3919(it)X4007(implies)X576 4799(the)N718(number)X1036(is)X1124(binary.)X1418(Therefore,)X1846(the)X1988(following)X2386(all)X2507(represent)X2884(the)X3026(same)X3248(value.)X1056 4911(9472)N2 f9 f1272(=)X2 f1349($)X1 f(2500)S2 f9 f1613(=)X1 f1690(%0010010100000000)X3 f576 5183(3.6.)N768(A)X861(More)X1110(Complete)X1529(View)X1761(of)X1865(Memory)X1 f776 5323(Until)N1000(now,)X1215(we)X1353(have)X1561(only)X1758(said)X1939(that)X2110(memory)X2457(is)X2547(addressed)X2952(by)X3074(associating)X3528(a)X3597(number)X3917(with)X4114(each)X576 5435(location.)N941(In)X1051(fact,)X1249(there)X1471(are)X1618(several)X1920(ways)X2146(to)X2250(view)X2466(the)X2613(organization)X3124(of)X3233(memory.)X3607(For)X3769(our)X3926(purposes,)X576 5547(we)N712(can)X870(think)X1092(of)X1196(memory)X1541(as)X1645(being)X1883(organized)X2287(in)X2386(three)X2603(different)X2959(ways.)X776 5687(As)N913(shown)X1194(in)X1300(Figure)X1582(3.11,)X1805(memory)X2157(can)X2322(be)X2444(viewed)X2753(as)X2864(consisting)X3285(of)X3 f3396(bytes,)X3665(words,)X1 f3971(or)X3 f4083(long-)X576 5799(words)N1 f826(.)X874(A)X967(byte)X1157(is)X1245(8-bits)X1488(long,)X1707(a)X1774(word)X1995(is)X2083(16)X2203(bits,)X2390(and)X2553(a)X2620(longword)X3012(is)X3100(32)X3220(bits.)X28 p%%Page: 28 1112 s 0 xH 0 xS 1 f3 f576 400(57:017)N872(CIE)X1 f2329(-)X2385(28)X2505(-)X3 f3717(Lecture)X4062(Notes)X1 f10 s2592 1503 MXY0 518 Dl1036 0 Dl0 -388 Dl2592 1244 MXY1036 0 Dl2592 1892 MXY1036 0 Dl2592 1373 MXY0 -388 Dl1036 0 Dl0 518 Dl2592 1114 MXY1036 0 Dl1555 1373 MXY0 -388 Dl518 0 Dl0 518 Dl1555 1114 MXY518 0 Dl1555 1244 MXY0 0 Dl518 0 Dl1555 1892 MXY518 0 Dl1555 1503 MXY0 518 Dl518 0 Dl0 -388 Dl1555 2929 MXY0 -388 Dl2540 MY2073 0 Dl0 518 Dl3188 MY0 0 Dl0 388 Dl3577 MY-2073 0 Dl0 -518 Dl2669 MY2073 0 Dl1555 2799 MXY2073 0 Dl1555 3447 MXY2073 0 Dl1612 2460 MXY-57 14 Dl1612 2489 MXY-57 -14 Dl2079 0 Dl3577 2489 MXY57 -14 Dl3577 2460 MXY57 14 Dl2649 893 MXY-57 14 Dl2649 921 MXY-57 -14 Dl1043 0 Dl3577 921 MXY57 -14 Dl3577 893 MXY57 14 Dl1619 899 MXY-57 14 Dl1619 928 MXY-57 -14 Dl1561 913 MXY518 0 Dl2022 928 MXY57 -14 Dl2022 899 MXY57 14 Dl16 s2533 1441(.)N2597(.)X2661(.)X3577 1580(.)N3641(.)X3705(.)X3039 1509(.)N3103(.)X3167(.)X10 s2929 1991(word)N3114(n/2)X3236(-)X3283(1)X3006 1212(word)N3191(1)X3006 1069(word)N3191(0)X14 s3058 2190(\(B\))N16 s1509 1447(.)N1573(.)X1637(.)X1749 1522(.)N1813(.)X1877(.)X2002 1580(.)N2066(.)X2130(.)X10 s1691 1991(byte)N1849(n-1)X1743 1205(byte)N1901(1)X1743 1075(byte)N1901(0)X14 s1743 2216(\(A\))N16 s1509 2996(.)N1573(.)X1637(.)X2546 3064(.)N2610(.)X2674(.)X3570 3142(.)N3634(.)X3698(.)X10 s2436 2769(longword)N2763(1)X2358 3537(longword)N2685(n/4)X2807(-1)X14 s2533 3771(\(C\))N10 s2436 2636(longword)N2763(0)X12 s1730 858(8)N1802(bits)X2973 855(16)N3093(bits)X2449 2397(32)N2569(bits)X10 s2274 936(Address)N1256 939(Address)N1231 2501(Address)N1380 3537(n-4)N1464 2779(4)N1464 2637(0)N1399 1982(n-1)N2436 1989(n-2)N2507 1212(2)N2514 1075(0)N1477 1082(0)N1477 1212(1)N3 f12 s1473 3982(Figure)N1770(3.11.)X1986(Three)X2256(Separate)X2643(Views)X2912(of)X3016(Memory.)X1 f576 4142(Figure)N853(3.11\(A\))X1180(shows)X1445(a)X1514(memory)X1861(organization)X2369(of)X2 f2475(n)X1 f2549(bytes.)X2802(A)X2897(byte)X3089(is)X3179(the)X3323(smallest)X3665(addressable)X4141(unit)X576 4254(of)N691(memory,)X1071(therefore,)X1478(the)X1631(addresses)X2034(of)X2149(bytes)X2386(are)X2538(simply)X2834(consecutive)X3323(integers.)X3710(Figure)X3995(3.11\(B\))X576 4366(shows)N842(the)X987(same)X2 f1212(quantity)X1 f1556(of)X1664(memory)X2013(as)X2121(\(A\),)X2306(but)X2457(organized)X2865(as)X2973(a)X3044(sequence)X3425(of)X3533(16-bit)X3791(words.)X4077(Since)X576 4478(words)N844(are)X996(each)X1207(two)X1385(bytes)X1622(long,)X1851(the)X2003(total)X2209(number)X2537(of)X2651(words)X2919(is)X3017(half)X3201(that)X3380(of)X3494(the)X3646(number)X3974(of)X4088(bytes)X576 4590(\(i.e.,)N774(n/2)X921(words\).)X1259(Furthermore,)X1788(each)X1989(address)X2301(is)X2389(a)X2456(multiple)X2802(of)X2906(2)X2978(\320)X3099(i.e.)X3242(0,)X3339(2,)X3436(4,)X3533(etc.)X3719(Figure)X3995(3.11\(C\))X576 4702(again)N824(shows)X1102(the)X1259(same)X1496(quantity)X1851(of)X1970(information)X2464(as)X2583(\(A\))X2755(and)X2933(\(B\),)X3123(but)X3284(organized)X3702(as)X3820(32-bit)X4088(long-)X576 4814(words.)N862(Therefore,)X1294(there)X1515(are)X1661(only)X1860(n/4)X2011(longwords,)X2468(and)X2635(each)X2840(has)X2996(an)X3115(address)X3431(which)X3695(is)X3788(a)X3860(multiple)X4211(of)X576 4926(4)N648(\320)X768(0,)X864(4,)X960(8,)X1056(etc.)X29 p%%Page: 29 1212 s 0 xH 0 xS 1 f3 f576 400(57:017)N872(CIE)X1 f2329(-)X2385(29)X2505(-)X3 f3717(Lecture)X4062(Notes)X1 f10 s1396 1762 MXY0 -777 Dl2073 0 Dl3470 MX0 1036 Dl1396 1244 MXY2073 0 Dl1396 2799 MXY2073 0 Dl1454 905 MXY-57 14 Dl1454 934 MXY-57 -14 Dl1396 MX2079 0 Dl3418 934 MXY57 -14 Dl3418 905 MXY57 14 Dl1396 1114 MXY25 0 Dl1448 MX25 0 Dl1501 MX25 0 Dl1553 MX25 0 Dl1606 MX25 0 Dl1659 MX25 0 Dl1711 MX25 0 Dl1763 MX25 0 Dl1816 MX25 0 Dl1868 MX25 0 Dl1921 MX25 0 Dl1974 MX25 0 Dl2026 MX25 0 Dl2079 MX25 0 Dl2131 MX25 0 Dl2183 MX25 0 Dl2236 MX25 0 Dl2289 MX25 0 Dl2341 MX25 0 Dl2394 MX25 0 Dl2446 MX25 0 Dl2498 MX25 0 Dl2551 MX25 0 Dl2604 MX25 0 Dl2656 MX25 0 Dl2709 MX25 0 Dl2761 MX25 0 Dl2814 MX25 0 Dl2866 MX25 0 Dl2918 MX25 0 Dl2971 MX25 0 Dl3024 MX25 0 Dl3076 MX25 0 Dl3129 MX25 0 Dl3181 MX25 0 Dl3233 MX25 0 Dl3286 MX25 0 Dl3339 MX25 0 Dl3391 MX25 0 Dl3444 MX25 0 Dl1396 1373 MXY25 0 Dl1448 MX25 0 Dl1501 MX25 0 Dl1553 MX25 0 Dl1606 MX25 0 Dl1659 MX25 0 Dl1711 MX25 0 Dl1763 MX25 0 Dl1816 MX25 0 Dl1868 MX25 0 Dl1921 MX25 0 Dl1974 MX25 0 Dl2026 MX25 0 Dl2079 MX25 0 Dl2131 MX25 0 Dl2183 MX25 0 Dl2236 MX25 0 Dl2289 MX25 0 Dl2341 MX25 0 Dl2394 MX25 0 Dl2446 MX25 0 Dl2498 MX25 0 Dl2551 MX25 0 Dl2604 MX25 0 Dl2656 MX25 0 Dl2709 MX25 0 Dl2761 MX25 0 Dl2814 MX25 0 Dl2866 MX25 0 Dl2918 MX25 0 Dl2971 MX25 0 Dl3024 MX25 0 Dl3076 MX25 0 Dl3129 MX25 0 Dl3181 MX25 0 Dl3233 MX25 0 Dl3286 MX25 0 Dl3339 MX25 0 Dl3391 MX25 0 Dl3444 MX25 0 Dl1396 2929 MXY25 0 Dl1448 MX25 0 Dl1501 MX25 0 Dl1553 MX25 0 Dl1606 MX25 0 Dl1659 MX25 0 Dl1711 MX25 0 Dl1763 MX25 0 Dl1816 MX25 0 Dl1868 MX25 0 Dl1921 MX25 0 Dl1974 MX25 0 Dl2026 MX25 0 Dl2079 MX25 0 Dl2131 MX25 0 Dl2183 MX25 0 Dl2236 MX25 0 Dl2289 MX25 0 Dl2341 MX25 0 Dl2394 MX25 0 Dl2446 MX25 0 Dl2498 MX25 0 Dl2551 MX25 0 Dl2604 MX25 0 Dl2656 MX25 0 Dl2709 MX25 0 Dl2761 MX25 0 Dl2814 MX25 0 Dl2866 MX25 0 Dl2918 MX25 0 Dl2971 MX25 0 Dl3024 MX25 0 Dl3076 MX25 0 Dl3129 MX25 0 Dl3181 MX25 0 Dl3233 MX25 0 Dl3286 MX25 0 Dl3339 MX25 0 Dl3391 MX25 0 Dl3444 MX25 0 Dl2433 985(.)N2433 1004(.)N2433 1024(.)N2433 1044(.)N2433 1064(.)N2433 1083(.)N2433 1103(.)N2433 1123(.)N2433 1143(.)N2433 1162(.)N2433 1182(.)N2433 1202(.)N2433 1221(.)N2433 1241(.)N2433 1261(.)N2433 1281(.)N2433 1300(.)N2433 1320(.)N2433 1340(.)N2433 1360(.)N2433 1379(.)N2433 1399(.)N2433 1418(.)N2433 1438(.)N2433 1458(.)N2433 1478(.)N2433 1497(.)N2433 1517(.)N2433 1537(.)N2433 1557(.)N2433 1576(.)N2433 1596(.)N2433 1616(.)N2433 1636(.)N2433 1655(.)N2433 1675(.)N2433 1695(.)N2433 1714(.)N2433 1734(.)N2433 1754(.)N2433 1774(.)N2433 1793(.)N2433 1813(.)N2433 1833(.)N2433 1853(.)N2433 1872(.)N2433 1892(.)N2433 2151(.)N2433 2171(.)N2433 2190(.)N2433 2210(.)N2433 2230(.)N2433 2250(.)N2433 2269(.)N2433 2289(.)N2433 2309(.)N2433 2328(.)N2433 2348(.)N2433 2368(.)N2433 2388(.)N2433 2407(.)N2433 2427(.)N2433 2447(.)N2433 2467(.)N2433 2486(.)N2433 2506(.)N2433 2526(.)N2433 2546(.)N2433 2565(.)N2433 2585(.)N2433 2604(.)N2433 2625(.)N2433 2644(.)N2433 2664(.)N2433 2683(.)N2433 2703(.)N2433 2723(.)N2433 2743(.)N2433 2762(.)N2433 2782(.)N2433 2802(.)N2433 2822(.)N2433 2841(.)N2433 2861(.)N2433 2881(.)N2433 2900(.)N2433 2920(.)N2433 2940(.)N2433 2960(.)N2433 2979(.)N2433 2999(.)N2433 3019(.)N2433 3039(.)N2433 3058(.)N1396 1503 MXY2073 0 Dl1396 2021 MXY0 1036 Dl3058 MY2073 0 Dl3470 MX0 -777 Dl16 s1351 1889(.)N1415(.)X1479(.)X2375 2027(.)N2439(.)X2503(.)X3411 2157(.)N3475(.)X3539(.)X12 s2316 861(32)N2436(bits)X10 s3508 1143(longword)N3835(0)X3508 1425(longword)N3835(1)X3515 2967(longword)N3842(n/4)X3964(-1)X2860 1075(byte)N3018(1)X1856 1082(byte)N2014(0)X1856 1218(byte)N2014(2)X2854 1212(byte)N3012(3)X1849
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -