os_mem.lst

来自「atmega单片机用的ucos系统 占用内存适中 是atmega单片机合适的操作」· LST 代码 · 共 1,065 行 · 第 1/4 页

LST
1,065
字号
 694 0262 0895      		ret
 695               	/* epilogue end (size=3) */
 696               	/* function OSMemPut size 64 (59) */
 698               	.Lscope4:
 702               	.global	OSMemQuery
 704               	OSMemQuery:
 308:OSsrc/os_mem.c **** }
 309:OSsrc/os_mem.c **** /*$PAGE*/
 310:OSsrc/os_mem.c **** /*
 311:OSsrc/os_mem.c **** ***************************************************************************************************
 312:OSsrc/os_mem.c **** *                                          QUERY MEMORY PARTITION
 313:OSsrc/os_mem.c **** *
 314:OSsrc/os_mem.c **** * Description : This function is used to determine the number of free memory blocks and the number 
 315:OSsrc/os_mem.c **** *               used memory blocks from a memory partition.
 316:OSsrc/os_mem.c **** *
 317:OSsrc/os_mem.c **** * Arguments   : pmem        is a pointer to the memory partition control block
 318:OSsrc/os_mem.c **** *
 319:OSsrc/os_mem.c **** *               p_mem_data  is a pointer to a structure that will contain information about the mem
 320:OSsrc/os_mem.c **** *                           partition.
 321:OSsrc/os_mem.c **** *
 322:OSsrc/os_mem.c **** * Returns     : OS_NO_ERR            If no errors were found.
 323:OSsrc/os_mem.c **** *               OS_MEM_INVALID_PMEM  if you passed a NULL pointer for 'pmem'
 324:OSsrc/os_mem.c **** *               OS_MEM_INVALID_PDATA if you passed a NULL pointer to the data recipient.
 325:OSsrc/os_mem.c **** ***************************************************************************************************
 326:OSsrc/os_mem.c **** */
 327:OSsrc/os_mem.c **** 
 328:OSsrc/os_mem.c **** #if OS_MEM_QUERY_EN > 0
 329:OSsrc/os_mem.c **** INT8U  OSMemQuery (OS_MEM *pmem, OS_MEM_DATA *p_mem_data)
 330:OSsrc/os_mem.c **** {
 706               	.LM89:
 707               	/* prologue: frame size=0 */
 708 0264 CF93      		push r28
 709 0266 DF93      		push r29
 710               	/* prologue end (size=2) */
 711 0268 EC01      		movw r28,r24
 712 026a FB01      		movw r30,r22
 331:OSsrc/os_mem.c **** #if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register       
 332:OSsrc/os_mem.c ****     OS_CPU_SR  cpu_sr;
 333:OSsrc/os_mem.c ****     
 334:OSsrc/os_mem.c ****     
 335:OSsrc/os_mem.c **** 
 336:OSsrc/os_mem.c ****     cpu_sr = 0;                                  /* Prevent compiler warning                       
 337:OSsrc/os_mem.c **** #endif    
 338:OSsrc/os_mem.c **** #if OS_ARG_CHK_EN > 0
 339:OSsrc/os_mem.c ****     if (pmem == (OS_MEM *)0) {                   /* Must point to a valid memory partition         
 714               	.LM90:
 715 026c 892B      		or r24,r25
 716 026e 19F4      		brne .L33
 340:OSsrc/os_mem.c ****         return (OS_MEM_INVALID_PMEM);
 718               	.LM91:
 719 0270 84E7      		ldi r24,lo8(116)
 720 0272 90E0      		ldi r25,hi8(116)
 721 0274 3CC0      		rjmp .L32
 722               	.L33:
 341:OSsrc/os_mem.c ****     }
 342:OSsrc/os_mem.c ****     if (p_mem_data == (OS_MEM_DATA *)0) {        /* Must release a valid storage area for the data 
 724               	.LM92:
 725 0276 672B      		or r22,r23
 726 0278 19F4      		brne .L34
 343:OSsrc/os_mem.c ****         return (OS_MEM_INVALID_PDATA);
 728               	.LM93:
 729 027a 85E7      		ldi r24,lo8(117)
 730 027c 90E0      		ldi r25,hi8(117)
 731 027e 37C0      		rjmp .L32
 732               	.L34:
 344:OSsrc/os_mem.c ****     }
 345:OSsrc/os_mem.c **** #endif
 346:OSsrc/os_mem.c ****     OS_ENTER_CRITICAL();
 734               	.LM94:
 735               	/* #APP */
 736 0280 0FB6      		in __tmp_reg__,__SREG__
 737 0282 F894      		cli
 738 0284 0F92      		push __tmp_reg__
 347:OSsrc/os_mem.c ****     p_mem_data->OSAddr     = pmem->OSMemAddr;
 740               	.LM95:
 741               	/* #NOAPP */
 742 0286 8881      		ld r24,Y
 743 0288 9981      		ldd r25,Y+1
 744 028a 8083      		st Z,r24
 745 028c 9183      		std Z+1,r25
 348:OSsrc/os_mem.c ****     p_mem_data->OSFreeList = pmem->OSMemFreeList;
 747               	.LM96:
 748 028e 8A81      		ldd r24,Y+2
 749 0290 9B81      		ldd r25,Y+3
 750 0292 8283      		std Z+2,r24
 751 0294 9383      		std Z+3,r25
 349:OSsrc/os_mem.c ****     p_mem_data->OSBlkSize  = pmem->OSMemBlkSize;
 753               	.LM97:
 754 0296 8C81      		ldd r24,Y+4
 755 0298 9D81      		ldd r25,Y+5
 756 029a AE81      		ldd r26,Y+6
 757 029c BF81      		ldd r27,Y+7
 758 029e 8483      		std Z+4,r24
 759 02a0 9583      		std Z+5,r25
 760 02a2 A683      		std Z+6,r26
 761 02a4 B783      		std Z+7,r27
 350:OSsrc/os_mem.c ****     p_mem_data->OSNBlks    = pmem->OSMemNBlks;
 763               	.LM98:
 764 02a6 8885      		ldd r24,Y+8
 765 02a8 9985      		ldd r25,Y+9
 766 02aa AA85      		ldd r26,Y+10
 767 02ac BB85      		ldd r27,Y+11
 768 02ae 8087      		std Z+8,r24
 769 02b0 9187      		std Z+9,r25
 770 02b2 A287      		std Z+10,r26
 771 02b4 B387      		std Z+11,r27
 351:OSsrc/os_mem.c ****     p_mem_data->OSNFree    = pmem->OSMemNFree;
 773               	.LM99:
 774 02b6 8C85      		ldd r24,Y+12
 775 02b8 9D85      		ldd r25,Y+13
 776 02ba AE85      		ldd r26,Y+14
 777 02bc BF85      		ldd r27,Y+15
 778 02be 8487      		std Z+12,r24
 779 02c0 9587      		std Z+13,r25
 780 02c2 A687      		std Z+14,r26
 781 02c4 B787      		std Z+15,r27
 352:OSsrc/os_mem.c ****     OS_EXIT_CRITICAL();
 783               	.LM100:
 784               	/* #APP */
 785 02c6 0F90      		pop __tmp_reg__
 786 02c8 0FBE      		out __SREG__,__tmp_reg__
 353:OSsrc/os_mem.c ****     p_mem_data->OSNUsed    = p_mem_data->OSNBlks - p_mem_data->OSNFree;
 788               	.LM101:
 789               	/* #NOAPP */
 790 02ca 8085      		ldd r24,Z+8
 791 02cc 9185      		ldd r25,Z+9
 792 02ce A285      		ldd r26,Z+10
 793 02d0 B385      		ldd r27,Z+11
 794 02d2 2485      		ldd r18,Z+12
 795 02d4 3585      		ldd r19,Z+13
 796 02d6 4685      		ldd r20,Z+14
 797 02d8 5785      		ldd r21,Z+15
 798 02da 821B      		sub r24,r18
 799 02dc 930B      		sbc r25,r19
 800 02de A40B      		sbc r26,r20
 801 02e0 B50B      		sbc r27,r21
 802 02e2 808B      		std Z+16,r24
 803 02e4 918B      		std Z+17,r25
 804 02e6 A28B      		std Z+18,r26
 805 02e8 B38B      		std Z+19,r27
 354:OSsrc/os_mem.c ****     return (OS_NO_ERR);
 807               	.LM102:
 808 02ea 80E0      		ldi r24,lo8(0)
 809 02ec 90E0      		ldi r25,hi8(0)
 810               	.L32:
 811               	/* epilogue: frame size=0 */
 812 02ee DF91      		pop r29
 813 02f0 CF91      		pop r28
 814 02f2 0895      		ret
 815               	/* epilogue end (size=3) */
 816               	/* function OSMemQuery size 77 (72) */
 818               	.Lscope5:
 820               	.global	OS_MemInit
 822               	OS_MemInit:
 355:OSsrc/os_mem.c **** }
 356:OSsrc/os_mem.c **** #endif                                           /* OS_MEM_QUERY_EN                                
 357:OSsrc/os_mem.c **** /*$PAGE*/
 358:OSsrc/os_mem.c **** /*
 359:OSsrc/os_mem.c **** ***************************************************************************************************
 360:OSsrc/os_mem.c **** *                                    INITIALIZE MEMORY PARTITION MANAGER
 361:OSsrc/os_mem.c **** *
 362:OSsrc/os_mem.c **** * Description : This function is called by uC/OS-II to initialize the memory partition manager.  Yo
 363:OSsrc/os_mem.c **** *               application MUST NOT call this function.
 364:OSsrc/os_mem.c **** *
 365:OSsrc/os_mem.c **** * Arguments   : none
 366:OSsrc/os_mem.c **** *
 367:OSsrc/os_mem.c **** * Returns     : none
 368:OSsrc/os_mem.c **** *
 369:OSsrc/os_mem.c **** * Note(s)    : This function is INTERNAL to uC/OS-II and your application should not call it.
 370:OSsrc/os_mem.c **** ***************************************************************************************************
 371:OSsrc/os_mem.c **** */
 372:OSsrc/os_mem.c **** 
 373:OSsrc/os_mem.c **** void  OS_MemInit (void)
 374:OSsrc/os_mem.c **** {
 824               	.LM103:
 825               	/* prologue: frame size=0 */
 826               	/* prologue end (size=0) */
 375:OSsrc/os_mem.c **** #if OS_MAX_MEM_PART == 1
 376:OSsrc/os_mem.c ****     OSMemFreeList = (OS_MEM *)&OSMemTbl[0];             /* Point to beginning of free list         
 377:OSsrc/os_mem.c ****     OS_MemClr((INT8U *)&OSMemTbl[0], sizeof(OSMemTbl)); /* Clear the memory partition table        
 378:OSsrc/os_mem.c **** #endif
 379:OSsrc/os_mem.c **** 
 380:OSsrc/os_mem.c **** #if OS_MAX_MEM_PART >= 2
 381:OSsrc/os_mem.c ****     OS_MEM  *pmem;
 382:OSsrc/os_mem.c ****     INT16U   i;
 383:OSsrc/os_mem.c **** 
 384:OSsrc/os_mem.c **** 
 385:OSsrc/os_mem.c ****     OS_MemClr((INT8U *)&OSMemTbl[0], sizeof(OSMemTbl)); /* Clear the memory partition table        
 828               	.LM104:
 829 02f4 60E6      		ldi r22,lo8(96)
 830 02f6 70E0      		ldi r23,hi8(96)
 831 02f8 80E0      		ldi r24,lo8(OSMemTbl)
 832 02fa 90E0      		ldi r25,hi8(OSMemTbl)
 833 02fc 0E94 0000 		call OS_MemClr
 834 0300 2FE3      		ldi r18,lo8(63)
 835 0302 80E0      		ldi r24,lo8(OSMemTbl+48)
 836 0304 90E0      		ldi r25,hi8(OSMemTbl+48)
 386:OSsrc/os_mem.c ****     pmem = (OS_MEM *)&OSMemTbl[0];                      /* Point to memory control block (MCB)     
 387:OSsrc/os_mem.c ****     for (i = 0; i < (OS_MAX_MEM_PART - 1); i++) {       /* Init. list of free memory partitions    
 388:OSsrc/os_mem.c ****         pmem->OSMemFreeList = (void *)&OSMemTbl[i+1];   /* Chain list of free partitions           
 838               	.LM105:
 839 0306 9093 0000 		sts (OSMemTbl+2)+1,r25
 840 030a 8093 0000 		sts OSMemTbl+2,r24
 841 030e C097      		sbiw r24,48
 389:OSsrc/os_mem.c **** #if OS_MEM_NAME_SIZE > 1
 390:OSsrc/os_mem.c ****         pmem->OSMemName[0]  = '?';                      /* Unknown name                            
 843               	.LM106:
 844 0310 2093 0000 		sts OSMemTbl+16,r18
 391:OSsrc/os_mem.c ****         pmem->OSMemName[1]  = OS_ASCII_NUL;
 846               	.LM107:
 847 0314 1092 0000 		sts OSMemTbl+17,__zero_reg__
 392:OSsrc/os_mem.c **** #endif
 393:OSsrc/os_mem.c ****         pmem++;
 394:OSsrc/os_mem.c ****     }
 395:OSsrc/os_mem.c ****     pmem->OSMemFreeList = (void *)0;                    /* Initialize last node                    
 849               	.LM108:
 850 0318 1092 0000 		sts (OSMemTbl+50)+1,__zero_reg__
 851 031c 1092 0000 		sts OSMemTbl+50,__zero_reg__
 396:OSsrc/os_mem.c **** #if OS_MEM_NAME_SIZE > 1
 397:OSsrc/os_mem.c ****     pmem->OSMemName[0]  = '?';                          /* Unknown name                            
 853               	.LM109:
 854 0320 2093 0000 		sts OSMemTbl+64,r18
 398:OSsrc/os_mem.c ****     pmem->OSMemName[1]  = OS_ASCII_NUL;
 856               	.LM110:
 857 0324 1092 0000 		sts OSMemTbl+65,__zero_reg__
 399:OSsrc/os_mem.c **** #endif
 400:OSsrc/os_mem.c **** 
 401:OSsrc/os_mem.c ****     OSMemFreeList       = (OS_MEM *)&OSMemTbl[0];       /* Point to beginning of free list         
 859               	.LM111:
 860 0328 9093 0000 		sts (OSMemFreeList)+1,r25
 861 032c 8093 0000 		sts OSMemFreeList,r24
 862               	/* epilogue: frame size=0 */
 863 0330 0895      		ret
 864               	/* epilogue end (size=1) */
 865               	/* function OS_MemInit size 31 (30) */
 867               	.Lscope6:
 868               		.text
 870               	Letext:
 871               	/* File "OSsrc/os_mem.c": code  456 = 0x01c8 ( 401), prologues  24, epilogues  31 */
DEFINED SYMBOLS
                            *ABS*:00000000 os_mem.c
                            *ABS*:0000003f __SREG__
                            *ABS*:0000003e __SP_H__
                            *ABS*:0000003d __SP_L__
                            *ABS*:00000000 __tmp_reg__
                            *ABS*:00000001 __zero_reg__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccM5aaaa.s:90     .text:00000000 OSMemCreate
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccM5aaaa.s:289    .text:000000dc OSMemGet
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccM5aaaa.s:398    .text:00000146 OSMemNameGet
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccM5aaaa.s:486    .text:0000018a OSMemNameSet
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccM5aaaa.s:596    .text:000001f2 OSMemPut
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccM5aaaa.s:704    .text:00000264 OSMemQuery
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccM5aaaa.s:822    .text:000002f4 OS_MemInit
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccM5aaaa.s:870    .text:00000332 Letext

UNDEFINED SYMBOLS
__do_copy_data
__do_clear_bss
OSMemFreeList
OS_StrCopy
OS_StrLen
OSMemTbl
OS_MemClr

⌨️ 快捷键说明

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