📄 menu.lst
字号:
C51 COMPILER V7.01 MENU 08/17/2003 17:24:42 PAGE 1
C51 COMPILER V7.01, COMPILATION OF MODULE MENU
OBJECT MODULE PLACED IN .\menu.OBJ
COMPILER INVOKED BY: C:\KEIL\C51\BIN\C51.EXE .\menu.c LARGE MODDP2 DEBUG OBJECTEXTEND
stmt level source
1 #include "char_rom.h"
2
3 #define black 0x00
4 #define red 0x01
5 #define green 0x02
6 #define yellow 0x03
7 #define blue 0x04
8 #define magenta 0x05
9 #define cyan 0x06
10 #define white 0x07
11
12 unsigned char pos;//当前节目
13 unsigned char sound;//当前节目声音中频
14 unsigned char tv_av;//tv/av
15 unsigned char slep;//静音
16 unsigned char band;////波段
17
18 extern void char_w_c(unsigned int row,unsigned int color,
19 unsigned int char_p[]);//每行字符设置
20 //显示行位置,纵位置,字符串,颜色,
21 extern void char_w_e(unsigned int address,unsigned int color,
22 unsigned int char_p[]);//不定字符 不定地址 不定个数显示
23
24 extern void char_w_f(unsigned int row,unsigned int content,
25 unsigned int color,unsigned int char_p);//单字符设置
26
27 void menu_main(char r);
28 void av_menu(char r);//tv/av1/av2/av3
29 void vol_main(char r);
30 void vol_av(char r);
31 void jintu(unsigned int r,unsigned int l,
32 unsigned int h, unsigned int op);//进度条
33
34
35
36
37 void menu_main(char r)
38 {
39 1 unsigned char as1,as2,as3,as4,as5;
40 1 switch(r)
41 1 {
42 2 case 0: as1=red;as2=green;as3=green;as4=green;as5=green;break;
43 2 case 1: as1=green;as2=red;as3=green;as4=green;as5=green;break;
44 2 case 2: as1=green;as2=green;as3=red;as4=green;as5=green;break;
45 2 case 3: as1=green;as2=green;as3=green;as4=red;as5=green;break;
46 2 case 4: as1=green;as2=green;as3=green;as4=green;as5=red;break;
47 2 default:;
48 2 }
49 1
50 1 char_w_c(0,magenta,char_sx1);//菜单1
51 1
52 1 char_w_c(2,as1,char_sx2);//节目
53 1 char_w_c(3,as2,char_sx27);//波段 band
54 1 char_w_c(4,as3,char_sx3);//自动选台
55 1 char_w_c(5,as4,char_sx4);//手动选台/
C51 COMPILER V7.01 MENU 08/17/2003 17:24:42 PAGE 2
56 1 char_w_c(6,as5,char_sx5);//微调/fine
57 1 }
58
59 void av_menu(char r)//tv/av1/av2/av3
60 {
61 1 unsigned char as1,as2,as3;
62 1 switch(r)
63 1 {
64 2 case 0: as1=red;as2=green;as3=green;break;
65 2 case 1: as1=green;as2=red;as3=green;break;
66 2 case 2: as1=green;as2=green;as3=red;break;
67 2 default:;
68 2 }
69 1 char_w_c(0,magenta,char_sx6);//菜单2
70 1
71 1 char_w_c(2,as1,char_sx7);//声音中频/sound-sys
72 1 char_w_c(3,as2,char_sx8);//TV/AV
73 1 char_w_c(4,as3,char_sx9);////静音
74 1 }
75
76 void vol_main(char r)//
77 {
78 1 unsigned char u;
79 1 bit h;
80 1 unsigned char as1,as2,as3,as4,as5;
81 1 switch(r)
82 1 {
83 2 case 0: as1=red;as2=green;as3=green;as4=green;as5=green;break;
84 2 case 1: as1=green;as2=red;as3=green;as4=green;as5=green;break;
85 2 case 2: as1=green;as2=green;as3=red;as4=green;as5=green;break;
86 2 case 3: as1=green;as2=green;as3=green;as4=red;as5=green;break;
87 2 case 4: as1=green;as2=green;as3=green;as4=green;as5=red;break;
88 2 default:;
89 2 }
90 1
91 1 u=pos/100;//节目百位
92 1 if(u==0)
93 1 {
94 2 char_w_f(2,20,0,0x00ff);
95 2 h=1;
96 2 }
97 1 else {char_w_f(2,20,as1,u+0x20);h=0;}
98 1
99 1 u=(pos%100)/10;//节目十位
100 1 if((u==0)&h)
101 1 char_w_f(2,21,0,0x00ff);
102 1 else char_w_f(2,21,as1,u+0x20);
103 1
104 1 u=pos%10;//节目个位
105 1 char_w_f(2,22,as1,u+0x20);
106 1
107 1 if(band==0)
108 1 char_w_e(3*24+20,as2,char_sx24);//v-l波段
109 1 else if(band==1)
110 1 char_w_e(3*24+20,as2,char_sx25);//v-h波段
111 1 else char_w_e(3*24+20,as2,char_sx26);//uhf波段
112 1
113 1 switch(r)//指示行
114 1 {
115 2 case 0: char_w_f(2,1,red,char_ga);break;
116 2 case 1: char_w_f(3,1,red,char_ga);break;
117 2 case 2: char_w_f(4,1,red,char_ga);break;
C51 COMPILER V7.01 MENU 08/17/2003 17:24:42 PAGE 3
118 2 case 3: char_w_f(5,1,red,char_ga);break;
119 2 case 4: char_w_f(6,1,red,char_ga);break;
120 2 default:;
121 2 }
122 1 }
123
124 void vol_av(char r)
125 {
126 1 unsigned char as1,as2,as3;
127 1 switch(r)
128 1 {
129 2 case 0: as1=red;as2=green;as3=green;break;
130 2 case 1: as1=green;as2=red;as3=green;break;
131 2 case 2: as1=green;as2=green;as3=red;break;
132 2 default:;
133 2 }
134 1
135 1 if(sound==0)
136 1 char_w_e(2*24+20,as1,char_sx15);//6.5m
137 1 else if(sound==1)
138 1 char_w_e(2*24+20,as1,char_sx16);//6.0m
139 1 else if(sound==2)
140 1 char_w_e(2*24+20,as1,char_sx17);//5.5m
141 1 else char_w_e(2*24+20,as1,char_sx18);///4.5m
142 1
143 1 if(tv_av==0)
144 1 char_w_e(3*24+20,as2,char_sx12);//tv
145 1 else if(tv_av==1)
146 1 char_w_e(3*24+20,as2,char_sx13);//av1
147 1 else char_w_e(3*24+20,as2,char_sx14);//av2
148 1
149 1 if(slep==0)
150 1 char_w_e(4*24+20,as3,char_sx10);//on
151 1 else
152 1 char_w_e(4*24+20,as3,char_sx11);//off
153 1
154 1 switch(r)//指示行
155 1 {
156 2 case 0: char_w_f(2,1,red,char_ga);break;
157 2 case 1: char_w_f(3,1,red,char_ga);break;
158 2 case 2: char_w_f(4,1,red,char_ga);break;
159 2 }
160 1
161 1 }
162
163 void jintu(unsigned int r,unsigned int l,
164 unsigned int h, unsigned int op)//调台进度条
165 //r 调节值,l 预定低频段,H预定高频段,全频段频道数
166 {
167 1 unsigned char i;
168 1 unsigned char u;
169 1 unsigned char f;
170 1
171 1
172 1 char_w_e(9*24,red,char_sx23);//-
173 1
174 1 if(r<=l)//vl
175 1 {
176 2 u=((r*40)/l)/2;
177 2 f=((r*40)/l)%2;
178 2
179 2 for(i=0;i<u;i++)
C51 COMPILER V7.01 MENU 08/17/2003 17:24:42 PAGE 4
180 2 char_w_f(9,i+2,red,0x73);
181 2 if(f==0)
182 2 {
183 3 for(i=u;i<20;i++)
184 3 char_w_f(9,i+2,red,0x70);
185 3 }
186 2 else if(f==1)
187 2 {
188 3 char_w_f(9,u+2,red,0x72);
189 3 for(i=u+1;i<20;i++)
190 3 char_w_f(9,i+2,red,0x70);
191 3 }
192 2 char_w_e(8*24+16,red,char_sx24);//v-l
193 2 }
194 1
195 1 else if(r<=h)//vH
196 1 {
197 2 u=(((r-l)*40)/(h-l))/2;
198 2 f=(((r-l)*40)/(h-l))%2;
199 2
200 2 for(i=0;i<u;i++)
201 2 char_w_f(9,i+2,red,0x73);
202 2 if(f==0)
203 2 {
204 3 for(i=u;i<20;i++)
205 3 char_w_f(9,i+2,red,0x70);
206 3 }
207 2 else if(f==1)
208 2 {
209 3 char_w_f(9,u+2,red,0x72);
210 3 for(i=u+1;i<20;i++)
211 3 char_w_f(9,i+2,red,0x70);
212 3 }
213 2
214 2 char_w_e(8*24+16,red,char_sx25);//v-h
215 2 }
216 1 else
217 1 {
218 2 u=(((r-h)*40)/(op-h))/2;
219 2 f=(((r-h)*40)/(op-h))%2;
220 2
221 2 for(i=0;i<u;i++)
222 2 char_w_f(9,i+2,red,0x73);
223 2 if(f==0)
224 2 {
225 3 for(i=u;i<20;i++)
226 3 char_w_f(9,i+2,red,0x70);
227 3 }
228 2 else if(f==1)
229 2 {
230 3 char_w_f(9,u+2,red,0x72);
231 3 for(i=u+1;i<20;i++)
232 3 char_w_f(9,i+2,red,0x70);
233 3 }
234 2
235 2 char_w_e(8*24+16,red,char_sx26);//uhf
236 2
237 2 }
238 1 char_w_e(9*24+22,red,char_sx22);//+
239 1 }
240
241
C51 COMPILER V7.01 MENU 08/17/2003 17:24:42 PAGE 5
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 2134 ----
CONSTANT SIZE = 642 ----
XDATA SIZE = 5 30
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
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 + -