~ubuntu-branches/ubuntu/hardy/ocaml-doc/hardy

« back to all changes in this revision

Viewing changes to examples/picomach/code.ml

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Mimram
  • Date: 2007-09-08 01:49:22 UTC
  • mfrom: (0.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070908014922-lvihyehz0ndq7suu
Tags: 3.10-1
* New upstream release.
* Removed camlp4 documentation since it is not up-to-date.
* Updated to standards version 3.7.2, no changes needed.
* Updated my email address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
(***********************************************************************)
2
 
(*                                                                     *)
3
 
(*                           Objective Caml                            *)
4
 
(*                                                                     *)
5
 
(*               Pierre Weis, projet Cristal, INRIA Rocquencourt       *)
6
 
(*                                                                     *)
7
 
(*  Copyright 2001 Institut National de Recherche en Informatique et   *)
8
 
(*  en Automatique.  All rights reserved.  This file is distributed    *)
9
 
(*  only by permission.                                                *)
10
 
(*                                                                     *)
11
 
(***********************************************************************)
12
 
type registre = int;;
13
 
 
14
 
type op�rande =
15
 
   | Reg of registre
16
 
   | Imm of int;;
17
 
 
18
 
type instruction =
19
 
   | Op of op�ration * registre * op�rande * registre
20
 
   | Jmp of op�rande * registre
21
 
   | Braz of registre * int
22
 
   | Branz of registre * int
23
 
   | Scall of int
24
 
   | Stop
25
 
 
26
 
and op�ration =
27
 
  | Load | Store | Add | Mult | Sub | Div
28
 
  | And | Or | Xor | Shl | Shr
29
 
  | Slt | Sle | Seq;;
30
 
 
31
 
let nombre_de_registres = 32
32
 
and sp = 30
33
 
and ra = 31
34
 
and taille_du_mot = 4;;