Ignore:
Timestamp:
Sep 14, 2010, 12:33:19 PM (9 years ago)
Author:
mulligan
Message:

XCHD implemented.

File:
1 edited

Legend:

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

    r69 r70  
    873873     let new_status = set_arg8 status old_acc arg in
    874874       { new_status with acc = old_arg }
    875 (*
    876  | XCHD of acc * indirect
    877 *)
     875 | XCHD(`A, (`INDIRECT i)) ->
     876     let ((a1,a2,a3,a4),(a5,a6,a7,a8)) = fetch_arg8 status `A in
     877     let ((i1,i2,i3,i4),(i5,i6,i7,i8)) = fetch_arg8 status (`INDIRECT i) in
     878     let new_acc_val = ((a1,a2,a3,a4),(i5,i6,i7,i8)) in
     879     let new_reg_val = ((i1,i2,i3,i4),(a5,a6,a7,a8)) in
     880     let status = set_arg8 status new_acc_val `A in
     881     let status = set_arg8 status new_reg_val (`INDIRECT i) in
     882       status
    878883 (* program branching *)
    879884 | JC (`REL rel) ->
Note: See TracChangeset for help on using the changeset viewer.