Ignore:
Timestamp:
Sep 10, 2010, 11:36:40 AM (9 years ago)
Author:
mulligan
Message:

All RR* and RL* instructions implemented.

File:
1 edited

Legend:

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

    r52 r53  
    802802     let (b1,b2,b3,b4),(b5,b6,b7,b8) = status.acc in
    803803       { status with acc = (b2,b3,b4,b5),(b6,b7,b8,b1) }
    804 (*
    805  | RLC of acc
    806 *)
     804 | RLC `A ->
     805     let old_carry = carr status in
     806     let (b1,b2,b3,b4),(b5,b6,b7,b8) = status.acc in
     807     let new_status = set_arg1 status b1 `C in
     808       { new_status with acc = (b2,b3,b4,b5),(b6,b7,b8,old_carry) }
    807809 | RR `A ->
    808810     let (b1,b2,b3,b4),(b5,b6,b7,b8) = status.acc in
    809811       { status with acc = (b8,b1,b2,b3),(b4,b5,b6,b7) }
    810 (*
    811  | RRC of acc
    812 *)
     812 | RRC `A ->
     813     let old_carry = carr status in
     814     let (b1,b2,b3,b4),(b5,b6,b7,b8) = status.acc in
     815     let new_status = set_arg1 status b8 `C in
     816       { new_status with acc = (old_carry,b1,b2,b3),(b4,b5,b6,b7) }
    813817 | SWAP `A ->
    814818     let (acc_n_1, acc_n_2) = status.acc in
     
    843847 | PUSH of direct
    844848 | POP of direct
    845  | XCH of acc * [ reg | direct | indirect ]
     849*)
     850
     851 | XCH(`A, arg) ->
     852     let old_arg = fetch_arg8 status arg in
     853     let old_acc = status.acc in
     854     let new_status = set_arg8 status old_acc arg in
     855       { status with acc = old_arg }
     856(*
    846857 | XCHD of acc * indirect
    847858
Note: See TracChangeset for help on using the changeset viewer.