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

Last change on this file since 28 was 28, checked in by sacerdot, 9 years ago

1) all the opcodes are there in ASM syntax

(but no labels, pseudo-instruction and similar ASM-level stuff)

2) assembly function (from ASM syntax to bytes) partially implemented
3) decode function (from bytes to ASM syntax) partially implemented
4) one-step execute function partially implemented

File size: 784 bytes
Line 
1exception FOO2
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 byte7_of_int: int -> byte7
17val byte_of_int: int -> byte
18val int_of_bit: bit -> int
19val int_of_byte: byte -> int
20val int_of_nibble: nibble -> int
21
22val (++): word -> int -> word
23
24val add8_with_c:
25 byte -> byte -> bit -> byte * bit * bit * bit (* +, c, ac, ov *)
26val subb8_with_c:
27 byte -> byte -> bit -> byte * bit * bit * bit (* -, c, ac, ov *)
28val dec: byte -> byte (* with roll-over *)
29val inc: byte -> byte (* with roll-over *)
Note: See TracBrowser for help on using the repository browser.