8086汇编语言习题解答 - 百度文库 ÏÂÔر¾ÎÄ

MOV MOV LDS ADD

AX, [SI] [SI+22H], 1200H SI, [SI+20H] AX, [SI]

ÉÏÊö³ÌÐòÖ´Ðк󣺣¨DS£©= £¬£¨SI£©= £¨AX£©=

3.8¡¢ÒÑÖª£¨AX£©=0A5C6H,(CX)=0F03H,CF=1 RCL AX, CL AND AH, CH

RCR

AX, CL

ÉÏÊöÈýÌõÖ¸ÁîÖ´Ðк󣺣¨£Á£Ø£©£½

3.9¡¢ÒÑÖª£¨AX£©=0FC77H,(CX)=504H,CF=1 SAR

AX, CL

XCHG CH, CL SHL

AX, CL

ÉÏÊöÈýÌõÖ¸ÁîÖ´Ðк󣺣¨£Á£Ø£©£½

3.10¡¢ÒÑÖª£¨AX£©=1234H MOV BX, AX NEG BX

ADD

AX, BX

ÉÏÊöÈýÌõÖ¸ÁîÖ´Ðк󣺣¨£Á£Ø£©£½ £¬£Ã£Æ£½ (BX)£½ ¡£ ¡£

£¬£Ã£Æ£½ ¡£

3.11¡¢ÒÑÖª£¨AX£©=4321H

INC NEG DEC NEG

AX AX AX AX

ÉÏÊö¼¸ÌõÖ¸ÁîÖ´Ðк󣺣¨£Á£Ø£©£½ 3.12¡¢ÒÑÖª£¨AX£©=0A33AH£¬£¨DX£©=0F0F0H

AND XOR NEG NOT

AH£¬DL AL£¬DH AH AL

ÉÏÊö¼¸ÌõÖ¸ÁîÖ´Ðк󣺣¨£Á£Ø£©£½

3.13¡¢ÒÑÖª£¨AX£©=0FF60H£¬ CF=1

MOV XOR SBB

DX£¬96 DH£¬0FFH AX£¬DX

ÉÏÊö¼¸ÌõÖ¸ÁîÖ´Ðк󣺣¨£Á£Ø£©£½ £¬£Ã£Æ£½ ¡£ 3.14¡¢ÊÔ°´ÏÂÁÐÒªÇó·Ö±ð±àÖƳÌÐò¶Î£º ¢Ù¡¢°Ñ±êÖ¾¼Ä´æÆ÷ÖзûºÅλSFÖÃ?1? ¢Ú¡¢¼Ä´æÆ÷ALÖиߵÍ4 λÏ໥»»

¢Û¡¢ÓɼĴæÆ÷AX £¬BX×é³ÉÒ»¸ö32λ´ø·ûºÅÊý£¨AX Öдæ¸ß16룬ÊÔÇóÕâ¸öÊýµÄ¸ºÊý£©

¢Ü¡¢ÏÖÓÐÈý¸ö×Ö½Ú´æ´¢µ¥ÔªA¡¢B¡¢C¡£ÔÚ²»Ê¹ÓÃADDºÍADCÖ¸ÁîµÄÇé¿öÏ£¬ÊµÏÖ£¨A£© + £¨B£©ËÍC¡£

¢Ý¡¢ÓÃÒ»ÌõÖ¸Áî°ÑCXÖеÄÕûÊýת±ä³ÉÆæÊý£¨ÈôÔ­À´ÊÇÆæÊý£¬ÔòCX¿´Êý¾Ý²»±ä£»ÈôÔ­À´ÊÇżÊý£¬Ôò£¨CX £©+1ÐγÉÆæÊý¡£

¢Þ¡¢¸ù¾ÝAXÖÐÓÐ0µÄλ¶ÔBXÖжÔӦλ±ä·´£¬ÆäÓà¸÷λ±£³Ö²»±ä 3.15¡¢ÊÔ¸ø³öÏÂÁи÷Ö¸ÁîµÄ»úÆ÷Ä¿±ê´úÂ룺 ¢Ù¡¢MOV ¢Ú¡¢MOV ¢Û¡¢SAL ¢Ü¡¢ADD

BL,12H[SI] 12H[SI],BL DX,1

0ABH[BP][DI],1234H

µÚËÄÕÂ

4.1¡¢ÒÑÖªÏÂÁгÌÐò¶Î DATA SEGMENT

DB1 DB 12H,34H,0,56H DW1 DW 78H,90H,0AB46H,1234H ADR1 DW DB1 ADR2 DW DW1

BUF DB 5 DUP(0) DATA ENDS COSEG SEGMENT

ASSUME CS:COSEG,DS:DATA STACK1 SEGMENT PARA STACK DW 20H DUP(0)

STACK1 ENDS

ORG 30H START:

XOR CX,CX MOV CL,3 ADD ADR1,CX SUB ADR2,CX MOV BX,ADR2 MOV DI,ADR2 MOV AL,DB1[BX] MOV BUF[DI],AL MOV AX,DW1[BX][SI] MOV WORD PTR BUF,AX

COSEG ENDS

END START

ÉÏÊö³ÌÐò¶ÎÔËÐнáÊøºó£¬BUFÖи÷×Ö½Úµ¥ÔªµÄÄÚÈÝÊÇʲô£¿ ´ð£ºAX£ºAC27£¬BX£º0704£¬CX£º0003£¬DX£º0000 SI£º0000£¬DI£º0704£¬BP£º0000£¬SP£º0040 DS£º139B£¬ES£º139B£¬SS£º13B3£¬CS£º13AB IP£º0053

DS£º0030£ºCC 11 14 00 18 9B 13