ºÃÎĵµ - רҵÎÄÊéд×÷·¶ÎÄ·þÎñ×ÊÁÏ·ÖÏíÍøÕ¾

΢»úÔ­ÀíÓë½Ó¿Ú¼¼ÊõÅí»¢(µÚÈý°æ)¿Î±¾Ï°Ìâ´ð°¸

ÓÉ ÌìÏ ·ÖÏí ʱ¼ä£º ¼ÓÈëÊÕ²Ø ÎÒҪͶ¸å µãÔÞ

µÚ¶þÕÂ8086Ìåϵ½á¹¹Óë80x86CPU

1. 8086CPU 111ÄÄÁ½²¿·Ö¹¹³É£¿ËüÃǵÄÖ÷Òª¹¦ÄÜÊÇʲô£¿

´ð£º8086CPU IIIÁ½²¿·Ö×é³É£ºÖ¸ÁîÖ´Ðв¿¼þ(EU, Execution Unit)ºÍ×ÜÏß½Ó ¿Ú²¿¼þ(BIU, Bus Interface Unit) <>Ö¸ÁîÖ´Ðв¿¼þ(EU)Ö÷ÒªÓÉËãÊõÂß¼­ÔËËã µ¥Ôª(ALU)¡¢±êÖ¾¼Ä´æÆ÷FR¡¢Í¨ÓüĴæÆ÷×éºÍEU¿ØÖÆÆ÷µÈ4¸ö²¿¼þ×é³É£¬ÆäÖ÷ Òª¹¦ÄÜÊÇÖ´ÐÐÖ¸Áî¡£×ÜÏß½Ó¿Ú²¿¼þ(BIU)Ö÷ÒªÓɵØÖ·¼Ó·¨Æ÷¡¢×¨ÓüĴæÆ÷×é¡¢Ö¸ Áî¶ÓÁкÍ×ÜÏß¿ØÖƵç·µÈ4¸ö²¿¼þ×é³É£¬ÆäÖ÷Òª¹¦ÄÜÊÇÐγɷÃÎÊ´æ´¢Æ÷µÄÎïÀíµØ Ö·¡¢·ÃÎÊ´æ´¢Æ÷²¢È¡Ö¸ÁîÔÝ´æµ½Ö¸Áî¶ÓÁÐÖеȴýÖ´ÐУ¬·ÃÎÊ´æ´¢Æ÷»òI/O¶Ë¿Ú ¶ÁÈ¡²Ù×÷Êý²Î¼ÓEUÔËËã»ò´æ·ÅÔËËã½á¹ûµÈ¡£

2. 8086CPUԤȡָÁî¶ÓÁÐÓÐʲôºÃ´¦£¿ 8086CPUÄÚ²¿µÄ²¢ÐвÙ×÷ÌåÏÖÔÚÄÄ À´ð£º8086CPUµÄԤȡָÁî¶ÓÁÐɽ6¸ö×Ö½Ú×é³É£¬°´ÕÕ8086CPUµÄÉè¼ÆÒªÇó£¬ Ö¸ÁîÖ´Ðв¿¼þ(EU)ÔÚÖ´ÐÐÖ¸Áîʱ£¬²»ÊÇÖ±½Óͨ¹ý·ÃÎÊ´æ´¢Æ÷È¡Ö¸Á¶øÊÇ´ÓÖ¸ Áî¶ÓÁÐÖÐÈ¡µÃÖ¸Áî´úÂ룬²¢·ÖÎöÖ´ÐÐËü¡£´ÓËÙ¶ÈÉÏ¿´£¬¸ÃÖ¸Áî¶ÓÁÐÊÇÔÚCPUÄÚ²¿, EU´ÓÖ¸Áî¶ÓÁÐÖлñµÃÖ¸ÁîµÄËٶȻáÔ¶Ô¶³¬¹ýÖ±½Ó´ÓÄÚ´æÖжÁÈ¡Ö¸Áî¡£8086CPU ÄÚ²¿µÄ²¢ÐвÙ×÷ÌåÏÖÔÚÖ¸ÁîÖ´ÐеÄͬʱ£¬´ýÖ´ÐеÄÖ¸ÁîҲͬʱ´ÓÄÚ´æÖжÁÈ¡£¬²¢ Ë͵½Ö¸Áî¶ÓÁС£

5. ¼òÊö8086ϵͳÖÐÎïÀíµØÖ·µÄÐγɹý³Ì¡£8086ϵͳÖеÄÎïÀíµØÖ·×î¶àÓÐ ¶àÉÙ¸ö£¿Âß¼­µØÖ·ÄØ£¿´ð£º8086ϵͳÖеÄÎïÀíµØÖ·ÊÇɽ20¸ùµØÖ·×ÜÏßÐγɵġ£ 8086ϵͳ²ÉÓ÷ֶβ¢¸½ÒÔµØÖ·Æ«ÒÆÁ¿°ì·¨ÐγÉ20λµÄÎïÀíµØÖ·¡£²ÉÓ÷ֶνṹ µÄ´æ´¢Æ÷ÖУ¬ÈκÎÒ»¸öÂß¼­µØÖ·¶¼É½¶Î»ùÖ·ºÍÆ«ÒƵØÖ·Á½²¿·Ö¹¹³É£¬¶¼ÊÇ16λ ¶þ½øÖÆÊý¡£Í¨¹ýÒ»¸ö20λµÄµØÖ·¼Ó·¨Æ÷½«ÕâÁ½¸öµØÖ·Ïà¼ÓÐγÉÎïÀíµØÖ·¡£¾ßÌå ×ö·¨ÊÇ16λµÄ¶Î»ùÖ·×óÒÆ4λ(Ï൱ÓÚÔڶλùÖ·×îµÍλºóÌí4¸ö¡°0¡±)£¬È»ºóÓë Æ«ÒƵØÖ·Ïà¼Ó»ñµÃÎïÀíµØÖ·¡£ÓÉÓÚ8086CPUµÄµØÖ·ÏßÊÇ20¸ù£¬ËùÒÔ¿ÉÑ°Ö·µÄ´æ ´¢¿Õ¼äΪ1M×Ö½Ú£¬¼´8086ϵͳµÄÎïÀíµØÖ·¿Õ¼äÊÇ1MB¡£Âß¼­µØַɽ¶Î»ùÖ·ºÍÆ« ÒƵØÖ·Á½²¿·Ö¹¹³É£¬¶¼ÊÇÎÞ·ûºÅµÄ16λ¶þ½øÖÆÊý£¬³ÌÐòÉè¼Æʱ²ÉÓÃÂß¼­µØÖ·£¬ Ò²ÊÇIMBo

6. 8086ϵͳÖеĴ洢Æ÷ΪʲôҪ²ÉÓ÷ֶνṹ£¿ÓÐʲôºÃ´¦£¿

´ð£º8086CPUÖеļĴæÆ÷¶¼ÊÇ16λµÄ£¬16λµÄµØÖ·Ö»ÄÜ·ÃÎÊ64KBµÄÄÚ´æ¡£ 086ϵͳÖеÄÎïÀíµØÖ·ÊÇɽ20¸ùµØÖ·×ÜÏßÐγɵģ¬Òª×öµ½¶Ô20λµØÖ·¿Õ¼ä½øÐÐ ·ÃÎÊ£¬¾ÍÐèÒªÁ½²¿·ÖµØÖ·

1

²ÉÓöλùÖ·ºÍÆ«ÒƵØÖ··½Ê½×é³ÉÎïÀíµØÖ·µÄÓŵãÊÇ:Âú×ã¶Ô8086ϵͳµÄ1MB ´æ´¢¿Õ¼äµÄ·ÃÎÊ£¬Í¬Ê±Ôڴ󲿷ÖÖ¸ÁîÖÐÖ»ÒªÌṩ16λµÄÆ«ÒƵØÖ·¼´¿É¡£

9. ÔÚijϵͳÖУ¬ÒÑÖªµ±Ç°£¨SS£© =2360H, £¨SP£© =0800H,ÄÇô¸Ã¶ÑÕ»¶Î ÔÚ´æ´¢Æ÷ÖеÄÎïÀíµØÖ··¶Î§ÊÇʲô£¿ÈôÍù¶ÑÕ»ÖдæÈë20¸ö×Ö½ÚÊý¾Ý£¬ÄÇôSP µÄÄÚÈÝΪʲôֵ£¿´ð£º£¨SS£© X10H+ £¨SP£© =23600H+0800H=23E00H,¶ÑÕ»¶Î ÔÚ´æ´¢Æ÷ÖеÄÎïÀíµØÖ··¶Î§ÊÇ23600H?23E00H¡£ÈôÍù¶ÑÕ»ÖдæÈë20¸ö×Ö½ÚÊý¾Ý, ÄÇôSPµÄÄÚÈÝΪ0800H-14H=07ECHo £¨20µÄÊ®Áù½øÖÆΪ14H£©¡£

10. ÒÑÖªµ±Ç°Êý¾Ý¶ÎλÓÚ´æ´¢Æ÷µÄB4000Hµ½C3FFFH·¶Î§ÄÚ,Ôò¶Î¼Ä´æÆ÷ DSµÄÄÚÈÝΪ¶àÉÙ£¿´ð£º¶Î¼Ä´æÆ÷DSµÄÄÚÈÝΪBlOOOHo

11. 8086ϵͳÖÐΪʲôһ¶¨ÒªÓеØÖ·Ëø´æÆ÷£¿ÐèÒªËø´æÄÄЩÐÅÏ¢£¿ ´ð£ºÉ½ÓÚ8086CPUÊÜоƬ·â×°µÄÏÞÖÆ£¬Ö»ÓÐ40¸ö¹Ü½Å£¬ËùÒÔµØÖ·ÏߺÍÊý¾Ý ÏßÖ»ÄܲÉÓø´Óõķ½Ê½¹²Í¬Ê¹ÓÃijЩ¹Ü½Å¡£¶Ô´æ´¢Æ÷½øÐзÃÎÊʱ£¬ÔÚ¶ÁÈ¡Êý¾Ý»ò дÈëÊý¾Ýʱ£¬´æ´¢Æ÷оƬҪÇóÔÚÕâ¸ö¹ý³ÌÖеØÖ·ÐÅÏ¢±ØÐëÎȶ¨Ìṩ¸ø´æ´¢Æ÷£¬¶ø ɽÓÚ8086CPUµØÖ·ÏߺÍÊý¾ÝÏßÊǸ´Óõģ¬¾Í²»¿ÉÄÜÔÚͬһʱ¿Ì¾ßÓеØÖ·ºÍÊý¾ÝµÄ Á½ÖÖ¹¦ÄÜ¡£Õâ¾ÍÐèÒªÔÚCPUÌṩµØÖ·ÐÅϢʱ£¬½«µØÖ·Ëø´æÆðÀ´£¬ÒÔ±£Ö¤ÏÂÒ»¸öʱ ¿Ì°ëÕâЩ¸´ÓõĹܽÅÆð×ÅÊý¾ÝÏߵŦÄÜʱ£¬´æ´¢Æ÷ÓÐÕýÈ·µÄµØÖ·ÐÅÏ¢¡£ÒªËø´æµÄ ÐÅÏ¢°üÀ¨ÕâЩ¸´ÓùܽŵĵØÖ·ºÍBHEµÈÐźš£

12. 8086¶Á/д×ÜÏßÖÜÆÚ¸÷°üÀ¨×îÉÙ¶ù¸öʱÖÓÖÜÆÚ£¿Ê²Ã´Çé¿öÏÂÐèÒª²åÈëµÈ ´ýÖÜÆÚ¼¸£¿²åÈë¶àÉÙ¸ö¼¸È¡¾öÓÚʲôÒòËØ£¿´ð£º8086¶Á/д×ÜÏßÖÜÆÚ¸÷°üÀ¨×îÉÙ ËĸöʱÖÓÖÜÆÚ¡£ÔÚϵͳÖÐÔö¼ÓµÈ´ýÖÜÆÚT,µÄÒ»°ãÇé¿öÊÇ£ºµ±CPUÌṩÁ˵ØÖ·ºó, ɽÓÚÍâÉè»ò´æ´¢Æ÷µÄ¶Á³ö»òдÈëʱ¼ä½ÏÂý£¬²»ÄÜÓëCPUµÄËÙ¶ÈÆ¥Å䣬¾ÍÐèÒª²åÈë µÈ´ýÖÜÆڵȴýCPUÄÜ´ÓÍâÉè»ò´æ´¢Æ÷½«Êý¾ÝÕýÈ·µØ¶Á³ö»òдÈëΪֹ¡£ÏÔÈ»£¬ ²åÈëµÄµÈ´ýÖÜÆÚT¡±µÄ¸öÊýÈ¡¾öÓÚÍâÉè»ò´æ´¢Æ÷µÄÈ¡³ö»òдÈëʱ¼ä¡£

13. ÈôÒÑÖªµ±Ç°£¨DS£©¶þ7F06H,ÔÚÆ«ÒƵØַΪ0075H¿ªÊ¼µÄ´æ´¢Æ÷ÖÐÁ¬Ðø´æ ·Å6¸ö×Ö½ÚµÄÊý¾Ý£¬·Ö±ðΪ11H, 22H, 33H, 44H, 55HºÍ66H,ÇëÖ¸³öÕâЩÊý¾Ý ÔÚ´æ´¢Æ÷ÖеÄÎïÀíµØÖ·£¬Èç¹ûÒª´Ó´æ´¢Æ÷ÖжÁ³öÕâЩÊý¾Ý£¬ÐèÒªÉ豸²¿¶ù´Î´æ´¢ Æ÷£¿¸÷¶Á³öÄÄЩÊý¾Ý£¿

´ð£ºÎïÀíµØÖ·£º7F06HX10H+ 007 5H=7F0DSH,¹Ê´Ó 7F0DSH Æð6 ¸ö µØÖ·Êý¾ÝÔÚ´æ´¢Æ÷ÖеĵØÖ·¡£×îÉÙÒª·ÃÎÊËĴΣºµÚÒ»´Î£º1 I¡£µÚ¶þ´Î£º3 3, 2 2¡£µÚÈý´Î£º5 5 , 4 4¡£µÚËĴΣº6 6¡£

1 4£ºÄ³³ÌÐòÔÚµ±Ç°Êý¾Ý¶ÎÖдæÓÐÁ½¸öÊý¾Ý×Ö0ABCDHºÍ1234H,ËüÃǶÔÓ¦µÄÎï ÀíµØÖ··Ö±ðΪ3FF85HºÍ40AFEH,ÈôÒÑÖªµ±Ç°£¨DS£©¶þ3FB0H,Çë˵Ã÷ÕâÁ½¸öÊý¾Ý µÄÆ«ÒƵØÖ·£¬²¢ÓÃͼ˵Ã÷ËüÃÇÔÚ´æ´¢Æ÷ÖеĴæ·Å¸ñʽ¡£

1

´ð£ºÆ«ÒƵØַΪ£º0485HºÍOFFEH¡£

µÚÈýÕÂ8086µÄÖ¸Áîϵͳ

1£º MOV AX, [SI]¼Ä´æÆ÷Ñ°Ö·¼Ä´æÆ÷¼ä½ÓÑ°Ö· 2£º MOV DI, 100¼Ä´æÆ÷Ñ°Ö· Á¢¼´Ñ°Ö· 3£º MOV [BX],AL¼Ä´æÆ÷¼ä½Ó¼Ä´æÆ÷ 4£º MOV [BX][S¶££¬CX»ùÖ·+±äÖ· ¼Ä´æÆ÷ 5£º ADD DX, 106HESI]±äÖ·¼Ä´æÆ÷

6£º PUSH AX ¼Ä´æÆ÷ 7£º ADD DS: [BP], AX 8:0R AX, DX ¼Ä´æÆ÷ 2£ºÉè¼Ä´æÆ÷ DS ¶þ2000H, SS ¶þ 1500H, ES ¶þ3200H, SI= 0 A 0 H, BX= 1 OOH,

BP=1 OH,Êý¾Ý¶ÎÖбäÁ¿VALµÄÆ«ÒƵØַΪ50H,ÊÔÖ¸³öÏÂÁи÷ÌõÖ¸ÁîÖÐÔ´²Ù ×÷ÊýµÄÑ°Ö··½Ê½ÊÇʲô£¿¶ÔÓÚ´æ´¢Æ÷²Ù×÷Êý£¬ÆäÎïÀíµØÖ·ÊǶàÉÙ£¿

(1) MOV AX, [100H]Ö±½ÓÑ°Ö·£º20100H (2) MOV CX, ES: [BX]¼Ä´æÆ÷Ñ°Ö· (3) MOV DX, [BX] [SI]»ùÖ·+±äÖ·:200F0h (4) MOV AX, VALESI]±äÖ·Ñ°Ö·£º200F0h (5) MOV BX, 1234[BX]»ùÖ·Ñ°Ö·£º205D2H (6) MOV AX, [BP]¼Ä´æÆ÷Ñ°Ö·£º15010H 3. ´ð°¸

(3)OUT 3EBH, AX ¸Ä (4) MUL AL, CL ¸Ä MUL CL MOV DX, 3EBH OUT DX, AX (5) MUL AX,25 ¸Ä MOV BX, 25

234H

(11) ADD [BX], 456H ¸Ä ADD WORD (10) INC [SI]¸Ä INC BYTE PTR PTR [SI] [BX],456H (12) INT 0 ´í

(13) DIV AX ,BX ¸Ä DIVBX

6) ROL DX, 5 ¸Ä MOV CL, 5

ROL DX, CL (8) POP FR ¸Ä POPF (9) MOV 234H, BX ¸Ä MOV BX,

(14) DEC [BP]¸Ä DEC WORD PTR [BP] (lo)XLAT BX ´í (16)ADD CX+1 ¸Ä ADD CX,1 »ò INC

1

Ö´ÐÐ MOV DL, 2AH ºÍ SHR DL, 1 Á½ÌõÖ¸Áîºó£ºDL¶þ00010101 CF=0

1

¿É½«AX¼Ä´æÆ÷ÖÐDO, Do, D8ºÍDllλÇó·´£¬ÆäÓàλ²»±äµÄÖ¸ÁXOR AX, 0921H ij´æ´¢µ¥ÔªÎïÀíµØַΪ3B4FH,Æä¶ÎµØÖ·ºÍÆ«ÒƵØÖ·¿ÉÑ¡£º3B40HºÍ00FEH Á½¸ö8λ¶þ½øÖÆÊý00110101¼°×ö¡°Òì»ò¡±²Ù×÷ºó£¬¼Ä´æÆ÷FRµÄÏÂÃæ3¸ö×´ ̬±êÖ¾·Ö±ðÊÇ£ºPF¶þ0 SF¶þ1 ZF¶þ0

¼Ä´æÆ÷дָÁîʱ£¬ÈçMOV [SI], AX,ÔòCPUµÄÍⲿ¹Ü½Å״̬£ºWR¶þ0 RD¶þ1 M\\I0¶þ1

5:ÒÑÖª£¬DS¶þ2000H BX=1OOH SI=02H´ÓÎïÀíµØÖ·20100Hµ¥Ôª¿ªÊ¼£¬ÒÀ´Î´æ ·ÅÊý¾Ý12H 34H 56H 78H£¬¶ø´ÓÎïÀíµØÖ·21200hµ¥Ôª¿ªÊ¼£¬ÒÀ´Î´æ·ÅÊý¾Ý 2AH, 4CH. 8BH, 98H.ÊÔ˵Ã÷ÏÂÁи÷ÌõÖ¸Áîµ¥¶ÀÖ´ÐкóAX¼Ä´æÆ÷µÄÄÚÈÝ¡£

(1) MOV AX, 3600H (2) MOV AX, [1200H] (3) MOV AX,BX (4) MOV AX, [BX] (5) MOV AX,1100HEBX] (6) MOV AX, [BX][SI]

3600H 4C2AH 0100H 3412H 4C2AH 7856H

6. Éè¶ÑÕ»Ö¸Õë SP µÄ³õֵΪ 2400H, (AX) =4000H, (BX) =3600H.ÎÊ£º (1) Ö´ÐÐÖ¸Áî ¡°PUSH AX¡± ºó£¬SP=?

23FEH

(2) ÔÙÖ´ÐÐ ¡°PUSH AX¡± ºÍ¡± POP AX¡± ºó£¬(SP) =?(AX) =?(BX) =? SP¶þ23FEH AX¶þ3600H BX¶þ3600H 7.

(1) MOV DX, 2000H MOV BX,1000H XHGH BX, DX BX¶þ2000H, DX¶þ1000H (2) MOV AX, 1234H PUSH AX POP BX

AX¶þ1234H, BX¶þ1234H

1

΢»úÔ­ÀíÓë½Ó¿Ú¼¼ÊõÅí»¢(µÚÈý°æ)¿Î±¾Ï°Ìâ´ð°¸

µÚ¶þÕÂ8086Ìåϵ½á¹¹Óë80x86CPU1.8086CPU111ÄÄÁ½²¿·Ö¹¹³É£¿ËüÃǵÄÖ÷Òª¹¦ÄÜÊÇʲô£¿´ð£º8086CPUIIIÁ½²¿·Ö×é³É£ºÖ¸ÁîÖ´Ðв¿¼þ(EU,ExecutionUnit)ºÍ×ÜÏß½Ó¿Ú²¿¼þ(BIU,BusInterfaceUnit)Ö¸ÁîÖ´Ðв¿¼þ(EU)Ö÷ÒªÓÉËãÊõÂß¼­ÔËËãµ¥Ôª(ALU)¡¢±êÖ¾¼Ä´æÆ÷FR¡¢Í¨ÓüĴæÆ÷×éºÍEU¿ØÖÆÆ÷
ÍƼö¶È£º
µã»÷ÏÂÔØÎĵµÎĵµÎªdoc¸ñʽ
2nkbc8l7cp0vngk58yua7wp9920csk00zwm
ÁìÈ¡¸£Àû

΢ÐÅɨÂëÁìÈ¡¸£Àû

΢ÐÅɨÂë·ÖÏí