📄 menu.lst
字号:
C51 COMPILER V6.23a MENU 09/10/2007 21:52:45 PAGE 1
C51 COMPILER V6.23a, COMPILATION OF MODULE MENU
OBJECT MODULE PLACED IN menu.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE menu.c BROWSE DEBUG OBJECTEXTEND
stmt level source
1 /**********************************多级菜单LCD显示********************************************/
2 /*********作者:王胜文。QQ:95201972 email:nunk@163.com 希望与大家交流2007。08。03**********/
3
4
5
6 #include<drive_functions.h>
7 #include<get_keys.h>
8 #include<characters.h>
9 #include<menu_functions.h>
10 void (*current_operation_index)();//
11
12
13
14 typedef struct
15 {
16 uchar current;
17 uchar up;
18 uchar down;
19 uchar enter;
20 void (*current_operation)();
21 } key_table;
22
23 key_table code table[56]=
24 {
25 {0,24,8,1,(*fun0)}, //0//第一层,显示[语言],图片,说明,返回
26 {1,7,3,2,(*fun1)},//1-0按回车,进第二层,显示[英语],法语,中文,返回
27 {2,2,2,1,(*fun2)},//2-1 >enter>guiyang is the capital of guizhou,[return]
28
29 {3,1,5,4,(*fun4)},//4-1向下,显示英语,[法语],中文,返回
30 {4,4,4,3,(*fun5)},//5-4 >enter>liupanshui is a base of coal mine of southern of china
31
32 {5,3,7,6,(*fun7)},//7-4向下,显示英语,法语,[中文],返回
33 {6,6,6,5,(*fun8)}, //8-7 >enter>huangping is my hometown,[return]
34
35 {7,5,1,0,(*fun10)},//10-7 >down>显示英语,法语,中文,[返回]
36
37 {8,0,16,9,(*fun12)},//12-0 >down>显示语言,[图片],说明,返回
38 {9,15,11,10,(*fun13)},//13-12 >enter>[图片1],图片2,图片2,返回
39 {10,10,10,9,(*fun14)},//14-13 >entern>chengdu is the capital of sichuan province,[return]
40
41 {11,9,13,12,(*fun16)},//16-13 >down>图片1,[图片2],图片2,返回
42 {12,12,12,11,(*fun17)},//17-16 >enter>miangyang is a technology city of western china,[return]
43
44 {13,11,15,14,(*fun19)},//19-16 >down>图片1,图片2,[图片3],返回
45 {14,14,14,13,(*fun20)},//20-19 >enter>leshan have leshan dafu,[return]
46
47 {15,13,9,8,(*fun22)},//22-19 >down>图片1,图片2,图片2,[返回]
48
49 {16,8,24,17,(*fun24)},//24-12 >down>语言,图片,[说明],返回
50 {17,23,19,18,(*fun25)},//25-24 >enter>[二键],5键,8键,返回
51 {18,18,18,17,(*fun26)},//26-25 >enter>i'm now in shenzhen,[return]
52
53 {19,17,21,20,(*fun28)},//28-25 >down>二键,[5键],8键,返回
54 {20,20,20,19,(*fun29)}, //29-28 >enter>guangzhou is the capital of guangdong,return
55
C51 COMPILER V6.23a MENU 09/10/2007 21:52:45 PAGE 2
56 {21,19,23,22,(*fun31)},//31-28 >down>二键,5键,[8键],返回
57 {22,22,22,21,(*fun32)},//32-31 >enter>i'm in huizhou in 1997,[return]
58
59 {23,21,17,16,(*fun34)},//34-31 >down>二键,5键,8键,[返回]
60
61 {24,16,0,25,(*fun36)},//36-24 >down>语言,图片,说明,[返回]
62 {25,26,26,27,(*fun37)},//37-36 >enter>[关机],菜单
63 {26,25,25,0,(*fun38)}, //38-37 >up>关闭,[菜单]
64 {27,27,27,0,(*fun39)},//shutdown
65 /*..........................................英文菜单...............................................*/
66 {0,52,36,29,(*fun60)}, //0//第一层,显示[语言],图片,说明,返回
67 {1,35,31,30,(*fun62)},//1-0按回车,进第二层,显示[英语],法语,中文,返回
68 {2,40,40,29,(*fun63)},//2-1 >enter>guiyang is the capital of guizhou,[return]
69
70 {3,29,33,32,(*fun64)},//4-1向下,显示英语,[法语],中文,返回
71 {4,32,32,31,(*fun65)},//5-4 >enter>liupanshui is a base of coal mine of southern of china
72
73 {5,31,35,34,(*fun66)},//7-4向下,显示英语,法语,[中文],返回
74 {6,34,34,33,(*fun67)}, //8-7 >enter>huangping is my hometown,[return]
75
76 {7,33,29,28,(*fun68)},//10-7 >down>显示英语,法语,中文,[返回]
77
78 {8,28,44,37,(*fun69)},//12-0 >down>显示语言,[图片],说明,返回
79 {9,43,39,38,(*fun70)},//13-12 >enter>[图片1],图片2,图片2,返回
80 {10,38,38,37,(*fun71)},//14-13 >entern>chengdu is the capital of sichuan province,[return]
81
82 {11,37,41,40,(*fun72)},//16-13 >down>图片1,[图片2],图片2,返回
83 {12,40,40,39,(*fun73)},//17-16 >enter>miangyang is a technology city of western china,[return]
84
85 {13,39,43,42,(*fun74)},//19-16 >down>图片1,图片2,[图片3],返回
86 {14,42,42,41,(*fun75)},//20-19 >enter>leshan have leshan dafu,[return]
87
88 {15,41,37,36,(*fun76)},//22-19 >down>图片1,图片2,图片2,[返回]
89
90 {16,36,52,45,(*fun77)},//24-12 >down>语言,图片,[说明],返回
91 {17,51,47,46,(*fun78)},//25-24 >enter>[二键],5键,8键,返回
92 {18,46,46,45,(*fun79)},//26-25 >enter>i'm now in shenzhen,[return]
93
94 {19,45,49,48,(*fun80)},//28-25 >down>二键,[5键],8键,返回
95 {20,48,48,47,(*fun81)}, //29-28 >enter>guangzhou is the capital of guangdong,return
96
97 {21,47,51,50,(*fun82)},//31-28 >down>二键,5键,[8键],返回
98 {22,50,50,49,(*fun83)},//32-31 >enter>i'm in huizhou in 1997,[return]
99
100 {23,49,45,44,(*fun84)},//34-31 >down>二键,5键,8键,[返回]
101
102 {24,44,28,53,(*fun85)},//36-24 >down>语言,图片,说明,[返回]
103 {25,54,54,55,(*fun86)},//37-36 >enter>[关机],菜单
104 {26,53,53,28,(*fun87)}, //38-37 >up>关闭,[菜单]
105 {27,55,55,28,(*fun88)},//shutdown
106 };
107
108
109 void main(void)
110 {
111 1 void fun40();
112 1 while(1)
113 1 {
114 2 if(CheckState()) //检查是否有键按下
115 2 {
116 3 delay(); //延时去抖动
117 3
C51 COMPILER V6.23a MENU 09/10/2007 21:52:45 PAGE 3
118 3 if(CheckState())
119 3 {
120 4 key=GetKeys(); //读取键盘值
121 4
122 4
123 4 /*******************find index****************************/
124 4 switch(key)
125 4 {
126 5 case 0x14:
127 5 func_index=table[func_index].up; //向上翻
128 5 break;
129 5 case 0x24: if(func_index<28)
130 5 {
131 6 dengdai();
132 6 }
133 5 else dengdai_y();
134 5 ClearLCD2();
135 5 func_index=table[func_index].enter;//回车
136 5 break;
137 5 case 0x44:
138 5 func_index=table[func_index].down;//向下翻
139 5 break;
140 5 default:
141 5 break;
142 5
143 5 }
144 4 }
145 3 }
146 2
147 2 current_operation_index=table[func_index].current_operation;
148 2
149 2 (*current_operation_index)();//执行当前操作函数
150 2
151 2 }
152 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 16186 ----
CONSTANT SIZE = 8728 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 14 9
IDATA SIZE = ---- ----
BIT SIZE = 3 1
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -