📄 24lc04p6.lst
字号:
HI-TECH Software PICC Macro Assembler V8.05PL1
Serial number: HCPIC-40231 Sun Nov 25 20:03:36 2007
Licensed to: ONE
1 processor 16F877A
2 opt pw 79
3 psect __Z40231RS_,global,delta=1
4 psect rdata_0,global,class=BANK0,space=1,delta
+ =1
5 psect idata_0,global,class=CODE,delta=2
6 psect text0,local,class=CODE,delta=2
7 psect text5,local,class=CODE,delta=2
8 psect text7,local,class=CODE,delta=2
9 psect text8,local,class=CODE,delta=2
10 psect rbit_0,global,bit,class=BANK0,space=1,de
+ lta=1
11 psect rbss_0,global,class=BANK0,space=1,delta=
+ 1
12 psect temp,global,ovrld,class=BANK0,space=1,de
+ lta=1
13 0000
14 0000
15 0000
16 0000
17 0000
18 0000
19 0000
20 0000
21 0000
22 0000
23
24 psect __Z40231RS_
25 0190
26 0190
27
28 psect rdata_0
29 0049 _err_count
30 0049 ds 1
31
32 psect idata_0
33 07FF 3432 retlw 50
34
35 psect text0
36 0488 _dlay
37 ;24LC04P6.C: 28: asm("nop");
38 0488 0000 nop ;#
39 ;24LC04P6.C: 29: asm("nop");
40 0489 0000 nop ;#
41 ;24LC04P6.C: 30: asm("nop");
42 048A 0000 nop ;#
43 ;24LC04P6.C: 31: asm("nop");
44 048B 0000 nop ;#
45 ;24LC04P6.C: 33: }
46 048C 0183 clrf 3 ;select bank 0
47 048D 0008 return
48 048E _tx
49 ; _k assigned to ?a_tx+0
50 0000 _tx$k set ?a_tx
51 ; _temp assigned to ?a_tx+1
52 0000 _tx$temp set ?a_tx+1
53 ;_k stored from w
54 048E 0183 clrf 3 ;select bank 0
55 048F 00C7 movwf ?a_tx
56 ;24LC04P6.C: 37: unsigned char temp=8;
57 0490 3008 movlw 8
58 0491 00C8 movwf ?a_tx+1
59 ;24LC04P6.C: 38: err_flag=1;
60 0492 14A0 bsf _err_flag/(0+8),_err_flag& (0+7)
61 ;24LC04P6.C: 39: while(temp--)
62 0493 2CA2 goto l3
63 0494 l4
64 ;24LC04P6.C: 40: {
65 0494 1683 bsf 3,5
66 0495 1186 bcf 6,3
67 ;24LC04P6.C: 44: TRISB2=0;
68 0496 1106 bcf 6,2
69 ;24LC04P6.C: 45: dlay( );
70 0497 2488 fcall _dlay
71 ;24LC04P6.C: 46: if((k&0b10000000))
72 0498 1FC7 btfss ?a_tx,7
73 0499 2C9C goto l6
74 ;24LC04P6.C: 47: {
75 049A 1506 bsf 6,2
76 ;24LC04P6.C: 50: }
77 049B 2C9D goto l7
78 049C l6
79 ;24LC04P6.C: 52: {
80 049C 1106 bcf 6,2
81 049D l7
82 ;24LC04P6.C: 55: }
83 ;24LC04P6.C: 56: RB3=1;
84 049D 1586 bsf 6,3
85 ;24LC04P6.C: 57: dlay();
86 049E 2488 fcall _dlay
87 ;24LC04P6.C: 58: RB3=0;
88 049F 1186 bcf 6,3
89 ;24LC04P6.C: 60: k<<=1;
90 04A0 1003 bcf 3,0
91 04A1 0DC7 rlf ?a_tx
92 04A2 l3
93 ;24LC04P6.C: 61: }
94 04A2 03C8 decf ?a_tx+1
95 04A3 0F48 incfsz ?a_tx+1,w
96 04A4 2C94 goto l4
97 ;24LC04P6.C: 64: TRISB2=1;
98 04A5 1683 bsf 3,5
99 04A6 1506 bsf 6,2
100 ;24LC04P6.C: 65: RB2=1;
101 04A7 1283 bcf 3,5
102 04A8 1506 bsf 6,2
103 ;24LC04P6.C: 66: dlay();
104 04A9 2488 fcall _dlay
105 ;24LC04P6.C: 67: RB3=1;
106 04AA 1586 bsf 6,3
107 ;24LC04P6.C: 68: dlay();
108 04AB 2488 fcall _dlay
109 ;24LC04P6.C: 71: if(RB2==0)
110 04AC 1D06 btfss 6,2
111 ;24LC04P6.C: 72: err_flag=0;
112 04AD 10A0 bcf _err_flag/(0+8),_err_flag& (0+7)
113 ;24LC04P6.C: 73: dlay();
114 04AE 2488 fcall _dlay
115 ;24LC04P6.C: 74: RB3=0;
116 04AF 1186 bcf 6,3
117 ;24LC04P6.C: 78: }
118 04B0 0008 return
119 ;24LC04P6.C: 80: void start(void)
120 ;24LC04P6.C: 81: {
121 04B1 _start
122 ;24LC04P6.C: 82: TRISB3=0;
123 04B1 1683 bsf 3,5
124 04B2 1303 bcf 3,6 ;carry unused
125 04B3 1186 bcf 6,3
126 ;24LC04P6.C: 83: TRISB2=0;
127 04B4 1106 bcf 6,2
128 ;24LC04P6.C: 84: RB2=1;
129 04B5 1283 bcf 3,5
130 04B6 1506 bsf 6,2
131 ;24LC04P6.C: 85: dlay();
132 04B7 2488 fcall _dlay
133 ;24LC04P6.C: 86: RB3=1;
134 04B8 1586 bsf 6,3
135 ;24LC04P6.C: 87: dlay();
136 04B9 2488 fcall _dlay
137 ;24LC04P6.C: 88: RB2=0;
138 04BA 1106 bcf 6,2
139 ;24LC04P6.C: 89: dlay();
140 04BB 2488 fcall _dlay
141 ;24LC04P6.C: 90: RB3=0;
142 04BC 1186 bcf 6,3
143 ;24LC04P6.C: 94: }
144 04BD 0008 return
145 ;24LC04P6.C: 96: void stop(void)
146 ;24LC04P6.C: 97: {
147 04BE _stop
148 ;24LC04P6.C: 99: TRISB3=0;
149 04BE 1683 bsf 3,5
150 04BF 1303 bcf 3,6 ;carry unused
151 04C0 1186 bcf 6,3
152 ;24LC04P6.C: 100: TRISB2=0;
153 04C1 1106 bcf 6,2
154 ;24LC04P6.C: 101: RB2=0;
155 04C2 1283 bcf 3,5
156 04C3 1106 bcf 6,2
157 ;24LC04P6.C: 102: dlay();
158 04C4 2488 fcall _dlay
159 ;24LC04P6.C: 103: RB3=1;
160 04C5 1586 bsf 6,3
161 ;24LC04P6.C: 104: dlay();
162 04C6 2488 fcall _dlay
163 ;24LC04P6.C: 105: RB2=1;
164 04C7 1506 bsf 6,2
165 ;24LC04P6.C: 106: dlay();
166 04C8 2C88 ljmp _dlay
167 ;24LC04P6.C: 110: }
168 04C9 0008 return
169 ;24LC04P6.C: 112: unsigned char rx(void)
170 ;24LC04P6.C: 113: {
171 04CA _rx
172 ; _buf assigned to ?a_rx+0
173 0000 _rx$buf set ?a_rx
174 ; _temp assigned to ?a_rx+1
175 0000 _rx$temp set ?a_rx+1
176 ;24LC04P6.C: 114: unsigned char temp=8,buf;
177 04CA 3008 movlw 8
178 04CB 0183 clrf 3 ;select bank 0
179 04CC 00C8 movwf ?a_rx+1
180 ;24LC04P6.C: 115: TRISB2=1;
181 04CD 1683 bsf 3,5
182 04CE 1506 bsf 6,2
183 ;24LC04P6.C: 116: TRISB3=0;
184 04CF 1186 bcf 6,3
185 ;24LC04P6.C: 117: RB2=1;
186 04D0 1283 bcf 3,5
187 04D1 1506 bsf 6,2
188 ;24LC04P6.C: 119: asm("nop");
189 04D2 0000 nop ;#
190 ;24LC04P6.C: 120: while(temp--)
191 04D3 2CDE goto l12
192 04D4 l13
193 ;24LC04P6.C: 121: {
194 04D4 1586 bsf 6,3
195 ;24LC04P6.C: 123: dlay();
196 04D5 2488 fcall _dlay
197 ;24LC04P6.C: 126: buf=(buf<<1)|RB2;
198 04D6 1003 bcf 3,0
199 04D7 1906 btfsc 6,2
200 04D8 1403 bsf 3,0
201 04D9 0DC7 rlf ?a_rx
202 ;24LC04P6.C: 128: RB3=0;
203 04DA 1186 bcf 6,3
204 ;24LC04P6.C: 130: asm("nop");
205 04DB 0000 nop ;#
206 ;24LC04P6.C: 131: asm("nop");
207 04DC 0000 nop ;#
208 ;24LC04P6.C: 132: asm("nop");
209 04DD 0000 nop ;#
210 04DE l12
211 ;24LC04P6.C: 134: }
212 04DE 03C8 decf ?a_rx+1
213 04DF 0F48 incfsz ?a_rx+1,w
214 04E0 2CD4 goto l13
215 ;24LC04P6.C: 135: return(buf);
216 04E1 0847 movf ?a_rx,w
217 ;24LC04P6.C: 136: }
218 04E2 0008 return
219 04E3 _iic_read
220 ; _i assigned to ?a_iic_read+0
221 0000 _iic_read$i set ?a_iic_read
222 ; _Start_Address assigned to ?a_iic_read+2
223 0000 _iic_read$Start_Address set ?a_iic_read+2
224 ; _Start_Bank assigned to ?a_iic_read+4
225 0000 _iic_read$Start_Bank set ?a_iic_read+4
226 ;24LC04P6.C: 192: int i;
227 04E3 0183 clrf 3 ;select bank 0
228 04E4 0840 movf ?_iic_read+1,w
229 04E5 3A80 xorlw 128
230 04E6 00F0 movwf btemp
231 04E7 3081 movlw 129
232 04E8 0270 subwf btemp,w
233 04E9 3000 movlw 0
234 ;set bank bits for (((?_iic_read+0)))
235 04EA 1903 btfsc 3,2
236 04EB 023F subwf ?_iic_read,w
237 04EC 1C03 btfss 3,0
238 04ED 2D0B goto l19
239 ;24LC04P6.C: 196: {
240 04EE 30FF movlw 255
241 04EF 053F andwf ?_iic_read,w
242 04F0 00C3 movwf ?a_iic_read+2
243 04F1 01C4 clrf ?a_iic_read+3
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -