How to write a sample program "Hello world" using arm assembly language for gnu as(gas) to...

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi,

I have an arm board, which is runnig Linux. My question is would anyone
tell me how to write a "Hello, World" program using ARM assembly
language, compiled by gnu as(gas) on Linux? Thanks.


Re: How to write a sample program "Hello world" using arm assembly language for gnu as(gas) to compile?

Quoted text here. Click to load it

Personally, I would have thought that the easiest way would be to write it in C
first and then compile it using the "-S" option. This option tells gcc to
compile, but not assemble. You may also need a -m switch to tell gcc to produce
ARM assembly.

Pete


Re: How to write a sample program "Hello world" using arm assembly languagefor gnu as(gas) to compile?

--------------8622F69077800592BF9E05CE
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Keichii -

First build yourself a gcc cross-compile for Arm.  There's help here.

Create a C program to do what you want.

Cross-compile to assembly, using the "-S" option, eg.
"arm-unknown-linux-gnu-gcc -S hello.c"

- Glen

Keichii wrote:

Quoted text here. Click to load it

--
Glen Call
snipped-for-privacy@flash.net


We've slightly trimmed the long signature. Click to see the full one.

Site Timeline