1、ORG 0000HLJMP MAINORG 0003HLJMP INTR0ORG 0100HMAIN:SETB TCON.1SETB EX0SETB PX0SETB EAMOV A,#0F6HMOV P1,ALCALL DELAYL1:MOV A,#0DEHMOV P1,ALCALL DELAYMOV A,#0CEHMOV P1,ALCALL DELAY1MOV A,#0DEHMOV P1,ALCALL DELAY1MOV A,#0CEHMOV P1,ALCALL DELAY1MOV A,#0DEHMOV P1,ALCALL DELAY1MOV A,#0DEHMOV P1,ALCALL DEL
2、AY1MOV A,#0CEHMOV P1,ALCALL DELAY1MOV A,#0F3HMOV P1,ALCALL DELAYMOV A,#0F1HMOV P1,ALCALL DELAY1MOV A,#0E3HMOV P1,ALCALL DELAY1MOV A,#0F1HMOV P1,ALCALL DELAY1MOV A,#0E3HMOV P1,ALCALL DELAY1MOV A,#0F1HMOV P1,ALCALL DELAY1MOV A,#0E3HMOV P1,ALCALL DELAY1LJMP L1ORG 0200HINTR0:PUSH PSWPUSH ACCMOV A,#0F6HM
3、OV P1,ALCALL DELAY2POP ACCPOP PSWRETIDELAY:DEL:MOV R0,#20DEL1:MOV R1,#200DEL2:MOV R2,#125DEL3:DJNZ R2,DEL3DJNZ R1,DEL2DJNZ R0,DEL1RETIDELAY1:DEL4:MOV R3,#10DEL5:MOV R4,#200DEL6:MOV R5,#125DEL7:DJNZ R5,DEL7DJNZ R4,DEL6DJNZ R3,DEL5RETIDELAY2:DEL8:MOV R6,#200DEL9:MOV R7,#200DEL10:MOV B,#125DEL11:DJNZ B,DEL11DJNZ R7,DEL10DJNZ R6,DEL9RETIEND