[pso] Intrebare (masina big-endian)

foxX alex.mihaiuc at gmail.com
Tue Sep 30 17:46:41 EEST 2008


poftim http://msdn.microsoft.com/en-us/library/ms796989.aspx
int tag = '1gaT'

2008/9/30 mE <me_registered at yahoo.com>

> :) same answer here
>
> ----- Original Message ----
> From: Alexandru Moşoi <brtzsnr at gmail.com>
> To: laurentiu.duca at cs.pub.ro; Proiectarea Sistemelor de Operare <
> pso at cursuri.cs.pub.ro>
> Sent: Tuesday, September 30, 2008 5:26:44 PM
> Subject: Re: [pso] Intrebare (masina big-endian)
>
> 2008/9/30 Laurentiu-Cristian Duca <laurentiu.duca at mail.cs.pub.ro>:
> > Buna ziua,
> >
> >  Am nevoie de un sfat.
> > Pe o masina big-endian,
> > char *str="abcd";
> > str[0]==(*str) este 'd' // nu este 'a'.
>
> da?
> eu stiam ca bigendian se refera la asezarea byteurile intr-un numar
> intreg (gen int32_t) si nu intr-un sir. pentru siruri ordinea nu
> trebuie sa se schimbe.
>
> daca ai facut ceva de genul:
> int a = 45354;
> char *str = (int*)&a; s-ar putea sa ai surprize de genul celor de mai
> sus, altfel nu vad cum ai obtinut 'd' in loc de 'a'.
>
> oricum, e posibil sa gresesc eu...
>
>
> --
> Alexandru Moşoi
> http://alexandru.mosoi.googlepages.com
>
> Please avoid sending me Word or PowerPoint attachments.
> See http://www.gnu.org/philosophy/no-word-attachments.html
> _______________________________________________
> pso mailing list
> pso at cursuri.cs.pub.ro
> http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/pso
>
>
> _______________________________________________
> pso mailing list
> pso at cursuri.cs.pub.ro
> http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/pso
>
>


-- 
kthxbai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/pso/attachments/20080930/9c59edbd/attachment.htm 


More information about the pso mailing list