Subject: Re: memtest86 in bochs
To: None <port-i386@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: port-i386
Date: 01/04/2004 18:37:40
On Wed, Dec 31, 2003 at 11:35:45AM +0100, Christian Biere wrote:
> Ben Collver wrote:
> > The confusing part is in query_pcbios(), at line 730 of head.S
> > xorl %eax, %eax
> >
> > At this point in the function, bochs is in real mode. I expected the xorl
> > to cause eax to be zeroed out, but instead it zeroes cs and sets eip to 2.
> > Can someone advise me if this is a quirk of the 80386 in real mode, or if
> > it looks like a bug in bochs?
>
> There's definately no such side-effect of "xor eax,eax". You can use all 32-bit
> registers in real-mode just like in protected mode. I'd even say to enter
> the latter successfully you have to use them. However, it's unlikely that the
> emulation is buggy here because a lot of DOS apps use 32-bit registers etc.
> Though I haven't used bochs in quite a while. I'd guess it's rather a problem
> of the debugger. Maybe it damaged the stack or an interrupt got in-between.
More likely the source is compiled for the wrpong mode.
Try adding '.code 16' directives to the .S files.
Bochs works well enough to install and run netbsd (if slowly).
David
--
David Laight: david@l8s.co.uk