From: <jt...@us...> - 2007-06-20 23:57:33
|
Revision: 281 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=281&view=rev Author: jtytgat Date: 2007-06-20 16:57:31 -0700 (Wed, 20 Jun 2007) Log Message: ----------- Ignore ELF binaries & call the assembler routines 'main' so that they are called from C runtime library. Modified Paths: -------------- branches/simplified-build/!OSLib/Source/Test/Test/test.asm branches/simplified-build/!OSLib/Source/Test/Test/test.gas Property Changed: ---------------- branches/simplified-build/!OSLib/Source/Test/Test/ Property changes on: branches/simplified-build/!OSLib/Source/Test/Test ___________________________________________________________________ Name: svn:ignore - *,ff8 all_oslib.h all_oslib.Hdr + *,ff8 *,e1f all_oslib.h all_oslib.Hdr Modified: branches/simplified-build/!OSLib/Source/Test/Test/test.asm =================================================================== --- branches/simplified-build/!OSLib/Source/Test/Test/test.asm 2007-06-20 23:56:11 UTC (rev 280) +++ branches/simplified-build/!OSLib/Source/Test/Test/test.asm 2007-06-20 23:57:31 UTC (rev 281) @@ -4,22 +4,13 @@ EXPORT |_main| AREA code, CODE - ENTRY -|_main| SWI XOS_GetEnv ; get the environment - SWIVS OS_GenerateError ; exit on error - - MOV sp, r1 ; set up a stack - - STMFD sp!, {lr} ; save the return address +|main| STMFD sp!, {lr} ; save the return address ADR R0, message ; write the message std out SWI OS_Write0 - SWI OS_NewLine - LDMFD sp!, {lr} + LDMFD sp!, {pc} - SWI OS_Exit ; return - message = "Hello World from ObjAsm",0 END Modified: branches/simplified-build/!OSLib/Source/Test/Test/test.gas =================================================================== --- branches/simplified-build/!OSLib/Source/Test/Test/test.gas 2007-06-20 23:56:11 UTC (rev 280) +++ branches/simplified-build/!OSLib/Source/Test/Test/test.gas 2007-06-20 23:57:31 UTC (rev 281) @@ -4,21 +4,14 @@ #include "all_oslib.Hdr" .text - .global _main + .global main -_main: SWI XOS_GetEnv @ get the environment - SWIVS OS_GenerateError @ exit on error - - MOV sp, r1 @ set up a stack - - STMFD sp!, {lr} @ save the return address +main: STMFD sp!, {lr} @ save the return address ADR R0, message @ write the message std out SWI OS_Write0 SWI OS_NewLine - LDMFD sp!, {lr} @ return + LDMFD sp!, {pc} @ return - SWI OS_Exit - message: .asciz "Hello World from GNU assembler" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |