Changeset 74


Ignore:
Timestamp:
Sep 14, 2010, 3:46:22 PM (9 years ago)
Author:
mulligan
Message:

RETI instruction implemented.

File:
1 edited

Legend:

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

    r73 r74  
    950950     let status = { status with sp = new_sp } in
    951951       { status with pc = (high_bits, low_bits) }
     952 | RETI ->
     953     let high_bits = (Byte7Map.find (byte7_of_byte status.sp) status.low_internal_ram) in
     954     let new_sp = byte_of_int ((int_of_byte status.sp) - 1) in
     955     let status = { status with sp = new_sp } in
     956     let low_bits = (Byte7Map.find (byte7_of_byte status.sp) status.low_internal_ram) in
     957     let new_sp = byte_of_int ((int_of_byte status.sp) - 1) in
     958     let status = { status with sp = new_sp } in
     959       { status with pc = (high_bits, low_bits) }
    952960(*
    953961 | ACALL of addr11
    954962 | LCALL of addr16
    955  | RET
    956  | RETI
    957963 | AJMP of addr11
    958964*)
Note: See TracChangeset for help on using the changeset viewer.