7 type line = [ `P1 of byte
9 | `SerialBuff of [ `Eight of byte
10 | `Nine of BitVectors.bit * byte
14 val string_of_line: line -> string;;
18 (* In: reception time, line of input, new continuation,
19 Out: transmission time, output line, expected duration until reply,
23 [`In of time * line * epsilon * continuation] option *
24 [`Out of (time -> line -> time * continuation) ];;
29 code_memory: WordMap.map; (* can be reduced *)
30 low_internal_ram: Byte7Map.map;
31 high_internal_ram: Byte7Map.map;
32 external_ram: WordMap.map;
57 t2con: byte; (* 8052 only *)
58 rcap2l: byte; (* 8052 only *)
59 rcap2h: byte; (* 8052 only *)
60 tl2: byte; (* 8052 only *)
61 th2: byte; (* 8052 only *)
63 (* Latches for the output lines *)
67 (* Fields for tracking the state of the processor. *)
70 previous_p1_val: bool;
71 previous_p3_val: bool;
73 serial_epsilon_out: epsilon option;
74 serial_epsilon_in: epsilon option;
78 serial_v_in: [`Eight of byte | `Nine of (BitVectors.bit * byte) ] option;
79 serial_v_out: [`Eight of byte | `Nine of (BitVectors.bit * byte) ] option;
81 serial_k_out: continuation option;
84 expected_out_time: [ `None | `Now | `At of time ];
86 (* Timer and clock specific *)
90 timer2: word; (* can be missing *)
99 exit_addr : BitVectors.word;
100 cost_labels : string BitVectors.WordMap.t
103 val string_of_status: status -> string
107 [< ASM.labelled_instruction] ASM.pretty_program -> ASM.program
111 (ASM.instruction list * symbol_table * cost_map) list -> BitVectors.byte list
114 val initialize: status
116 val load_code_memory: BitVectors.byte list -> Physical.WordMap.map
117 val load_mem: Physical.WordMap.map -> status -> status
118 val load: BitVectors.byte list -> status -> status
120 exception Halt (* to be raised to stop execution *)
122 (* the callback function is used to observe the execution
123 trace; it can raise Hold to stop execution. Otherwise
124 the processor never halts. *)
125 val execute: (status -> unit) -> status -> status
127 val fetch: Physical.WordMap.map -> word -> ASM.instruction * word * int
129 val load_program : ASM.program -> status
130 val interpret : bool -> ASM.program -> AST.trace
132 val size_of_instrs : ASM.labelled_instruction list -> int