[pso] Intrebare (masina big-endian)
mE
me_registered at yahoo.com
Tue Sep 30 17:59:01 EEST 2008
int a[] = {0x12345678, 0x22334455};
memdump arata asa:
0x78 0x56 0x34 0x12 0x55 0x44 0x33 0x22
----- Original Message ----
From: foxX <alex.mihaiuc at gmail.com>
To: Proiectarea Sistemelor de Operare <pso at cursuri.cs.pub.ro>
Sent: Tuesday, September 30, 2008 5:46:41 PM
Subject: Re: [pso] Intrebare (masina big-endian)
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/86ac456c/attachment.htm
More information about the pso
mailing list