΢»úÔ­ÀíÓë½Ó¿Ú¼¼Êõ¿¼ÊÔÊÔÌâ¿â ÏÂÔر¾ÎÄ

INT 20H

ÊÔÎÊ£º£¨1£©Ã¿ÌõÖ¸ÁîÖ´Ðкó£¬AX¼Ä´æÆ÷µÄÄÚÈÝÊÇʲô£¿£¨2£©Ã¿ÌõÖ¸ÁîÖ´Ðкó£¬CF£¬

SF¼°ZFµÄÖµ·Ö±ðÊÇʲô£¿£¨3£©³ÌÐòÔËÐнáÊøʱ£¬AX¼°DX¼Ä´æÆ÷µÄֵΪ¶àÉÙ£¿ 10£®ÉèÒ»¸ö×Ö½ÚÊý¾ÝX´æ·ÅAL¼Ä´æÆ÷ÖУ¬ÊÔ˵Ã÷ÏÂÁгÌÐòµÄ¹¦ÄÜ£º

XOR AH£¬AH £»AHÇåÁã

SAL AX£¬1 £»AX×óÒÆһ룬Ï൱ÓÚ2X MOV BX£¬AX £»2XËÍBXÔÝ´æ MOV CL£¬2

SAL AX£¬CL £»AX×óÒƶþ룬2X¡Á4=8X ADD AX£¬BX £»2X+8X=10X

B Àࣺ

1£®.·ÖÎöÏÂÁгÌÐò¶Î£º

ADD AX£¬BX JNO L1 JNC L2

SUB AX£¬BX JNC L3 JNO L4

JMP SHORT L5

Èç¹ûAXºÍBXµÄÄÚÈÝ£¨´ø·ûºÅÊý£©¸ø¶¨ÈçÏ£º

AX BX

£¨1£©B568H 54B7H £¨2£©147BH 80DCH £¨3£©D023H 9FD0H £¨4£©42C8H 608DH £¨5£©B568H 94B7H

ÎʸóÌÐòÖ´ÐÐÍêºó£¬³ÌÐòתÏòÄÄÀ ´ð£º

2£®ÄÚ´æµ¥Ôª³õʼ»¯ÄÚÈÝΪ£º£¨2000H£º2A00H£©--£¨2000H£º2A02H£©·Ö±ðΪ0FH¡¢0EH¡¢0DH£¬£¨2000H£º2A10H£©--£¨2000H£º2A12H£©·Ö±ðΪ09H¡¢08¡¢07H¡£Ö´ÐÐÏÂÁгÌÐòºó£¬ÇëÌîд´æ´¢µ¥ÔªµÄÄÚÈÝ£º

MOV AX£¬2000H MOV DS£¬AX MOV ES£¬AX MOV SI£¬2A10H MOV DI£¬2A00H CLD

MOV CX£¬3 L£ºMOV AL£¬[DI] MOVSB DEC SI

MOV [SI]£¬AL INC SI

LOOP L HLT

£¨1£©2000H£º2A00H= ¡£ £¨2£©2000H£º2A11H= ¡£ £¨3£©2000H£º2A12H= ¡£

3£®ÏÂÃæ³ÌÐòÊǽ«10¸ö8λÎÞ·ûºÅÊý°´µÝ¼õ´ÎÐòÅÅÐò£¬Ç뽫³ÌÐòÌîдÍêÕû¡£

DATA SEGMENT

ARRAY DB 05H£¬78H£¬FFH£¬7BH£¬00H DB 8CH£¬20H£¬A0H£¬F0H£¬60H DATA ENDS

CODE SEGMENT

ASSUME CS£ºCODE£¬DS£ºDATA MAIN PROC FAR START£ºPUSH DS

XOR AX£¬AX PUSH AX

MOV AX£¬DATA MOV DS£¬AX

AB1£º MOV SI£¬OFFSET ARRAY MOV BL£¬0 MOV CX£¬10

AGAIN£ºMOV AL£¬[SI] INC SI

CMP AL£¬[SI] CD1 MOV AH£¬[SI] MOV [SI]£¬AL DEC SI

MOV [SI]£¬AH INC SI

MOV BX£¬1 CD1£ºLOOP AGAIN DEC BL

AB1 RET MAIN ENDP CODE ENDS

END START

4£®´ÓBUF¿ªÊ¼µÄ11¸öµ¥ÔªÖдæ·Å×Å11¸öÕûÊý£¬ÕÒ³öÕâ11¸öÊýÖÐÕýÊý²¢ÇÒÊÇżÊýµÄ¸öÊý´æÈëRÖС£ DATA SEGMENT BUF DB ¨C2,5,-3,6,100,0,-20,-9,8,-110,21 N= ¢Ù R DW £¿

DATA ENDS CODE SEGMENT ¢Ú BEGIN£ºMOV AX£¬DATA ¢Û LEA BX£¬BUF MOV CX£¬N ¢Ü LOPA£º CMP [BX]£¬BYTE PTR 0 ¢Ý TEST [BX]£¬BYTE PTR 1 ¢Þ INC AX NEXT £º INC BX DEC CX

¢ß MOV R£¬AX

MOV AH£¬4CH INT 21H CODE ENDS END ¢à

½â£º

C Àࣺ

1£®ÓÐÒ»³ÌÐòÈçÏ£º MOV CX£¬0005 MOV DI£¬3000H

NEXT£º MOV BL£¬0FFH MOV AL£¬BYTE PTR[DI] CMP AL£¬3AH JNB NEXT1 SUB AL£¬30H JB NEXT1 MOV BL£¬AL

NEXT1£ºMOV AL£¬BL MOV BYTE PTR[DI+0AH]£¬AL INC DI LOOP NEXT HLT

ÒÑÖªÊý¾Ý¶Î3000Hµ¥Ôª¿ªÊ¼ÄÚÈÝΪ40H£¬30H£¬35H£¬59H£¬12H£¬·ÅÖõÄÊÇ×Ö·ûµÄASCIIÂë

ÎÊ£º£¨1£©³ÌÐòÖ´ÐÐÍê±Ï½á¹û·ÅÖÃÔں䦣¿ £¨2£©ÄÚÈÝÊÇʲô£¿

£¨3£©ÓúÎDEBUGÃüÁî¼ì²é½á¹û£¿

2£®ÏÂÃæÊǶà×Ö½Ú¼Ó·¨³ÌÐò,µÚÒ»¸öÊýÊÇ8A0BH£¬µÚ¶þ¸öÊýÊÇD705H¡£ÇëÌîд³öÕýÈ·½á¹û¡£ DATA SEGMENT

FIRST DB £¬ £¬0H SECOND DB £¬ DATA ENDS CODE SEGMENT

ASSUME CS£ºCODE£¬DS£ºDATA START£º MOV AX£¬DATA MOV DS£¬AX

MOV CX£¬ MOV SI£¬0

NEXT: MOV AL£¬SECOND[SI] ADC FIRST[SI]£¬AL INC SI LOOP NEXT MOV AL£¬0

ADC AL£¬ MOV FIRST[SI]£¬AL MOV AH£¬4CH INT 21H CODE ENDS END START

3£® CLC

MOV AX,248BH MOV CL,3 RCL AX,CL

Ö´ÐÐÒÔÉϳÌÐòÐòÁÐºó£¬ AX=____________________¡£ 4£®ÉèTABLE DW 3467H£¬7367H£¬0A566H£¬665DH£¬767FH ENTRY DW 3

ÈôÖ´ÐÐÏÂÁÐÖ¸ÁMOV BX,OFFSET TABLE ADD BX,ENTRY MOV AX,[BX]

½á¹û£¬AX=___________(ÓÃÊ®Áù½øÖƱíʾ) 5£®

(A) (B)

MOV CX£¬77H MOV CX£¬77H MOV BX£¬88H MOV BX£¬88H NEXT: MOV AX£¬4500H NEXT: MOV AX£¬4500H DEC BX DEC BX

LOOP NEXT LOOPNZ NEXT ÎʳÌÐò¶ÎA£¬BÖ´ÐÐÖи÷Ñ­»·¶àÉٴΣ¿

³ÌÐò¶Î AÑ­»·_______________´Î£¬³ÌÐò¶ÎBÑ­»·___________´Î¡£