大家帮我看看这个51程序, org 0000h ajmp main org 0003h AJMP IN2 ORG 0013H AJMP IN3 org 0030h main: mov ie,#85h mov tcon,#05h mov sp,#20h CLR P3.1 MOV IE,10000101B MOV IP,00000001B
START: CLR P2.4 rotate: CPL P2.4 acall delay ajmp rotate delay: mov r3,#0FFh del: mov r4,#0FFh djnz r4,$ djnz r3,del ret IN2: push psw push aCC setb rs0 CLR rs1 clr ie0 mov r0,#09h loop: SETB P2.4 CLR P2.3 acall delay acall delay SETB P2.3 ACALL DELAY acall delay djnz r0,loop pop aCC pop psw reti IN3: push psw push aCC setb rs0 CLR rs1 clr ie1 mov r1,#0Fh loop1: SETB P2.4 SETB P2.3 CLR P2.2 acall delay acall delay SETB P2.2 ACALL DELAY acall delay djnz r1,loop1 pop aCC pop psw reti end
问题:当程序进入中断int0时,为什么当int1中断程序不能跳出并转入int1; 当程序进入int1时,为什么当int0中断程序不能跳出并转入int0 要实现进入int1中断的同时,如果发生int0中断程序转入int0,该怎么编写? 谢谢,请指教
|