<div dir="ltr">I am using the following version:<div><br></div><div style>VMMaker</div><div style>oscog-EstebanLorenzano.236</div><div style><br></div><div style>Phil</div><div style><br></div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">2013/4/11 Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com" target="_blank">siguctua@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
On 11 April 2013 18:00, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Thu, Apr 11, 2013 at 2:11 AM, <a href="mailto:phil@highoctane.be">phil@highoctane.be</a> &lt;<a href="mailto:phil@highoctane.be">phil@highoctane.be</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Hello,<br>
&gt;&gt;<br>
&gt;&gt; I&#39;ve been working on getting the simulator to work from VMMaker.<br>
&gt;&gt;<br>
&gt;&gt; Now, I can load my 6505 formatted image inside the simulator and it looks okay (from what I can inspect).<br>
&gt;&gt;<br>
&gt;&gt; Then, I am now running the test of the sim:<br>
&gt;&gt;<br>
&gt;&gt; test<br>
&gt;&gt; transcript clear.<br>
&gt;&gt; byteCount := 0.<br>
&gt;&gt; quitBlock := [^ self].<br>
&gt;&gt; self internalizeIPandSP.<br>
&gt;&gt; self fetchNextBytecode.<br>
&gt;&gt; [true] whileTrue:<br>
&gt;&gt; [self dispatchOn: currentBytecode in: BytecodeTable.<br>
&gt;&gt; byteCount := byteCount + 1.<br>
&gt;&gt; byteCount \\ 10000 = 0 ifTrue: [self fullDisplay]].<br>
&gt;&gt; self externalizeIPandSP.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; and I hit an issue:<br>
&gt;&gt;<br>
&gt;&gt; MNU: isInstanceOfClassFloat: oop.<br>
&gt;&gt; InterpreterSimulatorLSB(Interpreter)&gt;&gt;floatValueOf:<br>
&gt;&gt; InterpreterSimulatorLSB(Interpreter)&gt;&gt;loadFloatOrIntFrom:<br>
&gt;&gt; InterpreterSimulatorLSB(Interpreter)&gt;&gt;primitiveFloatEqual:toArg:<br>
&gt;&gt; InterpreterSimulatorLSB(Interpreter)&gt;&gt;bytecodePrimEqual<br>
&gt;&gt; InterpreterSimulatorLSB(InterpreterSimulator)&gt;&gt;dispatchOn:in:<br>
&gt;&gt; InterpreterSimulatorLSB(InterpreterSimulator)&gt;&gt;test<br>
&gt;&gt; UndefinedObject&gt;&gt;DoIt<br>
&gt;&gt;<br>
&gt;&gt; This happens here:<br>
&gt;&gt;<br>
&gt;&gt; floatValueOf: oop<br>
&gt;&gt; &quot;Answer the C double precision floating point value of the argument,<br>
&gt;&gt; or fail if it is not a Float, and answer 0.<br>
&gt;&gt; Note: May be called by translated primitive code.&quot;<br>
&gt;&gt;<br>
&gt;&gt; | isFloat result |<br>
&gt;&gt; &lt;returnTypeC: #double&gt;<br>
&gt;&gt; &lt;var: #result type: #double&gt;<br>
&gt;&gt; isFloat := self isInstanceOfClassFloat: oop.<br>
&gt;&gt; isFloat ifTrue:<br>
&gt;&gt; [self cCode: &#39;&#39; inSmalltalk: [result := Float new: 2].<br>
&gt;&gt; self fetchFloatAt: oop + BaseHeaderSize into: result.<br>
&gt;&gt; ^result].<br>
&gt;&gt; self primitiveFail.<br>
&gt;&gt; ^0.0<br>
&gt;&gt;<br>
&gt;&gt; There is such a method in IntepreterPrimitives, but not in the Interpreter itself nor parents.<br>
&gt;&gt;<br>
&gt;&gt; InterpreterPrimitives&gt;&gt;isInstanceOfClassFloat: oop<br>
&gt;&gt; &lt;inline: true&gt;<br>
&gt;&gt; &quot;N.B.  Because Slang always inlines is:instanceOf:compactClassIndex:<br>
&gt;&gt; (because is:instanceOf:compactClassIndex: has an inline: pragma) the<br>
&gt;&gt; phrase (objectMemory splObj: ClassFloat) is expanded in-place and is<br>
&gt;&gt; _not_ evaluated if oop has a non-zero CompactClassIndex.&quot;<br>
&gt;&gt; ^objectMemory<br>
&gt;&gt; is: oop<br>
&gt;&gt; instanceOf: (objectMemory splObj: ClassFloat)<br>
&gt;&gt; compactClassIndex: ClassFloatCompactIndex<br>
&gt;&gt;<br>
&gt;&gt; Clues?<br>
&gt;<br>
&gt;<br>
&gt; Just copy the method into Interpreter and replace objectMemory with self.  But I don&#39;t understand which VMMsker you&#39;re using.  In David Lewis&#39; trunk, e.g. VMMaker-dtl.316, Interpreter inherits from InterpreterPrimitives.<br>


<br>
It its Cog branch, i think.<br>
<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Phil<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
<span class="HOEnZb"><font color="#888888">&gt;<br>
&gt; --<br>
&gt; best,<br>
&gt; Eliot<br>
&gt;<br>
<br>
<br>
<br>
--<br>
Best regards,<br>
Igor Stasenko.<br>
<br>
</font></span></blockquote></div><br></div>