[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Assembly Language Question

> From: <brian@xxxxxxx.net>
> Date: Tue, 18 Nov 2003 16:35:06 -0800

> On our Dev Board 82 I am trying to create a "Hello World" program in
> assembly language. I have programmed many programs in x86 assembler before.
> 4 Hrs of googling did not produce any example assembler programs. Does
> anyone have a simple .asm file we can use as a "skeleton".

Are you not aware of the gcc compiler option "-S"?  Compile your
"Hello, world" C program with it and there you go.  For the ABI,
please refer to the documentation, specifically the ABI
subsection in Chapter 6 (CRIS compiler specifics) at

> Do we need to use
> the Makefile?

What Makefile?

> We just need a little push in the right direction.

Do you have a specific need for assembly programming?

FWIW, I see no practical need for application programming in
assembly (i.e. outside of *small* parts of the Linux kernel and
certain low-level library details).  Most kernel drivers are
written in C.  You can't beat the GCC compiler, can you? ;-)

> Should our asm file end in .S (example.S) so gcc knows its an
> assembler file.

Yes, or .s if you don't want it preprocessed with the C
preprocessor.  Like with i386 and others instruction sets
supported by the GNU tool set.

brgds, H-P