This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


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

Calling an assembly function from redboot main.c


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


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