艺术品
3262383564流水灯汇编程序 ORG 0000H SJMP START ORG 0003H SJMP X0_INT ORG 000BH SJMP T0_INT ;------------------------------------------- START: MOV TMOD, #01H MOV TH0, #(65536 - 50000) / 256; //定时50ms@12MHz MOV TL0, #(65536 - 50000) MOD 256; //定时50ms@12MHz SETB TR0 SETB ET0 SETB IT0 SETB EX0 SETB PT0 SETB EA MOV R3, #20 MOV R2, #7FH MOV P1, R2 SJMP $ ;------------------------------------------- X0_INT: CPL F0 JNB P3.2, $ ;等待按键释放 RETI ;------------------------------------------- T0_INT: MOV TL0, #(65536 - 50000) MOD 256; //定时50ms@12MHz MOV TH0, #(65536 - 50000) / 256; //定时50ms@12MHz DJNZ R3, T0_END MOV R3, #20 MOV A, R2 JNB F0, DDD RL A SJMP EEE DDD: RR A EEE: MOV R2, A MOV P1, A T0_END: RETI ;------------------------------------------- END官网是www.ahgf.com.cn。帖吧不内太清容楚。