Ignore:
Timestamp:
Oct 19, 2010, 3:29:52 PM (9 years ago)
Author:
mulligan
Message:

Fixes to debug code to make serial output more clear. CJNE/JNZ is not a
bug with emulator, but with mcu's `normalise hex file' function. Do not
use!

File:
1 edited

Legend:

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

    r198 r199  
    1818let string_of_line =
    1919  function
    20     `P1 b -> "P1: " ^ hex_string_of_vect b
    21   | `P3 b -> "P2: " ^ hex_string_of_vect b
    22   | `SerialBuff (`Eight b) -> "Serial 8bit: " ^ string_of_vect b
    23   | `SerialBuff (`Nine (b, b')) -> "Serial 9bit: " ^
    24        let i = int_of_vect b' in
    25          if b then
    26            string_of_int (128 + i)
    27          else
    28            string_of_int i
     20    `P1 b ->
     21       "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n" ^
     22       "P1 OUTPUT: " ^ hex_string_of_vect b ^ "\n" ^
     23       "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n"
     24  | `P3 b ->
     25       "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n" ^
     26       "P2 OUTPUT: " ^ hex_string_of_vect b ^ "\n" ^
     27       "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n"
     28  | `SerialBuff (`Eight b) ->
     29       "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n" ^
     30       "SERIAL 8b OUTPUT: " ^ string_of_vect b ^ "\n" ^
     31       "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n"
     32  | `SerialBuff (`Nine (b, b')) ->
     33       "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n" ^
     34       "SERIAL 9b OUTPUT: " ^
     35          (let i = int_of_vect b' in
     36            if b then
     37              string_of_int (128 + i)
     38          else
     39             string_of_int i) ^
     40       "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n"
    2941
    3042(* In:  reception time, line of input, new continuation,
Note: See TracChangeset for help on using the changeset viewer.