📄 interrupt.lst
字号:
C51 COMPILER V7.06 INTERRUPT 06/10/2005 23:25:34 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE INTERRUPT
OBJECT MODULE PLACED IN interrupt.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE interrupt.c DEBUG OBJECTEXTEND
stmt level source
1 #include "Head.h"
2 extern uchar searchOK;
3 extern uchar Command[];
4 unsigned int TimeCNT,timer0,temp_1820=1,Button_02;//
5 uchar TimeBT;
6 bit psw; //pass word OK?
7 void EXintt0(void) interrupt 0 using 1
8 { Alarm=0;
9 1 if(IN1) Alarm=1;
10 1 if(IN2) Alarm=2;
11 1 if(IN3) Alarm=3;
12 1 if(IN4) Alarm=4;
13 1 }
14 void time0(void) interrupt 1 using 2
15 { TR0=0;
16 1 A0_ISD=0; //Sound quick search stop
17 1 searchOK=1; // set searchok flag
18 1 }
19 void signal_input(void) interrupt 2 using 2
20 { unsigned char data temp;
21 1 static uchar counter,i=0;
22 1 //------------------------------------------------------------
23 1 temp=Read_80status();
24 1 if(HANDUP==1) //ring checking
25 1 {
26 2 if(timer0==1) timer0=1;
27 2 if(timer0>1200) {timer0=0; counter=0;}
28 2 if(timer0>75) counter++; //原值150
29 2 timer0=1;
30 2 if(counter==1)
31 2 {Inputcounter=0;
32 3 counter=0;
33 3 HANDUP=0;
34 3 timer0=1; //input watch dog(about 30s)
35 3 SoundEn=1;
36 3 }
37 2 }
38 1 else//---------------------------------------
39 1 { //funtion
40 2 if((temp&0x02)==0x02 )
41 2 {temp=Read_80Data();
42 3 if(musicstate<9) musicstate=10;
43 3 timer0=2000; // Input watch dog/
44 3 //SoundEn=0;
45 3 if(AlarmHappen==1) {SoundEn=1; AlarmHappen=0;return;}
46 3 temp=temp & 0x0f;
47 3 if(GetPSW==1 && InputEn) //pass
48 3 {switch(InputLen)
49 4 {case 1:
50 5 if(temp==13) timer0=10000;
51 5 else{Funtion=temp;break;} // funtion select
52 5 case 2: // chanle control
53 5 if(i==0)
54 5 if(temp==3 || temp==13){Funtion=21;break;} // # ?
55 5 InputBuff[i++]=temp;
C51 COMPILER V7.06 INTERRUPT 06/10/2005 23:25:34 PAGE 2
56 5 if(i==2)
57 5 {if(temp==3 || temp==13){ Funtion=20;break;} // No.+#
58 6 else {Funtion=23;break;} //input error
59 6 }
60 5 return;
61 5 case 3:
62 5 if(i==0 && temp==3){Funtion=21;break;} // # ?
63 5 InputBuff[i++]=temp;
64 5 if(i>2)
65 5 {if(temp==3 || temp==13){ Funtion=26;break;} // temperature.+#
66 6 else {Funtion=23;break;} //input error
67 6 }
68 5 return;
69 5 case 6: // change psw
70 5 InputBuff[i++]=temp;
71 5 //if(i<6 && temp==3){Funtion=21;break;}
72 5 if(i==6){Funtion=22;break;}
73 5 if(temp==3 || temp==13){Funtion=21;break;} //input Err
74 5 return;
75 5 case 11: //phone number
76 5 InputBuff[i++]=temp;
77 5 if(i<3 && temp==3) {Funtion=21;break;} //input Err
78 5 if(i>=13 || temp==3){Funtion=24;break;}
79 5 if(temp==13){Funtion=21;break;} //input Err
80 5 return;
81 5 }
82 4 InputEn=0;i=0;
83 4 return;
84 4 }
85 3 else //pass word input
86 3 if(InputEn==1)
87 3 {
88 4 InputBuff[i++]=temp; // psw input
89 4 if(i>12) {InputEn=0;InputErr=1;i=0;return;}
90 4 if(temp==0x03 )
91 4 {
92 5 if(i!=(InputLen+1)) InputErr=1;
93 5 else
94 5 {InputDone=1;
95 6 InputBuff[i-1]=0xff;
96 6 }
97 5 InputEn=0;
98 5 i=0;
99 5 }
100 4 }
101 3 }
102 2 }
103 1 }
104 void time1(void) interrupt 3 using 3//about 8ms
105 { TH1=225; TL1=0;
106 1 if(temp_1820>0 && temp_1820<500)temp_1820++;//1820delay
107 1 if(Button_02>0 && Button_02<1000) Button_02++;//Button_02 delay
108 1 if(TimeCNT>0 && TimeCNT<2000) TimeCNT++; //8880 delay
109 1 if(TimeBT>0) TimeBT++; //button chcke
110 1 if(timer0>0)timer0++; //input signal check (watch dog/auto handdown)
111 1 if(timer0>10000)
112 1 { HANDUP=1; timer0=9999;
113 2 GetPSW=0;InputLen=6;
114 2 LINE=1;
115 2 Funtion=0;
116 2 InputDone=0;
117 2 InputErr=0;
C51 COMPILER V7.06 INTERRUPT 06/10/2005 23:25:34 PAGE 3
118 2 if(musicstate<9) musicstate=10; // stop sound
119 2 Sound[0]=15;
120 2 Sound[1]=29;
121 2 Sound[2]=27;
122 2 Sound[3]=0xff;
123 2 } //超时 挂机
124 1 }
125
126
127
128
129
130
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 667 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 11 ----
IDATA SIZE = ---- ----
BIT SIZE = 2 ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -