Ignore:
Timestamp:
Sep 8, 2010, 6:09:01 PM (10 years ago)
Author:
mulligan
Message:

MOV done.

File:
1 edited

Legend:

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

    r45 r46  
    1111let pretty_byte =
    1212  function (n1, n2) -> pretty_nibble n1 ^ " " ^ pretty_nibble n2
    13 
    14 let pretty_byte7 =
    15   function (b1,b2,b3,n) -> "byte7: " ^ pretty_byte ((false,b1,b2,b3), n)
    1613
    1714let pretty_word =
     
    3027  | ADD (`A, `DIRECT b1) ->
    3128     "ADD A direct (" ^ pretty_byte b1 ^ ")"
     29  | ADD (`A, `INDIRECT i1) ->
     30     "ADD A @Ri (" ^ pretty_bit i1 ^ ")"
     31  | ADD (`A, `DATA b1) ->
     32     "ADD A #data (" ^ pretty_byte b1 ^ ")"
     33  | ADDC (`A, `REG(r1,r2,r3)) ->
     34     "ADDC A Rn (" ^ pretty_bit r1 ^ pretty_bit r2 ^ pretty_bit r3 ^ ")"
     35  | ADDC (`A, `DIRECT b1) ->
     36     "ADDC A direct (" ^ pretty_byte b1 ^ ")"
     37  | ADDC (`A,`INDIRECT i1) ->
     38     "ADDC A @Ri (" ^ pretty_bit i1 ^ ")"
     39  | ADDC (`A,`DATA b1) ->
     40     "ADDC A #data (" ^ pretty_byte b1 ^ ")"
     41  | AJMP (`ADDR11 (a10,a9,a8,b1)) ->
     42     "AJMP addr11 (" ^ pretty_word11 (a10,a9,a8,b1) ^ ")"
     43  | ANL (`U1 (`A, `REG (r1,r2,r3))) ->
     44     "ANL A Rn (" ^ pretty_bit r1 ^ pretty_bit r2 ^ pretty_bit r3 ^ ")"
     45  | ANL (`U1 (`A, `DIRECT b1)) ->
     46     "ANL A direct (" ^ pretty_byte b1 ^ ")"
     47  | ANL (`U1 (`A, `INDIRECT i1)) ->
     48     "ANL A @Ri (" ^ pretty_bit i1 ^ ")"
     49  | ANL (`U1 (`A, `DATA b1)) ->
     50     "ANL A #data (" ^ pretty_byte b1 ^ ")"
     51  | ANL (`U2 (`DIRECT b1,`A)) ->
     52     "ANL direct A (" ^ pretty_byte b1 ^ ")"
     53  | ANL (`U2 (`DIRECT b1,`DATA b2)) ->
     54     "ANL direct #data (" ^ pretty_byte b1 ^ pretty_byte b2 ^ ")"
     55  | ANL (`U3 (`C,`BIT b1)) ->
     56     "ANL C bit (" ^ pretty_byte b1 ^ ")"
     57  | ANL (`U3 (`C,`NBIT b1)) ->
     58     "ANL C /bit (" ^ pretty_byte b1 ^ ")"
    3259(*
    33   | ADD (`A, `INDIRECT i1) ->
    34      [(false,false,true,false),(false,true,true,i1)]
    35   | ADD (`A, `DATA b1) ->
    36      [(false,false,true,false),(false,true,false,false); b1]
    37   | ADDC (`A, `REG(r1,r2,r3)) ->
    38      [(false,false,true,true),(true,r1,r2,r3)]
    39   | ADDC (`A, `DIRECT b1) ->
    40      [(false,false,true,true),(false,true,false,true); b1]
    41   | ADDC (`A,`INDIRECT i1) ->
    42      [(false,false,true,true),(false,true,true,i1)]
    43   | ADDC (`A,`DATA b1) ->
    44      [(false,false,true,true),(false,true,false,false); b1]
    45   | AJMP (`ADDR11 (a10,a9,a8,b1)) ->
    46      [(a10,a9,a8,false),(false,false,false,true)]
    47   | ANL (`U1 (`A, `REG (r1,r2,r3))) ->
    48      [(false,true,false,true),(true,r1,r2,r3)]
    49   | ANL (`U1 (`A, `DIRECT b1)) ->
    50      [(false,true,false,true),(false,true,false,true); b1]
    51   | ANL (`U1 (`A, `INDIRECT i1)) ->
    52      [(false,true,false,true),(false,true,true,i1)]
    53   | ANL (`U1 (`A, `DATA b1)) ->
    54      [(false,true,false,true),(false,true,false,false); b1]
    55   | ANL (`U2 (`DIRECT b1,`A)) ->
    56      [(false,true,false,true),(false,false,true,false); b1]
    57   | ANL (`U2 (`DIRECT b1,`DATA b2)) ->
    58      [(false,true,false,true),(false,false,true,true); b1; b2]
    59   | ANL (`U3 (`C,`BIT b1)) ->
    60      [(true,false,false,false),(false,false,true,false); byte_of_byte7 b1]
    61   | ANL (`U3 (`C,`NBIT b1)) ->
    62     [(true,false,true,true),(false,false,false,false); byte_of_byte7 b1]
    6360  | CJNE (`U1 (`A, `DIRECT b1), `REL b2) ->
    6461    [(true,false,true,true),(false,true,false,true); b1; b2]
Note: See TracChangeset for help on using the changeset viewer.