Changeset 102


Ignore:
Timestamp:
Sep 22, 2010, 12:34:12 PM (9 years ago)
Author:
mulligan
Message:

Implemented INC DPTR. Type error related to polymorphic variants
though.

File:
1 edited

Legend:

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

    r101 r102  
    866866        in
    867867          set_flags (set_arg8 status v `A) c (Some ac) ov
     868   | `SUBB (`A,d1) ->
     869        let v,c,ac,ov =
     870          subb8_with_c (get_arg_8 status `A) (get_arg_8 status d1) (get_cy_flag status)
     871        in
     872          set_flags (set_arg8 status v `A) c (Some ac) ov
     873   | `INC `DPTR ->
     874       let cry, low_order_byte = half_add status.dpl (vect_of_int 1 `Eight) in
     875       let cry, high_order_byte = full_add status.dph (vect_of_int 0 `Eight) cry in
     876         { status with dpl = low_order_byte; dph = high_order_byte }
     877   | `INC ((`A | `REG _ | `DIRECT _ | `INDIRECT _) as d) ->
     878       let b = get_arg_8 status d in
     879       let cry, res = half_add b (vect_of_int 0 `Eight) in
     880         set_arg8 status res d
    868881(*
    869    | SUBB (`A,d1) ->
    870       let v,c,ac,ov =
    871        subb8_with_c (get_arg_8 status `A) (get_arg_8 status d1) (carr status)
    872       in
    873        set_flags (set_arg8 status v `A) c (Some ac) ov
    874    | INC `DPTR ->
    875        let dpl_int_val = int_of_byte status.dpl in
    876        let dph_int_val = int_of_byte status.dph in
    877        let inc_dpl = dpl_int_val + 1 in
    878          if inc_dpl > 255 then
    879            let inc_dpl = 0 in
    880            (* DPM: finish *)
    881              assert false
    882          else
    883            (* DPM: finish *)
    884            assert false
    885    | INC ((`A | `REG _ | `DIRECT _ | `INDIRECT _) as d) ->
    886       let b = get_arg_8 status d in
    887       let res = inc b in
    888        set_arg8 status res d
    889882   | DEC d ->
    890883      let b = get_arg_8 status d in
Note: See TracChangeset for help on using the changeset viewer.