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

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.

Reply to
Keichii
Loading thread data ...

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

Reply to
Pete Brett
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:

Reply to
Glen Call

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.