📄 1302.lst
字号:
HI-TECH Software PICC Macro Assembler V9.60PL1
Sun Feb 08 16:31:10 2009
1 processor 16F877A
2 opt pw 79
3 psect text0,local,class=CODE,delta=2
4 psect text1,local,class=CODE,delta=2
5 psect text2,local,class=CODE,delta=2
6 psect text3,local,class=CODE,delta=2
7 0000
8 0000
9 0000
10 0000
11 0000
12 0000
13 0000
14 0000
15 0000
16 0000
17
18 psect text0
19 0139 _init_1302
20 ;1302.c: 5: void init_1302(void)
21 0139 1683 bsf 3,5
22 013A 1303 bcf 3,6 ;carry unused
23 013B 1187 bcf 7,3 ;volatile
24 ;1302.c: 8: TRISA &=0xDF;
25 013C 1285 bcf 5,5 ;volatile
26 ;1302.c: 9: RA5=0;
27 013D 1283 bcf 3,5
28 013E 1285 bcf 5,5
29 ;1302.c: 10: RC3=0;
30 013F 1187 bcf 7,3
31 ;1302.c: 11: RC5=1;
32 0140 1687 bsf 7,5
33 ;1302.c: 12: TRISC |=0x20;
34 0141 1683 bsf 3,5
35 0142 1687 bsf 7,5 ;volatile
36 ;1302.c: 13: }
37 0143 1283 bcf 3,5
38 0144 0008 return ;W free
39
40 psect text1
41 00B2 _Read_DS1302
42 ; _Address assigned to ?a_Read_DS1302+0
43 0000 _Read_DS1302$Address set ?a_Read_DS1302
44 ; _i assigned to ?a_Read_DS1302+1
45 0000 _Read_DS1302$i set ?a_Read_DS1302+1
46 ; _temp assigned to ?a_Read_DS1302+2
47 0000 _Read_DS1302$temp set ?a_Read_DS1302+2
48 ;_Address stored from w
49 00B2 0183 clrf 3 ;select bank 0
50 00B3 00B3 movwf ?a_Read_DS1302
51 ;1302.c: 16: unsigned char Read_DS1302(unsigned
+ char Address)
52 00B4 1285 bcf 5,5
53 ;1302.c: 21: RC3=0;
54 00B5 1187 bcf 7,3
55 ;1302.c: 22: TRISC &=0xDF;
56 00B6 1683 bsf 3,5
57 00B7 1287 bcf 7,5 ;volatile
58 ;1302.c: 23: asm("nop");
59 00B8 0000 nop ;#
60 ;1302.c: 24: asm("nop");
61 00B9 0000 nop ;#
62 ;1302.c: 25: RA5=1;
63 00BA 1283 bcf 3,5
64 00BB 1685 bsf 5,5
65 ;1302.c: 26: asm("nop");
66 00BC 0000 nop ;#
67 ;1302.c: 27: asm("nop");
68 00BD 0000 nop ;#
69 ;1302.c: 28: for(i=8;i>0;i--)
70 00BE 3008 movlw 8
71 00BF 00B4 movwf ?a_Read_DS1302+1
72 00C0 l3
73 ;1302.c: 29: {
74 00C0 1C33 btfss ?a_Read_DS1302,0
75 00C1 28C4 goto l6
76 00C2 1687 bsf 7,5
77 00C3 28C5 goto l7
78 00C4 l6
79 ;1302.c: 32: else RC5=0;
80 00C4 1287 bcf 7,5
81 00C5 l7
82 ;1302.c: 33: asm("nop");
83 00C5 0000 nop ;#
84 ;1302.c: 34: asm("nop");
85 00C6 0000 nop ;#
86 ;1302.c: 35: RC3=1;
87 00C7 1587 bsf 7,3
88 ;1302.c: 36: asm("nop");
89 00C8 0000 nop ;#
90 ;1302.c: 37: asm("nop");
91 00C9 0000 nop ;#
92 ;1302.c: 38: RC3=0;
93 00CA 1187 bcf 7,3
94 ;1302.c: 39: asm("nop");
95 00CB 0000 nop ;#
96 ;1302.c: 40: asm("nop");
97 00CC 0000 nop ;#
98 ;1302.c: 41: Address>>=1;
99 00CD 1003 bcf 3,0
100 00CE 0CB3 rrf ?a_Read_DS1302
101 00CF 0BB4 decfsz ?a_Read_DS1302+1
102 00D0 28C0 goto l3
103 ;1302.c: 42: }
104 00D1 1687 bsf 7,5
105 ;1302.c: 44: asm("nop");
106 00D2 0000 nop ;#
107 ;1302.c: 45: asm("nop");
108 00D3 0000 nop ;#
109 ;1302.c: 46: TRISC |=0x20;
110 00D4 1683 bsf 3,5
111 00D5 1687 bsf 7,5 ;volatile
112 ;1302.c: 47: asm("nop");
113 00D6 0000 nop ;#
114 ;1302.c: 48: asm("nop");
115 00D7 0000 nop ;#
116 ;1302.c: 49: temp=0;
117 00D8 1283 bcf 3,5
118 00D9 01B5 clrf ?a_Read_DS1302+2
119 00DA 01B6 clrf ?a_Read_DS1302+3
120 ;1302.c: 50: if(PORTC & 0x20)temp|=0x8000;
121 00DB 1E87 btfss 7,5 ;volatile
122 00DC 28DF goto l8
123 00DD 3080 movlw 128
124 00DE 04B6 iorwf ?a_Read_DS1302+3
125 00DF l8
126 ;1302.c: 51: temp>>=1;
127 00DF 1003 bcf 3,0
128 00E0 0CB6 rrf ?a_Read_DS1302+3
129 00E1 0CB5 rrf ?a_Read_DS1302+2
130 ;1302.c: 52: for(i=7;i>0;i--)
131 00E2 3007 movlw 7
132 00E3 00B4 movwf ?a_Read_DS1302+1
133 00E4 l9
134 ;1302.c: 53: {
135 00E4 0000 nop ;#
136 ;1302.c: 55: asm("nop");
137 00E5 0000 nop ;#
138 ;1302.c: 56: RC3=1;
139 00E6 1587 bsf 7,3
140 ;1302.c: 57: asm("nop");
141 00E7 0000 nop ;#
142 ;1302.c: 58: asm("nop");
143 00E8 0000 nop ;#
144 ;1302.c: 59: RC3=0;
145 00E9 1187 bcf 7,3
146 ;1302.c: 60: asm("nop");
147 00EA 0000 nop ;#
148 ;1302.c: 61: asm("nop");
149 00EB 0000 nop ;#
150 ;1302.c: 62: if(PORTC & 0x20)temp|=0x8000;
151 00EC 1E87 btfss 7,5 ;volatile
152 00ED 28F0 goto l12
153 00EE 3080 movlw 128
154 00EF 04B6 iorwf ?a_Read_DS1302+3
155 00F0 l12
156 ;1302.c: 63: temp>>=1;
157 00F0 1003 bcf 3,0
158 00F1 0CB6 rrf ?a_Read_DS1302+3
159 00F2 0CB5 rrf ?a_Read_DS1302+2
160 00F3 0BB4 decfsz ?a_Read_DS1302+1
161 00F4 28E4 goto l9
162 ;1302.c: 64: }
163 00F5 1285 bcf 5,5
164 ;1302.c: 66: temp<<=1;
165 00F6 1003 bcf 3,0
166 00F7 0DB5 rlf ?a_Read_DS1302+2
167 00F8 0DB6 rlf ?a_Read_DS1302+3
168 ;1302.c: 67: return(temp/256);
169 00F9 0836 movf ?a_Read_DS1302+3,w
170 ;1302.c: 68: }
171 00FA 0008 return ;uses W
172
173 psect text2
174 00FB _Write_DS1302
175 ; _Address assigned to ?a_Write_DS1302+0
176 0000 _Write_DS1302$Address set ?a_Write_DS1302
177 ; _i assigned to ?a_Write_DS1302+1
178 0000 _Write_DS1302$i set ?a_Write_DS1302+1
179 ;_Address stored from w
180 00FB 0183 clrf 3 ;select bank 0
181 00FC 00B4 movwf ?a_Write_DS1302
182 ;1302.c: 71: void Write_DS1302(unsigned char Ad
+ dress,unsigned char Data)
183 00FD 1285 bcf 5,5
184 ;1302.c: 75: RC3=0;
185 00FE 1187 bcf 7,3
186 ;1302.c: 76: RC5=0;
187 00FF 1287 bcf 7,5
188 ;1302.c: 77: asm("nop");
189 0100 0000 nop ;#
190 ;1302.c: 78: asm("nop");
191 0101 0000 nop ;#
192 ;1302.c: 79: RA5=1;
193 0102 1685 bsf 5,5
194 ;1302.c: 80: asm("nop");
195 0103 0000 nop ;#
196 ;1302.c: 81: asm("nop");
197 0104 0000 nop ;#
198 ;1302.c: 82: for(i=8;i>0;i--)
199 0105 3008 movlw 8
200 0106 00B5 movwf ?a_Write_DS1302+1
201 0107 l14
202 ;1302.c: 83: {
203 0107 1C34 btfss ?a_Write_DS1302,0
204 0108 290B goto l17
205 0109 1687 bsf 7,5
206 010A 290C goto l18
207 010B l17
208 ;1302.c: 86: else RC5=0;
209 010B 1287 bcf 7,5
210 010C l18
211 ;1302.c: 87: asm("nop");
212 010C 0000 nop ;#
213 ;1302.c: 88: asm("nop");
214 010D 0000 nop ;#
215 ;1302.c: 89: RC3=1;
216 010E 1587 bsf 7,3
217 ;1302.c: 90: asm("nop");
218 010F 0000 nop ;#
219 ;1302.c: 91: asm("nop");
220 0110 0000 nop ;#
221 ;1302.c: 92: RC3=0;
222 0111 1187 bcf 7,3
223 ;1302.c: 93: asm("nop");
224 0112 0000 nop ;#
225 ;1302.c: 94: asm("nop");
226 0113 0000 nop ;#
227 ;1302.c: 95: Address>>=1;
228 0114 1003 bcf 3,0
229 0115 0CB4 rrf ?a_Write_DS1302
230 0116 0BB5 decfsz ?a_Write_DS1302+1
231 0117 2907 goto l14
232 ;1302.c: 96: }
233 0118 3008 movlw 8
234 0119 00B5 movwf ?a_Write_DS1302+1
235 011A l19
236 ;1302.c: 98: {
237 011A 1C34 btfss ?a_Write_DS1302,0
238 011B 291E goto l22
239 011C 1687 bsf 7,5
240 011D 291F goto l23
241 011E l22
242 ;1302.c: 101: else RC5=0;
243 011E 1287 bcf 7,5
244 011F l23
245 ;1302.c: 102: asm("nop");
246 011F 0000 nop ;#
247 ;1302.c: 103: asm("nop");
248 0120 0000 nop ;#
249 ;1302.c: 104: RC3=1;
250 0121 1587 bsf 7,3
251 ;1302.c: 105: asm("nop");
252 0122 0000 nop ;#
253 ;1302.c: 106: asm("nop");
254 0123 0000 nop ;#
255 ;1302.c: 107: RC3=0;
256 0124 1187 bcf 7,3
257 ;1302.c: 108: asm("nop");
258 0125 0000 nop ;#
259 ;1302.c: 109: asm("nop");
260 0126 0000 nop ;#
261 ;1302.c: 110: Data>>=1;
262 0127 1003 bcf 3,0
263 0128 0CB3 rrf ?_Write_DS1302
264 0129 0BB5 decfsz ?a_Write_DS1302+1
265 012A 291A goto l19
266 ;1302.c: 111: }
267 012B 1285 bcf 5,5
268 ;1302.c: 113: }
269 012C 0008 return ;W free
270
271 psect text3
272 0000
273 0000
274 0000
275 0000
276 0000
277 0000
278 0000
279 0000
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -