Compiling Asm file through mmp .

Login to reply to this topic.
Tue, 2005-02-08 03:41
Joined: 2004-09-27
Forum posts: 122
Hi all,
I have added few asm file in mmp file, but getting during compilation what extra option i need to add in mmp file compiling asm code, and what is asm file extension.

I have added my asm file in mmp same as CPP file and getting following error.

gcc: ..\TARGET\temp.asm: linker input file unused since linking not done.

How to add n compile assembler file through mmp file? Though writing some embedded asm code in cpp is ok but how to compile it as seperate file ?

hoping for your help.
singh

Tue, 2005-02-08 06:47
Joined: 2003-11-12
Forum posts: 68
Compiling Asm file through mmp .
I'm pretty sure if you name it *.s it will work.
Tue, 2005-02-08 08:02
Joined: 2004-09-27
Forum posts: 122
Compiling Asm file through mmp .
Thanks alot,
It is now compiling but with alot of errors. Why it throws error for commented line with ;(semicolon) and EXPORT Keyword.

Rgds
singh
Tue, 2005-02-08 09:16
Joined: 2004-08-30
Forum posts: 53
Compiling Asm file through mmp .
The summary first: The Gnu assembler (GAS) is an absolute piece of crap.

The details next: It's designed to process the output of the compiler (which it clearly does well ... most of the time), but using it as a standalone tool would definitely qualify as insane.

Useful info: IIRC, the comment character is "@" and most of the keywords are completely different from pretty much anything else out there.

I believe that ";" effectively means "new line" -- basically you can write multiple opcodes on a single text line and seperate them with ";"

Why you would want to do this (or what on earth they were thinking when they chose this particular formatting style), I'm not really sure -- ASM is cryptic enough as it stands, nevermind having multiple opcodes on a single line.

Try gcc.gnu.org (or somesuch) and google for tutorials on the directives syntax.

You'll find other information on using the assembler at various Linux-based support sites -- the documentation is fairly sparse.

Good luck!
Wed, 2005-02-09 18:11
Joined: 2004-12-29
Forum posts: 19
Compiling Asm file through mmp .
Please do have a look here:
http://www.symbian.com/developer/techlib/apps/9210game.html
As Kenneth Guy is using a lot of assembler in its project, you should get the information you are looking for.

Cheers,

Andre
Thu, 2005-02-10 04:24
Joined: 2004-09-27
Forum posts: 122
Compiling Asm file through mmp .
Hi Andre,
Thanks alot for the link and it is very helpful, after going through the source code, I found that it is very different  in syntax than normal.
I am not getting what is the significance of __12 , PQ212 and 6T
written in following lines in assembler file.

File:Blankarea.s
  .global BlankAreaAsm__12RScreenUtilsPQ212RScreenUtils6TBlank
BlankAreaAsm__12RScreenUtilsPQ212RScreenUtils6TBlank:

These are for following C++ source code:

File: RScreenUtils.cpp

void RScreenUtils::BlankArea(TBlank &aBlank) {
 BlankAreaAsm(&aBlank);
}


Can any body explain me  Huh:

Thanks in adv.
singh
Thu, 2005-02-10 11:26
Joined: 2004-12-29
Forum posts: 19
Compiling Asm file through mmp .
Hi Singh,

Please try to understand the format of your .def files. It contains the linker information needed for exported functions. In your case RScreenUtil isn't exported, so you won't find it. You could try to make RScreenUtil a exported class in a separate library. As example I appeded you one of my .def files. There will be another way as well to get hold of this information. Have a look in your make files under /epoc32/build. There might be a temporary file that is deleted later.

EXPORTS
   DumpFileL__8CHexDumpR6TDes16i11TChangeViewii @ 1 NONAME ; CHexDump::DumpFileL(TDes16 &, int, TChangeView, int, int)
   E32Dll__F10TDllReason @ 2 NONAME ; E32Dll(TDllReason)
   LoadFile2BufferL__8CHexDumpRC7TDesC16 @ 3 NONAME ; CHexDump::LoadFile2BufferL(TDesC16 const &)
   MaxLines__8CHexDump @ 4 NONAME ; CHexDump::MaxLines(void)
   NewL__8CHexDumpRC7TDesC16 @ 5 NONAME ; CHexDump::NewL(TDesC16 const &)
   "_._8CHexDump" @ 6 NONAME ; CHexDump::~CHexDump(void)



Here you can find the reverse way:
http://www.cs.helsinki.fi/u/mraento/symbian/reverse.html

Try googling for something like this:
http://www.google.co.uk/search?hl=en&q=elf+format+explained+def+files+symbian&btnG=Search&meta=
That is already an interesting read (but still doesn't contain everything you need):
http://www.arm.com/miscPDFs/8058.pdf

HTH,

Andre
  • Login to reply to this topic.