init.s

来自「各种硬件平台上的us OS移植实例(arm6)」· S 代码 · 共 41 行

S
41
字号
    	TTL 	ARM uC/OS minimal run-time system > init.s    	; ---------------------------------------------------------------------    	; This file provides a VERY simple (minimal) run-time support    	; for 'C' programs.    	;    	; $Revision: 0.1 $    	;   $Author: jsmith $    	;     $Date: 941103 $    	;    	; Copyright (c) 1994, VLSI Technology Inc. All Rights Reserved.    	; ---------------------------------------------------------------------    	INCLUDE	swis_h.s    	; ---------------------------------------------------------------------	IMPORT	main	    ; user application entry point	EXPORT	__main	    ; standard name for 'C' entry point on the ARM    	; ---------------------------------------------------------------------	AREA	|uCOS_init|,CODE,READONLY	ENTRY__main 	; We provide *NO* argument support for the "main" function we    	; are about to call.    	;    	; At the moment we have a hard-wired "top of memory" stack    	; pointer.    	SWI 	GetEnv	    	; read environment information    	MOV 	sp,a2	    	; RAM size is returned in "a2"    	; This then becomes the stack pointer for the initial    	; application thread.    	;	; As long as "main" is an APCS-3 conforming function, it will	; not expect any arguments in "v1", and it will happily return	; using its entry "lr". This saves a couple of instructions.	B	main		; extern int main(void) ;    	; ---------------------------------------------------------------------	END 	; EOF init.s

⌨️ 快捷键说明

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