📄 weida.lst
字号:
C51 COMPILER V6.23a WEIDA 09/14/2005 09:11:45 PAGE 1
C51 COMPILER V6.23a, COMPILATION OF MODULE WEIDA
OBJECT MODULE PLACED IN Weida.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\c51.exe Weida.C DB OE SMALL ROM(LARGE)
stmt level source
1 /****************************************************************/
2 /*功能:打印集成运放参数自动测试结果
3 /*版本:v2.1
4 /*设计人:
5 /*编写日期:
6 /*最后修改日期:2005-09-09
7 /*状态:in test
8 /****************************************************************/
9
10 /*头文件定义*/
11 #include <reg51.h>
12 #include <absacc.h>
13
14 /*预定义部分*/
15 #define uchar unsigned char
16 #define uint unsigned int
17 #define ulong unsigned long
18 #define ADDR XBYTE[0x7fff]
19
20 sbit busy=P0^7;
21 uchar code Vio[] = { 'V', 'i', 'o', '(', 'm', 'V', ')', ':', 0x0d, 0xff };
22 uchar code Iio[] = { 'I', 'i', 'o', '(', 'u', 'A', ')', ':', 0x0d, 0xff};
23 uchar code Avd[] = { 'A', 'v', 'd', '(', 'd', 'B', ')', ':', 0x0d, 0xff };
24 uchar code Kcmr[] = { 'K', 'c', 'm', 'r', '(', 'd', 'B', ')', ':', 0x0d, 0xff };
25 uchar code BWG[] = { 'B', 'W', 'G', '(', 'H', 'z', ')', ':', 0x0d, 0xff };
26 uchar code LINE[] = { 0x1b, 0x27, 0x67,
27 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,
-0x0e, 0x0f,
28 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d,
-0x1e, 0x1f,
29 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
-0x2e, 0x2f,
30 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d,
-0x3e, 0x3f,
31 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d,
-0x4e, 0x4f,
32 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d,
-0x5e, 0x5f,
33 0x0d, 0xff };
34
35 //uchar code BODE[] = { 0x1b, 0x27, 0x02, 0x01, 0x08, 0x0d, 0x05 };
36 //uchar code figure[]={0x1b,0x4b,0x21,0000,0x00,0xff,
37 // 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
38 // 0x81,0x41,0x41,0x41,0x41,0x21,0x21,0x21,0x21,0x05,0x05,0x05,0x09,0x09,0x05,0x03};
39
40 /*调用Scan_Keyboard.C定义的函数*/
41 ulong power(uchar); /*求10的N次幂*/
42
43
44 /*函数声明部分*/
45 void init_weida();
46 void type_byte(uchar);
47 void print_string(uchar *);
48 void print_result(void);
49 void print_float(float);
C51 COMPILER V6.23a WEIDA 09/14/2005 09:11:45 PAGE 2
50 void print_ulong(ulong);
51 void print_bode(void);
52
53 /*
54 void en_string(uchar *);
55 void en_mode1();
56 void en_mode2();
57 void cn_mode();
58 void figure_mode(uchar);
59 void cn_string(uchar *);
60 */
61
62 /*主函数部分*/
63 /*********************************************************************/
64 /*函数名:main()
65 /*功能:主函数
66 /*输入参数:无
67 /*返回值:无
68 /*编写日期:
69 /*最后修改日期:
70 /********************************************************************/
71 void main()
72 {
73 1
74 1 //init_weida();
75 1 //print_result();
76 1 //print_line(LINE);
77 1
78 1 print_bode();
79 1
80 1 //en_string(Iio);
81 1 //en_string(Avd);
82 1 //en_string(Kcmr);
83 1 //en_string(BWG);
84 1 //en_string(figure);
85 1 while(1);
86 1 }
87
88 /*其他函数定义部分*/
89 /*********************************************************************/
90 /*函数名:
91 /*功能:
92 /*输入参数:
93 /*返回值:
94 /*调用函数:
95 /*被调用函数:
96 /*编写日期:
97 /*最后修改日期:
98 /********************************************************************/
99 void init_weida()
100 {
101 1 type_byte(0x1b);
102 1 type_byte(0x40);
103 1 }
104 /*********************************************************************/
105 /*函数名:
106 /*功能:
107 /*输入参数:
108 /*返回值:
109 /*调用函数:
110 /*被调用函数:
111 /*编写日期:
C51 COMPILER V6.23a WEIDA 09/14/2005 09:11:45 PAGE 3
112 /*最后修改日期:
113 /********************************************************************/
114 void en_mode1()
115 {
116 1 type_byte(0x1c);
117 1 type_byte(0x2e);
118 1 type_byte(0x1b);
119 1 type_byte(0x36);
120 1 }
121 /*********************************************************************/
122 /*函数名:
123 /*功能:
124 /*输入参数:
125 /*返回值:
126 /*调用函数:
127 /*被调用函数:
128 /*编写日期:
129 /*最后修改日期:
130 /********************************************************************/
131 void en_mode2()
132 {
133 1 type_byte(0x1c);
134 1 type_byte(0x2e);
135 1 type_byte(0x1b);
136 1 type_byte(0x37);
137 1 }
138 /*********************************************************************/
139 /*函数名:
140 /*功能:
141 /*输入参数:
142 /*返回值:
143 /*调用函数:
144 /*被调用函数:
145 /*编写日期:
146 /*最后修改日期:
147 /********************************************************************/
148 void cn_mode()
149 {
150 1 type_byte(0x1c);
151 1 type_byte(0x26);
152 1 }
153 /*********************************************************************/
154 /*函数名:
155 /*功能:
156 /*输入参数:
157 /*返回值:
158 /*调用函数:
159 /*被调用函数:
160 /*编写日期:
161 /*最后修改日期:
162 /********************************************************************/
163 void figure_mode(uchar num)
164 {
165 1 type_byte(0x1b);
166 1 type_byte(0x27);
167 1 type_byte(num);
168 1 }
169 /*********************************************************************/
170 /*函数名:
171 /*功能:
172 /*输入参数:
173 /*返回值:
C51 COMPILER V6.23a WEIDA 09/14/2005 09:11:45 PAGE 4
174 /*调用函数:
175 /*被调用函数:
176 /*编写日期:
177 /*最后修改日期:
178 /********************************************************************/
179 void en_string(uchar *string)
180 {
181 1 while(*string!=0x05)
182 1 {
183 2 type_byte(*string);
184 2 string++;
185 2 }
186 1 }
187 /*********************************************************************/
188 /*函数名:
189 /*功能:
190 /*输入参数:
191 /*返回值:
192 /*调用函数:
193 /*被调用函数:
194 /*编写日期:
195 /*最后修改日期:
196 /********************************************************************/
197 void cn_string(uchar *string)
198 {
199 1 while(*string!=0x05)
200 1 {
201 2 type_byte(*string);
202 2 string++;
203 2 }
204 1 }
205 /*********************************************************************/
206 /*函数名:
207 /*功能:
208 /*输入参数:
209 /*返回值:
210 /*调用函数:
211 /*被调用函数:
212 /*编写日期:
213 /*最后修改日期:
214 /********************************************************************/
215 void type_byte(uchar lcv_byte)
216 {
217 1 uchar lcv_temp = 0;
218 1
219 1 // feed_dog = !feed_dog;
220 1
221 1 lcv_temp = ADDR;
222 1
223 1 while(busy == 1)
224 1 {
225 2 // feed_dog = !feed_dog;
226 2 lcv_temp = ADDR;
227 2 }
228 1
229 1 ADDR = lcv_byte;
230 1 }
231
232
233 /*****************************************
234 Function:
235 Description:
C51 COMPILER V6.23a WEIDA 09/14/2005 09:11:45 PAGE 5
236 Calls:
237 Called By:
238 Input:
239 Output:
240 State:
241 *****************************************/
242 void print_result(void)
243 {
244 1 // feed_dog = !feed_dog;
245 1
246 1 init_weida();
247 1
248 1 print_ulong(7800);
249 1 print_string(BWG);
250 1 type_byte(0x0a);
251 1 type_byte(0x0d);
252 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -