Changeset 199


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!

Location:
Deliverables/D4.1
Files:
2 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,
  • Deliverables/D4.1/Test.hex

    r195 r199  
    1 :100000000200081200B580FE7581091200EEE5823B
    2 :1000100060030200037900E94400601B7A0090004D
    3 :10002000F2780075A000E493F2A308B8000205A0DE
    4 :10003000D9F4DAF275A0FFE478FFF6D8FD7800E88D
    5 :100040004400600A790075A000E4F309D8FC780048
    6 :10005000E84400600C7900900000E4F0A3D8FCD9DB
    7 :10006000FA020003AA82AB83EA4B700490000122DB
    8 :10007000BA0107BB000490000122EA24FFF582EBDD
    9 :1000800034FFF583C002C0031200648582088583B3
    10 :1000900009D003D0028A828B830200D14398404367
    11 :1000A0008920758DFD43878022AA82AB83C2998AFD
    12 :1000B000993099FD2212009C90000A1200A990002C
    13 :1000C000141200A99000031200641200A990000508
    14 :1000D00022E5828508F0A4C582C0F08509F0A4D08D
    15 :1000E000F025F0C5838508F0A42583F58322758269
    16 :0200F0000022EC
     1:03000000020008F3
     2:0300610002000397
     3:050003001200BA80FEAE
     4:09006400AA82AB83EA4BB401004F
     5:0B006D00E433FCE4BA0104BB00010412
     6:070078004C6004900001221E
     7:0E007F00EA24FFF582EB34FFF583C002C003D4
     8:08008D001200648582088583DE
     9:0C00950009D003D0028A828B830200D6BF
     10:0D00A100439840438920758DFD43878022E0
     11:0800AE00AA82AB83C2998A9972
     12:0400B6003099FD225E
     13:0D00BA001200A190000A1200AE9000141276
     14:0900C70000AE9000031200641267
     15:0600D00000AE90000522C5
     16:06003700E478FFF6D8FD9D
     17:080015007900E94400601B7A48
     18:05001D00009000F778DF
     19:030022000075A0C6
     20:0A00250000E493F2A308B8000205FE
     21:08002F00A0D9F4DAF275A0FF7C
     22:0B00D600E5828508F0A4C582C0F0851B
     23:0A00E10009F0A4D0F025F0C58385D6
     24:0800EB0008F0A42583F583222F
     25:08003D007800E84400600A7934
     26:030045000075A0A3
     27:0600480000E4F309D8FCFE
     28:08004E007800E84400600C7921
     29:0B00560000900000E4F0A3D8FCD9FAF1
     30:03000800758109F6
     31:0A000B001200F3E582600302000317
     32:0400F30075820022F0
    1733:00000001FF
Note: See TracChangeset for help on using the changeset viewer.