Ignore:
Timestamp:
Sep 20, 2010, 5:40:16 PM (10 years ago)
Author:
mulligan
Message:

Fixed physical interface file. Refactoring ASMInterface.

File:
1 edited

Legend:

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

    r91 r92  
    1919    | _ -> raise Byte7_conversion
    2020
    21 let add8_with_c b1 b2 c =
     21let add8_with_c (b1 : [`Eight] vect) (b2 : [`Eight] vect) (c : bit) =
    2222 let n1 = int_of_vect b1 in
    2323 let n2 = int_of_vect b2 in
    24  let c = int_of_vect c in
     24 let c = int_of_bit c in
    2525 let res = n1 + n2 + c in
    2626 let ac = n1 mod 16 + n2 mod 16 + c >= 16 in
     
    2828 let res,c = res mod 256, res >= 256 in
    2929 let ov = c <> c6 in
    30    vect_of_int res,c,ac,ov
     30   vect_of_int res `Eight,c,ac,ov
    3131;;
    3232
     
    5353let inc b =
    5454 let res = int_of_vect b + 1 in
    55   if res > 255 then vect_of_int 0 `Eight
    56   else vect_of_int res `Eight
     55  if res > 255 then (vect_of_int 0 `Eight : byte)
     56  else (vect_of_int res `Eight : byte)
    5757;;
    5858
Note: See TracChangeset for help on using the changeset viewer.