📄 stepmotor_pic.lst
字号:
HI-TECH Software PICC Macro Assembler V8.05PL1
Serial number: HCPIC-81939 Thu Jan 11 20:56:21 2007
Licensed to: ONE
1 processor 16F877A
2 opt pw 79
3 psect __Z81939RS_,global,delta=1
4 psect strings,global,class=STRING,delta=2
5 psect const1,local,class=CONST,delta=2
6 psect const2,local,class=CONST,delta=2
7 psect text0,local,class=CODE,delta=2
8 psect config,global,class=CONFIG,delta=2
9 psect text1,local,class=CODE,delta=2
10 psect text3,local,class=CODE,delta=2
11 psect temp,global,ovrld,class=BANK0,space=1,de
+ lta=1
12 0000
13 0000
14 0000
15 0000
16 0000
17 0000
18 0000
19 0000
20 0000
21 0000
22
23 psect __Z81939RS_
24 0190
25 0190
26
27 psect const1
28 0013 0782 addwf 2
29 0014 _step
30 0014 3401 retlw 1
31 0015 3402 retlw 2
32 0016 3404 retlw 4
33 0017 3408 retlw 8
34 0018 3400 retlw 0
35 0019 3400 retlw 0
36
37 psect const2
38 0008 0782 addwf 2
39 0009 _steps
40 0009 3401 retlw 1
41 000A 3403 retlw 3
42 000B 3402 retlw 2
43 000C 3406 retlw 6
44 000D 3404 retlw 4
45 000E 340C retlw 12
46 000F 3408 retlw 8
47 0010 3409 retlw 9
48 0011 3400 retlw 0
49 0012 3400 retlw 0 ;#
50
51 psect text0
52 07AA _delay
53 07AA l2
54 07AA 0183 clrf 3 ;select bank 0
55 07AB 0820 movf ?_delay,w
56 07AC 1903 btfsc 3,2
57 07AD 03A1 decf ?_delay+1
58 07AE 03A0 decf ?_delay
59 07AF 0A20 incf ?_delay,w
60 07B0 1903 btfsc 3,2
61 07B1 0A21 incf ?_delay+1,w
62 07B2 1903 btfsc 3,2
63 07B3 0008 return
64 07B4 2FAA goto l2
65
66 psect config
67 2007 3F7A dw 16250 ;#
68 0000 _delay$us set ?_delay
69
70 psect text1
71 ;stepmotor_pic.C: 22: void delay5ms()
72 ;stepmotor_pic.C: 23: {
73 07B5 _delay5ms
74 ; _i assigned to ?a_delay5ms+0
75 0000 _delay5ms$i set ?a_delay5ms
76 ;stepmotor_pic.C: 24: int i;
77 07B5 0183 clrf 3 ;select bank 0
78 07B6 01A2 clrf ?a_delay5ms
79 07B7 01A3 clrf ?a_delay5ms+1
80 07B8 l6
81 ;stepmotor_pic.C: 26: ;
82 07B8 0AA2 incf ?a_delay5ms
83 07B9 1903 btfsc 3,2
84 07BA 0AA3 incf ?a_delay5ms+1
85 07BB 0823 movf ?a_delay5ms+1,w
86 07BC 3A80 xorlw 128
87 07BD 00F0 movwf btemp
88 07BE 3080 movlw 128
89 07BF 0270 subwf btemp,w
90 07C0 30C8 movlw 200
91 ;set bank bits for (((?a_delay5ms+0)))
92 07C1 1903 btfsc 3,2
93 07C2 0222 subwf ?a_delay5ms,w
94 07C3 1803 btfsc 3,0
95 07C4 0008 return
96 07C5 2FB8 goto l6
97 ;stepmotor_pic.C: 31: main()
98 ;stepmotor_pic.C: 32: {
99 07C6 _main
100 ; _j assigned to ?a_main+0
101 0000 _main$j set ?a_main
102 ; _i assigned to ?a_main+1
103 0000 _main$i set ?a_main+1
104 ;stepmotor_pic.C: 34: unsigned char i,j,dat;;
105 07C6 1683 bsf 3,5
106 07C7 1303 bcf 3,6 ;carry unused
107 07C8 0188 clrf 8 ;volatile
108 ;stepmotor_pic.C: 37: PORTD=00;
109 07C9 1283 bcf 3,5
110 07CA 0188 clrf 8 ;volatile
111 ;stepmotor_pic.C: 39: for(j=0;j<255;j++)
112 07CB 01A0 clrf ?a_main
113 07CC l10
114 ;stepmotor_pic.C: 40: {
115 ;stepmotor_pic.C: 41: for(i=0;i<8;i++)
116 07CC 01A1 clrf ?a_main+1
117 07CD l13
118 ;stepmotor_pic.C: 42: {
119 ;stepmotor_pic.C: 43: PORTD=steps[i] ;
120 07CD 3000 movlw _steps shr (0+8)
121 07CE 008A movwf 10
122 07CF 0821 movf ?a_main+1,w
123 07D0 2008 call ((_steps+-1)& (0+2047))| (($)& (0+-2048))
124 07D1 0088 movwf 8 ;volatile
125 ;stepmotor_pic.C: 44: delay5ms();
126 07D2 120A 118A 27B5 fcall _delay5ms
127 ;stepmotor_pic.C: 45: delay5ms();
128 07D5 27B5 fcall _delay5ms
129 ;stepmotor_pic.C: 47: }
130 07D6 0AA1 incf ?a_main+1
131 07D7 3008 movlw 8
132 07D8 0221 subwf ?a_main+1,w
133 07D9 1C03 btfss 3,0
134 07DA 2FCD goto l13
135 ;stepmotor_pic.C: 48: }
136 07DB 0AA0 incf ?a_main
137 07DC 0F20 incfsz ?a_main,w
138 07DD 2FCC goto l10
139 ;stepmotor_pic.C: 49: for(j=0;j<255;j++)
140 07DE 01A0 clrf ?a_main
141 07DF l16
142 ;stepmotor_pic.C: 50: {
143 ;stepmotor_pic.C: 51: for(i=0;i<8;i++)
144 07DF 01A1 clrf ?a_main+1
145 07E0 l19
146 ;stepmotor_pic.C: 52: {
147 ;stepmotor_pic.C: 53: PORTD=steps[i] ;
148 07E0 3000 movlw _steps shr (0+8)
149 07E1 008A movwf 10
150 07E2 0821 movf ?a_main+1,w
151 07E3 2008 call ((_steps+-1)& (0+2047))| (($)& (0+-2048))
152 07E4 0088 movwf 8 ;volatile
153 ;stepmotor_pic.C: 54: delay5ms();
154 07E5 120A 118A 27B5 fcall _delay5ms
155 ;stepmotor_pic.C: 55: delay5ms();
156 07E8 27B5 fcall _delay5ms
157 ;stepmotor_pic.C: 57: }
158 07E9 0AA1 incf ?a_main+1
159 07EA 3008 movlw 8
160 07EB 0221 subwf ?a_main+1,w
161 07EC 1C03 btfss 3,0
162 07ED 2FE0 goto l19
163 ;stepmotor_pic.C: 58: }
164 07EE 0AA0 incf ?a_main
165 07EF 0F20 incfsz ?a_main,w
166 07F0 2FDF goto l16
167 07F1 l23
168 ;stepmotor_pic.C: 62: while(1)
169 ;stepmotor_pic.C: 63: {
170 07F1 01A1 clrf ?a_main+1
171 07F2 l25
172 ;stepmotor_pic.C: 65: {
173 ;stepmotor_pic.C: 66: PORTD=steps[i] ;
174 07F2 3000 movlw _steps shr (0+8)
175 07F3 008A movwf 10
176 07F4 0821 movf ?a_main+1,w
177 07F5 2008 call ((_steps+-1)& (0+2047))| (($)& (0+-2048))
178 07F6 0088 movwf 8 ;volatile
179 ;stepmotor_pic.C: 67: delay5ms();
180 07F7 120A 118A 27B5 fcall _delay5ms
181 ;stepmotor_pic.C: 68: }
182 07FA 0AA1 incf ?a_main+1
183 07FB 3008 movlw 8
184 07FC 0221 subwf ?a_main+1,w
185 07FD 1803 btfsc 3,0
186 07FE 2FF1 goto l23
187 07FF 2FF2 goto l25
188
189 psect text3
190 0000
191 0000
192 0000
193 0000
194 0000
195 0000
196 0000
197 0000
198 0000
199 0000
200 0000
201 0000
202 0000
203 0000
204 0000
205 0000
206 0000
207 0000
208 0000
209 0000
210 0000
211 0000
212 0000
213 0000
214 0000
215 0000
216 0000
217 0000
218 0000
219 0000
220 0000
221 0000
222 0000
223 0000
224 0000
225 0000
226 0000
227 0000
228 0000
229 0000
230 0000
231 0000
232 0000
233 0000
234 0000
235 0000
236 0000
237 0000
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -