📄 motor.lst
字号:
238 global ??_time0
239 global ?_time0
240
241 ; *************** function _time0 *************
**
242 ; Defined at:
243 ; line 53 in file "F:\program\PIC-program\moto
r\motor1\motor.c"
244 ; Parameters:
245 ; None
246 ; Auto variables:
247 ; None
248 ; Return value:
249 ; type: void
250 ; size: 0
251 ; Registers used:
252 ; wreg, fsr, status,2, status,0, pclath
253 ; Tracked objects:
254 ; On entry : 0/0
255 ; On exit : 0/0
256 ; Unchanged: 0/0
257 ; Data sizes:
258 ; Autos: 0
259 ; Params: 0
260 ; Temp: 5
261 ; Total: 5
262 ; This function calls:
263 ; Nothing
264 ; This function is called by:
265 ; Interrupt level 1
266 ; This function uses a non-reentrant model
267 ;
268 psect intrtext,class=CODE,delta=2
269 file "F:\program\PIC-program\motor\motor1\moto
r.c"
270 line 53
271 ;motor.c: 52: void interrupt time0(void)
272 ;motor.c: 53: {
273
274 011B _time0:
275 ; Regs used in _time0: [wreg+fsr+status,2+statu
s,0+pclath]
276 psect intentry,class=CODE,delta=2
277 global interrupt_function
278 0004 interrupt_function:
279 global saved_w
280 0000 saved_w set btemp+1
281 0004 00FF movwf saved_w
282 0005 0803 movf status,w
283 0006 00F1 movwf (??_time0+1)
284 0007 0804 movf fsr,w
285 0008 00F2 movwf (??_time0+2)
286 0009 080A movf pclath,w
287 000A 00F3 movwf (??_time0+3)
288 000B 087E movf btemp+0,w
289 000C 00F4 movwf (??_time0+4)
290 000D 120A 118A 291B ljmp _time0
291 psect intrtext
292 line 54
293 ;motor.c: 54: T0IF=0;
294 011B 1283 bcf status, 5 ;RP0=0, select bank0
295 011C 1303 bcf status, 6 ;RP2=0, select bank0
296 011D 110B bcf (90/8),(90)&7
297 line 55
298 ;motor.c: 55: TMR0=240;
299 011E 30F0 movlw (0F0h)
300
301 011F 0081 movwf (1) ;volatile
302 line 56
303 ;motor.c: 56: cnt++;
304
305 0120 3001 movlw low(01h)
306 0121 07F8 addwf (120),f
307 0122 1803 skipnc
308 0123 0AF9 incf (120+1),f
309 0124 3000 movlw high(01h)
310 0125 07F9 addwf (120+1),f
311 line 68
312 ;motor.c: 68: switch(j)
313 0126 2947 goto i1l15
314 line 70
315 ;motor.c: 69: {
316 ;motor.c: 70: case 0:PORTB=zhenz[0];
317
318 0127 i1l16:
319 0127 3005 movlw (_zhenz-__stringbase)
320 0128 120A 118A 2109 fcall stringdir
120A 118A
321
322 012D 0086 movwf (6) ;volatile
323 line 71
324 ;motor.c: 71: break;
325 012E 2955 goto i1l14
326 line 72
327 ;motor.c: 72: case 1:PORTB=zhenz[1];
328
329 012F i1l17:
330 012F 3006 movlw ((_zhenz-__stringbase)+01h)
331 0130 120A 118A 2109 fcall stringdir
120A 118A
332
333 0135 0086 movwf (6) ;volatile
334 line 73
335 ;motor.c: 73: break;
336 0136 2955 goto i1l14
337 line 74
338 ;motor.c: 74: case 2:PORTB=zhenz[2];
339
340 0137 i1l18:
341 0137 3007 movlw ((_zhenz-__stringbase)+02h)
342 0138 120A 118A 2109 fcall stringdir
120A 118A
343
344 013D 0086 movwf (6) ;volatile
345 line 75
346 ;motor.c: 75: break;
347 013E 2955 goto i1l14
348 line 76
349 ;motor.c: 76: case 3:PORTB=zhenz[3];
350
351 013F i1l19:
352 013F 3008 movlw ((_zhenz-__stringbase)+03h)
353 0140 120A 118A 2109 fcall stringdir
120A 118A
354
355 0145 0086 movwf (6) ;volatile
356 line 77
357 ;motor.c: 77: break;
358 0146 2955 goto i1l14
359 line 68
360
361 0147 i1l15:
362
363 0147 087A movf (122),w
364
365 0148 3A00 xorlw 0^0
366 0149 1903 skipnz
367 014A 2927 goto i1l16
368 014B 3A01 xorlw 1^0
369 014C 1903 skipnz
370 014D 292F goto i1l17
371 014E 3A03 xorlw 2^1
372 014F 1903 skipnz
373 0150 2937 goto i1l18
374 0151 3A01 xorlw 3^2
375 0152 1903 skipnz
376 0153 293F goto i1l19
377 0154 2955 goto i1l14
378
379 line 78
380
381 0155 i1l14:
382 line 79
383 ;motor.c: 79: j++;
384 0155 3001 movlw (01h)
385 0156 00F0 movwf (??_time0+0+0)
386
387 0157 0870 movf (??_time0+0+0),w
388 0158 07FA addwf (122),f
389 line 80
390 ;motor.c: 80: if(j==4)j=0;
391
392 0159 087A movf (122),w
393
394 015A 3A04 xorlw 04h
395 015B 1D03 skipz
396 015C 295E goto i1u711
397 015D 295F goto i1u710
398 015E i1u711:
399 015E 2964 goto i1l20
400 015F i1u710:
401 015F 1003 clrc
402
403 0160 3000 movlw 0
404 0161 1803 btfsc status,0
405 0162 3001 movlw 1
406 0163 00FA movwf (122)
407
408 0164 i1l20:
409 line 81
410 ;motor.c: 81: }
411 0164 i1l13:
412 0164 0874 movf (??_time0+4),w
413 0165 00FE movwf btemp+0
414 0166 0873 movf (??_time0+3),w
415 0167 008A movwf pclath
416 0168 0872 movf (??_time0+2),w
417 0169 0084 movwf fsr
418 016A 0871 movf (??_time0+1),w
419 016B 0083 movwf status
420 016C 0EFF swapf saved_w,f
421 016D 0E7F swapf saved_w,w
422 016E 0009 retfie
423 ; =============== function _time0 ends ========
=======
424
425 GLOBAL __end_of_time0
426 016F __end_of_time0:
427 FNSIZE _time0,5,0
428 signat _time0,88
429 FNCALL _main,_init
430 FNROOT _main
431 FNCALL intlevel1,_time0
432 global intlevel1
433 FNROOT intlevel1
434 psect strings,class=CODE,delta=2,reloc=256
435 global stringdir,stringtab,__stringbase,string
jmp
436 0100 stringtab:
437 0100 00FE movwf (btemp)&07Fh
438 0101 1FFE btfss (btemp)&07Fh,7
439 0102 2908 goto stringcode
440 0103 1383 bcf status,7
441 0104 187E btfsc btemp&7Fh,0
442 0105 1783 bsf status,7
443 0106 0800 movf indf,w
444 0107 0008 return
445 0108 stringcode:
446 0108 0804 movf fsr,w
447 0109 stringdir:
448 0109 00FE movwf btemp&07Fh
449 010A 3001 movlw high(stringdir)
450 010B 008A movwf pclath
451 010C 087E movf btemp&07Fh,w
452 010D stringjmp:
453 010D 0782 addwf pc
454 010E __stringbase:
455 010E 3400 retlw 0
456 global _fanz
457 line 15
458 010F _fanz:
459 010F 3408 retlw 08h
460 0110 3404 retlw 04h
461 0111 3402 retlw 02h
462 0112 3401 retlw 01h
463 global _zhenz
464 line 14
465 0113 _zhenz:
466 0113 3401 retlw 01h
467 0114 3402 retlw 02h
468 0115 3404 retlw 04h
469 0116 3408 retlw 08h
470 global _zhenz1
471 line 17
472 0117 _zhenz1:
473 0117 3405 retlw 05h
474 0118 3406 retlw 06h
475 0119 340A retlw 0Ah
476 011A 3409 retlw 09h
477 global _fanz
478 global _zhenz
479 global _zhenz1
480 global _cnt
481 psect common,class=COMMON,space=1
482
483 DABS 1,120,2 ;_cnt
484 0000 _cnt set 0x78
485
486 global _gCnt
487 global _gCnt
488 psect rbss_0,class=BANK0,space=1
489
490 DABS 1,110,2 ;_gCnt
491 0000 _gCnt set 0x6E
492
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -