From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 240C0BB9A for ; Sat, 22 Oct 2005 02:39:14 +0200 (CEST) Received: from qproxy.gmail.com (qproxy.gmail.com [72.14.204.195]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j9M0dD1q001900 for ; Sat, 22 Oct 2005 02:39:13 +0200 Received: by qproxy.gmail.com with SMTP id z8so641157qbc for ; Fri, 21 Oct 2005 17:39:12 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=EYBP1BlbDHa4a1tC24shPhVgtpxmToJTIrDTGHaJAUQfzH0n4lmroYveP2ZAwsQ17VXS1XkjiVS5YW0ootFtJ5tDDYvxZzStaGN0gXmyfVccETnFuBCg4mJYM7ABSSy/k3MR1EXxDsWaSxwJGLFoks26y+v1AD9qLL1ppQkT5hs= Received: by 10.65.189.6 with SMTP id r6mr2333654qbp; Fri, 21 Oct 2005 17:39:12 -0700 (PDT) Received: by 10.65.35.7 with HTTP; Fri, 21 Oct 2005 17:39:12 -0700 (PDT) Message-ID: Date: Sat, 22 Oct 2005 13:39:12 +1300 From: Jonathan Roewen To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] The Bytecode Interpreter... In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Miltered: at nez-perce with ID 43598A31.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 bytecode:01 toplevel:01 bytecode:01 ocaml:01 toplevel:01 suitability:01 read-only:01 in-memory:01 ocamlrun:01 ...:98 functions:01 kernel:01 caml:02 caml:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 Hi Again, I have a few more questions about the toplevel/bytecode interpreter. I've noted in startup.c that caml_main tries to open itself, and do some sort of work on the file. The problem is that I want to be able to run the ocaml toplevel on the bare metal (and later extend it into an operating system of sorts). I've seen there is a caml_startup_code function in startup.c that appears to setup the caml environment without reading itself: however, how do I find all the values to pass to it? Alternatively, another idea, which I'd like some feedback on for suitabilit= y is: - load the 'kernel' as a module as well as the kernel itself (so I suppose mapped into memory twice). - provide some dummy C functions that a) let us open the 'kernel', and b) provide read-only access to the file. - let caml_main use this in-memory representation of the 'kernel' to start itself up. I'm wondering what kind of other obstacles would also affect my desire to achieve this as well. One last thing =3D) How does the toplevel get initialised, etc., and started running? Does it depend on ocamlrun being in the path, and being able to load it into memory or something? Jonathan