On 25/02/2008, John M McIntosh <
[hidden email]> wrote:
> >
>
> Ok, well a spend a day or so trying to compile up a vm
>
> I wonder why perhaps this shouldn't be a plugin you load? So you could
> have full featured VM, then the plugin hydra vm with fewer features
> (like no sound, ui)
Maybe someone else can explain this.
I can't answer on it with more than a single word: Impossible.
>
> I note I could not use the vmmaker supplied and build a proper
> interp.c on the macintosh, it would not build for example foo-
> >endOfMemory even tho I said the VM should be build
> using a structure.
>
First, you need to disable using foo struct when generating interp.c sources
(btw this should be done for all platforms).
So, make sure VMMaker using correct CodeGenerator class.
The CCodeGeneratorGlobalStructure is not unsupported for generating
HydraVM, so please remove, method
MacOSPowerPCOS9VMMaker>>createCodeGenerator , or make sure it's using
following:
^CCodeGenerator new initialize
> I think in sqFilePluginBasicPrims.c
> the source I have reads
> sqInt sqFileAtEnd(PLUGIN_IPARAM_COMMA SQFile *f) {
> /* Return true if the file's read/write head is at the end of the
> file. */
>
> if (!sqFileValid(PLUGIN_IPARAM_COMMA f)) return vmFunction(success)
> (PLUGIN_IARG_COMMA false);
> return ftell(getFile(f)) == getSize(f);
> }
>
> But as far as I could figure out that is wrong, it's reversed and
> should be.
>
> sqInt sqFileAtEnd(PLUGIN_IARG_COMMA SQFile *f) {
> /* Return true if the file's read/write head is at the end of the
> file. */
>
> if (!sqFileValid(PLUGIN_IPARAM_COMMA f)) return vmFunction(success)
> (PLUGIN_IPARAM_COMMA false);
> return ftell(getFile(f)) == getSize(f);
> }
>
Yes, thanks for noticing it. Its strange how it compiles without
errors.. Seems this function is never user or replaced by something
else in win32 build.
> mmm MainVM = 0x0 when I want to read the first image file. Oh well
> guess more work is required
>
Yes, take a look, how i initially creating interpreter instance,
before reading image file
in sqMain() function in sqWin32Intel.c file.
> I'll need some who wants to test, email me for details
>
>
> --
--
Best regards,
Igor Stasenko AKA sig.