From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FFFwl-0005gE-KE for qemu-devel@nongnu.org; Fri, 03 Mar 2006 14:28:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FFFwh-0005ds-Nl for qemu-devel@nongnu.org; Fri, 03 Mar 2006 14:28:13 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FFFwg-0005dW-Hw for qemu-devel@nongnu.org; Fri, 03 Mar 2006 14:28:11 -0500 Received: from [129.79.1.73] (helo=plounts.uits.indiana.edu) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FFFyR-0005WJ-UW for qemu-devel@nongnu.org; Fri, 03 Mar 2006 14:30:00 -0500 Received: from mail-relay.iu.edu (logchain.uits.indiana.edu [129.79.1.77]) by plounts.uits.indiana.edu (8.12.10/8.12.10/IUPO) with ESMTP id k23JS7aM012304 for ; Fri, 3 Mar 2006 14:28:07 -0500 (EST) Received: from wombat.dlib.indiana.edu (wombat.dlib.indiana.edu [129.79.35.182]) (authenticated bits=0) by mail-relay.iu.edu (8.12.10/8.12.10/IUPO) with ESMTP id k23JS7k2015997 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Fri, 3 Mar 2006 14:28:07 -0500 (EST) Subject: Re: [Qemu-devel] Printing bogus values in ne2000_asic_ioport_read()/ ne2000_receive() From: Brian Wheeler In-Reply-To: <20060226180110.89640.qmail@web36814.mail.mud.yahoo.com> References: <20060226180110.89640.qmail@web36814.mail.mud.yahoo.com> Content-Type: text/plain Date: Fri, 03 Mar 2006 14:28:07 -0500 Message-Id: <1141414087.8951.37.camel@wombat.dlib.indiana.edu> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Sun, 2006-02-26 at 10:01 -0800, Umamaheswararao Karyampudi wrote: > Hi, > I am using QEMU in one of my research projects. I > landed in a problem where I see bogus numbers being > printed when I printed the packet/each word that is > received from ne2000. > > In ne2000_receive(), I copied the packet received to a > static char [] and printed the packet using > static void print_packet(char *s, int len) > { > int i,j; > for (i=0;i if (i%20 == 0) > printf("\n"); > printf("%02x ", s[i]); > } > printf("\n"); > } > And some bytes it prints as fffffffff > instead of just the last byte. > For eg: > 52 54 00 12 34 56 00 ffffffff 4f 0a 46 05 08 00 45 00 > 00 ffffff80 00 00 > 40 00 40 01 ffffffbc 2b ffffffc0 ffffffa8 fffffffe > fffffffe ffffffc0 ffffffa8 ff > Just guessing, but is it a signed/unsigned thing? All of the ffffffxx values are above 0x7f... Brian