📄 set_speed.lst
字号:
C51 COMPILER V7.06 SET_SPEED 02/05/2005 09:08:21 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE SET_SPEED
OBJECT MODULE PLACED IN set_speed.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE set_speed.c BROWSE DEBUG OBJECTEXTEND
stmt level source
1 #include <math.h>
2 #include <intrins.h>
3 #include "function.h"
4 #include "val.h"
5 unsigned char jin_speed_set[4];
6 unsigned char tui_speed_set[4],gun_speed_set[4];
7 //unsigned char gunjing_set[3];
8 unsigned char set_speed;
9 extern bit up_bit,down_bit,enter_bit;
10 void display_speed_set(void)
11 {
12 1
13 1 unsigned char a[4],b[4],c[4];
14 1 //第一行
15 1 display_l_word(0,0,kuai_code);
16 1 display_l_word(0,16,jin_code);
17 1 display_l_word(0,32,su_code);
18 1 display_l_word(0,48,du_code);
19 1 // display_r_byte(0,32,zero_code);
20 1 // display_r_word(0,48,mm_code);
21 1 if(set_speed==1) {
22 2 flash_r_byte(0,0,maohao_code);
23 2 if(down_bit){
24 3 down_bit=0;
25 3 set_speed=6;}
26 2 a[0]=jin_speed_set[0];
27 2 a[1]=jin_speed_set[1];
28 2 a[2]=jin_speed_set[2];
29 2 a[3]=jin_speed_set[3];}
30 1 else display_r_byte(0,0,maohao_code);
31 1 if(set_speed==2) {
32 2 flash_r_byte(0,16,&(number_code[a[0]*16]));
33 2 if(up_bit&&(a[0]<9)) {
34 3 up_bit=0;
35 3 a[0]=a[0]+1;}
36 2 if(down_bit&&(a[0]>0)) {
37 3 down_bit=0;
38 3 a[0]=a[0]-1;}
39 2 if(enter_bit) {
40 3 enter_bit=0;
41 3 jin_speed_set[0]=a[0];
42 3 set_speed=3;}
43 2 }
44 1 else { display_r_byte(0,16,&(number_code[jin_speed_set[0]*16]));
45 2 a[0]=jin_speed_set[0];}
46 1 if(set_speed==3) {
47 2 flash_r_byte(0,24,&(number_code[a[1]*16]));
48 2 if(up_bit&&(a[1]<9)) {
49 3 up_bit=0;
50 3 a[1]=a[1]+1;
51 3 }
52 2 if(down_bit&&(a[1]>0)) {
53 3 down_bit=0;
54 3 a[1]=a[1]-1;
55 3 }
C51 COMPILER V7.06 SET_SPEED 02/05/2005 09:08:21 PAGE 2
56 2 if(enter_bit) {
57 3 enter_bit=0;
58 3 jin_speed_set[1]=a[1];
59 3 set_speed=4;
60 3 }
61 2 }
62 1 else {display_r_byte(0,24,&(number_code[jin_speed_set[1]*16]));
63 2 a[1]=jin_speed_set[1];}
64 1 if(set_speed==4) {
65 2 flash_r_byte(0,32,&(number_code[a[2]*16]));
66 2 if(up_bit&&(a[2]<9)) {
67 3 up_bit=0;
68 3 a[2]=a[2]+1;}
69 2 if(down_bit&&(a[2]>0)) {
70 3 down_bit=0;
71 3 a[2]=a[2]-1;}
72 2 if(enter_bit) {
73 3 enter_bit=0;
74 3 jin_speed_set[2]=a[2];
75 3 set_speed=5;}
76 2 }
77 1 else {display_r_byte(0,32,&(number_code[jin_speed_set[2]*16]));
78 2 a[2]=jin_speed_set[2];}
79 1 if(set_speed==5) {
80 2 flash_r_byte(0,40,&(number_code[a[3]*16]));
81 2 if(up_bit&&(a[3]<9)) {
82 3 up_bit=0;
83 3 a[3]=a[3]+1;}
84 2 if(down_bit&&(a[3]>0)) {
85 3 down_bit=0;
86 3 a[3]=a[3]-1;}
87 2 if(enter_bit) {
88 3 enter_bit=0;
89 3 jin_speed_set[3]=a[3];
90 3 set_speed=6;}
91 2 }
92 1 else {display_r_byte(0,40,&(number_code[jin_speed_set[3]*16]));
93 2 a[3]=jin_speed_set[3]; }
94 1 //第二行
95 1 display_l_word(2,0,kuai_code);
96 1 display_l_word(2,16,tui_code);
97 1 display_l_word(2,32,su_code);
98 1 display_l_word(2,48,du_code);
99 1 // display_r_word(2,48,mm_code);
100 1 if(set_speed==6) {
101 2 flash_r_byte(2,0,maohao_code);
102 2 if(down_bit){
103 3 down_bit=0;
104 3 set_speed=11;}
105 2 if(up_bit){
106 3 up_bit=0;
107 3 set_speed=1;}
108 2 b[0]=tui_speed_set[0];
109 2 b[1]=tui_speed_set[1];
110 2 b[2]=tui_speed_set[2];
111 2 b[3]=tui_speed_set[3];}
112 1 else display_r_byte(2,0,maohao_code);
113 1 if(set_speed==7) {
114 2 flash_r_byte(2,16,&(number_code[b[0]*16]));
115 2 if(up_bit&&(b[0]<9)) {
116 3 up_bit=0;
117 3 b[0]=b[0]+1;}
C51 COMPILER V7.06 SET_SPEED 02/05/2005 09:08:21 PAGE 3
118 2 if(down_bit&&(b[0]>0)) {
119 3 down_bit=0;
120 3 b[0]=b[0]-1;}
121 2 if(enter_bit) {
122 3 enter_bit=0;
123 3 tui_speed_set[0]=b[0];
124 3 set_speed=7;}
125 2 }
126 1 else {display_r_byte(2,16,&(number_code[tui_speed_set[0]*16]));
127 2 b[0]=tui_speed_set[0];}
128 1 if(set_speed==8) {
129 2 flash_r_byte(2,24,&(number_code[b[1]*16]));
130 2 if(up_bit&&(b[1]<9)) {
131 3 up_bit=0;
132 3 b[1]=b[1]+1;}
133 2 if(down_bit&&(b[1]>0)) {
134 3 down_bit=0;
135 3 b[1]=b[1]-1;}
136 2 if(enter_bit) {
137 3 enter_bit=0;
138 3 tui_speed_set[1]=b[1];
139 3 set_speed=9;}
140 2 }
141 1 else {display_r_byte(2,24,&(number_code[tui_speed_set[1]*16]));
142 2 b[1]=tui_speed_set[1]; }
143 1 if(set_speed==9) {
144 2 flash_r_byte(2,32,&(number_code[b[2]*16]));
145 2 if(up_bit&&(b[2]<9)) {
146 3 up_bit=0;
147 3 b[2]=b[2]+1;}
148 2 if(down_bit&&(b[2]>0)) {
149 3 down_bit=0;
150 3 b[2]=b[2]-1;}
151 2 if(enter_bit) {
152 3 enter_bit=0;
153 3 tui_speed_set[2]=b[2];
154 3 set_speed=10;}
155 2 }
156 1 else {display_r_byte(2,32,&(number_code[tui_speed_set[2]*16]));
157 2 b[2]=tui_speed_set[2];}
158 1 if(set_speed==10) {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -