📄 lib24c16.lst
字号:
004E 22 190 ret
191 ;------------------------------------------------------------
192 ;Allocation info for local variables in function 'read'
193 ;------------------------------------------------------------
194 ;readcmd Allocated to registers r2
195 ;RDCMD Allocated to registers
196 ;aux Allocated to registers r2
197 ;------------------------------------------------------------
198 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:145: char read (char readcmd)
199 ; -----------------------------------------
200 ; function read
201 ; -----------------------------------------
004F 202 _read:
203 ; genReceive
004F AA 82 204 mov r2,dpl
205 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:149: RDCMD = readcmd | 0x01; // set r/w bit
206 ; genOr
0051 74 01 207 mov a,#0x01
0053 4A 208 orl a,r2
0054 F5 82 209 mov dpl,a
210 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:150: outs (RDCMD); // send read command with start condition
211 ; genCall
0056 12s00r68 212 lcall _outs
213 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:151: aux = in(); // read current position
214 ; genCall
0059 12s00rEA 215 lcall _in
005C AA 82 216 mov r2,dpl
217 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:152: stop (); // send stop condition
218 ; genCall
005E C0 02 219 push ar2
0060 12s01r19 220 lcall _stop
0063 D0 02 221 pop ar2
222 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:153: return (aux); // return current position data
223 ; genRet
0065 8A 82 224 mov dpl,r2
0067 225 00101$:
0067 22 226 ret
227 ;------------------------------------------------------------
228 ;Allocation info for local variables in function 'outs'
229 ;------------------------------------------------------------
230 ;------------------------------------------------------------
231 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:170: void outs (char datum)
232 ; -----------------------------------------
233 ; function outs
234 ; -----------------------------------------
0068 235 _outs:
236 ; genReceive
0068 AA 82 237 mov r2,dpl
238 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:174: SDA = 1; // set port pin SDA to insure data is HI
239 ; genAssign
006A D2*00 240 setb _SDA
241 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:175: SCK = 1; // set port pin SCK to insure clock is HI
242 ; genAssign
006C D2*00 243 setb _SCK
244 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:182: _endasm;
245 ; genInline
006E 00 246 nop
006F 00 247 nop
0070 00 248 nop
0071 00 249 nop
0072 00 250 nop
251 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:183: SDA = 0; // start condition, data = 0
252 ; genAssign
0073 C2*00 253 clr _SDA
254 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:190: _endasm;
255 ; genInline
0075 00 256 nop
0076 00 257 nop
0077 00 258 nop
0078 00 259 nop
0079 00 260 nop
261 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:191: SCK = 0; // clock = 0
262 ; genAssign
007A C2*00 263 clr _SCK
264 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:192: for (i = 0; i < 8; i++) // bit shifting cycle
265 ; genAssign
007C 7B 00 266 mov r3,#0x00
007E 267 00104$:
268 ; genCmpLt
269 ; genCmp
007E C3 270 clr c
007F EB 271 mov a,r3
0080 64 80 272 xrl a,#0x80
0082 94 88 273 subb a,#0x88
274 ; genIfxJump
275 ; Peephole 108 removed ljmp by inverse jump logic
0084 50 1D 276 jnc 00107$
0086 277 00113$:
278 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:194: aux = datum & 0x80; // check MSB bit
279 ; genAnd
0086 74 80 280 mov a,#0x80
0088 5A 281 anl a,r2
0089 FC 282 mov r4,a
283 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:195: if (aux == 0) // MSB = 0
284 ; genCmpEq
285 ; Peephole 132 changed ljmp to sjmp
286 ; Peephole 199 optimized misc jump sequence
008A BC 00 04 287 cjne r4,#0x00,00102$
288 ;00114$:
289 ; Peephole 200 removed redundant sjmp
008D 290 00115$:
291 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:196: SDA = 0; // then SDA = 0
292 ; genAssign
008D C2*00 293 clr _SDA
294 ; Peephole 132 changed ljmp to sjmp
008F 80 02 295 sjmp 00103$
0091 296 00102$:
297 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:198: SDA = 1; // else MSB =1, then SDA = 1
298 ; genAssign
0091 D2*00 299 setb _SDA
0093 300 00103$:
301 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:199: SCK = 1; // clock = 1
302 ; genAssign
0093 D2*00 303 setb _SCK
304 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:206: _endasm;
305 ; genInline
0095 00 306 nop
0096 00 307 nop
0097 00 308 nop
0098 00 309 nop
0099 00 310 nop
311 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:207: SCK = 0; // clock = 0
312 ; genAssign
009A C2*00 313 clr _SCK
314 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:208: datum = datum << 1; // rotate for next bit
315 ; genLeftShift
316 ; genLeftShiftLiteral
317 ; genlshOne
009C EA 318 mov a,r2
009D 25 E0 319 add a,acc
009F FA 320 mov r2,a
321 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:192: for (i = 0; i < 8; i++) // bit shifting cycle
322 ; genPlus
323 ; genPlusIncr
00A0 0B 324 inc r3
325 ; Peephole 132 changed ljmp to sjmp
00A1 80 DB 326 sjmp 00104$
00A3 327 00107$:
328 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:210: SDA = 1; // set port pin for ack
329 ; genAssign
00A3 D2*00 330 setb _SDA
331 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:215: _endasm;
332 ; genInline
00A5 00 333 nop
00A6 00 334 nop
00A7 00 335 nop
336 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:216: SCK = 1; // clock ack
337 ; genAssign
00A8 D2*00 338 setb _SCK
339 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:223: _endasm;
340 ; genInline
00AA 00 341 nop
00AB 00 342 nop
00AC 00 343 nop
00AD 00 344 nop
00AE 00 345 nop
346 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:224: SCK = 0; // clock = 0
347 ; genAssign
00AF C2*00 348 clr _SCK
00B1 349 00108$:
00B1 22 350 ret
351 ;------------------------------------------------------------
352 ;Allocation info for local variables in function 'out'
353 ;------------------------------------------------------------
354 ;------------------------------------------------------------
355 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:241: void out (char datum)
356 ; -----------------------------------------
357 ; function out
358 ; -----------------------------------------
00B2 359 _out:
360 ; genReceive
00B2 AA 82 361 mov r2,dpl
362 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:245: for (i = 0; i < 8; i++) // bit shifting cycle
363 ; genAssign
00B4 7B 00 364 mov r3,#0x00
00B6 365 00104$:
366 ; genCmpLt
367 ; genCmp
00B6 C3 368 clr c
00B7 EB 369 mov a,r3
00B8 64 80 370 xrl a,#0x80
00BA 94 88 371 subb a,#0x88
372 ; genIfxJump
373 ; Peephole 108 removed ljmp by inverse jump logic
00BC 50 1D 374 jnc 00107$
00BE 375 00113$:
376 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:247: aux = datum & 0x80; // check MSB bit
377 ; genAnd
00BE 74 80 378 mov a,#0x80
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -