Little Endian Big Endian?
Little Endian Big Endian?
Ok Mac OS X is Big Endian and Windows is little Endian so what problems to fear when doing a Filetransfer system based on PBs Network libary communicating between Mac OS X and Windows? (All Apps in PB)
bye Nik
bye Nik
Visit www.sceneproject.org
If you also have to send the length of the content i would have to make sure that for example both sides use little endain.
Right?
Right?
Visit www.sceneproject.org
What do you mean it ins't working now? No function for conversion or no network support
Visit www.sceneproject.org
Code: Select all
Procedure LittleToBig(Long.l)
PokeB(@LongBig+2,PeekB(@Long+3))
PokeB(@LongBig+3,PeekB(@Long+2))
PokeB(@LongBig,PeekB(@Long+1))
PokeB(@LongBig+1,PeekB(@Long))
ProcedureReturn LongBig.l
EndProcedure
I also noticed that 'UNIX' is not the same as PokeS(@Address,"UNIX") Why?
And thats te point that makes us think that it should be called XINU Problem instead of NUXI Problem *confused*
Visit www.sceneproject.org
A little code used for a value from a file...
Code: Select all
nb.l=ReadLong()
MOV eax,nb
BSWAP eax
MOV nb,eax
Well it musst be correct but
Debuges XINU and it's called the NUXI Problem so wtf
Code: Select all
nb.l=0
PokeS(@nb,"UNIX",4)
MOV eax,nb
BSWAP eax
MOV nb,eax
Debug PeekS(@nb,4)
Visit www.sceneproject.org
Not 100% sure what we are getting at here, but ...
"UNIX" is 4 bytes long, respresenting here, I think, a 4 byte integer?
XINU is how a 4 byte (long) reversal would appear
NUXI is how 2x2 byte (words) reversal would appear.
Also, are you reversing all data sent one side to the other? I think (stress, think) you would only need to reverse words/longs where those were stored as words/longs in the original data.
So
>> [long]+"ABC"+[word]+[word]+[byte] - or - [1234]ABC[12][34][1]
would go across as
>> [gnol]+"ABC"+[drow]+[drow]+[byte] - or - [4321]ABC[21][43][1]
If you are sending "UNIX" and then, on fixing it on the other side, you are ending up with "XINU" then you don't need to be fixing it.
If you are ending up with "NUXI" (unfixed) on other side, need to be fixing word reversals.
If you are ending up with "XINU" (unfixed) on other side, need to be fixing long reversals.
But I am not really sure what it is that we are talking about. What exactly are we trying to address? What are you getting on the "other side"?
"UNIX" is 4 bytes long, respresenting here, I think, a 4 byte integer?
XINU is how a 4 byte (long) reversal would appear
NUXI is how 2x2 byte (words) reversal would appear.
Also, are you reversing all data sent one side to the other? I think (stress, think) you would only need to reverse words/longs where those were stored as words/longs in the original data.
So
>> [long]+"ABC"+[word]+[word]+[byte] - or - [1234]ABC[12][34][1]
would go across as
>> [gnol]+"ABC"+[drow]+[drow]+[byte] - or - [4321]ABC[21][43][1]
If you are sending "UNIX" and then, on fixing it on the other side, you are ending up with "XINU" then you don't need to be fixing it.
If you are ending up with "NUXI" (unfixed) on other side, need to be fixing word reversals.
If you are ending up with "XINU" (unfixed) on other side, need to be fixing long reversals.
But I am not really sure what it is that we are talking about. What exactly are we trying to address? What are you getting on the "other side"?
@}--`--,-- A rose by any other name ..
It was a theoretical Problem Haven't got a Mac yet but was interested in it and maybe it was good because it seems like it reminded fred at something
Well maybe I can get my Hands on a Mac then I will test this Theorey in practice. But nice to know how the made this NUXI problem up. Because who the hell would stroe a 4 byte String in 2 words
Thanks a lot for your efford
Well maybe I can get my Hands on a Mac then I will test this Theorey in practice. But nice to know how the made this NUXI problem up. Because who the hell would stroe a 4 byte String in 2 words
Thanks a lot for your efford
Visit www.sceneproject.org
In theory, no. For more details:
http://en.wikipedia.org/wiki/Endian
http://en.wikipedia.org/wiki/Endian