Ignore:
Timestamp:
Oct 19, 2010, 10:40:47 AM (10 years ago)
Author:
mulligan
Message:

Added printout of processor status when we enter the infinite SJMP loop
at the end. Need to add printout of register status, though. Every
other important SFR, etc. is already implemented.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D4.1/test.ml

    r150 r195  
    11open BitVectors;;
     2open ASMInterpret;;
    23open Util;;
    34open Pretty;;
     
    910 let pc = status.ASMInterpret.pc in
    1011 let instr,_,_ = ASMInterpret.fetch status.ASMInterpret.code_memory pc in
    11    prerr_string (BitVectors.hex_string_of_vect pc) ;
    12    prerr_endline (": " ^ pp_instruction instr)
     12   let _ = prerr_string (BitVectors.hex_string_of_vect pc) in
     13   let _ = prerr_endline (": " ^ pp_instruction instr) in
     14     match instr with
     15       `SJMP (`REL b) ->
     16          if int_of_vect b = 254 then
     17            prerr_endline <*> string_of_status $ status
     18          else
     19            ()
     20     | _ -> ()
    1321in
    1422(* DPM: for debugging! *)
Note: See TracChangeset for help on using the changeset viewer.