Changeset 444
- Timestamp:
- 01/13/11 14:19:14 (2 years ago)
- Location:
- Deliverables/D4.1
- Files:
-
- 4 modified
-
ASMInterpret.ml (modified) (1 diff)
-
IntelHex.ml (modified) (2 diffs)
-
IntelHex.mli (modified) (1 diff)
-
Test.ml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Deliverables/D4.1/ASMInterpret.ml
r441 r444 1746 1746 | `PUSH (`DIRECT b) -> 1747 1747 (* DPM: What happens if we overflow? *) 1748 let cry,new_sp = half_add (get_arg_8 status status.sp)(vect_of_int 1 `Eight) in1748 let cry,new_sp = half_add status.sp (vect_of_int 1 `Eight) in 1749 1749 let status = { status with sp = new_sp } in 1750 1750 write_at_sp status b -
Deliverables/D4.1/IntelHex.ml
r443 r444 3 3 open Util;; 4 4 open Parser;; 5 open Printf;; 5 6 6 7 exception WrongFormat of string … … 235 236 processed @ end_buffer 236 237 ;; 238 239 let file_of_intel_hex path fmt = 240 let str_fmt = string_of_intel_hex_format fmt in 241 let channel = open_out path in 242 fprintf channel "%s\n" str_fmt; 243 close_out channel 244 ;; -
Deliverables/D4.1/IntelHex.mli
r443 r444 11 11 12 12 val intel_hex_of_file: string -> intel_hex_format 13 val file_of_intel_hex: string -> intel_hex_format -> unit 13 14 val process_intel_hex: intel_hex_format -> Physical.WordMap.map 14 15 -
Deliverables/D4.1/Test.ml
r429 r444 2 2 open ASMInterpret;; 3 3 open Util;; 4 open IntelHex;; 4 5 open Pretty;; 5 6 … … 7 8 let mem = IntelHex.process_intel_hex hex in 8 9 let status = ASMInterpret.load_mem mem ASMInterpret.initialize in 10 let _ = file_of_intel_hex "hex-output-test.hex" (pack_exported_code_memory 64 65536 status.code_memory) in 9 11 let observe status = 10 12 let pc = status.ASMInterpret.pc in
