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

📄 list.lst

📁 MSP430 IAR project with FreeRTOS port.
💻 LST
📖 第 1 页 / 共 2 页
字号:
    119          	pxIndex = pxList->pxIndex;
   \   000000   1D4C0200     MOV.W   0x2(R12), R13
    120          
    121          	pxNewListItem->pxNext = pxIndex->pxNext;
   \   000004   9E4D02000200 MOV.W   0x2(R13), 0x2(R14)
    122          	pxNewListItem->pxPrevious = pxList->pxIndex;
   \   00000A   9E4C02000400 MOV.W   0x2(R12), 0x4(R14)
    123          	pxIndex->pxNext->pxPrevious = ( volatile xListItem * ) pxNewListItem;
   \   000010   1F4D0200     MOV.W   0x2(R13), R15
   \   000014   8F4E0400     MOV.W   R14, 0x4(R15)
    124          	pxIndex->pxNext = ( volatile xListItem * ) pxNewListItem;
   \   000018   8D4E0200     MOV.W   R14, 0x2(R13)
    125          	pxList->pxIndex = ( volatile xListItem * ) pxNewListItem;
   \   00001C   8C4E0200     MOV.W   R14, 0x2(R12)
    126          
    127          	/* Remember which list the item is in. */
    128          	pxNewListItem->pvContainer = ( void * ) pxList;
   \   000020   8E4C0800     MOV.W   R12, 0x8(R14)
    129          
    130          	( pxList->uxNumberOfItems )++;
   \   000024   0F4C         MOV.W   R12, R15
   \   000026   9F530000     ADD.W   #0x1, 0(R15)
    131          }
   \   00002A   3041         RET
    132          /*-----------------------------------------------------------*/
    133          

   \                                 In segment CODE, align 2
    134          void vListInsert( xList *pxList, xListItem *pxNewListItem )
   \                     vListInsert:
    135          {
   \   000000   0A12         PUSH.W  R10
    136          volatile xListItem *pxIterator;
    137          portTickType xValueOfInsertion;
    138          
    139          	/* Insert the new list item into the list, sorted in ulListItem order. */
    140          	xValueOfInsertion = pxNewListItem->xItemValue;
   \   000002   2A4E         MOV.W   @R14, R10
    141          
    142          	/* If the list already contains a list item with the same item value then
    143          	the new list item should be placed after it.  This ensures that TCB's which
    144          	are stored in ready lists (all of which have the same ulListItem value)
    145          	get an equal share of the CPU.  However, if the xItemValue is the same as 
    146          	the back marker the iteration loop below will not end.  This means we need
    147          	to guard against this by checking the value first and modifying the 
    148          	algorithm slightly if necessary. */
    149          	if( xValueOfInsertion == portMAX_DELAY )
   \   000004   3A93         CMP.W   #0xffff, R10
   \   000006   0C20         JNE     ??vListInsert_2
    150          	{
    151          		for( pxIterator = ( xListItem * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue < xValueOfInsertion; pxIterator = pxIterator->pxNext )
   \   000008   0F4C         MOV.W   R12, R15
   \   00000A   2F52         ADD.W   #0x4, R15
   \   00000C   0D4F         MOV.W   R15, R13
   \                     ??vListInsert_0:
   \   00000E   1F4D0200     MOV.W   0x2(R13), R15
   \   000012   8F9A0000     CMP.W   R10, 0(R15)
   \   000016   0F2C         JC      ??vListInsert_3
   \   000018   0F4D         MOV.W   R13, R15
   \   00001A   1D4F0200     MOV.W   0x2(R15), R13
   \   00001E   F73F         JMP     ??vListInsert_0
    152          		{
    153          			/* There is nothing to do here, we are just iterating to the
    154          			wanted insertion position. */
    155          		}
    156          	}
    157          	else
    158          	{
    159          		for( pxIterator = ( xListItem * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext )
   \                     ??vListInsert_2:
   \   000020   0F4C         MOV.W   R12, R15
   \   000022   2F52         ADD.W   #0x4, R15
   \   000024   0D4F         MOV.W   R15, R13
   \                     ??vListInsert_1:
   \   000026   1F4D0200     MOV.W   0x2(R13), R15
   \   00002A   2A9F         CMP.W   @R15, R10
   \   00002C   0428         JNC     ??vListInsert_3
   \   00002E   0F4D         MOV.W   R13, R15
   \   000030   1D4F0200     MOV.W   0x2(R15), R13
   \   000034   F83F         JMP     ??vListInsert_1
    160          		{
    161          			/* There is nothing to do here, we are just iterating to the
    162          			wanted insertion position. */
    163          		}
    164          	}
    165          
    166          	pxNewListItem->pxNext = pxIterator->pxNext;
   \                     ??vListInsert_3:
   \   000036   9E4D02000200 MOV.W   0x2(R13), 0x2(R14)
    167          	pxNewListItem->pxNext->pxPrevious = ( volatile xListItem * ) pxNewListItem;
   \   00003C   1F4E0200     MOV.W   0x2(R14), R15
   \   000040   8F4E0400     MOV.W   R14, 0x4(R15)
    168          	pxNewListItem->pxPrevious = pxIterator;
   \   000044   8E4D0400     MOV.W   R13, 0x4(R14)
    169          	pxIterator->pxNext = ( volatile xListItem * ) pxNewListItem;
   \   000048   8D4E0200     MOV.W   R14, 0x2(R13)
    170          
    171          	/* Remember which list the item is in.  This allows fast removal of the
    172          	item later. */
    173          	pxNewListItem->pvContainer = ( void * ) pxList;
   \   00004C   8E4C0800     MOV.W   R12, 0x8(R14)
    174          
    175          	( pxList->uxNumberOfItems )++;
   \   000050   0F4C         MOV.W   R12, R15
   \   000052   9F530000     ADD.W   #0x1, 0(R15)
    176          }
   \   000056   3A41         POP.W   R10
   \   000058   3041         RET
    177          /*-----------------------------------------------------------*/
    178          

   \                                 In segment CODE, align 2
    179          void vListRemove( xListItem *pxItemToRemove )
   \                     vListRemove:
    180          {
    181          xList * pxList;
    182          
    183          	pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious;
   \   000000   1F4C0200     MOV.W   0x2(R12), R15
   \   000004   9F4C04000400 MOV.W   0x4(R12), 0x4(R15)
    184          	pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext;
   \   00000A   1F4C0400     MOV.W   0x4(R12), R15
   \   00000E   9F4C02000200 MOV.W   0x2(R12), 0x2(R15)
    185          	
    186          	/* The list item knows which list it is in.  Obtain the list from the list
    187          	item. */
    188          	pxList = ( xList * ) pxItemToRemove->pvContainer;
   \   000014   1E4C0800     MOV.W   0x8(R12), R14
    189          
    190          	/* Make sure the index is left pointing to a valid item. */
    191          	if( pxList->pxIndex == pxItemToRemove )
   \   000018   8E9C0200     CMP.W   R12, 0x2(R14)
   \   00001C   0320         JNE     ??vListRemove_0
    192          	{
    193          		pxList->pxIndex = pxItemToRemove->pxPrevious;
   \   00001E   9E4C04000200 MOV.W   0x4(R12), 0x2(R14)
    194          	}
    195          
    196          	pxItemToRemove->pvContainer = NULL;
   \                     ??vListRemove_0:
   \   000024   8C430800     MOV.W   #0x0, 0x8(R12)
    197          	( pxList->uxNumberOfItems )--;
   \   000028   0F4E         MOV.W   R14, R15
   \   00002A   BF530000     ADD.W   #0xffff, 0(R15)
    198          }
   \   00002E   3041         RET
    199          /*-----------------------------------------------------------*/
    200          

   Maximum stack usage in bytes:

     Function            CSTACK
     --------            ------
     vListInitialise         2
     vListInitialiseItem     2
     vListInsert             4
     vListInsertEnd          2
     vListRemove             2


   Segment part sizes:

     Function/Label      Bytes
     --------------      -----
     vListInitialise       34
     vListInitialiseItem    6
     vListInsertEnd        44
     vListInsert           90
     vListRemove           48

 
 222 bytes in segment CODE
 
 222 bytes of CODE memory

Errors: none
Warnings: none

⌨️ 快捷键说明

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