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

POP implemented ... at last.

File:
1 edited

Legend:

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

    r67 r68  
    780780      let status = { status with acc = q ; b = r } in
    781781       set_flags status false None false
    782 
    783782(*
     783 | ANL (`U1 (`A, ag)) ->
     784     let acc_val = fetch_arg8 status `A in
     785     let ag_val = fetch_arg8 status ag in
    784786 | DA  of acc
    785787
     
    795797 | XRL of
    796798    (acc * [ reg | direct | indirect ],
    797      direct * [ acc | data ]) union2
    798 *)
    799  | CLR `A ->
    800      set_arg8 status ((false,false,false,false),(false,false,false,false)) `A
     799     direct * [ acc | data ]) union2 *)
     800  | CLR `A -> set_arg8 status
     801     ((false,false,false,false),(false,false,false,false)) `A
    801802 | CLR `C ->
    802803     set_arg1 status false `C
     
    857858*)
    858859 | SETB a -> set_arg1 status true a
    859 (*
    860  | PUSH of direct
    861  | POP of direct
    862 *)
    863 
     860(* | PUSH (`DIRECT b) ->*)
     861 | POP (`DIRECT b) ->
     862     let contents = Byte7Map.find (byte7_of_byte status.sp) status.low_internal_ram in
     863     let status = { status with pc = status.pc ++ (-1) } in
     864     let status = set_arg8 status contents (`DIRECT b) in
     865       status
    864866 | XCH(`A, arg) ->
    865867     let old_arg = fetch_arg8 status arg in
Note: See TracChangeset for help on using the changeset viewer.