📄 out.lst
字号:
C51 COMPILER V6.23a OUT 09/29/2006 19:41:04 PAGE 1
C51 COMPILER V6.23a, COMPILATION OF MODULE OUT
OBJECT MODULE PLACED IN D:\作业\电机控制\DCELEC~1\DCELEC~1\OUT.OBJ
COMPILER INVOKED BY: c:\COMP51\C51.EXE D:\作业\电机控制\DCELEC~1\DCELEC~1\OUT.C DB SB OE
stmt level source
1 #include <reg51.h>
2 #include <absacc.h>
3 #define uint unsigned int
4 #define uchar unsigned char
5 #define PORT XBYTE[0xffc0]
6 void delay(uint x);
7 sbit temp=P1^7;
8 sbit wxy1=P1^0;
9 sbit wxy2=P1^1;
10 sbit wxy3=P1^2;
11 sbit wxy4=P1^3;
12 sbit wxy5=P1^4;
13 void out(uchar speed,uchar direction,uchar backup){
14 1 uchar up=1;
15 1 uchar low=0;
16 1 if(backup=='y')
17 1 {
18 2 wxy5=low;
19 2 if(direction=='l')
20 2 {
21 3 wxy1=low;
22 3 wxy2=low;
23 3 wxy3=low;
24 3 wxy4=up;
25 3 if(speed=='f'){
26 4 temp=low;
27 4 PORT=low;
28 4 delay(8);
29 4 temp=low;
30 4 delay(8);
31 4 }
32 3 if(speed=='a'){
33 4 temp=up;
34 4 PORT=up;
35 4 delay(8);
36 4 temp=low;
37 4 delay(8);
38 4 }
39 3
40 3 else if(speed=='b'){
41 4 temp=up;
42 4 PORT=up;
43 4 delay(8);
44 4 temp=low;
45 4 delay(16);
46 4 }
47 3
48 3 else if(speed=='c'){
49 4 temp=up;
50 4 PORT=up;
51 4 delay(8);
52 4 temp=low;
53 4 delay(24);
54 4 }
55 3
C51 COMPILER V6.23a OUT 09/29/2006 19:41:04 PAGE 2
56 3 else if(speed=='d'){
57 4 temp=up;
58 4 PORT=up;
59 4 delay(8);
60 4 temp=low;
61 4 delay(32);
62 4 }
63 3 else if(speed=='e'){
64 4 temp=up;
65 4 PORT=up;
66 4 delay(8);
67 4 temp=low;
68 4 delay(40);
69 4
70 4 }
71 3 }
72 2 if(direction=='r')
73 2 {
74 3 wxy1=up;
75 3 wxy2=low;
76 3 wxy3=up;
77 3 wxy4=low;
78 3 if(speed=='f'){
79 4 temp=low;
80 4 PORT=low;
81 4 delay(8);
82 4 temp=low;
83 4 delay(8);
84 4 }
85 3 if(speed=='a'){
86 4 temp=up;
87 4 PORT=up;
88 4 delay(8);
89 4 temp=low;
90 4 delay(8);
91 4 }
92 3
93 3 else if(speed=='b'){
94 4 temp=up;
95 4 PORT=up;
96 4 delay(8);
97 4 temp=low;
98 4 delay(16);
99 4 }
100 3
101 3 else if(speed=='c'){
102 4 temp=up;
103 4 PORT=up;
104 4 delay(8);
105 4 temp=low;
106 4 delay(24);
107 4 }
108 3
109 3 else if(speed=='d'){
110 4 temp=up;
111 4 PORT=up;
112 4 delay(8);
113 4 temp=low;
114 4 delay(32);
115 4 }
116 3 else if(speed=='e'){
117 4 temp=up;
C51 COMPILER V6.23a OUT 09/29/2006 19:41:04 PAGE 3
118 4 PORT=up;
119 4 delay(8);
120 4 temp=low;
121 4 delay(40);
122 4
123 4 }
124 3 }
125 2 if(direction=='s')
126 2 {
127 3 wxy1=low;
128 3 wxy2=up;
129 3 wxy3=low;
130 3 wxy4=low;
131 3 if(speed=='f'){
132 4 temp=low;
133 4 PORT=low;
134 4 delay(8);
135 4 temp=low;
136 4 delay(8);
137 4 }
138 3 if(speed=='a'){
139 4 temp=up;
140 4 PORT=up;
141 4 delay(8);
142 4 temp=low;
143 4 delay(8);
144 4 }
145 3
146 3 else if(speed=='b'){
147 4 temp=up;
148 4 PORT=up;
149 4 delay(8);
150 4 temp=low;
151 4 delay(16);
152 4 }
153 3
154 3 else if(speed=='c'){
155 4 temp=up;
156 4 PORT=up;
157 4 delay(8);
158 4 temp=low;
159 4 delay(24);
160 4 }
161 3
162 3 else if(speed=='d'){
163 4 temp=up;
164 4 PORT=up;
165 4 delay(8);
166 4 temp=low;
167 4 delay(32);
168 4 }
169 3 else if(speed=='e'){
170 4 temp=up;
171 4 PORT=up;
172 4 delay(8);
173 4 temp=low;
174 4 delay(40);
175 4
176 4 }
177 3 }
178 2 }
179 1 //////////////////////////////////////////////////////////////
C51 COMPILER V6.23a OUT 09/29/2006 19:41:04 PAGE 4
180 1 if(backup=='z')
181 1 {
182 2 wxy5=up;
183 2 if(direction=='l')
184 2 {
185 3 wxy1=low;
186 3 wxy2=low;
187 3 wxy3=low;
188 3 wxy4=up;
189 3 if(speed=='f'){
190 4 temp=low;
191 4 PORT=low;
192 4 delay(8);
193 4 temp=low;
194 4 delay(8);
195 4 }
196 3 if(speed=='a'){
197 4 temp=up;
198 4 PORT=up;
199 4 delay(8);
200 4 temp=low;
201 4 delay(8);
202 4 }
203 3
204 3 else if(speed=='b'){
205 4 temp=up;
206 4 PORT=up;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -