From: Tore Lund <tl001@online.no>
To: caml-list@pauillac.inria.fr
Subject: [Caml-list] Porting to EPOC
Date: Tue, 29 May 2001 11:07:28 +0200 [thread overview]
Message-ID: <3B1366D0.8FAD3FEC@online.no> (raw)
I am trying to port the OCaml runtime to EPOC. If you don't know EPOC,
this is the operating system in recent Psion PDAs and a growing number
of mobile phones.
Development for EPOC is normally done in a PC emulator using VC++. Once
everything works you use a setup where GCC is called upon to produce
code for the target machine (which has an ARM processor). Thus, porting
to EPOC actually means porting to two different platforms: emulator and
target.
So far I have compiled ocamlrun with an extra module of my own that
allows the program to be started from EPOC. Once the program is
running, I want to call caml_main() with the name of a bytecode
executable. What will hopefully happen then is that the bytecode file
will be loaded, initializations will be performed, and after that I will
be able to call some ML function each time the user presses a key. This
ought to work somehow.
However, the ML code must necessarily call EPOC functions in order to
perform output and the like. Suppose I have a function epocfunc() in my
startup EPOC module, how can I tell ocamlc that epocfunc() is a legal
function? The systematic way to go about it is of course to port ocamlc
to EPOC as well and then do things by the book, but I had really hoped
to avoid this (especially since two ports are required). And none of
the -custom, -make-runtime or -output-obj switches seem to address this
situation.
So, is there a way to make the Win32 version of ocamlc produce bytecode
that is machine-independent and that calls epocfunc()? One thing that
might work is to make a C file with a dummy epocfunc(), put it in the
byterun directory and then recompile everything (for Win32). That would
presumably make ocamlc accept epocfunc() as a primitive. But this is
really a dirty trick, and I had hoped for a less messy way to do it.
I notice there is an undocumented compiler switch -use-prims <file>.
Maybe this would solve my problem if I knew the format of <file>?
Grateful for any hint.
--
Tore
-------------------
To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr
next reply other threads:[~2001-05-29 9:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-29 9:07 Tore Lund [this message]
2001-05-29 12:00 ` Xavier Leroy
2001-05-29 14:10 ` Tore Lund
2001-05-29 14:22 ` Alain Frisch
2001-05-29 14:59 ` Tore Lund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3B1366D0.8FAD3FEC@online.no \
--to=tl001@online.no \
--cc=caml-list@pauillac.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox