Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

.s function from evc++

0 views
Skip to first unread message

Alli Dem

unread,
Jun 3, 2009, 3:33:35 AM6/3/09
to
Hi ,

how can i call an asm code from a c++ project in evc 4.0 on a ce device.
like xlli_getFreq fuction exported from xlli_lowlev_init.s.
i include pxa27x_xllp.lib file.
add
extern "C" DWORD xlli_getFreq(void);
to cpp file.
but when i run the code app crashes.

Thanks
Alli.


Ulrich Eckhardt

unread,
Jun 3, 2009, 3:54:49 AM6/3/09
to

You might have to adjust the calling convention. It is also possible that it
doesn't use any of the common calling conventions, in which case you simply
can't call it. Also, "app crashes" can mean anything and nothing, i.e. is
completely useless as an error description.

Uli

--
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932

xcal

unread,
Jun 19, 2009, 4:02:50 PM6/19/09
to
well, I don't know anything about asm, but I suppose it would be interesting
to ask the same question in a forum dedicated to the machine's processor
programming language, because I believe the people who manufactured those
processors have all or almos all the programming rules.

hope this helps,
Carlos

"Alli Dem" <Alli...@gmail.com> escribi� en el mensaje
news:e$m451B5J...@TK2MSFTNGP03.phx.gbl...

xcal

unread,
Jun 19, 2009, 3:56:54 PM6/19/09
to

"Ulrich Eckhardt" <eckh...@satorlaser.com> escribi� en el mensaje
news:9rmhf6-...@satorlaser.homedns.org...

> Alli Dem wrote:
>> how can i call an asm code from a c++ project in evc 4.0 on a ce device.
>> like xlli_getFreq fuction exported from xlli_lowlev_init.s.
>> i include pxa27x_xllp.lib file.
>> add
>> extern "C" DWORD xlli_getFreq(void);
>> to cpp file.
>> but when i run the code app crashes.
>
> You might have to adjust the calling convention. It is also possible that
> it
> doesn't use any of the common calling conventions, in which case you
> simply
> can't call it. Also, "app crashes" can mean anything and nothing, i.e. is

yes, but statistics show the most probable thing is that crash mean
something.

> completely useless as an error description.
>
> Uli
>
> --
> Sator Laser GmbH

> Gesch�ftsf�hrer: Thorsten F�cking, Amtsgericht Hamburg HR B62 932
>


Bruce Eitman [eMVP]

unread,
Jun 19, 2009, 5:03:35 PM6/19/09
to
This is a perfect forum for asking the question. Microsoft, not the vendor,
defines the calling conventions for the software.

--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com
My BLOG http://geekswithblogs.net/bruceeitman

EuroTech Inc.
www.EuroTech.com

"xcal" <d22> wrote in message
news:%23gGhBiR...@TK2MSFTNGP03.phx.gbl...

Bruce Eitman [eMVP]

unread,
Jun 19, 2009, 5:02:24 PM6/19/09
to
Xcal:

The point that Ulrich was making is that crash doesn't mean anything
specific when asking a question in a newsgroup. Explaining what actually
occurs is of much greater value when asking for help.

--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com
My BLOG http://geekswithblogs.net/bruceeitman

EuroTech Inc.
www.EuroTech.com

"xcal" <d22> wrote in message

news:%23dmLyeR...@TK2MSFTNGP05.phx.gbl...

xcal

unread,
Jun 21, 2009, 10:50:22 AM6/21/09
to
thanks Bruce for your advise, I have just realized your idea.
I was thinking that probably to use asm instructions could
depend highly on the processor's model. This is, that WinCE
possibly leaves some freedom to programmers at asm level,
something that is purely interaction via C code with the
physical computer environment.

I thinked, that C/ASM/C++ code could be really independent
of Windodws, and that aditional interaction
is defined only for the processor's manufacturers.
You say this is not the case, wich is not an easy thing.

But, I recognize I never programmed asm, my very few experience
perhaps near these subjects is to make some code using GAPI, wich is
intended
precisely to hide the ASM part to deliver graphs to PPC devices.

thanks,
Carlos

"Bruce Eitman [eMVP]" <bruce.eit...@EuroTech.com.nospam> escribi� en
el mensaje news:e32EsFS8...@TK2MSFTNGP03.phx.gbl...

Bruce Eitman [eMVP]

unread,
Jun 21, 2009, 2:55:29 PM6/21/09
to
Xcal:

I understand your comments better now. Ali asked about calling assembly
code, not writing assembly code. So in that context Microsoft defines it,
or actually it is defined by the C standard which Microsoft implemented in
the compiler. Of course the assembly code must be written to be called from
C code.

You seem to be discussing writing ASM code, and in that context it is
defined by the CPU and the assembler.

--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com
My BLOG http://geekswithblogs.net/bruceeitman

EuroTech Inc.
www.EuroTech.com

"xcal" <d22> wrote in message news:OC22u8n8...@TK2MSFTNGP03.phx.gbl...

xcal

unread,
Jun 22, 2009, 9:12:35 PM6/22/09
to

Hi Bruce,

thanks for your comments,
wich are very useful to get
a better picture on these subjects.
Yes I was asking in general terms,
and your comments indeed are very
insigthful. It would take me very long
time to fix ideas by my own.

best regards,
Carlos.

"Bruce Eitman [eMVP]" <bruce.eit...@EuroTech.com.nospam> escribi� en

el mensaje news:%23u8vXHq...@TK2MSFTNGP04.phx.gbl...

0 new messages