Ignore:
Timestamp:
Sep 13, 2010, 4:15:00 PM (9 years ago)
Author:
mulligan
Message:

DJNZ instruction finished.

File:
1 edited

Legend:

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

    r62 r67  
    942942       else
    943943         { status with psw = (new_carry, b2, b3, b4),n2 }
    944 (*
    945  | DJNZ of [ reg | direct ] * rel
    946 *)
     944 | DJNZ (ag, (`REL rel)) ->
     945     let ag_val = fetch_arg8 status ag in
     946     let new_ag_val = byte_of_int ((int_of_byte ag_val) - 1) in
     947       if ag_val <> ((false,false,false,false),(false,false,false,false)) then
     948         { status with pc = status.pc ++ (int_of_byte rel) }
     949       else
     950         status
    947951 | NOP -> status
    948952;;
Note: See TracChangeset for help on using the changeset viewer.