📄 键盘.lst
字号:
C51 COMPILER V7.06 键盘 12/16/2008 14:55:01 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE 键盘
OBJECT MODULE PLACED IN 键盘.OBJ
COMPILER INVOKED BY: E:\我的学习软件\keil\C51\BIN\C51.EXE 键盘.c BROWSE DEBUG OBJECTEXTEND TABS(15)
stmt level source
1 #include <AT89X51.h>
2 #include <1602.c>
3 unsigned char a[16]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71,},b[
-4],c=0x01;
4 unsigned int jianzhi;
5 void key(void)
6 {
7 1 unsigned int hengzhi,leizhi=0,n,r=0x01;
8 1
9 1 if(P3_0==0)
10 1 hengzhi=0;
11 1 if(P3_1==0)
12 1 hengzhi=1;
13 1 if(P3_2==0)
14 1 hengzhi=2;
15 1 if(P3_3==0)
16 1 hengzhi=3;
17 1 for(n=0;n<4;n++)
18 1 {
19 2 P1=~(r<<n);
20 2 if((P3_0&&P3_1&&P3_2&&P3_3)!=1)
21 2 leizhi=n;
22 2 }
23 1
24 1 jianzhi=hengzhi*4+leizhi;
25 1
26 1 }
27
28 void main(void)
29 {
30 1 uchar i;
31 1 chushihua();
32 1 Delay1ms(10);
33 1 wzhilin(0x80|0x00);
34 1 i=0x00;
35 1 while(i!=0x010)
36 1 {
37 2 wshuju(lcd1[i]);
38 2 i++;
39 2 }
40 1 while(1)
41 1 {
42 2
43 2 P1=0x00;
44 2 jianche:
45 2 while((P3_0&&P3_1&&P3_2&&P3_3)==1)
46 2 {
47 3 wzhilin(0x80|0x40);
48 3 wshuju(lcd3[jianzhi]);
49 3 }
50 2 Delay1ms(10);
51 2 if((P3_0&&P3_1&&P3_2&&P3_3)==1)
52 2 goto jianche;
53 2
54 2 key();
C51 COMPILER V7.06 键盘 12/16/2008 14:55:01 PAGE 2
55 2
56 2 while((P3_0&&P3_1&&P3_2&&P3_3)!=1)
57 2 {
58 3 wzhilin(0x80|0x40);
59 3 wshuju(lcd3[jianzhi]);
60 3 }
61 2
62 2 }
63 1 }
64
65
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 437 ----
CONSTANT SIZE = 49 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 27 2
IDATA SIZE = ---- ----
BIT SIZE = ---- 1
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -