Thank you for your answer. But I'm still perplexd. pushl %eax //at that time ,%eax=0? so BootMain will receive NULL parameter? call _BootMain
--- On Wed, 5/20/09, [email protected] <[email protected]> wrote: > From: [email protected] <[email protected]> > Subject: Re: [ros-dev] runtime time function question in freeldr > To: "ReactOS Development List" <[email protected]> > Date: Wednesday, May 20, 2009, 3:18 AM > This is not an Intel syntax. > Operands in memory operations have inverted order: > > mov src, dest > > not > > mov dest, src > > thus eax == 0 > > > Zhang Fan pisze: > > Hi everybody, > > I'm a newbie of ReactOS, and I've just looked a piece > of code in freeldr module. I found some runtime function > such as strstr(). I want to know if the run time lib should > be initialized, and where the initialized code. > > Another question is that a piece of code in arch.S > > > > > > EXTERN(RealEntryPoint) > > > > //.... > > .code32 > > > > /* Zero BootDrive and BootPartition > */ > > xorl %eax,%eax > > movl > %eax,(_BootDrive) > > movl > %eax,(_BootPartition) > > > > /* Store the boot drive */ > > movb > %dl,(_BootDrive) > > > > /* Store the boot partition */ > > movb > %dh,(_BootPartition) > > > > /* GO! */ > > pushl %eax > > call _BootMain > > > > At there, I think %eax should equal zero, and BootMain > will call CmdLineParse(),and CmdLineParse will call > strstr(). So it cause strstr will receive a NULL parameter. > Is it right? > > > > Thank you. > > > > Fan Zhang > > > > > > > > > > _______________________________________________ > > Ros-dev mailing list > > [email protected] > > http://www.reactos.org/mailman/listinfo/ros-dev > > > > _______________________________________________ > Ros-dev mailing list > [email protected] > http://www.reactos.org/mailman/listinfo/ros-dev > _______________________________________________ Ros-dev mailing list [email protected] http://www.reactos.org/mailman/listinfo/ros-dev
