Oh...I just did:

Interpreter>>primitiveSetOSErrorCode
| value |
self export: true.
value := self stackIntegerValue: 0.
successFlag ifTrue:[
osErrorCode  := value.
self pop: argumentCount.
].

where 

osErrorCode is an instvar in Interpreter...

(I found the variable declarations in interp.c, including gcBiasToGrowGCLimit like you pointed out, but I don't see how it ended up there!)

Rob

On Wed, Nov 25, 2009 at 11:08 PM, John M McIntosh <johnmci@smalltalkconsulting.com> wrote:
How about pasting your smalltalk code for primitiveSetOSErrorCode

On 2009-11-25, at 7:06 PM, Rob Rothwell wrote:

> I miraculously managed to somehow load VMMaker in Pharo on Windows XP.
>
> Furthermore, I managed to create a new Primitive:  Interpreter>>primitiveSetOSErrorCode.
>
> I was even able to use that primitive without the VM crashing!
>
> But I can't seem to find the declaration of my instance variable osErrorCode outside the scope of the primitive so I can use it in ioExit...
>
> Any tips?  Is there something special you have to do to create the instance variables?
>
> Thanks again for pointing me in the right direction...
>
> Rob
--
===========================================================================
John M. McIntosh <johnmci@smalltalkconsulting.com>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================