Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] The Bytecode Interpreter...
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jonathan Roewen <jonathan.roewen@g...>
Subject: Re: [Caml-list] The Bytecode Interpreter...
Hmm,

It might not be the interpreter afterall, or at least I'm ending up
with some very volatile machine code =/

Adding a printf() and a clear_screen() just before "res =
caml_interprete(caml_start_code, code_size);"
startup.c/caml_startup_code, and the problematic code runs fine...

So, not sure where the fault lies on this one... =/

On 10/26/05, Jonathan Roewen <jonathan.roewen@gmail.com> wrote:
> Hi once again,
>
> Hopefully this'll be my last problem to solve ;-)
>
> I've got ocamlrun + a bytecode app running on the bare metal, finally =)
>
> The following works fine:
>
> print_endline "Hello, World";;
>
> but, the following fails:
>
> Printf.printf "Hello, World\n%!";;
>
> with a print_endline statement before it, not even that gets run, so
> it appears to be a problem with loading the bytecode itself.
>
> The bytecode app is created using ocamlc -output-obj, and the .o file
> is linked into my kernel. I then call caml_startup(argv), where argv =
> { "" }.
>
> I've also experienced the same problem (appearing to not load/run the
> bytecode) when using Scanf & Hashtbl modules (so it's not isolated to
> Printf).
>
> What is the bytecode interpreter trying to do? Any clues? ;-) I'm
> trying to debug file open calls and things, but nothing appears to
> show up, and I don't get any errors printed to stdout/stderr by the
> interpreter.
>
> Jonathan
>