Changeset 75


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

AJMP implemented.

File:
1 edited

Legend:

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

    r74 r75  
    961961 | ACALL of addr11
    962962 | LCALL of addr16
    963  | AJMP of addr11
    964963*)
     964 | AJMP (`ADDR11 (b1,b2,b3,b)) ->
     965     let status = { status with pc = status.pc ++ 2 } in
     966     let (((p1,p2,p3,p4),(p5,p6,p7,p8)),(_,_)) = status.pc in
     967     let addr = (((p1,p2,p3,p4),(p5,b1,b2,b3)),b) in
     968     let new_pc = word_of_int ((int_of_word status.pc) + (int_of_word addr)) in
     969       { status with pc = new_pc }
    965970 | LJMP (`ADDR16 (lb,hb)) ->
    966971     { status with pc = (lb,hb) }
Note: See TracChangeset for help on using the changeset viewer.