¶ÔÓ¦¹ØϵΪ£º
¸ø³öÊý¾Ý£»00 01 02¡¡ 0DH 0EH 0FH ¶ÔÓ¦Êý¾Ý£º00A0H 7DC2H FF09H 3456H 89ABH 5678H
Çë±àÖƲé±í³ÌÐò¶Î£¬¼ÓÉϱØÒªµÄαָÁ²¢¼ÓÒÔ×¢ÊÍ¡£
10. °Ñ³¤¶ÈΪ10HµÄ×Ö·û´®´ÓÄÚ²¿Êý¾Ý´æ´¢Æ÷µÄÊäÈ뻺³åÇøINBUFÏòÉèÔÚÍⲿÊý¾Ý´æ´¢Æ÷µÄÊä³ö»º³åÇøOUTBUF½øÐд«ËÍ£¬Ò»Ö±½øÐе½Óö¼û»Ø³µ×Ö·û¡°CR¡±½áÊø´«ËÍ»òÕû¸ö×Ö·û´®´«ËÍÍê±Ï¡£¼ÓÉϱØÒªµÄαָÁ²¢¶ÔÔ´³ÌÐò¼ÓÒÔ×¢ÊÍ¡£ ORG 0000H SJMP MAIN ORG 0030H MAIN£º
MOV R0£¬#40H £»±»¼ÓÊýÊ×Ö·£¬ÓÖ×÷Á½¸öÊ®½øÖÆÊýºÍµÄÊ×Ö· MOV R1£¬#50H £»¼ÓÊýÊ×Ö· MOV R2£¬30H £»×Ö½Ú³¤¶È CLR C PP: MOV A£¬@R1 £»È¡¼ÓÊý ADDC A£¬@R0 £»´ø½øλ¼Ó
DA A £»¶þ¡ªÊ®½øÖÆÊýµ÷Õû MOV @R0£¬A £»´æºÍ NC R0 £»ÐÞÕýµØÖ· INC R1
DJNZ R2£¬PP £»¶à×Ö½ÚÑ»·¼Ó AJMP $
5 / 19
END
12£®±È½ÏÁ½¸öASCIIÂë×Ö·û´®ÊÇ·ñÏàµÈ¡£×Ö·û´®µÄ³¤¶ÈÔÚÄÚ²¿Êý¾Ý´æ´¢Æ÷µÄ20Hµ¥Ôª£¬µÚÒ»¸ö×Ö·û´®µÄÊ×µØÖ·ÔÚÄÚ²¿Êý¾Ý´æ´¢Æ÷µÄ30HÖУ¬µÚ¶þ¸ö×Ö·û´®µÄÊ×µØÖ·ÔÚÄÚ²¿Êý¾Ý´æ´¢Æ÷µÄ50HÖС£Èç¹ûÁ½¸ö×Ö·û´®ÏàµÈ£¬ÔòÖÃÓû§±êÖ¾F0Ϊ0£»·ñÔòÖÃÓû§±êÖ¾F0Ϊ1¡£ ¼ÓÉϱØÒªµÄαָÁ²¢¼ÓÒÔ×¢ÊÍ¡£(×¢£ºÃ¿¸öASCIIÂë×Ö·ûΪһ¸ö×Ö½Ú£¬ÈçASCIIÂë¡°A¡±±íʾΪ41H)
14. 80C51µ¥Æ¬»ú´ÓÄÚ²¿Êý¾Ý´æ´¢Æ÷µÄ31Hµ¥Ôª¿ªÊ¼´æ·ÅÒ»×é8λ´ø·ûºÅÊý£¬×Ö½Ú¸öÊýÔÚ30HÖС£Çë±àд³ÌÐòͳ¼Æ³öÆäÖÐÕýÊý¡¢ÁãºÍ¸ºÊýµÄÊýÄ¿£¬²¢°Ñͳ¼Æ½á¹û·Ö±ð´æÈë20H¡¢21HºÍ22HÈý¸öµ¥ÔªÖС£¼ÓÉϱØÒªµÄαָÁ²¢¶ÔÔ´³ÌÐò¼ÓÒÔ×¢ÊÍ¡£
6 / 19
16£®½«ÍⲿÊý¾Ý´æ´¢Æ÷µÄ2040Hµ¥ÔªÖеÄÒ»¸ö×Ö½Ú²ð³É2¸öASCIIÂ룬·Ö±ð´æ
ÈëÄÚ²¿Êý¾Ý´æ´¢Æ÷40HºÍ41Hµ¥ÔªÖÐ,ÊÔ±àдÒÔ×Ó³ÌÐòÐÎʽ¸ø³öµÄת»»³ÌÐò,˵Ã÷µ÷ÓøÃ×Ó³ÌÐòµÄÈë¿ÚÌõ¼þºÍ³ö¿Ú¹¦ÄÜ¡£¼ÓÉϱØÒªµÄαָÁ²¢¼ÓÒÔ×¢ÊÍ¡£
7 / 19
17£®¸ù¾Ý8100Hµ¥ÔªÖеÄÖµX£¬¾ö¶¨P1¿ÚÒý½ÅÊä³öΪ£º
2X X>0
P1= 80H X=0 (£128D¡ÜX¡Ü63D)
X±ä·´ X<0
8 / 19