Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: "Sussillo, David" <sussillo@ftintl.com>,
	"'caml-list@inria.fr'" <caml-list@inria.fr>
Subject: Re: unsigned word type in OCaml?
Date: Mon, 1 Feb 1999 15:10:47 +0100	[thread overview]
Message-ID: <19990201151047.52170@pauillac.inria.fr> (raw)
In-Reply-To: <36B23B0D@smtp.ftintl.com>; from Sussillo, David on Fri, Jan 29, 1999 at 02:23:00PM -0800

> I'm working on a low level systems project, and I'm thinking about using   
> OCaml as the langauge.  However, try as I might, I simply cannot find a   
> reference to a machine word type.
> 
> More specially, I need:
> a. byte access to machine words
> b. unsigned 32 bit quantities (e.g. physical address)
> c. bitwise boolean operations (shifts, not, and & or)

None of this is supported natively in the language (OCaml's "int" type
and its associated operations is 31 or 63 bits, signed).

However, it's easy to define your "machine word" type as an abstract
type and implement it via small C functions.

Jean-Christophe Filliatre's "int32" library is a good starting point:

        http://pauillac.inria.fr/caml/caml-list/0200.html
        http://www.ens-lyon.fr/~jcfillia/ftp/ocaml/int32

Regards,

- Xavier Leroy




      parent reply	other threads:[~1999-02-03 12:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-29 22:23 Sussillo, David
1999-01-31 12:20 ` Jean-Christophe Filliatre
1999-02-01 14:10 ` Xavier Leroy [this message]

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=19990201151047.52170@pauillac.inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=sussillo@ftintl.com \
    /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