📄 lib24c16.rst
字号:
0097 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 ; -----------------------------------------
0098 202 _read:
203 ; genReceive
0098 AA 82 204 mov r2,dpl
205 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:149: RDCMD = readcmd | 0x01; // set r/w bit
206 ; genOr
009A 74 01 207 mov a,#0x01
009C 4A 208 orl a,r2
009D F5 82 209 mov dpl,a
210 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:150: outs (RDCMD); // send read command with start condition
211 ; genCall
009F 12 00 B1 212 lcall _outs
213 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:151: aux = in(); // read current position
214 ; genCall
00A2 12 01 33 215 lcall _in
00A5 AA 82 216 mov r2,dpl
217 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:152: stop (); // send stop condition
218 ; genCall
00A7 C0 02 219 push ar2
00A9 12 01 62 220 lcall _stop
00AC D0 02 221 pop ar2
222 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:153: return (aux); // return current position data
223 ; genRet
00AE 8A 82 224 mov dpl,r2
00B0 225 00101$:
00B0 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 ; -----------------------------------------
00B1 235 _outs:
236 ; genReceive
00B1 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
00B3 D2 91 240 setb _SDA
241 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:175: SCK = 1; // set port pin SCK to insure clock is HI
242 ; genAssign
00B5 D2 90 243 setb _SCK
244 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:182: _endasm;
245 ; genInline
00B7 00 246 nop
00B8 00 247 nop
00B9 00 248 nop
00BA 00 249 nop
00BB 00 250 nop
251 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:183: SDA = 0; // start condition, data = 0
252 ; genAssign
00BC C2 91 253 clr _SDA
254 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:190: _endasm;
255 ; genInline
00BE 00 256 nop
00BF 00 257 nop
00C0 00 258 nop
00C1 00 259 nop
00C2 00 260 nop
261 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:191: SCK = 0; // clock = 0
262 ; genAssign
00C3 C2 90 263 clr _SCK
264 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:192: for (i = 0; i < 8; i++) // bit shifting cycle
265 ; genAssign
00C5 7B 00 266 mov r3,#0x00
00C7 267 00104$:
268 ; genCmpLt
269 ; genCmp
00C7 C3 270 clr c
00C8 EB 271 mov a,r3
00C9 64 80 272 xrl a,#0x80
00CB 94 88 273 subb a,#0x88
274 ; genIfxJump
275 ; Peephole 108 removed ljmp by inverse jump logic
00CD 50 1D 276 jnc 00107$
00CF 277 00113$:
278 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:194: aux = datum & 0x80; // check MSB bit
279 ; genAnd
00CF 74 80 280 mov a,#0x80
00D1 5A 281 anl a,r2
00D2 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
00D3 BC 00 04 287 cjne r4,#0x00,00102$
288 ;00114$:
289 ; Peephole 200 removed redundant sjmp
00D6 290 00115$:
291 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:196: SDA = 0; // then SDA = 0
292 ; genAssign
00D6 C2 91 293 clr _SDA
294 ; Peephole 132 changed ljmp to sjmp
00D8 80 02 295 sjmp 00103$
00DA 296 00102$:
297 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:198: SDA = 1; // else MSB =1, then SDA = 1
298 ; genAssign
00DA D2 91 299 setb _SDA
00DC 300 00103$:
301 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:199: SCK = 1; // clock = 1
302 ; genAssign
00DC D2 90 303 setb _SCK
304 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:206: _endasm;
305 ; genInline
00DE 00 306 nop
00DF 00 307 nop
00E0 00 308 nop
00E1 00 309 nop
00E2 00 310 nop
311 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:207: SCK = 0; // clock = 0
312 ; genAssign
00E3 C2 90 313 clr _SCK
314 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:208: datum = datum << 1; // rotate for next bit
315 ; genLeftShift
316 ; genLeftShiftLiteral
317 ; genlshOne
00E5 EA 318 mov a,r2
00E6 25 E0 319 add a,acc
00E8 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
00E9 0B 324 inc r3
325 ; Peephole 132 changed ljmp to sjmp
00EA 80 DB 326 sjmp 00104$
00EC 327 00107$:
328 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:210: SDA = 1; // set port pin for ack
329 ; genAssign
00EC D2 91 330 setb _SDA
331 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:215: _endasm;
332 ; genInline
00EE 00 333 nop
00EF 00 334 nop
00F0 00 335 nop
336 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:216: SCK = 1; // clock ack
337 ; genAssign
00F1 D2 90 338 setb _SCK
339 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:223: _endasm;
340 ; genInline
00F3 00 341 nop
00F4 00 342 nop
00F5 00 343 nop
00F6 00 344 nop
00F7 00 345 nop
346 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:224: SCK = 0; // clock = 0
347 ; genAssign
00F8 C2 90 348 clr _SCK
00FA 349 00108$:
00FA 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 ; -----------------------------------------
00FB 359 _out:
360 ; genReceive
00FB 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
00FD 7B 00 364 mov r3,#0x00
00FF 365 00104$:
366 ; genCmpLt
367 ; genCmp
00FF C3 368 clr c
0100 EB 369 mov a,r3
0101 64 80 370 xrl a,#0x80
0103 94 88 371 subb a,#0x88
372 ; genIfxJump
373 ; Peephole 108 removed ljmp by inverse jump logic
0105 50 1D 374 jnc 00107$
0107 375 00113$:
376 ;C:/Maxx/Proyectos/APublicar/lib24c16.c:247: aux = datum & 0x80; // check MSB bit
377 ; genAnd
0107 74 80 378 mov a,#0x80
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -