This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ARM Cross-Assembler


Sorry, I think I could have explained it better. I will give an example, the code below is written with and can be read by ADS.
There are things like AREA, EXPORT or labels, aliases such as ULCON etc. that don't belong to the instruction set. Can GNU assembler read these, or instructions only? If instructions only, the point I am out of knowledge is how EXPORT and IMPORT could be used. In other words, how do you link assembly and c files without these, if GAS can only read instructions but not EXPORT,AREA, or comments, labels?

I had an assembly file written in this manner, and using GNU as (arm-elf-as) I got errors like, "error: bad instruction ULCON EQU 0". Maybe I am not using GAS the right way?

Many thanks.
Bahadir

AREA asmcode, CODE, READONLY
ULCON EQU 0
UCON EQU 4
USTAT EQU 8
UTXBUF EQU 12
EXPORT asm_put
asm_put ; asm_put starts here
start
LDR r4, [r0,#USTAT] ; comment
TST r4,#TXBRE ; comment
BEQ start ; comment


----Original Message Follows----
From: Yves Rutschle <y.rutschle@indigovision.com>
To: Bahadir Balban <bahbalban@hotmail.com>

Most of all, your questions are not very precise. Yes, you
can do mixed code: have both assembly and C in different
files in a same project that you then link together. You can
also put inline assembly in C.

There is one thing you cannot do: using assembly written for
ADS with Gnu as, as they have different directive syntax. It
is the general opinion of everybody on this list that it
should be feasible (and not very hard) to translate from one
to the other, but I don't know that anyone actually did it.

HTH,
/Y

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus


------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]