Browse thread
[Caml-list] The Bytecode Interpreter...
-
Jonathan Roewen
- David MENTRE
- Jonathan Roewen
- Jonathan Roewen
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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... |
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 suitability 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 =) 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