📄 user_code.lss
字号:
742: cd bf out 0x3d, r28 ; 61
744: df 91 pop r29
746: cf 91 pop r28
748: 08 95 ret
0000074a <task_1>:
void task_1(void)
{
74a: cf 93 push r28
74c: df 93 push r29
74e: cd b7 in r28, 0x3d ; 61
750: de b7 in r29, 0x3e ; 62
752: 00 00 nop
for (;;)
{
PORTD=PORTD^0X01;
754: 80 91 32 00 lds r24, 0x0032
758: 91 e0 ldi r25, 0x01 ; 1
75a: 89 27 eor r24, r25
75c: 80 93 32 00 sts 0x0032, r24
dispt();
760: d2 df rcall .-92 ; 0x706
OS_TASK_DLY(1);
762: 81 e0 ldi r24, 0x01 ; 1
764: 49 df rcall .-366 ; 0x5f8
766: f6 cf rjmp .-20 ; 0x754
00000768 <task_2>:
}
}
void task_2(void)
{
768: cf 93 push r28
76a: df 93 push r29
76c: cd b7 in r28, 0x3d ; 61
76e: de b7 in r29, 0x3e ; 62
770: 00 00 nop
for (;;)
{
PORTD=PORTD^0X02;
772: 80 91 32 00 lds r24, 0x0032
776: 92 e0 ldi r25, 0x02 ; 2
778: 89 27 eor r24, r25
77a: 80 93 32 00 sts 0x0032, r24
dispt();
77e: c3 df rcall .-122 ; 0x706
OS_TASK_DLY(1);
780: 81 e0 ldi r24, 0x01 ; 1
782: 3a df rcall .-396 ; 0x5f8
784: f6 cf rjmp .-20 ; 0x772
00000786 <task_3>:
}
}
void task_3(void)
{
786: cf 93 push r28
788: df 93 push r29
78a: cd b7 in r28, 0x3d ; 61
78c: de b7 in r29, 0x3e ; 62
78e: 00 00 nop
for (;;)
{
PORTD=PORTD^0X04;
790: 80 91 32 00 lds r24, 0x0032
794: 94 e0 ldi r25, 0x04 ; 4
796: 89 27 eor r24, r25
798: 80 93 32 00 sts 0x0032, r24
dispt();
79c: b4 df rcall .-152 ; 0x706
OS_TASK_DLY(1);
79e: 81 e0 ldi r24, 0x01 ; 1
7a0: 2b df rcall .-426 ; 0x5f8
7a2: f6 cf rjmp .-20 ; 0x790
000007a4 <task_4>:
}
}
void task_4(void)
{
7a4: cf 93 push r28
7a6: df 93 push r29
7a8: cd b7 in r28, 0x3d ; 61
7aa: de b7 in r29, 0x3e ; 62
7ac: 00 00 nop
for (;;)
{
PORTD=PORTD^0X08;
7ae: 80 91 32 00 lds r24, 0x0032
7b2: 98 e0 ldi r25, 0x08 ; 8
7b4: 89 27 eor r24, r25
7b6: 80 93 32 00 sts 0x0032, r24
dispt();
7ba: a5 df rcall .-182 ; 0x706
7bc: f8 cf rjmp .-16 ; 0x7ae
000007be <main>:
//OS_TASK_DLY(1);
}
}
int main (void)
{
7be: cd e5 ldi r28, 0x5D ; 93
7c0: d4 e0 ldi r29, 0x04 ; 4
7c2: de bf out 0x3e, r29 ; 62
7c4: cd bf out 0x3d, r28 ; 61
void *p;
OS_CREATE_TASK(&task_1,1,0,SP_POINTER-120);
7c6: 80 91 5d 00 lds r24, 0x005D
7ca: 90 91 5e 00 lds r25, 0x005E
7ce: 88 57 subi r24, 0x78 ; 120
7d0: 90 40 sbci r25, 0x00 ; 0
7d2: 9c 01 movw r18, r24
7d4: 40 e0 ldi r20, 0x00 ; 0
7d6: 61 e0 ldi r22, 0x01 ; 1
7d8: 85 ea ldi r24, 0xA5 ; 165
7da: 93 e0 ldi r25, 0x03 ; 3
7dc: 3f dc rcall .-1922 ; 0x5c
OS_CREATE_TASK(&task_2,1,1,SP_POINTER-320);
7de: 80 91 5d 00 lds r24, 0x005D
7e2: 90 91 5e 00 lds r25, 0x005E
7e6: 80 54 subi r24, 0x40 ; 64
7e8: 91 40 sbci r25, 0x01 ; 1
7ea: 9c 01 movw r18, r24
7ec: 41 e0 ldi r20, 0x01 ; 1
7ee: 61 e0 ldi r22, 0x01 ; 1
7f0: 84 eb ldi r24, 0xB4 ; 180
7f2: 93 e0 ldi r25, 0x03 ; 3
7f4: 33 dc rcall .-1946 ; 0x5c
OS_CREATE_TASK(&task_3,1,2,SP_POINTER-520);
7f6: 80 91 5d 00 lds r24, 0x005D
7fa: 90 91 5e 00 lds r25, 0x005E
7fe: 88 50 subi r24, 0x08 ; 8
800: 92 40 sbci r25, 0x02 ; 2
802: 9c 01 movw r18, r24
804: 42 e0 ldi r20, 0x02 ; 2
806: 61 e0 ldi r22, 0x01 ; 1
808: 83 ec ldi r24, 0xC3 ; 195
80a: 93 e0 ldi r25, 0x03 ; 3
80c: 27 dc rcall .-1970 ; 0x5c
OS_CREATE_TASK(&task_4,1,255,SP_POINTER-720);
80e: 80 91 5d 00 lds r24, 0x005D
812: 90 91 5e 00 lds r25, 0x005E
816: 80 5d subi r24, 0xD0 ; 208
818: 92 40 sbci r25, 0x02 ; 2
81a: 9c 01 movw r18, r24
81c: 4f ef ldi r20, 0xFF ; 255
81e: 61 e0 ldi r22, 0x01 ; 1
820: 82 ed ldi r24, 0xD2 ; 210
822: 93 e0 ldi r25, 0x03 ; 3
824: 1b dc rcall .-1994 ; 0x5c
p=&OS_START_TICK;
826: 86 e5 ldi r24, 0x56 ; 86
828: 93 e0 ldi r25, 0x03 ; 3
82a: 89 83 std Y+1, r24 ; 0x01
82c: 9a 83 std Y+2, r25 ; 0x02
goto *p;
82e: e9 81 ldd r30, Y+1 ; 0x01
830: fa 81 ldd r31, Y+2 ; 0x02
832: 09 94 ijmp
00000834 <OS_GET_TO_TASK_INT>:
.endm
;汇编函数跳入下一条线程
OS_GET_TO_TASK_INT:
POPRS
834: 0f 91 pop r16
836: 0f bf out 0x3f, r16 ; 63
838: ff 91 pop r31
83a: ef 91 pop r30
83c: df 91 pop r29
83e: cf 91 pop r28
840: bf 91 pop r27
842: af 91 pop r26
844: 9f 91 pop r25
846: 8f 91 pop r24
848: 7f 91 pop r23
84a: 6f 91 pop r22
84c: 5f 91 pop r21
84e: 4f 91 pop r20
850: 3f 91 pop r19
852: 2f 91 pop r18
854: 1f 91 pop r17
856: 0f 91 pop r16
858: ff 90 pop r15
85a: ef 90 pop r14
85c: df 90 pop r13
85e: cf 90 pop r12
860: bf 90 pop r11
862: af 90 pop r10
864: 9f 90 pop r9
866: 8f 90 pop r8
868: 7f 90 pop r7
86a: 6f 90 pop r6
86c: 5f 90 pop r5
86e: 4f 90 pop r4
870: 3f 90 pop r3
872: 2f 90 pop r2
874: 1f 90 pop r1
876: 0f 90 pop r0
OS_SET_I ;开中断
878: 78 94 sei
RETI
87a: 18 95 reti
0000087c <OS_GET_TO_TASK_DISP>:
;汇编函数跳入下一条线程
OS_GET_TO_TASK_DISP:
POPRS
87c: 0f 91 pop r16
87e: 0f bf out 0x3f, r16 ; 63
880: ff 91 pop r31
882: ef 91 pop r30
884: df 91 pop r29
886: cf 91 pop r28
888: bf 91 pop r27
88a: af 91 pop r26
88c: 9f 91 pop r25
88e: 8f 91 pop r24
890: 7f 91 pop r23
892: 6f 91 pop r22
894: 5f 91 pop r21
896: 4f 91 pop r20
898: 3f 91 pop r19
89a: 2f 91 pop r18
89c: 1f 91 pop r17
89e: 0f 91 pop r16
8a0: ff 90 pop r15
8a2: ef 90 pop r14
8a4: df 90 pop r13
8a6: cf 90 pop r12
8a8: bf 90 pop r11
8aa: af 90 pop r10
8ac: 9f 90 pop r9
8ae: 8f 90 pop r8
8b0: 7f 90 pop r7
8b2: 6f 90 pop r6
8b4: 5f 90 pop r5
8b6: 4f 90 pop r4
8b8: 3f 90 pop r3
8ba: 2f 90 pop r2
8bc: 1f 90 pop r1
8be: 0f 90 pop r0
OS_SET_I ;开中断
8c0: 78 94 sei
RET
8c2: 08 95 ret
000008c4 <OS_DISP_TIME_P>:
;汇编线程等待处理过程
OS_DISP_TIME_P: ;线程延时处理
OS_CLEAR_I ;关中断
8c4: f8 94 cli
PUSHRS ;保存寄存器
8c6: 0f 92 push r0
8c8: 1f 92 push r1
8ca: 2f 92 push r2
8cc: 3f 92 push r3
8ce: 4f 92 push r4
8d0: 5f 92 push r5
8d2: 6f 92 push r6
8d4: 7f 92 push r7
8d6: 8f 92 push r8
8d8: 9f 92 push r9
8da: af 92 push r10
8dc: bf 92 push r11
8de: cf 92 push r12
8e0: df 92 push r13
8e2: ef 92 push r14
8e4: ff 92 push r15
8e6: 0f 93 push r16
8e8: 1f 93 push r17
8ea: 2f 93 push r18
8ec: 3f 93 push r19
8ee: 4f 93 push r20
8f0: 5f 93 push r21
8f2: 6f 93 push r22
8f4: 7f 93 push r23
8f6: 8f 93 push r24
8f8: 9f 93 push r25
8fa: af 93 push r26
8fc: bf 93 push r27
8fe: cf 93 push r28
900: df 93 push r29
902: ef 93 push r30
904: ff 93 push r31
906: 0f b7 in r16, 0x3f ; 63
908: 0f 93 push r16
IN R25,0X3E ;传递SPH
90a: 9e b7 in r25, 0x3e ; 62
IN R24,0X3D ;传递SPL
90c: 8d b7 in r24, 0x3d ; 61
RCALL OS_SAVE_TASK_SP ;调用C保存SP
90e: b0 dd rcall .-1184 ; 0x470
RCALL OS_ATTEMPER ;进入C调度
910: d4 dd rcall .-1112 ; 0x4ba
RJMP OS_GETTO_NEXT_TASK_DISP ;进入C指向函数处理过程
912: 87 cd rjmp .-1266 ; 0x422
00000914 <START_TICK_POINT>:
;第一次启动入口点
START_TICK_POINT:
RCALL OS_ATTEMPER; ;进入C调度
914: d2 dd rcall .-1116 ; 0x4ba
RJMP OS_GETTO_NEXT_TASK_DISP ;进入C指向函数处理过程
916: 85 cd rjmp .-1270 ; 0x422
00000918 <__vector_9>:
;中断入口
.global SIG_OVERFLOW0 ;中断入口点 用户根据情况修改
SIG_OVERFLOW0: ;中断入口点 用户根据情况修改
;SEI
OS_CLEAR_I ;关中断
918: f8 94 cli
PUSHRS ;保存寄存器
91a: 0f 92 push r0
91c: 1f 92 push r1
91e: 2f 92 push r2
920: 3f 92 push r3
922: 4f 92 push r4
924: 5f 92 push r5
926: 6f 92 push r6
928: 7f 92 push r7
92a: 8f 92 push r8
92c: 9f 92 push r9
92e: af 92 push r10
930: bf 92 push r11
932: cf 92 push r12
934: df 92 push r13
936: ef 92 push r14
938: ff 92 push r15
93a: 0f 93 push r16
93c: 1f 93 push r17
93e: 2f 93 push r18
940: 3f 93 push r19
942: 4f 93 push r20
944: 5f 93 push r21
946: 6f 93 push r22
948: 7f 93 push r23
94a: 8f 93 push r24
94c: 9f 93 push r25
94e: af 93 push r26
950: bf 93 push r27
952: cf 93 push r28
954: df 93 push r29
956: ef 93 push r30
958: ff 93 push r31
95a: 0f b7 in r16, 0x3f ; 63
95c: 0f 93 push r16
IN R25,0X3E ;传递SPH
95e: 9e b7 in r25, 0x3e ; 62
IN R24,0X3D ;传递SPL
960: 8d b7 in r24, 0x3d ; 61
RCALL OS_SAVE_TASK_SP ;调用C保存SP
962: 86 dd rcall .-1268 ; 0x470
RCALL OS_RELOAD_TICK ;C函数重新初始化系统时钟
964: c6 de rcall .-628 ; 0x6f2
RCALL OS_DLY_TIME_DEC ;时钟节拍处理
966: 05 de rcall .-1014 ; 0x572
RCALL OS_ATTEMPER; ;进入C调度
968: a8 dd rcall .-1200 ; 0x4ba
RJMP OS_GETTO_NEXT_TASK_INT ;进入C指向函数处理过程
96a: 34 cd rjmp .-1432 ; 0x3d4
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -