Changeset 198


Ignore:
Timestamp:
Oct 19, 2010, 2:20:10 PM (9 years ago)
Author:
mulligan
Message:

Added more info to status printout. Found weird bug in emulator: cjne
is sometimes interpreted as a jnz instruction.

Location:
Deliverables/D4.1
Files:
2 edited

Legend:

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

    r196 r198  
    262262  let scn_str = (string_of_int <*> int_of_vect $ status.scon) ^ " (" ^ string_of_vect status.scon ^ ")" in
    263263  let sbf_str = (string_of_int <*> int_of_vect $ status.sbuf) ^ " (" ^ string_of_vect status.sbuf ^ ")" in
     264  let tcn_str = (string_of_int <*> int_of_vect $ status.tcon) ^ " (" ^ string_of_vect status.tcon ^ ")" in
     265  let tmd_str = (string_of_int <*> int_of_vect $ status.tmod) ^ " (" ^ string_of_vect status.tmod ^ ")" in
    264266  let r0_str  = (string_of_int <*> int_of_vect $ get_register status (false, false, false)) ^ " (" ^ (string_of_vect $ get_register status (false, false, false)) ^ ")" in
    265267  let r1_str  = (string_of_int <*> int_of_vect $ get_register status (false, false, true)) ^ " (" ^ (string_of_vect $ get_register status (false, false, true)) ^ ")" in
     
    292294    "   SCON: " ^ scn_str ^ "\n"                          ^
    293295    "   SBUF: " ^ sbf_str ^ "\n"                          ^
     296    "   TMOD: " ^ tmd_str ^ "\n"                          ^
     297    "   TCON: " ^ tcn_str ^ "\n"                          ^
    294298    "   Registers:                                    \n" ^
    295299    "    R0 : " ^ r0_str  ^ "\n"                          ^
     
    302306    "    R7 : " ^ r7_str  ^ "\n"                          ^
    303307    "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n"
     308
    304309(* timings taken from SIEMENS *)
    305310
  • Deliverables/D4.1/test.ml

    r196 r198  
    1212   let _ = prerr_string (BitVectors.hex_string_of_vect pc) in
    1313   let _ = prerr_endline (": " ^ pp_instruction instr) in
    14     match instr with
     14    (* match instr with
    1515       `SJMP (`REL b) ->
    16           if int_of_vect b = 254 || int_of_vect b = 0 then
     16          if int_of_vect b = 254 || int_of_vect b = 0 then*)
    1717            prerr_endline <*> string_of_status $ status
    18           else
     18(*          else
    1919            ()
    20      | _ -> ()
     20     | _ -> ()*)
    2121in
    2222(* DPM: for debugging! *)
Note: See TracChangeset for help on using the changeset viewer.