initial eax value on x86

Philipp Eppelt philipp.eppelt at
Thu Aug 11 16:06:20 UTC 2011

Hello RTEMS-User,

I am a student at Dresden University of Technology and I am currently 
working on a student project with the goal to get RTEMS working on L4 
with the help of the L4-vCPU interface.

I have a simple HelloWorld and compiled it for i386+pc586. I load the 
hello.exe elf into my program, set the IP to the entry_point, zeroed the 
area between filesize and memsize and set the SP to the end of that area.
So far it works. But I get a PageFault on 100018, which is the asm 
00100018     cmp    (%eax),%dh

So after the entry point 10000c there is only one instruction touching eax:
00100010     dec    %eax

Initially %eax is 0, then its -1.
This is quite confusing and I couldn't find any hint in the start.S or 
bootcard.c if eax has to be initialized with a special value.

Or did I completely miss something?

I appreciate your help.

Kind Regards,
Philipp Eppelt

More information about the users mailing list