⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 integer.lst

📁 本代码已经经过修改
💻 LST
📖 第 1 页 / 共 2 页
字号:
    112          volatile portLONG lValue;
    113          portSHORT sError = pdFALSE;
   \   00000004   0024               MOV         R4,#+0
   \   00000006   0225               MOV         R5,#+0x2
   \   00000008   ED43               MVN         R5,R5              ;; #-3
   \   0000000A   0F4E               LDR         R6,??vCompeteingIntMathTask_1  ;; 0x39447
   \   0000000C   7B27               MOV         R7,#+0x7B
   \   0000000E   08E0               B           ??vCompeteingIntMathTask_2
    114          volatile signed portBASE_TYPE *pxTaskHasExecuted;
    115          
    116          	/* Set a pointer to the variable we are going to set to true each
    117          	iteration.  This is also a good test of the parameter passing mechanism
    118          	within each port. */
    119          	pxTaskHasExecuted = ( volatile signed portBASE_TYPE * ) pvParameters;
    120          
    121          	/* Keep performing a calculation and checking the result against a constant. */
    122          	for( ;; )
    123          	{
    124          		/* Perform the calculation.  This will store partial value in
    125          		registers, resulting in a good test of the context switch mechanism. */
    126          		lValue = intgCONST1;
    127          		lValue += intgCONST2;
    128          
    129          		/* Yield in case cooperative scheduling is being used. */
    130          		#if configUSE_PREEMPTION == 0
    131          		{
    132          			taskYIELD();
    133          		}
    134          		#endif
    135          
    136          		/* Finish off the calculation. */
    137          		lValue *= intgCONST3;
    138          		lValue /= intgCONST4;
    139          
    140          		/* If the calculation is found to be incorrect we stop setting the 
    141          		TaskHasExecuted variable so the check task can see an error has 
    142          		occurred. */
    143          		if( lValue != intgEXPECTED_ANSWER ) /*lint !e774 volatile used to prevent this being optimised out. */
    144          		{
    145          			sError = pdTRUE;
    146          		}
    147          
    148          		if( sError == pdFALSE )
   \                     ??vCompeteingIntMathTask_3:
   \   00000010   002C               CMP         R4,#+0
   \   00000012   06D1               BNE         ??vCompeteingIntMathTask_2
    149          		{
    150          			/* We have not encountered any errors, so set the flag that show
    151          			we are still executing.  This will be periodically cleared by
    152          			the check task. */
    153          			portENTER_CRITICAL();
   \   00000014   ........           _BLF        vPortEnterCritical,vPortEnterCritical??rT
    154          				*pxTaskHasExecuted = pdTRUE;
   \   00000018   0198               LDR         R0,[SP, #+0x4]
   \   0000001A   0121               MOV         R1,#+0x1
   \   0000001C   0160               STR         R1,[R0, #+0]
    155          			portEXIT_CRITICAL();
   \   0000001E   ........           _BLF        vPortExitCritical,vPortExitCritical??rT
    156          		}
   \                     ??vCompeteingIntMathTask_2:
   \   00000022   0097               STR         R7,[SP, #+0]
   \   00000024   0098               LDR         R0,[SP, #+0]
   \   00000026   8019               ADD         R0,R0,R6
   \   00000028   0090               STR         R0,[SP, #+0]
   \   0000002A   0098               LDR         R0,[SP, #+0]
   \   0000002C   6843               MUL         R0,R5
   \   0000002E   0090               STR         R0,[SP, #+0]
   \   00000030   0098               LDR         R0,[SP, #+0]
   \   00000032   0721               MOV         R1,#+0x7
   \   00000034   ........           _BLF        ??div32_t,??rT??div32_t
   \   00000038   0091               STR         R1,[SP, #+0]
   \   0000003A   0098               LDR         R0,[SP, #+0]
   \   0000003C   0349               LDR         R1,??vCompeteingIntMathTask_1+0x4  ;; 0xfffe771b
   \   0000003E   8842               CMP         R0,R1
   \   00000040   E6D0               BEQ         ??vCompeteingIntMathTask_3
   \   00000042   0124               MOV         R4,#+0x1
   \   00000044   EDE7               B           ??vCompeteingIntMathTask_2
   \   00000046   C046               NOP         
   \                     ??vCompeteingIntMathTask_1:
   \   00000048   47940300           DC32        0x39447
   \   0000004C   1B77FEFF           DC32        0xfffe771b
    157          
    158          		/* Yield in case cooperative scheduling is being used. */
    159          		#if configUSE_PREEMPTION == 0
    160          		{
    161          			taskYIELD();
    162          		}
    163          		#endif
    164          	}
    165          }
    166          /*-----------------------------------------------------------*/
    167          
    168          /* This is called to check that all the created tasks are still running. */

   \                                 In segment CODE, align 4, keep-with-next
    169          portBASE_TYPE xAreIntegerMathsTaskStillRunning( void )
    170          {
    171          portBASE_TYPE xReturn = pdTRUE;
   \                     xAreIntegerMathsTaskStillRunning:
   \   00000000   0120               MOV         R0,#+0x1
    172          portSHORT sTask;
    173          
    174          	/* Check the maths tasks are still running by ensuring their check variables 
    175          	are still being set to true. */
    176          	for( sTask = 0; sTask < intgNUMBER_OF_TASKS; sTask++ )
    177          	{
    178          		if( xTaskCheck[ sTask ] == pdFALSE )
   \   00000002   0021               MOV         R1,#+0
   \   00000004   ....               LDR         R2,??DataTable1    ;; ??xTaskCheck
   \   00000006   1368               LDR         R3,[R2, #+0]
   \   00000008   002B               CMP         R3,#+0
   \   0000000A   00D1               BNE         ??xAreIntegerMathsTaskStillRunning_0
    179          		{
    180          			/* The check has not incremented so an error exists. */
    181          			xReturn = pdFALSE;
   \   0000000C   0020               MOV         R0,#+0
    182          		}
    183          
    184          		/* Reset the check variable so we can tell if it has been set by
    185          		the next time around. */
    186          		xTaskCheck[ sTask ] = pdFALSE;
   \                     ??xAreIntegerMathsTaskStillRunning_0:
   \   0000000E   1160               STR         R1,[R2, #+0]
    187          	}
    188          
    189          	return xReturn;
   \   00000010   00B0               ADD         SP,#+0
   \   00000012   7047               BX          LR                 ;; return
    190          }

   \                                 In segment CODE, align 4, keep-with-next
   \                     ??DataTable1:
   \   00000000   ........           DC32        ??xTaskCheck

   \                                 In segment DATA_C, align 4, align-sorted
   \                     `?<Constant "IntMath">`:
   \   00000000   496E744D6174       DC8 "IntMath"
   \              6800        
    191          

   Maximum stack usage in bytes:

     Function                       CSTACK
     --------                       ------
     vCompeteingIntMathTask            28
     vStartIntegerMathTasks            12
     xAreIntegerMathsTaskStillRunning
                                        4


   Segment part sizes:

     Function/Label                 Bytes
     --------------                 -----
     xTaskCheck                        4
     vStartIntegerMathTasks           36
     vCompeteingIntMathTask           80
     xAreIntegerMathsTaskStillRunning
                                      20
     ??DataTable1                      4
     ?<Constant "IntMath">             8
      Others                          84

 
 212 bytes in segment CODE
   8 bytes in segment DATA_C
   4 bytes in segment DATA_Z
  12 bytes in segment INITTAB
 
 140 bytes of CODE  memory (+ 84 bytes shared)
   8 bytes of CONST memory
   4 bytes of DATA  memory

Errors: none
Warnings: none

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -