Changeset 140 for Deliverables/D4.1
- Timestamp:
- Sep 29, 2010, 12:51:05 PM (10 years ago)
- Location:
- Deliverables/D4.1
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Deliverables/D4.1/BitVectors.ml
r138 r140 89 89 he::tl 90 90 91 (* CSC: can overflow!!! *) 91 92 let int_of_vect v = 92 93 let rec aux pow v = … … 140 141 141 142 let zero size = pad (size_lookup size) [] 143 144 (* CSC: can overflow!!! *) 145 let hex_string_of_vect v = Printf.sprintf "%0 2X" (int_of_vect v);; -
Deliverables/D4.1/BitVectors.mli
r98 r140 29 29 val int_of_vect: 'a vect -> int 30 30 val vect_of_int: int -> ([< sizes] as 'a) -> 'a vect 31 val string_of_bit: bit -> string 31 32 val string_of_vect: 'a vect -> string 32 val string_of_bit: bit -> string 33 val hex_string_of_vect: 'a vect -> string 34 33 35 34 36 val (-&-): 'a vect -> 'a vect -> 'a vect -
Deliverables/D4.1/IntelHex.ml
r139 r140 33 33 | 'C' -> 12 | 'D' -> 13 | 'E' -> 14 34 34 | 'F' -> 15 | _ -> assert false 35 36 let hex_string_of_vect v = Printf.sprintf "%0 2X" (int_of_vect v);;37 35 38 36 let intel_hex_entry_type_of_int = -
Deliverables/D4.1/IntelHex.mli
r139 r140 3 3 open Parser;; 4 4 5 type intel_hex_entry_type = 6 Data 7 | End 8 | ExtendedSeg 9 | ExtendedLinear 10 ;; 5 type intel_hex_format 11 6 12 type intel_hex_entry = 13 { 14 record_length: byte; 15 record_addr: word; 16 record_type: intel_hex_entry_type; 17 data_field: byte list; 18 data_checksum: byte 19 } 20 ;; 21 22 type intel_hex_format = intel_hex_entry list;; 23 24 val string_of_intel_hex_format: intel_hex_format -> string;; 25 val prs_intel_hex_format: intel_hex_format parser;; 26 27 val hex_string_of_vect: 'a vect -> string;; 7 val string_of_intel_hex_format: intel_hex_format -> string 8 val prs_intel_hex_format: intel_hex_format parser 28 9 29 10 exception WrongFormat of string … … 31 12 val intel_hex_of_file: string -> intel_hex_format 32 13 val process_intel_hex: intel_hex_format -> Physical.WordMap.map 33 34 val checksum_valid: intel_hex_entry -> bool;; -
Deliverables/D4.1/test.ml
r138 r140 6 6 let opcode = Physical.WordMap.find pc status.ASMInterpret.code_memory in 7 7 let instr,_,_ = ASMInterpret.fetch status.ASMInterpret.code_memory pc in 8 prerr_string ("pc = " ^ IntelHex.hex_string_of_vect pc) ;9 prerr_string (" : " ^ IntelHex.hex_string_of_vect opcode);8 prerr_string ("pc = " ^ BitVectors.hex_string_of_vect pc) ; 9 prerr_string (" : " ^ BitVectors.hex_string_of_vect opcode); 10 10 prerr_endline (" = " ^ Pretty.pp_instruction instr) 11 11 in
Note: See TracChangeset
for help on using the changeset viewer.