📄 kaiji.lst
字号:
C51 COMPILER V8.02 KAIJI 11/28/2007 16:47:08 PAGE 1
C51 COMPILER V8.02, COMPILATION OF MODULE KAIJI
OBJECT MODULE PLACED IN kaiji.OBJ
COMPILER INVOKED BY: D:\Program Files\keil\C51\BIN\C51.EXE kaiji.c BROWSE DEBUG OBJECTEXTEND
line level source
1 #include "absacc.h"
2 #include "stdarg.h"
3 #include "reg52.h"
4 #include "intrins.h"
5 #include "math.h"
6 #include "stdio.h"
7 #include "zimo.h"
8 #include "t6963c.h"
9
10 #define p1 P1
11
12 #define ulong unsigned long
13 #define uint unsigned int
14 #define uchar unsigned char
15
16 uchar xx[]={48,49,50,51,52,53,54,55,56,57};
17 uchar buf=-1,jj=6,ii=0;
18 uchar pass[]={6,6,6,6,6,6};
19 uchar passbuf[]={0,0,0,0,0,0};
20
21 /************************************************/
22 /* 键盘程序*/
23 /************************************************/
24 uchar keyget()
25 {
26 1 uchar scancode,tmpcode;
27 1
28 1 {
29 2 scancode = 0xfe;
30 2 while((scancode&0x10)!=0)
31 2 {
32 3 p1=scancode;
33 3 if((p1&0xf0)!=0xf0)
34 3 {
35 4 tmpcode =(p1&0xf0)|0x0f;
36 4 return((~scancode)+(~tmpcode));
37 4 }
38 3 else scancode = (scancode<<1)|0x01;
39 3 }
40 2 }
41 1
42 1 return(0);
43 1 }
44 /************************************************/
45 /* 键盘产生及键值判断 */
46 /************************************************/
47 void getdata()interrupt 0 using 0
48 {
49 1 uchar key;
50 1 if(p1!=0xf0)
51 1 shortdelay(500);
52 1 if(p1!=0xf0)
53 1 {key=keyget();
54 2 switch(key)
55 2 {
C51 COMPILER V8.02 KAIJI 11/28/2007 16:47:08 PAGE 2
56 3 case 0x11:buf=7;break;
57 3 case 0x21:buf=4;break;
58 3 case 0x41:buf=1;break;
59 3 case 0x12:buf=8;break;
60 3 case 0x22:buf=5;break;
61 3 case 0x42:buf=2;break;
62 3 case 0x82:buf=0;break;
63 3 case 0x14:buf=9;break;
64 3 case 0x24:buf=6;break;
65 3 case 0x44:buf=3;break;
66 3 case 0x81:buf=0x0f;break;
67 3 case 0x84:buf=0x0a;break;
68 3 case 0x18:buf=0;break;
69 3 case 0x28:buf=0;break;
70 3 case 0x48:buf=0;break;
71 3 case 0x88:buf=0;break;
72 3 default:break;
73 3 }
74 2 jj++;
75 2 jj++;
76 2 passbuf[ii]=buf;
77 2 ii++;
78 2 p1=0xf0;}
79 1
80 1 }
81 void main(void)
82 {
83 1 uchar x=0;
84 1 unsigned char i,j,k=1;
85 1 EA=1;
86 1 EX0=1;
87 1 p1=0xf0; //查询键盘用
88 1 { shortdelay(1200);
89 2 fnLCMInit(); //初始化画面
90 2 cls(0);
91 2 cursor(0,0);
92 2 cls(1);
93 2 for(i=120;i>0;i--)
94 2 {Linexy(i,0,i,64,0);
95 3 Linexy(240-i,0,240-i,64,0);
96 3 }
97 2 Linexy(0,0,0,64,0);
98 2 for(i=65;i<=85;i++)
99 2 {dispchar(8,1,i);
100 3 dispchar(10,1,i+1);
101 3 dispchar(12,1,i+2);
102 3 dispchar(14,1,i+3);
103 3 dispchar(16,1,151-i);
104 3 dispchar(18,1,152-i);
105 3 dispchar(20,1,153-i);
106 3 dispchar(12,2,150-i);
107 3 dispchar(14,2,154-i);
108 3 shortdelay(500);}
109 2 dispchar(8,1,87);
110 2 dispchar(10,1,69);
111 2 dispchar(12,1,76);
112 2 dispchar(14,1,67);
113 2 dispchar(16,1,79);
114 2 dispchar(18,1,77);
115 2 dispchar(20,1,69);
116 2 dispchar(12,2,71);
117 2 dispchar(14,2,79);
C51 COMPILER V8.02 KAIJI 11/28/2007 16:47:08 PAGE 3
118 2 shortdelay(6000);
119 2 for(i=0;i<32;i++)
120 2 dispchar(i,3,62);
121 2 cls(0);
122 2 for(i=0;i<4;i++)
123 2 {for(x=60;x<=180;x=x+4)
124 3 {Linexy(60,36,180,36,8); // 横线
125 4 Linexy(60,44,180,44,8); // 横线
126 4 Linexy(60,36,60,44,8); // 竖线
127 4 Linexy(180,36,180,44,8); // 竖线
128 4 Linexy(x,37,x,43,8);
129 4 Linexy(x+2,37,x+2,43,8);
130 4 Linexy(x+4,37,x+4,43,8);
131 4 Linexy(x+6,37,x+6,43,8);
132 4 Linexy(x+8,37,x+8,43,8);
133 4 Linexy(x,37,x,43,0);
134 4 Linexy(x+2,37,x+2,43,0);
135 4 Linexy(186,37,186,43,0);
136 4 Linexy(184,37,184,43,0);
137 4 Linexy(188,37,188,43,0);
138 4 if(x==60)
139 4 dprintf(9,1,"start . ");
140 4 if(x==88)
141 4 dprintf(9,1,"start ..");
142 4 if(x==120)
143 4 dprintf(9,1,"start ...");
144 4 if(x==152)
145 4 dprintf(9,1,"start ....");
146 4 }
147 3 }
148 2 cls(0);
149 2 for(x=0;x<29;x++) //人头滑动
150 2 { shortdelay(500);
151 3 dprintf(x-2,3,"欢迎使用");
152 3 dprintf(x-3,3," ");
153 3 for(i=x*8-8;i<x*8;i++)
154 3 Linexy(i,0,i,30,0);
155 3 disppic(img0,x,0);
156 3 }
157 2
158 2 cls(0);
159 2 i=0;
160 2 do
161 2 {dprintf(4,0,"请输入密码:"); //密码输入界面
162 3 Linexy(65,46,150,46,8);// 横线
163 3 dispchar(jj,2,xx[buf]);
164 3 if(ii==6)
165 3 {jj=6;
166 4 ii=0;
167 4 buf=-1;
168 4 for(j=0;j<6;j++)
169 4 {if(pass[j]!=passbuf[j])
170 5 break;
171 5 ; }
172 4 if(j==6)
173 4 {cls(0);
174 5 dprintf(4,0,"密码正确!");
175 5 shortdelay(2000);
176 5 k=0; }
177 4 else
178 4 {cls(0);
179 5 dprintf(4,0,"密码错误!");// 返回重新输入
C51 COMPILER V8.02 KAIJI 11/28/2007 16:47:08 PAGE 4
180 5 i++;
181 5 if(i==3)
182 5 { dprintf(12,0,"密码锁启动"); //三次不对自动关机
183 6 dprintf(10,1,"即将关机!");
184 6 shortdelay(2000);
185 6 cls(0);
186 6 dprintf(13,1,"B");
187 6 shortdelay(2000);
188 6 dprintf(15,1,"y");
189 6 shortdelay(2000);
190 6 dprintf(17,1,"e");
191 6 shortdelay(2000);
192 6 dprintf(19,1,"!");
193 6 shortdelay(2000);
194 6 for(i=0;i<=120;i++) //拉屏关闭
195 6 { Linexy(i,0,i,64,8); // 竖线
196 7 Linexy(240-i,0,240-i,64,8); //竖线
197 7 }
198 6 while(1)
199 6 cls(0); } //
200 5 shortdelay(2000);
201 5 dprintf(4,0,"请重新输入:");
202 5 shortdelay(2000);
203 5 }
204 4 }
205 3 }
206 2 while(k);
207 2 for(x=60;x<=170;x=x+1) //第三画面 画进度条
208 2 {dprintf(4,0,"正在加载个人设置……");
209 3 Linexy(60,36,180,36,8); // 横线
210 3 Linexy(60,44,180,44,8); // 横线
211 3 Linexy(60,36,60,44,8); // 竖线
212 3 Linexy(180,36,180,44,8); // 竖线
213 3 Linexy(x,38,x+10,38,8);
214 3 Linexy(x,40,x+10,40,8);
215 3 Linexy(x,42,x+10,42,8);
216 3 Linexy(x,39,x+10,39,8);
217 3 Linexy(x,41,x+10,41,8);
218 3 shortdelay(10);}
219 2 }
220 1 cls(0);
221 1 dprintf(0,2,"请输入提示语:");
222 1 shortdelay(4000);
223 1 dprintf(15,2,"老");
224 1 shortdelay(4000);
225 1 dprintf(17,2,"板");
226 1 shortdelay(4000);
227 1 dprintf(19,2,"是");
228 1 shortdelay(4000);
229 1 dprintf(21,2,"傻");
230 1 shortdelay(4000);
231 1 dprintf(23,2,"吊");
232 1 shortdelay(4000);
233 1 for(x=202,i=57;x<=208,i<=64;i++,x++) //画叉号
234 1 {Linexy(201,56,x,i,8);
235 2 shortdelay(500);}
236 1 for(x=201,i=64;x<=209,i>=56;x++,i--)
237 1 {Linexy(200,64,x,i,8);
238 2 shortdelay(500);}
239 1 shortdelay(2000);
240 1 cls(0);
241 1 dprintf(8,1,"提示错误");
C51 COMPILER V8.02 KAIJI 11/28/2007 16:47:08 PAGE 5
242 1 dprintf(7,2,"请重新输入!");
243 1 shortdelay(2000);
244 1 cls(0);
245 1 dprintf(0,2,"请输入提示语:");
246 1 shortdelay(4000);
247 1 dprintf(15,2,"小");
248 1 shortdelay(4000);
249 1 dprintf(17,2,"强");
250 1 shortdelay(4000);
251 1 dprintf(19,2,"是");
252 1 shortdelay(4000);
253 1 dprintf(21,2,"傻");
254 1 shortdelay(4000);
255 1 dprintf(23,2,"吊");
256 1 shortdelay(4000);
257 1 for(x=203,i=58;x<=205,i<=60;i++,x++) //画对号
258 1 {Linexy(202,57,x,i,8);
259 2 shortdelay(500);}
260 1 for(x=206,i=60;x<=211,i>=55;x++,i--)
261 1 {Linexy(205,61,x,i,8);
262 2 shortdelay(500);}
263 1 shortdelay(2000);
264 1 cls(0);
265 1 dprintf(8,2,"提示正确!");
266 1 shortdelay(2000);
267 1 cls(0);
268 1 while(1)
269 1 {disppic(img1,6,10);
270 2 disppic(img2,6,10);
271 2 disppic(img3,6,10);
272 2 disppic(img4,6,10);
273 2 disppic(img5,6,10);
274 2 disppic(img6,6,10);
275 2 disppic(img7,6,10);
276 2 disppic(img8,6,10);
277 2 disppic(img9,6,10);
278 2 disppic(img10,6,10);
279 2 disppic(img11,6,10);
280 2 }
281 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 3501 ----
CONSTANT SIZE = 9968 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 35 54
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -