public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Calling an assembly function from redboot main.c
@ 2005-10-04 12:17 Sriramkumar Raju
  0 siblings, 0 replies; only message in thread
From: Sriramkumar Raju @ 2005-10-04 12:17 UTC (permalink / raw)
  To: ecos-discuss

Hi,
   I had booted redboot on i386 platform.  i am trying to call an
assembly function from redboot main.c file.
i did the following in main .c

void call_asm();

in cyg_start() function before the display of the redboot prompt i
called the asm function.
cyg_start()
{
...............
...............
...............
...............
...............
...............

call_asm();

 while (true) {
        if (prompt) {
            diag_printf("RedBoot> ");
         prompt = false;

        }

...............
...............
...............
...............
...............
}

In pcmb.inc file i have the entry for call_asm() function. The entry
will look like this

.globl    call_asm
.code32
call_asm:
            nop
            ret

But the moment code execution reaches call_asm() in cyg_stat()
function redboot is restarting.

I want to know what is the steps involved in calling an ASM function
from c file in case of redboot.

Thanks & regards,
Srriam.R

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-10-04 12:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-04 12:17 [ECOS] Calling an assembly function from redboot main.c Sriramkumar Raju

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).