📄 os_cpu_a.lis
字号:
031E ;/*$PAGE*/.
031E ;********************************************************************************************************
031E ; Uart0 udre ISR
031E ;
031E ; Description : This function is the ISR used to notify uC/OS-II that a system tick has occurred.
031E ;
031E ; The following C-like pseudo-code describe the operation being performed in the code below.
031E ;
031E ; Save all registers on the current task's stack:
031E ; Use the PUSH_ALL macro
031E ; Get the SREG, set Bit #7 and save onto the task's stack using -Y addressing
031E ; Use the PUSH_SP macro to save the task's hardware stack pointer onto the current task's stack
031E ; OSIntNesting++;
031E ; if (OSIntNesting == 1) {
031E ; OSTCBCur->OSTCBStkPtr = SP
031E ; }
031E ; Clear the interrupt; Not needed for the timer we used.
031E ; Notify uC/OS-II that a tick has occured
031E ; Notify uC/OS-II about end of ISR
031E ; Restore all registers that were save on the current task's stack:
031E ; Use the POP_SP macro to restore the task's hardware stack pointer
031E ; Use the POP_SREG macro to restore the SREG register
031E ; Use the POP_ALL macro to restore the remaining registers
031E ; Return (DO NOT use a RETI instruction);
031E ;********************************************************************************************************
031E /*
031E _uart0_udre_isr::
031E 0A92 ST -Y,R0
0320 1A92 ST -Y,R1
0322 2A92 ST -Y,R2
0324 3A92 ST -Y,R3
0326 4A92 ST -Y,R4
0328 5A92 ST -Y,R5
032A 6A92 ST -Y,R6
032C 7A92 ST -Y,R7
032E 8A92 ST -Y,R8
0330 9A92 ST -Y,R9
0332 AA92 ST -Y,R10
0334 BA92 ST -Y,R11
0336 CA92 ST -Y,R12
0338 DA92 ST -Y,R13
033A EA92 ST -Y,R14
033C FA92 ST -Y,R15
033E 0A93 ST -Y,R16
0340 1A93 ST -Y,R17
0342 2A93 ST -Y,R18
0344 3A93 ST -Y,R19
0346 4A93 ST -Y,R20
0348 5A93 ST -Y,R21
034A 6A93 ST -Y,R22
034C 7A93 ST -Y,R23
034E 8A93 ST -Y,R24
0350 9A93 ST -Y,R25
0352 AA93 ST -Y,R26
0354 BA93 ST -Y,R27
0356 EA93 ST -Y,R30
0358 FA93 ST -Y,R31
035A 0BB7 IN R16,RAMPZ
035C 0A93 ST -Y,R16
035E 0FB7 IN R16,SREG ; Save the SREG but with interrupts enabled
0360 0068 SBR R16,BIT07
0362 0A93 ST -Y,R16
0364 0EB7 IN R16,SPH
0366 0A93 ST -Y,R16
0368 0DB7 IN R16,SPL
036A 0A93 ST -Y,R16
036C
036C 00910000 LDS R16,_OSIntNesting ; Notify uC/OS-II of ISR
0370 0395 INC R16 ;
0372 00930000 STS _OSIntNesting,R16 ;
0376
0376 0130 CPI R16,1 ; if (OSIntNesting == 1) {
0378 31F4 BRNE uart0_udre_isr_1
037A
037A E0910000 LDS R30,_OSTCBCur ; OSTCBCur->OSTCBStkPtr = Y
037E F0910100 LDS R31,_OSTCBCur+1
0382 C193 ST Z+,R28
0384 D193 ST Z+,R29 ; }
0386
0386 uart0_udre_isr_1:
0386 // CALL _Uart0Ud_Handler ; Handle the tick ISR
0386
0386 0E940000 CALL _OSIntExit ; Notify uC/OS-II about end of ISR
038A
038A 0991 LD R16,Y+
038C 0DBF OUT SPL,R16
038E 0991 LD R16,Y+
0390 0EBF OUT SPH,R16
0392 0991 LD R16,Y+
0394 0FBF OUT SREG,R16
0396 0991 LD R16,Y+
0398 0BBF OUT RAMPZ,R16
039A F991 LD R31,Y+
039C E991 LD R30,Y+
039E B991 LD R27,Y+
03A0 A991 LD R26,Y+
03A2 9991 LD R25,Y+
03A4 8991 LD R24,Y+
03A6 7991 LD R23,Y+
03A8 6991 LD R22,Y+
03AA 5991 LD R21,Y+
03AC 4991 LD R20,Y+
03AE 3991 LD R19,Y+
03B0 2991 LD R18,Y+
03B2 1991 LD R17,Y+
03B4 0991 LD R16,Y+
03B6 F990 LD R15,Y+
03B8 E990 LD R14,Y+
03BA D990 LD R13,Y+
03BC C990 LD R12,Y+
03BE B990 LD R11,Y+
03C0 A990 LD R10,Y+
03C2 9990 LD R9,Y+
03C4 8990 LD R8,Y+
03C6 7990 LD R7,Y+
03C8 6990 LD R6,Y+
03CA 5990 LD R5,Y+
03CC 4990 LD R4,Y+
03CE 3990 LD R3,Y+
03D0 2990 LD R2,Y+
03D2 1990 LD R1,Y+
03D4 0990 LD R0,Y+
03D6
03D6 0895 RET ; Note: RET instead of RETI
03D8 */
03D8 ;/*$PAGE*/.
03D8 ;********************************************************************************************************
03D8 ; Uart1 rx ISR
03D8 ;
03D8 ; Description : This function is the ISR used to notify uC/OS-II that a system tick has occurred.
03D8 ;
03D8 ; The following C-like pseudo-code describe the operation being performed in the code below.
03D8 ;
03D8 ; Save all registers on the current task's stack:
03D8 ; Use the PUSH_ALL macro
03D8 ; Get the SREG, set Bit #7 and save onto the task's stack using -Y addressing
03D8 ; Use the PUSH_SP macro to save the task's hardware stack pointer onto the current task's stack
03D8 ; OSIntNesting++;
03D8 ; if (OSIntNesting == 1) {
03D8 ; OSTCBCur->OSTCBStkPtr = SP
03D8 ; }
03D8 ; Clear the interrupt; Not needed for the timer we used.
03D8 ; Notify uC/OS-II that a tick has occured
03D8 ; Notify uC/OS-II about end of ISR
03D8 ; Restore all registers that were save on the current task's stack:
03D8 ; Use the POP_SP macro to restore the task's hardware stack pointer
03D8 ; Use the POP_SREG macro to restore the SREG register
03D8 ; Use the POP_ALL macro to restore the remaining registers
03D8 ; Return (DO NOT use a RETI instruction);
03D8 ;********************************************************************************************************
03D8
03D8 _uart1_rx_isr::
03D8 0A92 ST -Y,R0
03DA 1A92 ST -Y,R1
03DC 2A92 ST -Y,R2
03DE 3A92 ST -Y,R3
03E0 4A92 ST -Y,R4
03E2 5A92 ST -Y,R5
03E4 6A92 ST -Y,R6
03E6 7A92 ST -Y,R7
03E8 8A92 ST -Y,R8
03EA 9A92 ST -Y,R9
03EC AA92 ST -Y,R10
03EE BA92 ST -Y,R11
03F0 CA92 ST -Y,R12
03F2 DA92 ST -Y,R13
03F4 EA92 ST -Y,R14
03F6 FA92 ST -Y,R15
03F8 0A93 ST -Y,R16
03FA 1A93 ST -Y,R17
03FC 2A93 ST -Y,R18
03FE 3A93 ST -Y,R19
0400 4A93 ST -Y,R20
0402 5A93 ST -Y,R21
0404 6A93 ST -Y,R22
0406 7A93 ST -Y,R23
0408 8A93 ST -Y,R24
040A 9A93 ST -Y,R25
040C AA93 ST -Y,R26
040E BA93 ST -Y,R27
0410 EA93 ST -Y,R30
0412 FA93 ST -Y,R31
0414 0BB7 IN R16,RAMPZ
0416 0A93 ST -Y,R16
0418 0FB7 IN R16,SREG ; Save the SREG but with interrupts enabled
041A 0068 SBR R16,BIT07
041C 0A93 ST -Y,R16
041E 0EB7 IN R16,SPH
0420 0A93 ST -Y,R16
0422 0DB7 IN R16,SPL
0424 0A93 ST -Y,R16
0426
0426 00910000 LDS R16,_OSIntNesting ; Notify uC/OS-II of ISR
042A 0395 INC R16 ;
042C 00930000 STS _OSIntNesting,R16 ;
0430
0430 0130 CPI R16,1 ; if (OSIntNesting == 1) {
0432 31F4 BRNE uart1_rx_isr_1
0434
0434 E0910000 LDS R30,_OSTCBCur ; OSTCBCur->OSTCBStkPtr = Y
0438 F0910100 LDS R31,_OSTCBCur+1
043C C193 ST Z+,R28
043E D193 ST Z+,R29 ; }
0440
0440 uart1_rx_isr_1:
0440 //CALL _Uart1Rx_Handler ; Handle the tick ISR
0440
0440 0E940000 CALL _OSIntExit ; Notify uC/OS-II about end of ISR
0444
0444 0991 LD R16,Y+
0446 0DBF OUT SPL,R16
0448 0991 LD R16,Y+
044A 0EBF OUT SPH,R16
044C 0991 LD R16,Y+
044E 0FBF OUT SREG,R16
0450 0991 LD R16,Y+
0452 0BBF OUT RAMPZ,R16
0454 F991 LD R31,Y+
0456 E991 LD R30,Y+
0458 B991 LD R27,Y+
045A A991 LD R26,Y+
045C 9991 LD R25,Y+
045E 8991 LD R24,Y+
0460 7991 LD R23,Y+
0462 6991 LD R22,Y+
0464 5991 LD R21,Y+
0466 4991 LD R20,Y+
0468 3991 LD R19,Y+
046A 2991 LD R18,Y+
046C 1991 LD R17,Y+
046E 0991 LD R16,Y+
0470 F990 LD R15,Y+
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -