Ignore:
Timestamp:
Sep 21, 2010, 4:43:33 PM (9 years ago)
Author:
mulligan
Message:

More added to ASMInterpret.

File:
1 edited

Legend:

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

    r99 r100  
    1 exception Fetch_exception of string
     1exception CodeTooLarge
    22
    3 type time = int
     3type status
    44
    5 type status = {
    6   code_memory : [ `Eight ] BitVectors.vect Physical.WordMap.t;
    7   low_internal_ram : [ `Eight ] BitVectors.vect Physical.Byte7Map.t;
    8   high_internal_ram : [ `Eight ] BitVectors.vect Physical.Byte7Map.t;
    9   external_ram : [ `Eight ] BitVectors.vect Physical.WordMap.t;
    10   pc : BitVectors.word;
    11   p0 : BitVectors.byte;
    12   sp : BitVectors.byte;
    13   dpl : BitVectors.byte;
    14   dph : BitVectors.byte;
    15   pcon : BitVectors.byte;
    16   tcon : BitVectors.byte;
    17   tmod : BitVectors.byte;
    18   tl0 : BitVectors.byte;
    19   tl1 : BitVectors.byte;
    20   th0 : BitVectors.byte;
    21   th1 : BitVectors.byte;
    22   p1 : BitVectors.byte;
    23   scon : BitVectors.byte;
    24   sbuf : BitVectors.byte;
    25   p2 : BitVectors.byte;
    26   ie : BitVectors.byte;
    27   p3 : BitVectors.byte;
    28   ip : BitVectors.byte;
    29   psw : BitVectors.byte;
    30   acc : BitVectors.byte;
    31   b : BitVectors.byte;
    32   clock : time;
    33   timer0 : BitVectors.word;
    34   timer1 : BitVectors.word;
    35   timer2 : BitVectors.word;
    36   io : time * int -> BitVectors.byte option;
    37 }
     5val assembly: ASM.labelled_instruction list -> BitVectors.byte list
    386
    39 val empty : status
     7val initialize: status
    408
    41 val fetch :
    42   BitVectors.byte Physical.WordMap.t ->
    43   Physical.WordMap.key ->
    44    ASM.instruction * [ `Sixteen ] BitVectors.vect * int
    45 val assembly1 : ASM.instruction -> BitVectors.byte list
     9val load: BitVectors.byte list -> status -> status
     10
     11exception Hold  (* to be raised to stop execution *)
     12
     13(* the callback function is used to observe the execution
     14   trace; it can raise Hold to stop execution. Otherwise
     15   the processor never halts. *)
     16val execute: (status -> unit) -> status -> status
Note: See TracChangeset for help on using the changeset viewer.