source: Deliverables/D4.1/ @ 142

Last change on this file since 142 was 142, checked in by sacerdot, 10 years ago

Rough implementation of direct (i.e. no BIT) SFR access.
Note: I/O is not handled properly. Thus the current implementation only
makes sense for real registers like SP, PSW, etc.

File size: 442 bytes
[138]1let hex = IntelHex.intel_hex_of_file Sys.argv.(1) in
2let mem = IntelHex.process_intel_hex hex in
3let status = ASMInterpret.load_mem mem ASMInterpret.initialize in
4let observe status =
5 let pc = status.ASMInterpret.pc in
6 let instr,_,_ = ASMInterpret.fetch status.ASMInterpret.code_memory pc in
[142]7  prerr_string (BitVectors.hex_string_of_vect pc) ;
8  prerr_endline (": " ^ Pretty.pp_instruction instr)
10 ASMInterpret.execute observe status
Note: See TracBrowser for help on using the repository browser.