In Pharo it is similar. However, we would like to have an image where BitBlt and Form are not there.
Here's one that works on both Spur and V3. It only works on a Cog or Stack VM (and hence is OK for Pharo) since it depends on Floats being stored in the platform order internally.
| f | f := Float new. f at: 2 put: 1. "store the least significant word of the float with 1; on big endian machines this is the second word" Bitmap adoptInstance: f. f first = 1 ifTrue: [#little] ifFalse: [#big]
Do you have a magic invocation that would not involved graphic objects? What would be cool is to have vm parameter or something like that. We want to reduce the dependencies in the core.
Stef
El mié., 18 de mar. de 2015 a la(s) 5:52 p. m., David T. Lewis lewis@mail.msen.com escribió:
It is easy to add a primitive for this, but it should not be necessary. See SmalltalkImage>>calcEndianness in Squeak.
Dave
Hello,
Is there a primitive or a parameter that I can call from the image to know the endianness of the processor / VM ?
Thanks,
Clement
-- best, Eliot