Subject: Re: memtest86 in bochs
To: None <port-i386@netbsd.org>
From: Christian Biere <christianbiere@gmx.de>
List: port-i386
Date: 12/31/2003 11:35:45
--J2SCkAp4GZ/dPZZf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Ben Collver wrote:
> The confusing part is in query_pcbios(), at line 730 of head.S
>         xorl    %eax, %eax
>=20
> 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 t=
he
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 probl=
em
of the debugger. Maybe it damaged the stack or an interrupt got in-between.

--=20
Christian

--J2SCkAp4GZ/dPZZf
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQE/8qaB0KQix3oyIMcRAu3DAJ9KjcukamMm1GKArMT0Ub0giYEcyQCfTDeM
QzOJ1CdkSBdEQ0KU9qa8Wkc=
=RGYZ
-----END PGP SIGNATURE-----

--J2SCkAp4GZ/dPZZf--