📄 main.lst
字号:
HI-TECH Software PICC Macro Assembler V9.50PL2
Thu May 22 12:09:24 2008
1 processor 16F886
2 opt pw 79
3 psect text3,local,class=CODE,delta=2
4 psect text9,local,class=CODE,delta=2
5 psect temp,global,ovrld,class=BANK0,space=1,de
+ lta=1
6 0000
7 0000
8 0000
9 0000
10 0000
11 0000
12 0000
13 0000
14 0000
15 0000
16
17 psect text3
18 0673 _i2c_stop
19 ;main.c: 48: void i2c_stop()
20 0673 0183 clrf 3 ;select bank 0
21 0674 1186 bcf 6,3
22 ;main.c: 51: asm("nop");
23 0675 0000 nop ;#
24 ;main.c: 52: RB4=1;
25 0676 1606 bsf 6,4
26 ;main.c: 53: asm("nop");
27 0677 0000 nop ;#
28 ;main.c: 54: RB3=1;
29 0678 1586 bsf 6,3
30 ;main.c: 55: asm("nop");
31 0679 0000 nop ;#
32 ;main.c: 56: asm("nop");
33 067A 0000 nop ;#
34 ;main.c: 57: asm("nop");
35 067B 0000 nop ;#
36 ;main.c: 58: asm("nop");
37 067C 0000 nop ;#
38 ;main.c: 59: asm("nop");
39 067D 0000 nop ;#
40 ;main.c: 60: }
41 067E 0008 return ;W free
42 067F _i2c_putack
43 ; _ack assigned to ?a_i2c_putack+0
44 0000 _i2c_putack$ack set ?a_i2c_putack
45 ;_ack stored from w
46 067F 0183 clrf 3 ;select bank 0
47 0680 00A2 movwf ?a_i2c_putack
48 ;main.c: 123: void i2c_putack(unsigned char ack
+ )
49 0681 1683 bsf 3,5
50 0682 1186 bcf 6,3
51 ;main.c: 126: RB3=ack;
52 0683 1283 bcf 3,5
53 0684 0C22 rrf ?a_i2c_putack,w
54 0685 1C03 btfss 3,0
55 0686 2E89 goto u90
56 0687 1586 bsf 6,3
57 0688 2E8A goto u104
58 0689 u90
59 0689 1186 bcf 6,3
60 068A u104
61 ;main.c: 127: asm("nop");
62 068A 0000 nop ;#
63 ;main.c: 128: RB4=1;
64 068B 1606 bsf 6,4
65 ;main.c: 129: asm("nop");
66 068C 0000 nop ;#
67 ;main.c: 130: RB4=0;
68 068D 1206 bcf 6,4
69 ;main.c: 131: asm("nop");
70 068E 0000 nop ;#
71 ;main.c: 132: }
72 068F 0008 return ;W free
73 0690 _i2c_read_byte
74 ; _i assigned to ?a_i2c_read_byte+0
75 0000 _i2c_read_byte$i set ?a_i2c_read_byte
76 ; _tep assigned to ?a_i2c_read_byte+1
77 0000 _i2c_read_byte$tep set ?a_i2c_read_byte+1
78 ;main.c: 86: unsigned char i2c_read_byte()
79 0690 0183 clrf 3 ;select bank 0
80 0691 01A3 clrf ?a_i2c_read_byte+1
81 ;main.c: 89: unsigned char i;
82 0692 1683 bsf 3,5
83 0693 1586 bsf 6,3
84 ;main.c: 91: for(i=0;i<8;i++)
85 0694 1283 bcf 3,5
86 0695 01A2 clrf ?a_i2c_read_byte
87 0696 l18
88 ;main.c: 92: {
89 0696 1606 bsf 6,4
90 ;main.c: 94: asm("nop");
91 0697 0000 nop ;#
92 ;main.c: 95: tep=tep<<1;
93 0698 1003 bcf 3,0
94 0699 0DA3 rlf ?a_i2c_read_byte+1
95 ;main.c: 96: if(RB3==1)
96 069A 1986 btfsc 6,3
97 ;main.c: 97: {
98 069B 1423 bsf ?a_i2c_read_byte+1,0
99 ;main.c: 99: }
100 069C 0000 nop ;#
101 ;main.c: 101: RB4=0;
102 069D 1206 bcf 6,4
103 ;main.c: 102: asm("nop");
104 069E 0000 nop ;#
105 069F 0AA2 incf ?a_i2c_read_byte
106 06A0 3008 movlw 8
107 06A1 0222 subwf ?a_i2c_read_byte,w
108 06A2 1C03 btfss 3,0
109 06A3 2E96 goto l18
110 ;main.c: 103: }
111 06A4 1683 bsf 3,5
112 06A5 1186 bcf 6,3
113 ;main.c: 105: return tep;
114 06A6 1283 bcf 3,5
115 06A7 0823 movf ?a_i2c_read_byte+1,w
116 ;main.c: 106: }
117 06A8 0008 return ;uses W
118 06A9 _i2c_write_byte
119 ; _byte assigned to ?a_i2c_write_byte+0
120 0000 _i2c_write_byte$byte set ?a_i2c_write_byte
121 ; _i assigned to ?a_i2c_write_byte+1
122 0000 _i2c_write_byte$i set ?a_i2c_write_byte+1
123 ;_byte stored from w
124 06A9 0183 clrf 3 ;select bank 0
125 06AA 00A2 movwf ?a_i2c_write_byte
126 ;main.c: 62: void i2c_write_byte(unsigned char
+ byte)
127 06AB 1206 bcf 6,4
128 ;main.c: 66: asm("nop");
129 06AC 0000 nop ;#
130 ;main.c: 67: for(i=0;i<8;i++)
131 06AD 01A3 clrf ?a_i2c_write_byte+1
132 06AE l12
133 ;main.c: 68: {
134 06AE 0A23 incf ?a_i2c_write_byte+1,w
135 06AF 00F0 movwf btemp
136 06B0 2EB3 goto u40
137 06B1 u45
138 06B1 1003 bcf 3,0
139 06B2 0DA2 rlf ?a_i2c_write_byte
140 06B3 u40
141 06B3 0BF0 decfsz btemp
142 06B4 2EB1 goto u45
143 ;main.c: 70: if(byte&0x80)
144 06B5 1283 bcf 3,5
145 06B6 1303 bcf 3,6 ;carry unused
146 06B7 1FA2 btfss ?a_i2c_write_byte,7
147 06B8 2EBB goto l15
148 ;main.c: 71: {
149 06B9 1586 bsf 6,3
150 ;main.c: 73: }
151 06BA 2EBC goto l16
152 06BB l15
153 ;main.c: 74: else
154 06BB 1186 bcf 6,3
155 06BC l16
156 ;main.c: 77: }
157 06BC 0000 nop ;#
158 ;main.c: 79: RB4=1;
159 06BD 1606 bsf 6,4
160 ;main.c: 80: asm("nop");
161 06BE 0000 nop ;#
162 ;main.c: 81: RB4=0;
163 06BF 1206 bcf 6,4
164 06C0 0AA3 incf ?a_i2c_write_byte+1
165 06C1 3008 movlw 8
166 06C2 0223 subwf ?a_i2c_write_byte+1,w
167 06C3 1C03 btfss 3,0
168 06C4 2EAE goto l12
169 ;main.c: 82: }
170 06C5 0000 nop ;#
171 ;main.c: 84: }
172 06C6 0008 return ;W free
173 06C7 _i2c_start
174 ;main.c: 36: void i2c_start()
175 06C7 0183 clrf 3 ;select bank 0
176 06C8 1586 bsf 6,3
177 ;main.c: 39: asm("nop");
178 06C9 0000 nop ;#
179 ;main.c: 40: RB4=1;
180 06CA 1606 bsf 6,4
181 ;main.c: 41: asm("nop");
182 06CB 0000 nop ;#
183 ;main.c: 42: RB3=0;
184 06CC 1186 bcf 6,3
185 ;main.c: 43: asm("nop");
186 06CD 0000 nop ;#
187 ;main.c: 44: RB4=0;
188 06CE 1206 bcf 6,4
189 ;main.c: 45: asm("nop");
190 06CF 0000 nop ;#
191 ;main.c: 46: }
192 06D0 0008 return ;W free
193 06D1 _delay
194 ; _i assigned to ?a_delay+0
195 0000 _delay$i set ?a_delay
196 ; _j assigned to ?a_delay+1
197 0000 _delay$j set ?a_delay+1
198 ;_i stored from w
199 06D1 0183 clrf 3 ;select bank 0
200 06D2 00A3 movwf ?a_delay
201 ;main.c: 14: void delay(unsigned char i)
202 06D3 08A3 movf ?a_delay
203 06D4 1903 btfsc 3,2
204 06D5 0008 return
205 06D6 l2
206 ;main.c: 18: for(j=5;j>0;j--);
207 06D6 3005 movlw 5
208 06D7 00A4 movwf ?a_delay+1
209 06D8 l5
210 06D8 0BA4 decfsz ?a_delay+1
211 06D9 2ED8 goto l5
212 06DA 0BA3 decfsz ?a_delay
213 06DB 2ED6 goto l2
214 06DC 0008 return
215 06DD _i2c_getack
216 ; _ack assigned to ?a_i2c_getack+0
217 0000 _i2c_getack$ack set ?a_i2c_getack
218 ;main.c: 108: unsigned char i2c_getack()
219 06DD 1683 bsf 3,5
220 06DE 1303 bcf 3,6 ;carry unused
221 06DF 1586 bsf 6,3
222 ;main.c: 112: asm("nop");
223 06E0 0000 nop ;#
224 ;main.c: 113: RB4=1;
225 06E1 1283 bcf 3,5
226 06E2 1606 bsf 6,4
227 ;main.c: 114: delay(1);
228 06E3 3001 movlw 1
229 06E4 26D1 fcall _delay
230 ;main.c: 115: ack=RB3;
231 06E5 3000 movlw 0
232 06E6 1986 btfsc 6,3
233 06E7 3001 movlw 1
234 06E8 00A2 movwf ?a_i2c_getack
235 ;main.c: 116: asm("nop");
236 06E9 0000 nop ;#
237 ;main.c: 117: RB4=0;
238 06EA 1206 bcf 6,4
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -