[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: |
Alessandro Iurlano |
Subject: |
Re: [Qemu-devel] Printing bogus values in ne2000_asic_ioport_read()/ ne2000_receive() |
Date: |
Thu, 02 Mar 2006 11:40:15 +0100 |
Il giorno sab, 25/02/2006 alle 10.29 -0800, Umamaheswararao Karyampudi
ha scritto:
> 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
>
Maybe it's just a sign problem. Try declaring the s[] buffer as unsigned
char instead of just char.
Hope this helps,
Alessandro
signature.asc
Description: Questa parte del messaggio รจ firmata
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] Printing bogus values in ne2000_asic_ioport_read()/ ne2000_receive(),
Alessandro Iurlano <=