[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Printing bogus values in ne2000_asic_ioport_read()/ ne2
From: |
Brian Wheeler |
Subject: |
Re: [Qemu-devel] Printing bogus values in ne2000_asic_ioport_read()/ ne2000_receive() |
Date: |
Fri, 03 Mar 2006 14:28:07 -0500 |
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<len;i++) {
> if (i%20 == 0)
> printf("\n");
> printf("%02x ", s[i]);
> }
> printf("\n");
> }
> And some bytes it prints as fffffffff<last byte>
> 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