[ros-dev] runtime time function question in freeldr

pay7n at o2.pl pay7n at o2.pl
Tue May 19 21:18:04 CEST 2009


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
> Ros-dev at reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev
> 



More information about the Ros-dev mailing list