📄 nangle.lss
字号:
264: 0e 94 db 00 call 0x1b6 <PutUart1Data>
268: 88 23 and r24, r24
26a: 89 f3 breq .-30 ; 0x24e <SendUart1String+0x14>
26c: 21 97 sbiw r28, 0x01 ; 1
26e: ff ef ldi r31, 0xFF ; 255
270: cf 3f cpi r28, 0xFF ; 255
272: df 07 cpc r29, r31
274: a1 f7 brne .-24 ; 0x25e <SendUart1String+0x24>
}
}
StartUart1Send(); //启动数据发送
276: 0e 94 01 01 call 0x202 <StartUart1Send>
return(OK);
27a: 61 e0 ldi r22, 0x01 ; 1
27c: 70 e0 ldi r23, 0x00 ; 0
}
27e: cb 01 movw r24, r22
280: df 91 pop r29
282: cf 91 pop r28
284: 1f 91 pop r17
286: 0f 91 pop r16
288: 08 95 ret
0000028a <__vector_15>:
****************************************************************************/
#pragma optimize=z 4
AVRX_SIGINT(SIG_OUTPUT_COMPARE0)
{
IntProlog(); //内核堆栈切换
28a: 0e 94 a7 01 call 0x34e <IntProlog>
AvrXTimerHandler(); //时钟队列管理
28e: 0e 94 bf 02 call 0x57e <AvrXTimerHandler>
Epilog(); //返回任务堆栈
292: 0e 94 f3 01 call 0x3e6 <Epilog>
00000296 <__vector_9>:
}
/***************************************************************************
*Function Name
*Description :定时器2比较中断函数,100us中断一次,自动重载
*Input parameters :
*Return Values: :
*Global Variables :
*Calling Modules :IntProlog,Epilog
***
*Create By :ChenWeiGuo
*Create Tate :2007-4-27
***
*Modified By :
*Modified Date :
*Note :
****************************************************************************/
#pragma optimize=z 4
AVRX_SIGINT(SIG_OUTPUT_COMPARE2)
{
IntProlog(); //内核堆栈切换
296: 0e 94 a7 01 call 0x34e <IntProlog>
Epilog(); //返回任务堆栈
29a: 0e 94 f3 01 call 0x3e6 <Epilog>
0000029e <MainTask>:
}
/***************************************************************************
*Function Name :MainTask
*Description :
*Input parameters :
*Return Values: :
*Global Variables :
*Calling Modules :
***
*Create By :ChenWeiGuo
*Create Tate :2007-4-27
***
*Modified By :
*Modified Date :
*Note :
****************************************************************************/
void MainTask(void)
{
while(1)
{
/*等待消息*/
AvrXDelay(&Timer1, 1000); //1S 延时
29e: 68 ee ldi r22, 0xE8 ; 232
2a0: 73 e0 ldi r23, 0x03 ; 3
2a2: 88 e7 ldi r24, 0x78 ; 120
2a4: 92 e0 ldi r25, 0x02 ; 2
2a6: 0e 94 91 02 call 0x522 <AvrXDelay>
LED = LED ^ 0x20;
2aa: 88 b3 in r24, 0x18 ; 24
2ac: 90 e2 ldi r25, 0x20 ; 32
2ae: 89 27 eor r24, r25
2b0: 88 bb out 0x18, r24 ; 24
2b2: f5 cf rjmp .-22 ; 0x29e <MainTask>
000002b4 <OsInit>:
}
}
/***************************************************************************
*Function Name :OsInit
*Description :系统堆栈和系统工作节拍初始化
*Input parameters :
*Return Values: :
*Global Variables :
*Calling Modules :AvrXSetKernelStack
***
*Create By :ChenWeiGuo
*Create Tate :2007-4-27
***
*Modified By :
*Modified Date :
*Note :
****************************************************************************/
void OsInit(void)
{
/*设置系统内核堆栈,默认堆栈*/
AvrXSetKernelStack(0);
2b4: 80 e0 ldi r24, 0x00 ; 0
2b6: 90 e0 ldi r25, 0x00 ; 0
2b8: 0e 94 2c 02 call 0x458 <AvrXSetKernelStack>
/*设置睡眠模式*/
MCUCR = (1 << SE);
2bc: 80 e2 ldi r24, 0x20 ; 32
2be: 85 bf out 0x35, r24 ; 53
/*定时器0为比较模式*/
TCCR0 = TMC8_CK256;
2c0: 8c e0 ldi r24, 0x0C ; 12
2c2: 83 bf out 0x33, r24 ; 51
/*比较值*/
OCR0 = TCNT0_INIT;
2c4: 8d e7 ldi r24, 0x7D ; 125
2c6: 81 bf out 0x31, r24 ; 49
/*开定时器0比较中断*/
TIMSK = (1 << OCIE0);
2c8: 82 e0 ldi r24, 0x02 ; 2
2ca: 87 bf out 0x37, r24 ; 55
2cc: 08 95 ret
000002ce <SoftInit>:
return;
}
/***************************************************************************
*Function Name :SoftInit
*Description :系统运行前参数初始化
*Input parameters :
*Return Values: :
*Global Variables :
*Calling Modules :InitUart
***
*Create By :ChenWeiGuo
*Create Tate :2007-4-27
***
*Modified By :
*Modified Date :
*Note :
****************************************************************************/
void SoftInit(void)
{
/*控制灯设置为输出*/
LEDDDR |= BV(5);
2ce: bd 9a sbi 0x17, 5 ; 23
/*串口初始化*/
InitUart();
2d0: 0e 94 6a 00 call 0xd4 <InitUart>
/*定时器2初始化*/
TIMSK &= ~BV(OCIE2);
2d4: 87 b7 in r24, 0x37 ; 55
2d6: 8f 77 andi r24, 0x7F ; 127
2d8: 87 bf out 0x37, r24 ; 55
/*分频系数为8,比较模式*/
TCCR2 = ((1 << WGM21) | (1 << CS21));
2da: 8a e0 ldi r24, 0x0A ; 10
2dc: 85 bd out 0x25, r24 ; 37
/*定时100us*/
OCR2 = 100;
2de: 84 e6 ldi r24, 0x64 ; 100
2e0: 83 bd out 0x23, r24 ; 35
TIMSK |= BV(OCIE2);
2e2: 87 b7 in r24, 0x37 ; 55
2e4: 80 68 ori r24, 0x80 ; 128
2e6: 87 bf out 0x37, r24 ; 55
2e8: 08 95 ret
000002ea <UartTask>:
return;
}
/***************************************************************************
*Function Name :UartTask
*Description :
*Input parameters :
*Return Values: :
*Global Variables :
*Calling Modules :
***
*Create By :ChenWeiGuo
*Create Tate :2006-9-25
***
*Modified By :
*Modified Date :
*Note :
****************************************************************************/
void UartTask(void)
{
2ea: cf 93 push r28
2ec: df 93 push r29
2ee: cd b7 in r28, 0x3d ; 61
2f0: de b7 in r29, 0x3e ; 62
2f2: 21 97 sbiw r28, 0x01 ; 1
2f4: 0f b6 in r0, 0x3f ; 63
2f6: f8 94 cli
2f8: de bf out 0x3e, r29 ; 62
2fa: 0f be out 0x3f, r0 ; 63
2fc: cd bf out 0x3d, r28 ; 61
uint8 byData;
while(1)
{
/*等待消息*/
while(GetUart1Data(&byData) == ERROR)
2fe: 06 c0 rjmp .+12 ; 0x30c <UartTask+0x22>
{
AvrXDelay(&Timer2, 1); //1ms 延时
300: 61 e0 ldi r22, 0x01 ; 1
302: 70 e0 ldi r23, 0x00 ; 0
304: 8c e6 ldi r24, 0x6C ; 108
306: 92 e0 ldi r25, 0x02 ; 2
308: 0e 94 91 02 call 0x522 <AvrXDelay>
30c: ce 01 movw r24, r28
30e: 01 96 adiw r24, 0x01 ; 1
310: 0e 94 b5 00 call 0x16a <GetUart1Data>
314: 88 23 and r24, r24
316: a1 f3 breq .-24 ; 0x300 <UartTask+0x16>
}
SendUart1String(&byData, 1);
318: 61 e0 ldi r22, 0x01 ; 1
31a: 70 e0 ldi r23, 0x00 ; 0
31c: ce 01 movw r24, r28
31e: 86 0f add r24, r22
320: 97 1f adc r25, r23
322: 0e 94 1d 01 call 0x23a <SendUart1String>
326: f2 cf rjmp .-28 ; 0x30c <UartTask+0x22>
00000328 <main>:
}
}
/***************************************************************************
*Function Name :main
*Description :
*Input parameters :
*Return Values: :
*Global Variables :
*Calling Modules :
***
*Create By :ChenWeiGuo
*Create Tate :2006-4-27
***
*Modified By :
*Modified Date :
*Note :
****************************************************************************/
int main(void)
{
328: cf ef ldi r28, 0xFF ; 255
32a: d0 e1 ldi r29, 0x10 ; 16
32c: de bf out 0x3e, r29 ; 62
32e: cd bf out 0x3d, r28 ; 61
/*系统初始化*/
OsInit();
330: 0e 94 5a 01 call 0x2b4 <OsInit>
SoftInit();
334: 0e 94 67 01 call 0x2ce <SoftInit>
/*创建任务*/
AvrXRunTask(TCB(MainTask));
338: 83 e9 ldi r24, 0x93 ; 147
33a: 90 e0 ldi r25, 0x00 ; 0
33c: 0e 94 38 02 call 0x470 <AvrXRunTask>
AvrXRunTask(TCB(UartTask));
340: 8c e8 ldi r24, 0x8C ; 140
342: 90 e0 ldi r25, 0x00 ; 0
344: 0e 94 38 02 call 0x470 <AvrXRunTask>
/*切换到第一个任务的堆栈区*/
Epilog();
348: 0e 94 f3 01 call 0x3e6 <Epilog>
while(1);
34c: ff cf rjmp .-2 ; 0x34c <main+0x24>
0000034e <IntProlog>:
34e: df 93 push r29
350: cf 93 push r28
352: bf 93 push r27
354: af 93 push r26
356: 9f 93 push r25
358: d2 e0 ldi r29, 0x02 ; 2
35a: c0 e8 ldi r28, 0x80 ; 128
35c: 9f b7 in r25, 0x3f ; 63
35e: ae 81 ldd r26, Y+6 ; 0x06
360: af 5f subi r26, 0xFF ; 255
362: ae 83 std Y+6, r26 ; 0x06
364: 60 f0 brcs .+24 ; 0x37e <SaveContext>
366: aa 81 ldd r26, Y+2 ; 0x02
368: bb 81 ldd r27, Y+3 ; 0x03
36a: ba 2b or r27, r26
36c: 41 f4 brne .+16 ; 0x37e <SaveContext>
36e: cd b7 in r28, 0x3d ; 61
370: de b7 in r29, 0x3e ; 62
372: fe 81 ldd r31, Y+6 ; 0x06
374: ef 81 ldd r30, Y+7 ; 0x07
376: 29 96 adiw r28, 0x09 ; 9
378: cd bf out 0x3d, r28 ; 61
37a: de bf out 0x3e, r29 ; 62
37c: 09 94 ijmp
0000037e <SaveContext>:
37e: 8f 93 push r24
380: 7f 93 push r23
382: 6f 93 push r22
384: 5f 93 push r21
386: 4f 93 push r20
388: 3f 93 push r19
38a: 2f 93 push r18
38c: 1f 93 push r17
38e: 0f 93 push r16
390: ff 92 push r15
392: ef 92 push r14
394: df 92 push r13
396: cf 92 push r12
398: bf 92 push r11
39a: af 92 push r10
39c: 9f 92 push r9
39e: 8f 92 push r8
3a0: 7f 92 push r7
3a2: 6f 92 push r6
3a4: 5f 92 push r5
3a6: 4f 92 push r4
3a8: 3f 92 push r3
3aa: 2f 92 push r2
3ac: 1f 92 push r1
3ae: 0f 92 push r0
3b0: 9f 93 push r25
3b2: cd b7 in r28, 0x3d ; 61
3b4: de b7 in r29, 0x3e ; 62
3b6: 9b 8d ldd r25, Y+27 ; 0x1b
3b8: 39 a1 ldd r19, Y+33 ; 0x21
3ba: 48 a1 ldd r20, Y+32 ; 0x20
3bc: e8 a3 std Y+32, r30 ; 0x20
3be: f9 a3 std Y+33, r31 ; 0x21
3c0: 70 f0 brcs .+28 ; 0x3de <AlreadyInKernel>
3c2: f2 e0 ldi r31, 0x02 ; 2
3c4: e0 e8 ldi r30, 0x80 ; 128
3c6: d3 81 ldd r29, Z+3 ; 0x03
3c8: c2 81 ldd r28, Z+2 ; 0x02
3ca: be b7 in r27, 0x3e ; 62
3cc: ad b7 in r26, 0x3d ; 61
3ce: bd 83 std Y+5, r27 ; 0x05
3d0: ac 83 std Y+4, r26 ; 0x04
3d2: 24 81 ldd r18, Z+4 ; 0x04
3d4: 2d bf out 0x3d, r18 ; 61
3d6: 25 81 ldd r18, Z+5 ; 0x05
3d8: 2e bf out 0x3e, r18 ; 62
3da: ca 2f mov r28, r26
3dc: db 2f mov r29, r27
000003de <AlreadyInKernel>:
3de: 11 24 eor r1, r1
3e0: e3 2f mov r30, r19
3e2: f4 2f mov r31, r20
3e4: 09 94 ijmp
000003e6 <Epilog>:
3e6: ef 91 pop r30
3e8: ef 91 pop r30
000003ea <_Epilog>:
3ea: e0 e8 ldi r30, 0x80 ; 128
3ec: f2 e0 ldi r31, 0x02 ; 2
3ee: f8 94 cli
3f0: 06 81 ldd r16, Z+6 ; 0x06
3f2: 0a 95 dec r16
3f4: 06 83 std Z+6, r16 ; 0x06
3f6: 54 f4 brge .+20 ; 0x40c <SkipTaskSwap>
3f8: d1 81 ldd r29, Z+1 ; 0x01
3fa: c0 81 ld r28, Z
3fc: d3 83 std Z+3, r29 ; 0x03
3fe: c2 83 std Z+2, r28 ; 0x02
400: 20 96 adiw r28, 0x00 ; 0
402: 39 f1 breq .+78 ; 0x452 <_IdleTask>
404: bd 81 ldd r27, Y+5 ; 0x05
406: ac 81 ldd r26, Y+4 ; 0x04
408: ad bf out 0x3d, r26 ; 61
40a: be bf out 0x3e, r27 ; 62
0000040c <SkipTaskSwap>:
40c: 0f 90 pop r0
40e: 0f be out 0x3f, r0 ; 63
410: 0f 90 pop r0
412: 1f 90 pop r1
414: 2f 90 pop r2
416: 3f 90 pop r3
418: 4f 90 pop r4
41a: 5f 90 pop r5
41c: 6f 90 pop r6
41e: 7f 90 pop r7
420: 8f 90 pop r8
422: 9f 90 pop r9
424: af 90 pop r10
426: bf 90 pop r11
428: cf 90 pop r12
42a: df 90 pop r13
42c: ef 90 pop r14
42e: ff 90 pop r15
430: 0f 91 pop r16
432: 1f 91 pop r17
434: 2f 91 pop r18
436: 3f 91 pop r19
438: 4f 91 pop r20
43a: 5f 91 pop r21
43c: 6f 91 pop r22
43e: 7f 91 pop r23
440: 8f 91 pop r24
442: 9f 91 pop r25
444: af 91 pop r26
446: bf 91 pop r27
448: cf 91 pop r28
44a: df 91 pop r29
44c: ef 91 pop r30
44e: ff 91 pop r31
450: 18 95 reti
00000452 <_IdleTask>:
452: 78 94 sei
454: 88 95 sleep
00000456 <snooze>:
456: fd cf rjmp .-6 ; 0x452 <_IdleTask>
00000458 <AvrXSetKernelStack>:
458: ff 91 pop r31
45a: ef 91 pop r30
45c: 80 50 subi r24, 0x00 ; 0
45e: 90 40 sbci r25, 0x00 ; 0
460: 11 f4 brne .+4 ; 0x466 <sks1>
462: 8d b7 in r24, 0x3d ; 61
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -