source: Deliverables/D4.1/physical.mli @ 72

Last change on this file since 72 was 72, checked in by mulligan, 9 years ago

DA instruction implemented: pretty complex!

File size: 1.0 KB
Line 
1exception Byte7_conversion
2
3type bit = bool
4type nibble = bit * bit * bit * bit
5type byte = nibble * nibble
6type byte7 = bit * bit * bit * nibble
7type word = byte * byte
8type word11 = bit * bit * bit * byte
9
10module Byte7Map : Map.S with type key = byte7
11module WordMap : Map.S with type key = word
12
13val byte7_of_byte: byte -> byte7
14
15val word_of_int: int -> word
16val int_of_word: word -> int
17val byte7_of_int: int -> byte7
18val byte_of_int: int -> byte
19val int_of_bit: bit -> int
20val int_of_byte: byte -> int
21val int_of_byte7: byte7 -> int
22val int_of_nibble: nibble -> int
23val nibble_of_int: int -> nibble
24val byte7_of_bit: bit -> byte7
25val byte_of_byte7: byte7 -> byte
26
27val complement: byte -> byte
28
29val (++): word -> int -> word
30
31val add8_with_c:
32 byte -> byte -> bit -> byte * bit * bit * bit (* +, c, ac, ov *)
33val subb8_with_c:
34 byte -> byte -> bit -> byte * bit * bit * bit (* -, c, ac, ov *)
35val dec: byte -> byte (* with roll-over *)
36val inc: byte -> byte (* with roll-over *)
37
38val nth_bit: int -> byte -> bit
39val set_nth_bit: int -> bit -> byte -> byte
Note: See TracBrowser for help on using the repository browser.