Changeset 28


Ignore:
Timestamp:
Sep 2, 2010, 6:30:29 PM (9 years ago)
Author:
sacerdot
Message:

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

Location:
Deliverables/D4.1
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D4.1/ASM.mli

    r27 r28  
    55type ('a,'b,'c,'d,'e,'f) union6 = [ `U1 of 'a | `U2 of 'b | `U3 of 'c | `U4 of 'd | `U5 of 'e | `U6 of 'f ]
    66
    7 type direct = [ `Direct of byte ]
    8 type indirect = [ `IR0 | `IR1 ]
    9 type reg = [ `R0 | `R1 | `R2 | `R3 | `R4 | `R5 | `R6 | `R7 ]
     7type direct = [ `DIRECT of byte ]
     8type indirect = [ `INDIRECT of bool ]
     9type reg = [ `REG of bit * bit * bit ]
    1010type acc = [ `A ]
    1111type b = [ `B ]
     
    3636 (* logical operations *)
    3737 | ANL of
    38     (acc * [ reg | direct | indirect ],
     38    (acc * [ reg | direct | indirect | data ],
    3939     direct * [ acc | data ],
    4040     carry * [ bit | nbit]) union3
  • Deliverables/D4.1/physical.mli

    r27 r28  
     1exception FOO2
     2
    13type bit = bool
    24type nibble = bit * bit * bit * bit
    35type byte = nibble * nibble
    4 type byte7 = nibble * bit * bit * bit
     6type byte7 = bit * bit * bit * nibble
    57type word = byte * byte
    6 type word11 = byte * bit * bit * bit
     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 TracChangeset for help on using the changeset viewer.