Last change
on this file since 28 was
28,
checked in by sacerdot, 11 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 | |
---|
1 | exception FOO2 |
---|
2 | |
---|
3 | type bit = bool |
---|
4 | type nibble = bit * bit * bit * bit |
---|
5 | type byte = nibble * nibble |
---|
6 | type byte7 = bit * bit * bit * nibble |
---|
7 | type word = byte * byte |
---|
8 | type word11 = bit * bit * bit * byte |
---|
9 | |
---|
10 | module Byte7Map : Map.S with type key = byte7 |
---|
11 | module WordMap : Map.S with type key = word |
---|
12 | |
---|
13 | val byte7_of_byte: byte -> byte7 |
---|
14 | |
---|
15 | val word_of_int: int -> word |
---|
16 | val byte7_of_int: int -> byte7 |
---|
17 | val byte_of_int: int -> byte |
---|
18 | val int_of_bit: bit -> int |
---|
19 | val int_of_byte: byte -> int |
---|
20 | val int_of_nibble: nibble -> int |
---|
21 | |
---|
22 | val (++): word -> int -> word |
---|
23 | |
---|
24 | val add8_with_c: |
---|
25 | byte -> byte -> bit -> byte * bit * bit * bit (* +, c, ac, ov *) |
---|
26 | val subb8_with_c: |
---|
27 | byte -> byte -> bit -> byte * bit * bit * bit (* -, c, ac, ov *) |
---|
28 | val dec: byte -> byte (* with roll-over *) |
---|
29 | val inc: byte -> byte (* with roll-over *) |
---|
Note: See
TracBrowser
for help on using the repository browser.