Oh...I just did:<div><br></div><div><div>Interpreter&gt;&gt;primitiveSetOSErrorCode</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>| value |</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>self export: true.</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>value := self stackIntegerValue: 0.</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>successFlag ifTrue:[</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>osErrorCode  := value.</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>self pop: argumentCount.</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>].</div><div><br></div><div>where </div><div><br></div><div>
osErrorCode is an instvar in Interpreter...</div><div><br></div><div>(I found the variable declarations in interp.c, including gcBiasToGrowGCLimit like you pointed out, but I don&#39;t see how it ended up there!)</div><div>
<br></div><div>Rob</div><br><div class="gmail_quote">On Wed, Nov 25, 2009 at 11:08 PM, John M McIntosh <span dir="ltr">&lt;<a href="mailto:johnmci@smalltalkconsulting.com">johnmci@smalltalkconsulting.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">How about pasting your smalltalk code for primitiveSetOSErrorCode<br>
<div class="im"><br>
On 2009-11-25, at 7:06 PM, Rob Rothwell wrote:<br>
<br>
&gt; I miraculously managed to somehow load VMMaker in Pharo on Windows XP.<br>
&gt;<br>
&gt; Furthermore, I managed to create a new Primitive:  Interpreter&gt;&gt;primitiveSetOSErrorCode.<br>
&gt;<br>
&gt; I was even able to use that primitive without the VM crashing!<br>
&gt;<br>
&gt; But I can&#39;t seem to find the declaration of my instance variable osErrorCode outside the scope of the primitive so I can use it in ioExit...<br>
&gt;<br>
&gt; Any tips?  Is there something special you have to do to create the instance variables?<br>
&gt;<br>
&gt; Thanks again for pointing me in the right direction...<br>
&gt;<br>
&gt; Rob<br>
</div><div><div></div><div class="h5">--<br>
===========================================================================<br>
John M. McIntosh &lt;<a href="mailto:johnmci@smalltalkconsulting.com">johnmci@smalltalkconsulting.com</a>&gt;   Twitter:  squeaker68882<br>
Corporate Smalltalk Consulting Ltd.  <a href="http://www.smalltalkconsulting.com" target="_blank">http://www.smalltalkconsulting.com</a><br>
===========================================================================<br>
<br>
<br>
<br>
<br>
</div></div></blockquote></div><br></div>