Changeset 123 for Deliverables/D4.1
- Timestamp:
- Sep 23, 2010, 5:36:45 PM (10 years ago)
- Location:
- Deliverables/D4.1
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Deliverables/D4.1/ASMInterpret.ml
r121 r123 3 3 open ASM;; 4 4 open Pretty;; 5 open IntelHex;; 5 6 6 7 exception Fetch_exception of string;; -
Deliverables/D4.1/IntelHex.ml
r122 r123 16 16 };; 17 17 18 let intel_hex_of_instruction 18 let hex_string_of_vect x = "00" 19 20 let string_of_intel_hex_entry entry = 21 let record_length_l, record_length_r = entry.record_length in 22 let data_checksum_l, data_checksum_r = entry.data_checksum in 23 let length_string = hex_string_of_vect record_length_l ^ 24 hex_string_of_vect record_length_l in 25 let checksum_string = hex_string_of_vect data_checksum_l ^ 26 hex_string_of_vect data_checksum_r in 27 let type_string = 28 match entry.record_type with 29 Data -> "00" 30 | End -> "01" 31 | ExtendedSeg -> "02" 32 | ExtendedLinear -> "04" in 33 let data_string = String.concat "" (List.map hex_string_of_vect entry.data_field) in 34 ":" ^ length_string ^ type_string ^ data_string ^ checksum_string -
Deliverables/D4.1/IntelHex.mli
r122 r123 17 17 18 18 (* val intel_hex_of_instructions: instruction list -> intel_hex_entry list *) 19 val string_of_intel_hex_entry: intel_hex_entry -> string
Note: See TracChangeset
for help on using the changeset viewer.