Ignore:
Timestamp:
Sep 30, 2010, 6:46:44 PM (10 years ago)
Author:
mulligan
Message:

Changes made today: we now have an emulator that is able to emulate two
small C programs.

File:
1 edited

Legend:

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

    r146 r147  
    88  | `C -> "C"
    99  | `DPTR -> "DPTR"
    10   | `ADDR11 x -> "addr11"
    11   | `ADDR16 x -> "addr16"
    12   | `DATA x -> "data"
    13   | `DATA16 x -> "data16"
    14   | `BIT x -> "bit"
    15   | `NBIT x -> "nbit"
    16   | `REG x -> "reg"
    17   | `REL x -> "rel"
     10  | `ADDR11 x -> hex_string_of_vect x
     11  | `ADDR16 x -> hex_string_of_vect x
     12  | `DATA x -> "#" ^ hex_string_of_vect x
     13  | `DATA16 x -> "#" ^ hex_string_of_vect x
     14  | `BIT x -> "bit " ^ hex_string_of_vect (x: byte)
     15  | `NBIT x -> "nbit " ^ hex_string_of_vect (x: byte)
     16  | `REG (r1, r2, r3) -> "R" ^ string_of_int (int_of_vect (mk_nibble false r1 r2 r3))
     17  | `REL x -> hex_string_of_vect x
    1818  | `A_DPTR -> "@DPTR"
    1919  | `A_PC -> "@PC"
    20   | `DIRECT x -> "direct"
    21   | `EXT_INDIRECT x -> "ext_indirect"
     20  | `DIRECT x -> hex_string_of_vect (x: byte)
     21  | `EXT_INDIRECT x -> "ext_indirect " ^ string_of_bool x
    2222  | `EXT_IND_DPTR -> "ext_indirect_dptr"
    23   | `INDIRECT x -> "indirect"
    24   | `IND_DPTR -> "ind_dptr"
     23  | `INDIRECT x -> if x then "@R0" else "@R1"
     24  | `IND_DPTR -> "@DPTR"
    2525;;
    2626
Note: See TracChangeset for help on using the changeset viewer.