This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Calling an assembly function from redboot main.c
- From: Sriramkumar Raju <rsriramkumar at gmail dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Tue, 4 Oct 2005 17:47:39 +0530
- Subject: [ECOS] Calling an assembly function from redboot main.c
- Reply-to: Sriramkumar Raju <rsriramkumar at gmail dot com>
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