<div dir="ltr">Hi Clément,<br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 18, 2015 at 7:26 AM, Clément Bera <span dir="ltr">&lt;<a href="mailto:bera.clement@gmail.com" target="_blank">bera.clement@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> <br><div dir="ltr">Hello,<div><br></div><div>Is there a primitive or a parameter that I can call from the image to know the endianness of the processor / VM ?<br></div></div></blockquote><div><br></div><div>Amazingly no (well it surprised me, anyway).  Squeak has an elaborate BitBlt-based scheme for calculating it.  But in Spur we know adoptInstance: between bit objects will work so we can do the following:</div><div><div><span class="" style="white-space:pre">        </span></div><div>| f |</div><div>f := BoxedFloat64 new.</div><div><span class="" style="white-space:pre">f </span>at: 1 put: 1; at: 2 put: 1.</div><div>ByteArray adoptInstance: f.</div><div>f first = 1 ifTrue: [#little] ifFalse: [#big]</div></div><div><br></div><div>-- <br></div></div><div class="gmail_signature">best,<div>Eliot</div></div>
</div></div>