From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@9fans.net Subject: Re: [9fans] _tos puzzle From: "Russ Cox" Date: Fri, 9 May 2008 09:08:44 -0400 In-Reply-To: <7A069CFA-C55D-4B5F-99B3-B1E82EC0D4BF@kix.in> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20080509131200.4A20F1E8C5C@holo.morphisms.net> Topicbox-Message-UUID: a4658fbc-ead3-11e9-9d60-3106f5b1d025 > I did, and to my surprise, AX is 0, even though I set it properly in > the loader. It appears as if Linux is setting AX to 0 sometime after > the loader finishes, but before the executable begins. All other > registers, however, are preserved (eip being the most important). The zero you see in AX is probably the return value from exec. Russ